[Pkg-virtualbox-commits] [virtualbox] 03/03: Patch refresh, upload to unstable
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Mon Apr 18 22:29:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to branch master
in repository virtualbox.
commit eb430dec62bea127c42f38c20bedc10910b0a8e0
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Tue Apr 19 00:26:46 2016 +0200
Patch refresh, upload to unstable
---
debian/changelog | 5 +-
debian/patches/18-system-xorg.patch | 4 +-
debian/patches/27-hide-host-cache-warning.patch | 2 +-
debian/patches/28-no-selinux-fedora.patch | 2 +-
debian/patches/29-fix-ftbfs-as-needed.patch | 2 +-
debian/patches/36-fix-vnc-version-string.patch | 2 +-
debian/patches/fix-graphics-backport.patch | 50017 ----------------------
debian/patches/series | 1 -
8 files changed, 10 insertions(+), 50025 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7fb2121..0ea2dfa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
-virtualbox (5.0.16-dfsg-4) UNRELEASED; urgency=medium
+virtualbox (5.0.18-dfsg-1) unstable; urgency=medium
+ * New upstream release.
+ - drop fix-grapphics.patch: upstream
* Fix insecure VCS fields.
+ * Upload to unstable.
-- Gianfranco Costamagna <locutusofborg at debian.org> Thu, 14 Apr 2016 18:20:22 +0200
diff --git a/debian/patches/18-system-xorg.patch b/debian/patches/18-system-xorg.patch
index 24ec10c..f17c7ff 100644
--- a/debian/patches/18-system-xorg.patch
+++ b/debian/patches/18-system-xorg.patch
@@ -18,7 +18,7 @@ Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
-@@ -67,18 +67,12 @@
+@@ -68,18 +68,12 @@
VBoxOGL_INCS = .
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_INCS += \
@@ -42,7 +42,7 @@ Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
endif
-@@ -213,10 +207,10 @@
+@@ -214,10 +208,10 @@
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_LIBS += \
diff --git a/debian/patches/27-hide-host-cache-warning.patch b/debian/patches/27-hide-host-cache-warning.patch
index ec2e683..3262028 100644
--- a/debian/patches/27-hide-host-cache-warning.patch
+++ b/debian/patches/27-hide-host-cache-warning.patch
@@ -6,7 +6,7 @@ Index: virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- virtualbox.orig/src/VBox/Main/src-client/ConsoleImpl2.cpp 2015-04-02 15:46:54.415740583 +0200
+++ virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp 2015-04-02 15:46:54.411740580 +0200
-@@ -3843,34 +3843,12 @@
+@@ -3861,34 +3861,12 @@
if ( enmFsTypeFile == RTFSTYPE_EXT4
|| enmFsTypeFile == RTFSTYPE_XFS)
{
diff --git a/debian/patches/28-no-selinux-fedora.patch b/debian/patches/28-no-selinux-fedora.patch
index 848ef2c..632fdaa 100644
--- a/debian/patches/28-no-selinux-fedora.patch
+++ b/debian/patches/28-no-selinux-fedora.patch
@@ -3,7 +3,7 @@ Author: Felix Geyer <fgeyer at debian.org>
--- a/src/VBox/Additions/linux/Makefile.kmk
+++ b/src/VBox/Additions/linux/Makefile.kmk
-@@ -344,9 +344,7 @@ lnx_add_inst-noexec_INST = $(VBOX_LN
+@@ -345,9 +345,7 @@ lnx_add_inst-noexec_INST = $(VBOX_LN
lnx_add_inst-noexec_SOURCES = \
$(VBOX_REL_X11_ADD_INST)vboxclient.desktop \
$(VBOX_REL_X11_ADD_INST)vboxvideo.ids \
diff --git a/debian/patches/29-fix-ftbfs-as-needed.patch b/debian/patches/29-fix-ftbfs-as-needed.patch
index f0a6e2e..ac22dd8 100644
--- a/debian/patches/29-fix-ftbfs-as-needed.patch
+++ b/debian/patches/29-fix-ftbfs-as-needed.patch
@@ -5,7 +5,7 @@ Index: virtualbox/Config.kmk
===================================================================
--- virtualbox.orig/Config.kmk 2015-04-02 15:46:59.611743003 +0200
+++ virtualbox/Config.kmk 2015-04-02 15:46:59.611743003 +0200
-@@ -5530,7 +5530,7 @@
+@@ -5531,7 +5531,7 @@
TEMPLATE_VBoxBldProg_LDFLAGS.amd64 = -m64
TEMPLATE_VBoxBldProg_LDFLAGS.sparc64 = -m64
ifeq ($(KBUILD_HOST),linux)
diff --git a/debian/patches/36-fix-vnc-version-string.patch b/debian/patches/36-fix-vnc-version-string.patch
index e01f337..b5c38dc 100644
--- a/debian/patches/36-fix-vnc-version-string.patch
+++ b/debian/patches/36-fix-vnc-version-string.patch
@@ -3,7 +3,7 @@ Index: virtualbox/Config.kmk
===================================================================
--- virtualbox.orig/Config.kmk 2015-04-02 15:47:04.439745251 +0200
+++ virtualbox/Config.kmk 2015-04-02 15:47:04.435745250 +0200
-@@ -2627,6 +2627,7 @@
+@@ -2628,6 +2628,7 @@
-e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
-e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
-e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
diff --git a/debian/patches/fix-graphics-backport.patch b/debian/patches/fix-graphics-backport.patch
deleted file mode 100644
index fb39761..0000000
--- a/debian/patches/fix-graphics-backport.patch
+++ /dev/null
@@ -1,50017 +0,0 @@
-Description: this is actually 5.0.17 revision 106564.
-
-Isolating the single fixes is too difficult.
---- virtualbox-5.0.16-dfsg.orig/Config.kmk
-+++ virtualbox-5.0.16-dfsg/Config.kmk
-@@ -208,7 +208,7 @@ VBOX_VERSION_MINOR = 0
- # This is the current build number. It should be increased every time we publish a
- # new build. The define is available in every source file. Only even build numbers
- # will be published, odd numbers are set during development.
--VBOX_VERSION_BUILD = 16
-+VBOX_VERSION_BUILD = 17
- # The raw version string. This *must not* contain any other information/fields than
- # major, minor and build revision (as it is now) -- also will be used for host/guest version
- # comparison.
-@@ -2271,6 +2271,7 @@ ifdef VBOX_WITH_CROGL
- VBOX_LIB_OGL_CRUTIL_X86 = $(PATH_OBJ)/VBoxOGLcrutil-x86/VBoxOGLcrutil-x86$(VBOX_SUFF_LIB)
- endif
- else
-+ VBOX_LIB_OGL = $(VBOX_PATH_ADDITIONS)/VBoxOGL$(VBOX_SUFF_DLL)
- VBOX_LIB_OGL_CRUTIL = $(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
- VBOX_LIB_OGL_HOSTCRUTIL = $(PATH_STAGE_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
- endif
-@@ -6234,7 +6235,7 @@ endif
- SVN ?= svn$(HOSTSUFF_EXE)
- VBOX_SVN_REV_KMK = $(PATH_OUT)/revision.kmk
- ifndef VBOX_SVN_REV
-- VBOX_SVN_REV_FALLBACK := $(patsubst %:,, $Rev: 105871 $ )
-+ VBOX_SVN_REV_FALLBACK := $(patsubst %:,, $Rev: 106382 $ )
- VBOX_SVN_DEP := $(firstword $(wildcard $(PATH_ROOT)/.svn/wc.db $(abspath $(PATH_ROOT)/../.svn/wc.db) $(abspath $(PATH_ROOT)/../../.svn/wc.db) $(PATH_ROOT)/.svn/entries))
- ifeq ($(which $(SVN)),)
- VBOX_SVN_DEP :=
-@@ -6386,4 +6387,3 @@ st stat status:
- quick:
- $(MAKE) VBOX_QUICK=1
-
--
---- virtualbox-5.0.16-dfsg.orig/configure
-+++ virtualbox-5.0.16-dfsg/configure
-@@ -431,7 +431,8 @@ check_gcc()
- -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
- -o \( $cc_maj -eq 4 -a $cc_min -gt 9 \) \
- -o \( $cc_maj -eq 5 -a $cc_min -gt 3 \) \
-- -o $cc_maj -gt 5 ]; then
-+ -o \( $cc_maj -eq 6 -a $cc_min -gt 0 \) \
-+ -o $cc_maj -gt 6 ]; then
- log_failure "gcc version $cc_maj.$cc_min found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<10 or gcc 5.3"
- fail really
- else
---- virtualbox-5.0.16-dfsg.orig/doc/manual/en_US/user_Installation.xml
-+++ virtualbox-5.0.16-dfsg/doc/manual/en_US/user_Installation.xml
-@@ -472,20 +472,14 @@
-
- <para>First, download the appropriate package for your distribution.
- The following examples assume that you are installing to a 32-bit
-- Ubuntu Raring system. Use <computeroutput>dpkg</computeroutput> to
-+ Ubuntu Wily system. Use <computeroutput>dpkg</computeroutput> to
- install the Debian package:</para>
-
-- <screen>sudo dpkg -i virtualbox-5.0_ at VBOX_VERSION_STRING@_Ubuntu_raring_i386.deb</screen>
-+ <screen>sudo dpkg -i virtualbox-5.0_ at VBOX_VERSION_STRING@_Ubuntu_wily_i386.deb</screen>
-
-- <para>You will be asked to accept the VirtualBox Personal Use and
-- Evaluation License. Unless you answer "yes" here, the installation
-- will be aborted.</para>
--
-- <para>The installer will also search for a VirtualBox kernel module
-- suitable for your kernel. The package includes pre-compiled modules
-- for the most common kernel configurations. If no suitable kernel
-- module is found, the installation script tries to build a module
-- itself. If the build process is not successful you will be shown a
-+ <para>The installer will also try to build kernel modules suitable for
-+ the current running kernel. If the build process is not successful you
-+ will be shown a
- warning and the package will be left unconfigured. Please have a look
- at <computeroutput>/var/log/vbox-install.log</computeroutput> to find
- out why the compilation failed. You may have to install the
---- virtualbox-5.0.16-dfsg.orig/doc/manual/en_US/user_VBoxManage.xml
-+++ virtualbox-5.0.16-dfsg/doc/manual/en_US/user_VBoxManage.xml
-@@ -2025,6 +2025,18 @@ Virtual system 0:
- when a snapshot is restored, the contents of the virtual machine's virtual
- hard disks can be quickly reset by simply dropping the pre-existing
- differencing files.</para>
-+
-+ <screen>VBoxManage snapshot <uuid|vmname>
-+ take <name> [--description <desc>] [--live]
-+ [--uniquename Number,Timestamp,Space,Force] |
-+ delete <uuid|snapname> |
-+ restore <uuid|snapname> |
-+ restorecurrent |
-+ edit <uuid|snapname>|--current
-+ [--name <name>]
-+ [--description <desc>] |
-+ list [--details|--machinereadable]
-+ showvminfo <uuid|snapname></screen>
-
- <para>The <computeroutput>take</computeroutput> operation takes a snapshot
- of the current state of the virtual machine. You must supply a name for
-@@ -2057,6 +2069,9 @@ Virtual system 0:
- <para>With the <computeroutput>edit</computeroutput> operation, you can
- change the name or description of an existing snapshot.</para>
-
-+ <para>The <computeroutput>list</computeroutput> operation shows all
-+ snapshots of a virtual machine.</para>
-+
- <para>With the <computeroutput>showvminfo</computeroutput> operation, you
- can view the virtual machine settings that were stored with an existing
- snapshot.</para>
-@@ -2076,6 +2091,9 @@ Virtual system 0:
- a registry.</para>
- </footnote></para>
-
-+ <screen>VBoxManage closemedium [disk|dvd|floppy] <uuid|filename>
-+ [--delete]</screen>
-+
- <para>Optionally, you can request that the image be deleted. You will get
- appropriate diagnostics that the deletion failed, however the image will
- become unregistered in any case.</para>
-@@ -2094,9 +2112,10 @@ Virtual system 0:
- [--port <number>]
- [--device <number>]
- [--type dvddrive|hdd|fdd]
-- [--medium none|emptydrive|
-+ [--medium none|emptydrive|additions|
- <uuid>|<filename>|host:<drive>|iscsi]
-- [--mtype normal|writethrough|immutable|shareable]
-+ [--mtype normal|writethrough|immutable|shareable
-+ readonly|multiattach]
- [--comment <text>]
- [--setuuid <uuid>]
- [--setparentuuid <uuid>]
-@@ -2104,6 +2123,7 @@ Virtual system 0:
- [--tempeject on|off]
- [--nonrotational on|off]
- [--discard on|off]
-+ [--hotpluggable on|off]
- [--bandwidthgroup name|none]
- [--forceunmount]
- [--server <name>|<ip>]
-@@ -2400,9 +2420,10 @@ Virtual system 0:
- [--add <ide/sata/scsi/floppy>]
- [--controller <LsiLogic|LSILogicSAS|BusLogic|
- IntelAhci|PIIX3|PIIX4|ICH6|I82078|usb>]
-- [--sataportcount <1-30>]
-+ [--portcount <1-30>]
- [--hostiocache on|off]
- [--bootable on|off]
-+ [--rename <name>]
- [--remove]</screen>
-
- <para>where the parameters mean: <glosslist>
-@@ -2441,10 +2462,10 @@ Virtual system 0:
- </glossentry>
-
- <glossentry>
-- <glossterm><computeroutput>--sataportcount</computeroutput></glossterm>
-+ <glossterm><computeroutput>--portcount</computeroutput></glossterm>
-
- <glossdef>
-- <para>This determines how many ports the SATA controller should
-+ <para>This determines how many ports the storage controller should
- support.</para>
- </glossdef>
- </glossentry>
-@@ -2468,6 +2489,14 @@ Virtual system 0:
- </glossentry>
-
- <glossentry>
-+ <glossterm><computeroutput>--rename</computeroutput></glossterm>
-+
-+ <glossdef>
-+ <para>Sets the name of the storage controller.</para>
-+ </glossdef>
-+ </glossentry>
-+
-+ <glossentry>
- <glossterm><computeroutput>--remove</computeroutput></glossterm>
-
- <glossdef>
-@@ -2583,7 +2612,7 @@ Virtual system 0:
- follows:</para>
-
- <screen>VBoxManage createhd --filename <filename>
-- --size <megabytes>
-+ --size <megabytes>|--sizebyte <bytes>
- [--format VDI|VMDK|VHD] (default: VDI)
- [--variant Standard,Fixed,Split2G,Stream,ESX]</screen>
-
-@@ -2640,6 +2669,7 @@ Virtual system 0:
- [--type normal|writethrough|immutable|shareable|
- readonly|multiattach]
- [--autoreset on|off]
-+ [--property <name=[value]>]
- [--compact]
- [--resize <megabytes>|--resizebyte <bytes>]</screen><note>
- <para>Despite the "hd" in the subcommand name, the command works with
---- virtualbox-5.0.16-dfsg.orig/doc/manual/user_ChangeLogImpl.xml
-+++ virtualbox-5.0.16-dfsg/doc/manual/user_ChangeLogImpl.xml
-@@ -3,6 +3,113 @@
- <chapter> <!-- HACK ALERT! Seems we must have a single top level element for xi:include to work.
- So, we use chapter and xpointer="xpointer(/chapter/)" with xi:include. -->
- <sect1>
-+ <title>Version 5.0.18 (2016-0x-xx)</title>
-+
-+ <para>This is a maintenance release. The following items were fixed and/or
-+ added:</para>
-+
-+ <itemizedlist>
-+
-+ <listitem>
-+ <para>GUI: position off-screen windows to be fully visible again on relaunch
-+ in consistence with default-behavior (bug #15226)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>GUI: fixed the <emphasis>View</emphasis> menu /
-+ <emphasis>Full-screen Mode</emphasis> behavior on Mac OS X El Capitan</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>GUI: fixed a test which allowed to encrypt a hard disk with an
-+ empty password</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>PC speaker passthrough: fixes (Linux hosts only; bug #627)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Drag and drop: several fixes</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>SATA: fixed hotplug flag handling when EFI is used</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Storage: fixed handling of encpryted disk images with SCSI
-+ controllers (bug #14812)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Storage: fixed possible crash with Solaris 7 if the BusLogic
-+ SCSI controller is used</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>USB: properly purge non-ASCII characters from USB strings
-+ (bugs #8801, #15222)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>NAT Network: fixed 100% CPU load in VBoxNetNAT on Mac OS X
-+ under certain circumstances (bug #15223)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>ACPI: fixed ACPI tables to make the display color management
-+ settings available again for older Windows versions (4.3.22
-+ regression)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Windows hosts: fixed support of jumbo frames in with bridged
-+ networking (5.0.16 regression; bug #15209)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Windows hosts: don't prevent receiving multicast traffic if
-+ host-only adapters are installed (bug #8698)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Linux hosts: added support for the new naming scheme of NVME disks when
-+ creating raw disks</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Solaris hosts / guests: properly sign the kernel modules (bug #12608)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Linux hosts / guests: Linux 4.5 fixes (bug #15251)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Linux hosts / guests: Linux 4.6 fixes (bug #15298)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Linux Additions: added a kernel graphics driver to support graphics
-+ when X.Org does not have root rights (bug #14732)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Windows hosts: hardening fix required for recent Windows insider
-+ builds (bugs #15245, #15296)</para>
-+ </listitem>
-+
-+ <listitem>
-+ <para>Windows Additions: fixed a hang with PowerPoint 2010 and the WDDM
-+ drivers if Aero is disabled</para>
-+ </listitem>
-+
-+ </itemizedlist>
-+
-+ </sect1>
-+
-+ <sect1>
- <title>Version 5.0.16 (2016-03-04)</title>
-
- <para>This is a maintenance release. The following items were fixed and/or
-@@ -12,7 +119,7 @@
-
- <listitem>
- <para>VMM: fixed a problem which could lead to a wrong guest behavior on
-- AMD CPUs (tickets #14831 and #15186)</para>
-+ AMD CPUs (bugs #14831 and #15186)</para>
- </listitem>
-
- <listitem>
---- virtualbox-5.0.16-dfsg.orig/include/VBox/GuestHost/DragAndDrop.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/GuestHost/DragAndDrop.h
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2014-2015 Oracle Corporation
-+ * Copyright (C) 2014-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -38,33 +38,52 @@
- #include <iprt/cpp/ministring.h>
-
- /**
-- * Structure for maintaining a "dropped files" directory
-+ * Class for maintaining a "dropped files" directory
- * on the host or guest. This will contain all received files & directories
- * for a single drag and drop operation.
-+ *
-+ * In case of a failed drag and drop operation this class can also
-+ * perform a gentle rollback if required.
- */
--typedef struct DNDDIRDROPPEDFILES
-+class DnDDroppedFiles
- {
-+
-+public:
-+
-+ DnDDroppedFiles(void);
-+ DnDDroppedFiles(const char *pszPath, uint32_t fFlags);
-+ virtual ~DnDDroppedFiles(void);
-+
-+public:
-+
-+ int AddFile(const char *pszFile);
-+ int AddDir(const char *pszDir);
-+ int Close(void);
-+ bool IsOpen(void) const;
-+ int OpenEx(const char *pszPath, uint32_t fFlags);
-+ int OpenTemp(uint32_t fFlags);
-+ const char *GetDirAbs(void) const;
-+ int Reopen(void);
-+ int Reset(bool fDeleteContent);
-+ int Rollback(void);
-+
-+protected:
-+
-+ int closeInternal(void);
-+
-+protected:
-+
-+ /** Open flags. */
-+ uint32_t m_fOpen;
- /** Directory handle for drop directory. */
-- PRTDIR hDir;
-- /** Flag indicating whether the drop directory
-- * has been opened for processing or not. */
-- bool fOpen;
-+ PRTDIR m_hDir;
- /** Absolute path to drop directory. */
-- RTCString strPathAbs;
-+ RTCString m_strPathAbs;
- /** List for holding created directories in the case of a rollback. */
-- RTCList<RTCString> lstDirs;
-+ RTCList<RTCString> m_lstDirs;
- /** List for holding created files in the case of a rollback. */
-- RTCList<RTCString> lstFiles;
--
--} DNDDIRDROPPEDFILES, *PDNDDIRDROPPEDFILES;
--
--int DnDDirDroppedAddFile(PDNDDIRDROPPEDFILES pDir, const char *pszFile);
--int DnDDirDroppedAddDir(PDNDDIRDROPPEDFILES pDir, const char *pszDir);
--int DnDDirDroppedFilesCreateAndOpenEx(const char *pszPath, PDNDDIRDROPPEDFILES pDir);
--int DnDDirDroppedFilesCreateAndOpenTemp(PDNDDIRDROPPEDFILES pDir);
--int DnDDirDroppedFilesClose(PDNDDIRDROPPEDFILES pDir, bool fRemove);
--const char *DnDDirDroppedFilesGetDirAbs(PDNDDIRDROPPEDFILES pDir);
--int DnDDirDroppedFilesRollback(PDNDDIRDROPPEDFILES pDir);
-+ RTCList<RTCString> m_lstFiles;
-+};
-
- bool DnDMIMEHasFileURLs(const char *pcszFormat, size_t cchFormatMax);
- bool DnDMIMENeedsDropDir(const char *pcszFormat, size_t cchFormatMax);
-@@ -148,6 +167,8 @@ protected:
- Type m_Type;
- RTCString m_strSrcPath;
- RTCString m_strTgtPath;
-+ /** Whether the object is in "opened" state. */
-+ bool m_fOpen;
- /** Object (file/directory) mode. */
- uint32_t m_fMode;
- /** Size (in bytes) to read/write. */
-@@ -182,10 +203,10 @@ public:
- bool IsEmpty(void) const { return m_lstTree.isEmpty(); }
- void RemoveFirst(void);
- int RootFromURIData(const void *pvData, size_t cbData, uint32_t fFlags);
-- RTCString RootToString(const RTCString &strPathBase = "", const RTCString &strSeparator = "\r\n");
-- size_t RootCount(void) const { return m_lstRoot.size(); }
-- uint32_t TotalCount(void) const { return m_cTotal; }
-- size_t TotalBytes(void) const { return m_cbTotal; }
-+ RTCString RootToString(const RTCString &strPathBase = "", const RTCString &strSeparator = "\r\n") const;
-+ uint64_t RootCount(void) const { return m_lstRoot.size(); }
-+ uint64_t TotalCount(void) const { return m_cTotal; }
-+ uint64_t TotalBytes(void) const { return m_cbTotal; }
-
- protected:
-
-@@ -203,10 +224,12 @@ protected:
- * added (lazy or not). */
- RTCList<DnDURIObject *> m_lstTree;
- /** Total number of all URI objects. */
-- uint32_t m_cTotal; /** @todo Really needed? m_lstTree.size()? */
-+ uint64_t m_cTotal;
- /** Total size of all URI objects, that is, the file
-- * size of all objects (in bytes). */
-- size_t m_cbTotal;
-+ * size of all objects (in bytes).
-+ * Note: Do *not* size_t here, as we also want to support large files
-+ * on 32-bit guests. */
-+ uint64_t m_cbTotal;
- };
- #endif /* ___VBox_GuestHost_DragAndDrop_h */
-
---- virtualbox-5.0.16-dfsg.orig/include/VBox/HostServices/DragAndDropSvc.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/HostServices/DragAndDropSvc.h
-@@ -3,7 +3,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -23,6 +23,38 @@
- * terms and conditions of either the GPL or the CDDL or both.
- */
-
-+/**
-+ * Protocol handling and notes:
-+ * All client/server components should be backwards compatible.
-+ *
-+ ******************************************************************************
-+ *
-+ * Protocol changelog:
-+ *
-+ * Protocol v1 (VBox < 5.0, deprecated):
-+ * | Initial implementation which only implemented host to guest transfers.
-+ * | For file transfers all file information such as the file name and file size were
-+ * transferred with every file data chunk being sent.
-+ *
-+ * Protocol v2 (VBox 5.0 - VBox 5.0.8, deprecated):
-+ * + Added support for guest to host transfers.
-+ * + Added protocol version support through VBOXDNDCONNECTMSG. The host takes the installed
-+ * Guest Additions version as indicator which protocol to use for communicating with the guest.
-+ * The guest itself uses VBOXDNDCONNECTMSG to report its supported protocol version to the DnD service.
-+ *
-+ * Protocol v3 (VBox 5.0.10 and up, current):
-+ * + Added VBOXDNDDISCONNECTMSG for being able to track client disconnects on host side (Main).
-+ * + Added context IDs for every HGCM message. Not used yet and must be 0.
-+ * + Added VBOXDNDSNDDATAHDR and VBOXDNDCBSNDDATAHDRDATA to support (simple) accounting of objects
-+ * being transferred, along with supplying separate meta data size (which is part of the total size being sent).
-+ * + Added new HOST_DND_HG_SND_DATA_HDR + GUEST_DND_GH_SND_DATA_HDR commands which now allow specifying an optional
-+ * compression type and defining a checksum for the overall data transfer.
-+ * + Enhannced VBOXDNDGHSENDDATAMSG to support (rolling) checksums for the supplied data block.
-+ * + VBOXDNDHGSENDDATAMSG and VBOXDNDGHSENDDATAMSG can now contain an optional checksum for the current data block.
-+ * | VBOXDNDHGSENDFILEDATAMSG and VBOXDNDGHSENDFILEDATAMSG are now sharing the same HGCM mesasge.
-+ * - Removed unused HOST_DND_GH_RECV_DIR, HOST_DND_GH_RECV_FILE_DATA and HOST_DND_GH_RECV_FILE_HDR commands.
-+ */
-+
- #ifndef ___VBox_HostService_DragAndDropSvc_h
- #define ___VBox_HostService_DragAndDropSvc_h
-
-@@ -103,15 +135,30 @@ enum eHostFn
- /** The host issued a "drop" event, meaning that the host is
- * ready to transfer data over to the guest. */
- HOST_DND_HG_EVT_DROPPED = 203,
-- /** The host requested to cancel the current DnD operation. */
-+ /** The host requested to cancel the current DnD operation on
-+ * the guest side. This can happen on user request on the host's
-+ * UI side or due to some host error which has happened.
-+ *
-+ * Note: This is a fire-and-forget message, as the host should
-+ * not rely on an answer from the guest side in order to
-+ * properly cancel the operation. */
- HOST_DND_HG_EVT_CANCEL = 204,
-- /** Gets the actual MIME data, based on
-- * the format(s) specified by HOST_DND_HG_EVT_ENTER. If the guest
-- * supplied buffer too small to send the actual data, the host
-- * will send a HOST_DND_HG_SND_MORE_DATA message as follow-up. */
-+ /** Sends the data header at the beginning of a (new)
-+ * data transfer. */
-+ HOST_DND_HG_SND_DATA_HDR = 210,
-+ /**
-+ * Sends the actual meta data, based on
-+ * the format(s) specified by HOST_DND_HG_EVT_ENTER.
-+ *
-+ * Protocol v1/v2: If the guest supplied buffer too small to send
-+ * the actual data, the host will send a HOST_DND_HG_SND_MORE_DATA
-+ * message as follow-up.
-+ * Protocol v3+: The incoming meta data size is specified upfront in the
-+ * HOST_DND_HG_SND_DATA_HDR message and must be handled accordingly.
-+ */
- HOST_DND_HG_SND_DATA = 205,
-- /** Sent when the actual buffer for HOST_DND_HG_SND_DATA
-- * was too small, issued by the DnD host service. */
-+ /** Sent when the actual buffer for HOST_DND_HG_SND_DATA was too small. */
-+ /** @todo Deprecated function; do not use anymore. */
- HOST_DND_HG_SND_MORE_DATA = 206,
- /** Directory entry to be sent to the guest. */
- HOST_DND_HG_SND_DIR = 207,
-@@ -132,13 +179,6 @@ enum eHostFn
- * has been started and that the host wants the data in
- * a specific MIME type. */
- HOST_DND_GH_EVT_DROPPED = 601,
-- /** Creates a directory on the guest. */
-- HOST_DND_GH_RECV_DIR = 650,
-- /** Retrieves file data from the guest. */
-- HOST_DND_GH_RECV_FILE_DATA = 670,
-- /** Retrieves a file header from the guest.
-- * Note: Only for protocol version 2 and up (>= VBox 5.0). */
-- HOST_DND_GH_RECV_FILE_HDR = 671,
- /** Blow the type up to 32-bit. */
- HOST_DND_32BIT_HACK = 0x7fffffff
- };
-@@ -150,10 +190,15 @@ enum eHostFn
- */
- enum eGuestFn
- {
-- /* Guest sends a connection request to the HGCM service.
-+ /* Guest sends a connection request to the HGCM service,
-+ * along with some additional information like supported
-+ * protocol version and flags.
- * Note: New since protocol version 2. */
- GUEST_DND_CONNECT = 10,
-
-+ /* Sent when a guest client disconnected from the HGCM service. */
-+ GUEST_DND_DISCONNECT = 11,
-+
- /**
- * Guest waits for a new message the host wants to process
- * on the guest side. This can be a blocking call.
-@@ -184,6 +229,9 @@ enum eGuestFn
- * dragged over to the host.
- */
- GUEST_DND_GH_ACK_PENDING = 500,
-+ /** Sends the data header at the beginning of a (new)
-+ * data transfer. */
-+ GUEST_DND_GH_SND_DATA_HDR = 503,
- /**
- * Sends data of the requested format to the host. There can
- * be more than one message if the actual data does not fit
-@@ -226,103 +274,227 @@ typedef enum DNDPROGRESS
- * Host events
- */
-
-+/**
-+ * Action message for telling the guest about the currently ongoing
-+ * drag and drop action when entering the guest's area, moving around in it
-+ * and dropping content into it from the host.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_EVT_ENTER
-+ * HOST_DND_HG_EVT_MOVE
-+ * HOST_DND_HG_EVT_DROPPED
-+ */
- typedef struct VBOXDNDHGACTIONMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * HG Action event.
-- *
-- * Used by:
-- * HOST_DND_HG_EVT_ENTER
-- * HOST_DND_HG_EVT_MOVE
-- * HOST_DND_HG_EVT_DROPPED
-- */
-- HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-- HGCMFunctionParameter uX; /* OUT uint32_t */
-- HGCMFunctionParameter uY; /* OUT uint32_t */
-- HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-- HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-- HGCMFunctionParameter pvFormats; /* OUT ptr */
-- HGCMFunctionParameter cFormats; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ HGCMFunctionParameter uX; /* OUT uint32_t */
-+ HGCMFunctionParameter uY; /* OUT uint32_t */
-+ HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-+ HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormats; /* OUT ptr */
-+ HGCMFunctionParameter cbFormats; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. */
-+ HGCMFunctionParameter uContext;
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ HGCMFunctionParameter uX; /* OUT uint32_t */
-+ HGCMFunctionParameter uY; /* OUT uint32_t */
-+ HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-+ HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormats; /* OUT ptr */
-+ HGCMFunctionParameter cbFormats; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGACTIONMSG;
-
-+/**
-+ * Tells the guest that the host has left its drag and drop area on the guest.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_EVT_LEAVE
-+ */
- typedef struct VBOXDNDHGLEAVEMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-- /**
-- * HG Leave event.
-- *
-- * Used by:
-- * HOST_DND_HG_EVT_LEAVE
-- */
-+ union
-+ {
-+ struct
-+ {
-+ /** Context ID. */
-+ HGCMFunctionParameter uContext;
-+ } v3;
-+ } u;
- } VBOXDNDHGLEAVEMSG;
-
-+/**
-+ * Tells the guest that the host wants to cancel the current drag and drop operation.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_EVT_CANCEL
-+ */
- typedef struct VBOXDNDHGCANCELMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-+ union
-+ {
-+ struct
-+ {
-+ /** Context ID. */
-+ HGCMFunctionParameter uContext;
-+ } v3;
-+ } u;
-+} VBOXDNDHGCANCELMSG;
-
-+/**
-+ * Sends the header of an incoming (meta) data block.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_SND_DATA_HDR
-+ * GUEST_DND_GH_SND_DATA_HDR
-+ *
-+ * New since protocol v3.
-+ */
-+typedef struct VBOXDNDHGSENDDATAHDRMSG
-+{
-+ VBoxGuestHGCMCallInfo hdr;
-+
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Data transfer flags. Not yet used and must be 0. */
-+ HGCMFunctionParameter uFlags; /* OUT uint32_t */
-+ /** Screen ID where the data originates from. */
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ /** Total size (in bytes) to transfer. */
-+ HGCMFunctionParameter cbTotal; /* OUT uint64_t */
- /**
-- * HG Cancel return event.
-+ * Total meta data size (in bytes) to transfer.
-+ * This size also is part of cbTotal already, so:
- *
-- * Used by:
-- * HOST_DND_HG_EVT_CANCEL
-+ * cbTotal = cbMeta + additional size for files etc.
- */
--} VBOXDNDHGCANCELMSG;
-+ HGCMFunctionParameter cbMeta; /* OUT uint64_t */
-+ /** Meta data format. */
-+ HGCMFunctionParameter pvMetaFmt; /* OUT ptr */
-+ /** Size (in bytes) of meta data format. */
-+ HGCMFunctionParameter cbMetaFmt; /* OUT uint32_t */
-+ /* Number of objects (files/directories) to transfer. */
-+ HGCMFunctionParameter cObjects; /* OUT uint64_t */
-+ /** Compression type. */
-+ HGCMFunctionParameter enmCompression; /* OUT uint32_t */
-+ /** Checksum type. */
-+ HGCMFunctionParameter enmChecksumType; /* OUT uint32_t */
-+ /** Checksum buffer for the entire data to be transferred. */
-+ HGCMFunctionParameter pvChecksum; /* OUT ptr */
-+ /** Size (in bytes) of checksum. */
-+ HGCMFunctionParameter cbChecksum; /* OUT uint32_t */
-+} VBOXDNDHGSENDDATAHDRMSG;
-
-+/**
-+ * Sends a (meta) data block to the guest.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_SND_DATA
-+ */
- typedef struct VBOXDNDHGSENDDATAMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * HG Send Data event.
-- *
-- * Used by:
-- * HOST_DND_HG_SND_DATA
-- */
-- HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-- HGCMFunctionParameter pvFormat; /* OUT ptr */
-- HGCMFunctionParameter cFormat; /* OUT uint32_t */
-- HGCMFunctionParameter pvData; /* OUT ptr */
-- HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormat; /* OUT ptr */
-+ HGCMFunctionParameter cbFormat; /* OUT uint32_t */
-+ HGCMFunctionParameter pvData; /* OUT ptr */
-+ HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ } v1;
-+ /* No changes in v2. */
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Data block to send. */
-+ HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Size (in bytes) of data block to send. */
-+ HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ /** Checksum of data block, based on the checksum
-+ * type in the data header. Optional. */
-+ HGCMFunctionParameter pvChecksum; /* OUT ptr */
-+ /** Size (in bytes) of checksum to send. */
-+ HGCMFunctionParameter cbChecksum; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGSENDDATAMSG;
-
-+/**
-+ * Sends more (meta) data in case the data didn't fit
-+ * into the current XXX_DND_HG_SND_DATA message.
-+ *
-+ ** @todo Deprecated since protocol v3. Don't use! Will be removed.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_SND_MORE_DATA
-+ */
- typedef struct VBOXDNDHGSENDMOREDATAMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * HG Send More Data event.
-- *
-- * Used by:
-- * HOST_DND_HG_SND_MORE_DATA
-- */
- HGCMFunctionParameter pvData; /* OUT ptr */
- HGCMFunctionParameter cbData; /* OUT uint32_t */
- } VBOXDNDHGSENDMOREDATAMSG;
-
-+/**
-+ * Directory entry event.
-+ *
-+ * Used by:
-+ * HOST_DND_HG_SND_DIR
-+ * GUEST_DND_GH_SND_DIR
-+ */
- typedef struct VBOXDNDHGSENDDIRMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * HG Directory event.
-- *
-- * Used by:
-- * HOST_DND_HG_SND_DIR
-- */
-- HGCMFunctionParameter pvName; /* OUT ptr */
-- HGCMFunctionParameter cbName; /* OUT uint32_t */
-- HGCMFunctionParameter fMode; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ /** Directory name. */
-+ HGCMFunctionParameter pvName; /* OUT ptr */
-+ /** Size (in bytes) of directory name. */
-+ HGCMFunctionParameter cbName; /* OUT uint32_t */
-+ /** Directory mode. */
-+ HGCMFunctionParameter fMode; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Directory name. */
-+ HGCMFunctionParameter pvName; /* OUT ptr */
-+ /** Size (in bytes) of directory name. */
-+ HGCMFunctionParameter cbName; /* OUT uint32_t */
-+ /** Directory mode. */
-+ HGCMFunctionParameter fMode; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGSENDDIRMSG;
-
- /**
-- * File header event.
-+ * File header message, marking the start of transferring a new file.
- * Note: Only for protocol version 2 and up.
- *
- * Used by:
- * HOST_DND_HG_SND_FILE_HDR
-- * HOST_DND_GH_SND_FILE_HDR
-+ * GUEST_DND_GH_SND_FILE_HDR
- */
- typedef struct VBOXDNDHGSENDFILEHDRMSG
- {
-@@ -340,7 +512,6 @@ typedef struct VBOXDNDHGSENDFILEHDRMSG
- HGCMFunctionParameter fMode; /* OUT uint32_t */
- /** Total size (in bytes). */
- HGCMFunctionParameter cbTotal; /* OUT uint64_t */
--
- } VBOXDNDHGSENDFILEHDRMSG;
-
- /**
-@@ -359,10 +530,15 @@ typedef struct VBOXDNDHGSENDFILEDATAMSG
- * every time a file data chunk is being sent. */
- struct
- {
-+ /** File name. */
- HGCMFunctionParameter pvName; /* OUT ptr */
-+ /** Size (in bytes) of file name. */
- HGCMFunctionParameter cbName; /* OUT uint32_t */
-+ /** Current data chunk. */
- HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Size (in bytes) of current data chunk. */
- HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ /** File mode. */
- HGCMFunctionParameter fMode; /* OUT uint32_t */
- } v1;
- struct
-@@ -371,40 +547,90 @@ typedef struct VBOXDNDHGSENDFILEDATAMSG
- /** Note: cbName is now part of the VBOXDNDHGSENDFILEHDRMSG message. */
- /** Context ID. Unused at the moment. */
- HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Current data chunk. */
- HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Size (in bytes) of current data chunk. */
- HGCMFunctionParameter cbData; /* OUT uint32_t */
- /** Note: fMode is now part of the VBOXDNDHGSENDFILEHDRMSG message. */
- } v2;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Current data chunk. */
-+ HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Size (in bytes) of current data chunk. */
-+ HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ /** Checksum of data block, based on the checksum
-+ * type in the data header. Optional. */
-+ HGCMFunctionParameter pvChecksum; /* OUT ptr */
-+ /** Size (in bytes) of curren data chunk checksum. */
-+ HGCMFunctionParameter cbChecksum; /* OUT uint32_t */
-+ } v3;
- } u;
--
- } VBOXDNDHGSENDFILEDATAMSG;
-
-+/**
-+ * Asks the guest if a guest->host DnD operation is in progress.
-+ *
-+ * Used by:
-+ * HOST_DND_GH_REQ_PENDING
-+ */
- typedef struct VBOXDNDGHREQPENDINGMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * GH Request Pending event.
-- *
-- * Used by:
-- * HOST_DND_GH_REQ_PENDING
-- */
-- HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ /** Screen ID. */
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Screen ID. */
-+ HGCMFunctionParameter uScreenId; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDGHREQPENDINGMSG;
-
-+/**
-+ * Tells the guest that the host has dropped the ongoing guest->host
-+ * DnD operation on a valid target on the host.
-+ *
-+ * Used by:
-+ * HOST_DND_GH_EVT_DROPPED
-+ */
- typedef struct VBOXDNDGHDROPPEDMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /**
-- * GH Dropped event.
-- *
-- * Used by:
-- * HOST_DND_GH_EVT_DROPPED
-- */
-- HGCMFunctionParameter pvFormat; /* OUT ptr */
-- HGCMFunctionParameter cFormat; /* OUT uint32_t */
-- HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ /** Requested format for sending the data. */
-+ HGCMFunctionParameter pvFormat; /* OUT ptr */
-+ /** Size (in bytes) of requested format. */
-+ HGCMFunctionParameter cbFormat; /* OUT uint32_t */
-+ /** Drop action peformed on the host. */
-+ HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Requested format for sending the data. */
-+ HGCMFunctionParameter pvFormat; /* OUT ptr */
-+ /** Size (in bytes) of requested format. */
-+ HGCMFunctionParameter cbFormat; /* OUT uint32_t */
-+ /** Drop action peformed on the host. */
-+ HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDGHDROPPEDMSG;
-
- /*
-@@ -412,8 +638,9 @@ typedef struct VBOXDNDGHDROPPEDMSG
- */
-
- /**
-- * The returned command the host wants to
-- * run on the guest.
-+ * Asks the host for the next command to process, along
-+ * with the needed amount of parameters and an optional blocking
-+ * flag.
- *
- * Used by:
- * GUEST_DND_GET_NEXT_HOST_MSG
-@@ -422,17 +649,17 @@ typedef struct VBOXDNDNEXTMSGMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter msg; /* OUT uint32_t */
-+ /** Message ID. */
-+ HGCMFunctionParameter uMsg; /* OUT uint32_t */
- /** Number of parameters the message needs. */
-- HGCMFunctionParameter num_parms; /* OUT uint32_t */
-+ HGCMFunctionParameter cParms; /* OUT uint32_t */
- /** Whether or not to block (wait) for a
- * new message to arrive. */
-- HGCMFunctionParameter block; /* OUT uint32_t */
--
-+ HGCMFunctionParameter fBlock; /* OUT uint32_t */
- } VBOXDNDNEXTMSGMSG;
-
- /**
-- * Connection request. Used to tell the DnD protocol
-+ * Guest connection request. Used to tell the DnD protocol
- * version to the (host) service.
- *
- * Used by:
-@@ -442,15 +669,30 @@ typedef struct VBOXDNDCONNECTMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- /** Protocol version to use. */
-- HGCMFunctionParameter uProtocol; /* OUT uint32_t */
-- /** Connection flags. Optional. */
-- HGCMFunctionParameter uFlags; /* OUT uint32_t */
--
-+ union
-+ {
-+ struct
-+ {
-+ /** Protocol version to use. */
-+ HGCMFunctionParameter uProtocol; /* OUT uint32_t */
-+ /** Connection flags. Optional. */
-+ HGCMFunctionParameter uFlags; /* OUT uint32_t */
-+ } v2;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Protocol version to use. */
-+ HGCMFunctionParameter uProtocol; /* OUT uint32_t */
-+ /** Connection flags. Optional. */
-+ HGCMFunctionParameter uFlags; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDCONNECTMSG;
-
- /**
-- * HG Acknowledge Operation event.
-+ * Acknowledges a host operation along with the allowed
-+ * action(s) on the guest.
- *
- * Used by:
- * GUEST_DND_HG_ACK_OP
-@@ -459,7 +701,19 @@ typedef struct VBOXDNDHGACKOPMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ HGCMFunctionParameter uAction; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGACKOPMSG;
-
- /**
-@@ -472,20 +726,48 @@ typedef struct VBOXDNDHGREQDATAMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter pFormat; /* OUT ptr */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter pvFormat; /* OUT ptr */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormat; /* OUT ptr */
-+ HGCMFunctionParameter cbFormat; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGREQDATAMSG;
-
- typedef struct VBOXDNDHGEVTPROGRESSMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter uStatus;
-- HGCMFunctionParameter uPercent;
-- HGCMFunctionParameter rc;
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter uStatus; /* OUT uint32_t */
-+ HGCMFunctionParameter uPercent; /* OUT uint32_t */
-+ HGCMFunctionParameter rc; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ HGCMFunctionParameter uStatus; /* OUT uint32_t */
-+ HGCMFunctionParameter uPercent; /* OUT uint32_t */
-+ HGCMFunctionParameter rc; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDHGEVTPROGRESSMSG;
-
- /**
-- * GH Acknowledge Pending event.
-+ * Acknowledges a pending drag and drop event
-+ * to the host.
- *
- * Used by:
- * GUEST_DND_GH_ACK_PENDING
-@@ -494,13 +776,39 @@ typedef struct VBOXDNDGHACKPENDINGMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-- HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-- HGCMFunctionParameter pFormat; /* OUT ptr */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-+ HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormats; /* OUT ptr */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ HGCMFunctionParameter uDefAction; /* OUT uint32_t */
-+ HGCMFunctionParameter uAllActions; /* OUT uint32_t */
-+ HGCMFunctionParameter pvFormats; /* OUT ptr */
-+ HGCMFunctionParameter cbFormats; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDGHACKPENDINGMSG;
-
- /**
-- * GH Send Data event.
-+ * Sends the header of an incoming data block
-+ * to the host.
-+ *
-+ * Used by:
-+ * GUEST_DND_GH_SND_DATA_HDR
-+ *
-+ * New since protocol v3.
-+ */
-+typedef struct VBOXDNDHGSENDDATAHDRMSG VBOXDNDGHSENDDATAHDRMSG;
-+
-+/**
-+ * Sends a (meta) data block to the host.
- *
- * Used by:
- * GUEST_DND_GH_SND_DATA
-@@ -509,114 +817,131 @@ typedef struct VBOXDNDGHSENDDATAMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
-- HGCMFunctionParameter pvData; /* OUT ptr */
-- /** Total bytes to send. This can be more than
-- * the data block specified in pvData above, e.g.
-- * when sending over file objects afterwards. */
-- HGCMFunctionParameter cbTotalBytes; /* OUT uint32_t */
-+ union
-+ {
-+ struct
-+ {
-+ HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Total bytes to send. This can be more than
-+ * the data block specified in pvData above, e.g.
-+ * when sending over file objects afterwards. */
-+ HGCMFunctionParameter cbTotalBytes; /* OUT uint32_t */
-+ } v1;
-+ struct
-+ {
-+ /** Context ID. Unused at the moment. */
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ /** Data block to send. */
-+ HGCMFunctionParameter pvData; /* OUT ptr */
-+ /** Size (in bytes) of data block to send. */
-+ HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ /** (Rolling) Checksum, based on checksum type in data header. */
-+ HGCMFunctionParameter pvChecksum; /* OUT ptr */
-+ /** Size (in bytes) of checksum. */
-+ HGCMFunctionParameter cbChecksum; /* OUT uint32_t */
-+ } v3;
-+ } u;
- } VBOXDNDGHSENDDATAMSG;
-
- /**
-- * GH Directory event.
-+ * Sends a directory entry to the host.
- *
- * Used by:
- * GUEST_DND_GH_SND_DIR
- */
--typedef struct VBOXDNDGHSENDDIRMSG
--{
-- VBoxGuestHGCMCallInfo hdr;
--
-- HGCMFunctionParameter pvName; /* OUT ptr */
-- HGCMFunctionParameter cbName; /* OUT uint32_t */
-- HGCMFunctionParameter fMode; /* OUT uint32_t */
--} VBOXDNDGHSENDDIRMSG;
-+typedef struct VBOXDNDHGSENDDIRMSG VBOXDNDGHSENDDIRMSG;
-
- /**
-- * GH File header event.
-- * Note: Only for protocol version 2 and up.
-+ * Sends a file header to the host.
- *
- * Used by:
-- * HOST_DND_GH_SND_FILE_HDR
-+ * GUEST_DND_GH_SND_FILE_HDR
-+ *
-+ * New since protocol v2.
- */
- typedef struct VBOXDNDHGSENDFILEHDRMSG VBOXDNDGHSENDFILEHDRMSG;
-
- /**
-- * GH File data event.
-+ * Sends file data to the host.
- *
- * Used by:
-- * GUEST_DND_HG_SND_FILE_DATA
-+ * GUEST_DND_GH_SND_FILE_DATA
- */
--typedef struct VBOXDNDGHSENDFILEDATAMSG
-+typedef struct VBOXDNDHGSENDFILEDATAMSG VBOXDNDGHSENDFILEDATAMSG;
-+
-+/**
-+ * Sends a guest error event to the host.
-+ *
-+ * Used by:
-+ * GUEST_DND_GH_EVT_ERROR
-+ */
-+typedef struct VBOXDNDGHEVTERRORMSG
- {
- VBoxGuestHGCMCallInfo hdr;
-
- union
- {
-- /* Note: Protocol v1 sends the file name + file mode
-- * every time a file data chunk is being sent. */
- struct
- {
-- HGCMFunctionParameter pvName; /* OUT ptr */
-- HGCMFunctionParameter cbName; /* OUT uint32_t */
-- HGCMFunctionParameter fMode; /* OUT uint32_t */
-- HGCMFunctionParameter pvData; /* OUT ptr */
-- HGCMFunctionParameter cbData; /* OUT uint32_t */
-+ HGCMFunctionParameter rc; /* OUT uint32_t */
- } v1;
- struct
- {
-- /** Note: pvName is now part of the VBOXDNDHGSENDFILEHDRMSG message. */
-- /** Note: cbName is now part of the VBOXDNDHGSENDFILEHDRMSG message. */
- /** Context ID. Unused at the moment. */
-- HGCMFunctionParameter uContext; /* OUT uint32_t */
-- HGCMFunctionParameter pvData; /* OUT ptr */
-- HGCMFunctionParameter cbData; /* OUT uint32_t */
-- /** Note: fMode is now part of the VBOXDNDHGSENDFILEHDRMSG message. */
-- } v2;
-+ HGCMFunctionParameter uContext; /* OUT uint32_t */
-+ HGCMFunctionParameter rc; /* OUT uint32_t */
-+ } v3;
- } u;
--
--} VBOXDNDGHSENDFILEDATAMSG;
--
--/**
-- * GH Error event.
-- *
-- * Used by:
-- * GUEST_DND_GH_EVT_ERROR
-- */
--typedef struct VBOXDNDGHEVTERRORMSG
--{
-- VBoxGuestHGCMCallInfo hdr;
--
-- HGCMFunctionParameter rc; /* OUT uint32_t */
- } VBOXDNDGHEVTERRORMSG;
-
- #pragma pack()
-
-+/** Builds a callback magic out of the function ID and the version
-+ * of the callback data. */
-+#define VBOX_DND_CB_MAGIC_MAKE(uFn, uVer) \
-+ RT_MAKE_U32(uVer, uFn)
-+
- /*
-- * Callback data magics.
-+ * Callback magics.
- */
--enum
-+enum eDnDCallbackMagics
- {
-- CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG = 0x19820126,
-- CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG_DATA = 0x19850630,
-- CB_MAGIC_DND_HG_ACK_OP = 0xe2100b93,
-- CB_MAGIC_DND_HG_REQ_DATA = 0x5cb3faf9,
-- CB_MAGIC_DND_HG_EVT_PROGRESS = 0x8c8a6956,
-- CB_MAGIC_DND_GH_ACK_PENDING = 0xbe975a14,
-- CB_MAGIC_DND_GH_SND_DATA = 0x4eb61bff,
-- CB_MAGIC_DND_GH_SND_DIR = 0x411ca754,
-- CB_MAGIC_DND_GH_SND_FILE_HDR = 0x65e35eaf,
-- CB_MAGIC_DND_GH_SND_FILE_DATA = 0x19840804,
-- CB_MAGIC_DND_GH_EVT_ERROR = 0x117a87c4
-+ CB_MAGIC_DND_CONNECT = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_CONNECT, 0),
-+ CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GET_NEXT_HOST_MSG, 0),
-+ CB_MAGIC_DND_HG_ACK_OP = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_HG_ACK_OP, 0),
-+ CB_MAGIC_DND_HG_REQ_DATA = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_HG_REQ_DATA, 0),
-+ CB_MAGIC_DND_HG_EVT_PROGRESS = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_HG_EVT_PROGRESS, 0),
-+ CB_MAGIC_DND_GH_ACK_PENDING = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_ACK_PENDING, 0),
-+ CB_MAGIC_DND_GH_SND_DATA = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_SND_DATA, 0),
-+ CB_MAGIC_DND_GH_SND_DATA_HDR = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_SND_DATA_HDR, 0),
-+ CB_MAGIC_DND_GH_SND_DIR = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_SND_DIR, 0),
-+ CB_MAGIC_DND_GH_SND_FILE_HDR = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_SND_FILE_HDR, 0),
-+ CB_MAGIC_DND_GH_SND_FILE_DATA = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_SND_FILE_DATA, 0),
-+ CB_MAGIC_DND_GH_EVT_ERROR = VBOX_DND_CB_MAGIC_MAKE(GUEST_DND_GH_EVT_ERROR, 0)
- };
-
- typedef struct VBOXDNDCBHEADERDATA
- {
- /** Magic number to identify the structure. */
-- uint32_t u32Magic;
-+ uint32_t uMagic;
- /** Context ID to identify callback data. */
-- uint32_t u32ContextID;
-+ uint32_t uContextID;
- } VBOXDNDCBHEADERDATA, *PVBOXDNDCBHEADERDATA;
-
-+typedef struct VBOXDNDCBCONNECTMSGDATA
-+{
-+ /** Callback data header. */
-+ VBOXDNDCBHEADERDATA hdr;
-+ uint32_t uProtocol;
-+ uint32_t uFlags;
-+} VBOXDNDCBCONNECTMSGDATA, *PVBOXDNDCBCONNECTMSGDATA;
-+
-+typedef struct VBOXDNDCBDISCONNECTMSGDATA
-+{
-+ /** Callback data header. */
-+ VBOXDNDCBHEADERDATA hdr;
-+} VBOXDNDCBDISCONNECTMSGDATA, *PVBOXDNDCBDISCONNECTMSGDATA;
-+
- typedef struct VBOXDNDCBHGGETNEXTHOSTMSG
- {
- /** Callback data header. */
-@@ -668,27 +993,99 @@ typedef struct VBOXDNDCBGHACKPENDINGDATA
- uint32_t cbFormat;
- } VBOXDNDCBGHACKPENDINGDATA, *PVBOXDNDCBGHACKPENDINGDATA;
-
-+/**
-+ * Data header.
-+ * New since protocol v3.
-+ */
-+typedef struct VBOXDNDDATAHDR
-+{
-+ /** Data transfer flags. Not yet used and must be 0. */
-+ uint32_t uFlags;
-+ /** Screen ID where the data originates from. */
-+ uint32_t uScreenId;
-+ /** Total size (in bytes) to transfer. */
-+ uint64_t cbTotal;
-+ /** Meta data size (in bytes) to transfer.
-+ * This size also is part of cbTotal already. */
-+ uint32_t cbMeta;
-+ /** Meta format buffer. */
-+ void *pvMetaFmt;
-+ /** Size (in bytes) of meta format buffer. */
-+ uint32_t cbMetaFmt;
-+ /** Number of objects (files/directories) to transfer. */
-+ uint64_t cObjects;
-+ /** Compression type. Currently unused, so specify 0.
-+ **@todo Add IPRT compression type enumeration as soon as it's available. */
-+ uint32_t enmCompression;
-+ /** Checksum type. Currently unused, so specify RTDIGESTTYPE_INVALID. */
-+ RTDIGESTTYPE enmChecksumType;
-+ /** The actual checksum buffer for the entire data to be transferred,
-+ * based on enmChksumType. If RTDIGESTTYPE_INVALID is specified,
-+ * no checksum is being used and pvChecksum will be NULL. */
-+ void *pvChecksum;
-+ /** Size (in bytes) of checksum. */
-+ uint32_t cbChecksum;
-+} VBOXDNDDATAHDR, *PVBOXDNDSNDDATAHDR;
-+
-+/* New since protocol v3. */
-+typedef struct VBOXDNDCBSNDDATAHDRDATA
-+{
-+ /** Callback data header. */
-+ VBOXDNDCBHEADERDATA hdr;
-+ /** Actual header data. */
-+ VBOXDNDDATAHDR data;
-+} VBOXDNDCBSNDDATAHDRDATA, *PVBOXDNDCBSNDDATAHDRDATA;
-+
-+typedef struct VBOXDNDSNDDATA
-+{
-+ union
-+ {
-+ struct
-+ {
-+ /** Data block buffer. */
-+ void *pvData;
-+ /** Size (in bytes) of data block. */
-+ uint32_t cbData;
-+ /** Total metadata size (in bytes). This is transmitted
-+ * with every message because the size can change. */
-+ uint32_t cbTotalSize;
-+ } v1;
-+ /* Protocol v2: No changes. */
-+ struct
-+ {
-+ /** Data block buffer. */
-+ void *pvData;
-+ /** Size (in bytes) of data block. */
-+ uint32_t cbData;
-+ /** (Rolling) Checksum. Not yet implemented. */
-+ void *pvChecksum;
-+ /** Size (in bytes) of checksum. Not yet implemented. */
-+ uint32_t cbChecksum;
-+ } v3;
-+ } u;
-+} VBOXDNDSNDDATA, *PVBOXDNDSNDDATA;
-+
- typedef struct VBOXDNDCBSNDDATADATA
- {
- /** Callback data header. */
- VBOXDNDCBHEADERDATA hdr;
-- void *pvData;
-- uint32_t cbData;
-- /** Total metadata size (in bytes). This is transmitted
-- * with every message because the size can change. */
-- uint32_t cbTotalSize;
-+ /** Actual data. */
-+ VBOXDNDSNDDATA data;
- } VBOXDNDCBSNDDATADATA, *PVBOXDNDCBSNDDATADATA;
-
- typedef struct VBOXDNDCBSNDDIRDATA
- {
- /** Callback data header. */
- VBOXDNDCBHEADERDATA hdr;
-+ /** Directory path. */
- char *pszPath;
-+ /** Size (in bytes) of path. */
- uint32_t cbPath;
-+ /** Directory creation mode. */
- uint32_t fMode;
- } VBOXDNDCBSNDDIRDATA, *PVBOXDNDCBSNDDIRDATA;
-
--/* Note: Only for protocol version 2 and up (>= VBox 5.0). */
-+/* Note: Only for protocol version 2 and up (>= VBox 5.0). */
- typedef struct VBOXDNDCBSNDFILEHDRDATA
- {
- /** Callback data header. */
-@@ -724,8 +1121,15 @@ typedef struct VBOXDNDCBSNDFILEDATADATA
- /** File (creation) mode. */
- uint32_t fMode;
- } v1;
-- /* Note: Protocol version 2 has the file attributes (name, size,
-- mode, ...) in the VBOXDNDCBSNDFILEHDRDATA structure. */
-+ /* Protocol v2 + v3: Have the file attributes (name, size, mode, ...)
-+ in the VBOXDNDCBSNDFILEHDRDATA structure. */
-+ struct
-+ {
-+ /** Checksum for current file data chunk. */
-+ void *pvChecksum;
-+ /** Size (in bytes) of current data chunk. */
-+ uint32_t cbChecksum;
-+ } v3;
- } u;
- } VBOXDNDCBSNDFILEDATADATA, *PVBOXDNDCBSNDFILEDATADATA;
-
---- virtualbox-5.0.16-dfsg.orig/include/VBox/HostServices/Service.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/HostServices/Service.h
-@@ -3,7 +3,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -63,22 +63,16 @@ public:
- {
- if (m_uMsg != uMsg)
- {
-- LogFlowFunc(("Message type does not match (%u (buffer), %u (guest))\n",
-- m_uMsg, uMsg));
-+ LogFlowFunc(("Message type does not match (%RU32 (buffer), %RU32 (guest))\n", m_uMsg, uMsg));
- return VERR_INVALID_PARAMETER;
- }
-- if (m_cParms != cParms)
-+ if (m_cParms > cParms)
- {
-- LogFlowFunc(("Parameter count does not match (%u (buffer), %u (guest))\n",
-- m_cParms, cParms));
-+ LogFlowFunc(("Parameter count does not match (%RU32 (buffer), %RU32 (guest))\n", m_cParms, cParms));
- return VERR_INVALID_PARAMETER;
- }
-
-- int rc = copyParmsInternal(cParms, m_paParms, &aParms[0], false /* fCreatePtrs */);
--
--// if (RT_FAILURE(rc))
--// cleanup(aParms);
-- return rc;
-+ return copyParmsInternal(&aParms[0], cParms, m_paParms, m_cParms, false /* fDeepCopy */);
- }
-
- int getParmU32Info(uint32_t iParm, uint32_t *pu32Info) const
-@@ -116,15 +110,18 @@ public:
- return VINF_SUCCESS;
- }
-
-- static int copyParms(uint32_t cParms, PVBOXHGCMSVCPARM paParmsSrc, PVBOXHGCMSVCPARM paParmsDst)
-+ static int copyParms(PVBOXHGCMSVCPARM paParmsDst, uint32_t cParmsDst, PVBOXHGCMSVCPARM paParmsSrc, uint32_t cParmsSrc)
- {
-- return copyParmsInternal(cParms, paParmsSrc, paParmsDst, false /* fCreatePtrs */);
-+ return copyParmsInternal(paParmsDst, cParmsDst, paParmsSrc, cParmsSrc, false /* fDeepCopy */);
- }
-
- private:
-
-- uint32_t m_uMsg;
-- uint32_t m_cParms;
-+ /** Stored message type. */
-+ uint32_t m_uMsg;
-+ /** Number of stored HGCM parameters. */
-+ uint32_t m_cParms;
-+ /** Stored HGCM parameters. */
- PVBOXHGCMSVCPARM m_paParms;
-
- int initData(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM aParms[])
-@@ -145,18 +142,25 @@ private:
- return VERR_NO_MEMORY;
- }
-
-- int rc = copyParmsInternal(cParms, &aParms[0], m_paParms, true /* fCreatePtrs */);
--
-+ int rc = copyParmsInternal(m_paParms, m_cParms, &aParms[0], cParms, true /* fDeepCopy */);
- if (RT_FAILURE(rc))
- cleanup();
-
- return rc;
- }
-
-- static int copyParmsInternal(uint32_t cParms, PVBOXHGCMSVCPARM paParmsSrc, PVBOXHGCMSVCPARM paParmsDst, bool fCreatePtrs)
-+ static int copyParmsInternal(PVBOXHGCMSVCPARM paParmsDst, uint32_t cParmsDst,
-+ PVBOXHGCMSVCPARM paParmsSrc, uint32_t cParmsSrc,
-+ bool fDeepCopy)
- {
-+ AssertPtrReturn(paParmsSrc, VERR_INVALID_POINTER);
-+ AssertPtrReturn(paParmsDst, VERR_INVALID_POINTER);
-+
-+ if (cParmsSrc > cParmsDst)
-+ return VERR_BUFFER_OVERFLOW;
-+
- int rc = VINF_SUCCESS;
-- for (uint32_t i = 0; i < cParms; ++i)
-+ for (uint32_t i = 0; i < cParmsSrc; i++)
- {
- paParmsDst[i].type = paParmsSrc[i].type;
- switch (paParmsSrc[i].type)
-@@ -173,8 +177,8 @@ private:
- }
- case VBOX_HGCM_SVC_PARM_PTR:
- {
-- /* Do we have to recreate the memory? */
-- if (fCreatePtrs)
-+ /* Do we have to perform a deep copy? */
-+ if (fDeepCopy)
- {
- /* Yes, do so. */
- paParmsDst[i].u.pointer.size = paParmsSrc[i].u.pointer.size;
-@@ -299,7 +303,7 @@ public:
- return pMessage->getData(m_uMsg, m_cParms, m_paParms);
- }
-
--private:
-+protected:
-
- uint32_t m_uClientId;
- /** Optional protocol version the client uses. */
-@@ -310,6 +314,22 @@ private:
- PVBOXHGCMSVCPARM m_paParms;
- };
-
-+/**
-+ * Structure for keeping a HGCM service context.
-+ */
-+typedef struct VBOXHGCMSVCTX
-+{
-+ /** HGCM helper functions. */
-+ PVBOXHGCMSVCHELPERS pHelpers;
-+ /*
-+ * Callback function supplied by the host for notification of updates
-+ * to properties.
-+ */
-+ PFNHGCMSVCEXT pfnHostCallback;
-+ /** User data pointer to be supplied to the host callback function. */
-+ void *pvHostData;
-+} VBOXHGCMSVCTX, *PVBOXHGCMSVCTX;
-+
- template <class T>
- class AbstractService: public RTCNonCopyable
- {
-@@ -382,10 +402,10 @@ public:
-
- protected:
- explicit AbstractService(PVBOXHGCMSVCHELPERS pHelpers)
-- : m_pHelpers(pHelpers)
-- , m_pfnHostCallback(NULL)
-- , m_pvHostData(NULL)
-- {}
-+ {
-+ RT_ZERO(m_SvcCtx);
-+ m_SvcCtx.pHelpers = pHelpers;
-+ }
- virtual int init(VBOXHGCMSVCFNTABLE *ptable) { return VINF_SUCCESS; }
- virtual int uninit() { return VINF_SUCCESS; }
- virtual int clientConnect(uint32_t u32ClientID, void *pvClient) = 0;
-@@ -395,15 +415,8 @@ protected:
-
- /** Type definition for use in callback functions. */
- typedef AbstractService SELF;
-- /** HGCM helper functions. */
-- PVBOXHGCMSVCHELPERS m_pHelpers;
-- /*
-- * Callback function supplied by the host for notification of updates
-- * to properties.
-- */
-- PFNHGCMSVCEXT m_pfnHostCallback;
-- /** User data pointer to be supplied to the host callback function. */
-- void *m_pvHostData;
-+ /** The HGCM service context this service is bound to. */
-+ VBOXHGCMSVCTX m_SvcCtx;
-
- /**
- * @copydoc VBOXHGCMSVCFNTABLE::pfnUnload
-@@ -499,8 +512,8 @@ protected:
- AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
- LogFlowFunc(("pvService=%p, pfnExtension=%p, pvExtention=%p\n", pvService, pfnExtension, pvExtension));
- SELF *pSelf = reinterpret_cast<SELF *>(pvService);
-- pSelf->m_pfnHostCallback = pfnExtension;
-- pSelf->m_pvHostData = pvExtension;
-+ pSelf->m_SvcCtx.pfnHostCallback = pfnExtension;
-+ pSelf->m_SvcCtx.pvHostData = pvExtension;
- return VINF_SUCCESS;
- }
- };
---- virtualbox-5.0.16-dfsg.orig/include/VBox/VBoxGuestLib.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/VBoxGuestLib.h
-@@ -124,7 +124,7 @@ DECLVBGL(int) VbglInitClient(void);
- /**
- * The library termination function.
- */
--DECLVBGL(void) VbglTerminate(void);
-+DECLVBGL(void) VbglTerminate (void);
-
-
- /** @name Generic request functions.
-@@ -148,7 +148,7 @@ DECLVBGL(int) VbglGRAlloc(VMMDevRequestH
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglGRPerform(VMMDevRequestHeader *pReq);
-+DECLVBGL(int) VbglGRPerform (VMMDevRequestHeader *pReq);
-
- /**
- * Free the generic request memory.
-@@ -157,7 +157,7 @@ DECLVBGL(int) VbglGRPerform(VMMDevReques
- *
- * @return VBox status code.
- */
--DECLVBGL(void) VbglGRFree(VMMDevRequestHeader *pReq);
-+DECLVBGL(void) VbglGRFree (VMMDevRequestHeader *pReq);
-
- /**
- * Verify the generic request header.
-@@ -169,7 +169,7 @@ DECLVBGL(void) VbglGRFree(VMMDevRequestH
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglGRVerify(const VMMDevRequestHeader *pReq, size_t cbReq);
-+DECLVBGL(int) VbglGRVerify (const VMMDevRequestHeader *pReq, size_t cbReq);
- /** @} */
-
- # ifdef VBOX_WITH_HGCM
-@@ -204,8 +204,8 @@ typedef FNVBGLHGCMCALLBACK *PFNVBGLHGCMC
- * @return VBox status code.
- */
-
--DECLR0VBGL(int) VbglR0HGCMInternalConnect(VBoxGuestHGCMConnectInfo *pConnectInfo,
-- PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-+DECLR0VBGL(int) VbglR0HGCMInternalConnect (VBoxGuestHGCMConnectInfo *pConnectInfo,
-+ PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-
-
- /**
-@@ -225,8 +225,8 @@ DECLR0VBGL(int) VbglR0HGCMInternalConnec
- * @return VBox status code.
- */
-
--DECLR0VBGL(int) VbglR0HGCMInternalDisconnect(VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
-- PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-+DECLR0VBGL(int) VbglR0HGCMInternalDisconnect (VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
-+ PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-
- /** Call a HGCM service.
- *
-@@ -242,8 +242,8 @@ DECLR0VBGL(int) VbglR0HGCMInternalDiscon
- *
- * @return VBox status code.
- */
--DECLR0VBGL(int) VbglR0HGCMInternalCall(VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
-- PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-+DECLR0VBGL(int) VbglR0HGCMInternalCall (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
-+ PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-
- /** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
- *
-@@ -259,8 +259,8 @@ DECLR0VBGL(int) VbglR0HGCMInternalCall(V
- *
- * @return VBox status code.
- */
--DECLR0VBGL(int) VbglR0HGCMInternalCall32(VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
-- PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-+DECLR0VBGL(int) VbglR0HGCMInternalCall32 (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
-+ PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
-
- /** @name VbglR0HGCMInternalCall flags
- * @{ */
-@@ -295,7 +295,7 @@ typedef struct VBGLHGCMHANDLEDATA *VBGLH
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglHGCMConnect(VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData);
-+DECLVBGL(int) VbglHGCMConnect (VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData);
-
- /**
- * Connect to a service.
-@@ -305,7 +305,7 @@ DECLVBGL(int) VbglHGCMConnect(VBGLHGCMHA
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglHGCMDisconnect(VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData);
-+DECLVBGL(int) VbglHGCMDisconnect (VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData);
-
- /**
- * Call to a service.
-@@ -316,7 +316,7 @@ DECLVBGL(int) VbglHGCMDisconnect(VBGLHGC
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglHGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
-+DECLVBGL(int) VbglHGCMCall (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
-
- /**
- * Call to a service with user-mode data received by the calling driver from the User-Mode process.
-@@ -328,7 +328,7 @@ DECLVBGL(int) VbglHGCMCall(VBGLHGCMHANDL
- *
- * @return VBox status code.
- */
--DECLVBGL(int) VbglHGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
-+DECLVBGL(int) VbglHGCMCallUserData (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
-
- /**
- * Call to a service with timeout.
-@@ -364,20 +364,20 @@ DECLVBGL(int) VbglR0CrCtlConCallUserData
- *
- * @returns VBox status code.
- */
--DECLVBGL(int) VbglPhysHeapInit(void);
-+DECLVBGL(int) VbglPhysHeapInit (void);
-
- /**
- * Shutdown the heap.
- */
--DECLVBGL(void) VbglPhysHeapTerminate(void);
-+DECLVBGL(void) VbglPhysHeapTerminate (void);
-
- /**
- * Allocate a memory block.
- *
- * @returns Virtual address of the allocated memory block.
-- * @param cbSize Size of block to be allocated.
-+ * @param cbSize Size of block to be allocated.
- */
--DECLVBGL(void *) VbglPhysHeapAlloc(uint32_t cbSize);
-+DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize);
-
- /**
- * Get physical address of memory block pointed by the virtual address.
-@@ -400,15 +400,15 @@ DECLVBGL(uint32_t) VbglPhysHeapGetPhysA
- */
- DECLVBGL(void) VbglPhysHeapFree(void *pv);
-
--DECLVBGL(int) VbglQueryVMMDevMemory(VMMDevMemory **ppVMMDevMemory);
--DECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
-+DECLVBGL(int) VbglQueryVMMDevMemory (VMMDevMemory **ppVMMDevMemory);
-+DECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
-
- # ifndef VBOX_GUEST
- /** @name Mouse
- * @{ */
--DECLVBGL(int) VbglSetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
--DECLVBGL(int) VbglGetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
--DECLVBGL(int) VbglSetMouseStatus(uint32_t fFeatures);
-+DECLVBGL(int) VbglSetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
-+DECLVBGL(int) VbglGetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
-+DECLVBGL(int) VbglSetMouseStatus(uint32_t fFeatures);
- /** @} */
- # endif /* VBOX_GUEST */
-
-@@ -491,7 +491,7 @@ VBGLR3DECL(int) VbglR3SetPointerShap
- * @{ */
- /** The folder for the video mode hint unix domain socket on Unix-like guests.
- * @note This can be safely changed as all users are rebuilt in lock-step. */
--#define VBGLR3HOSTDISPSOCKETPATH "/tmp/.VBoxService"
-+#define VBGLR3HOSTDISPSOCKETPATH "/tmp/.VBoxService"
- /** The path to the video mode hint unix domain socket on Unix-like guests. */
- #define VBGLR3HOSTDISPSOCKET VBGLR3VIDEOMODEHINTSOCKETPATH "/VideoModeHint"
-
-@@ -757,12 +757,16 @@ typedef struct VBGLR3GUESTDNDCMDCTX
- * a second communication channel, e.g. via TCP/IP.
- * Use a union for the HGCM stuff then. */
-
-- /** IN: HGCM client ID to use for communication. */
-+ /** HGCM client ID to use for communication. */
- uint32_t uClientID;
-- /** IN: Protocol version to use. */
-+ /** The VM's current session ID. */
-+ uint64_t uSessionID;
-+ /** Protocol version to use. */
- uint32_t uProtocol;
-- /** OUT: Number of parameters retrieved. */
-+ /** Number of parameters retrieved for the current command. */
- uint32_t uNumParms;
-+ /** Max chunk size (in bytes) for data transfers. */
-+ uint32_t cbMaxChunkSize;
- } VBGLR3GUESTDNDCMDCTX, *PVBGLR3GUESTDNDCMDCTX;
-
- typedef struct VBGLR3DNDHGCMEVENT
-@@ -770,7 +774,7 @@ typedef struct VBGLR3DNDHGCMEVENT
- uint32_t uType; /** The event type this struct contains. */
- uint32_t uScreenId; /** Screen ID this request belongs to. */
- char *pszFormats; /** Format list (\r\n separated). */
-- uint32_t cbFormats; /** Size of pszFormats (\0 included). */
-+ uint32_t cbFormats; /** Size (in bytes) of pszFormats (\0 included). */
- union
- {
- struct
-@@ -783,7 +787,7 @@ typedef struct VBGLR3DNDHGCMEVENT
- struct
- {
- void *pvData; /** Data request. */
-- size_t cbData; /** Size of pvData. */
-+ uint32_t cbData; /** Size (in bytes) of pvData. */
- } b; /** Values used in drop data event type. */
- } u;
- } VBGLR3DNDHGCMEVENT;
-@@ -792,14 +796,13 @@ typedef const PVBGLR3DNDHGCMEVENT CPVBGL
- VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3GUESTDNDCMDCTX pCtx);
- VBGLR3DECL(int) VbglR3DnDDisconnect(PVBGLR3GUESTDNDCMDCTX pCtx);
-
--VBGLR3DECL(int) VbglR3DnDProcessNextMessage(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent);
-+VBGLR3DECL(int) VbglR3DnDRecvNextMsg(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent);
-
--VBGLR3DECL(int) VbglR3DnDHGAcknowledgeOperation(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction);
--VBGLR3DECL(int) VbglR3DnDHGRequestData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pszFormat);
--VBGLR3DECL(int) VbglR3DnDHGSetProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
-+VBGLR3DECL(int) VbglR3DnDHGSendAckOp(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction);
-+VBGLR3DECL(int) VbglR3DnDHGSendReqData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pcszFormat);
-+VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
- # ifdef VBOX_WITH_DRAG_AND_DROP_GH
--VBGLR3DECL(int) VbglR3DnDGHAcknowledgePending(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uDefAction,
-- uint32_t uAllActions, const char *pszFormats);
-+VBGLR3DECL(int) VbglR3DnDGHSendAckPending(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats, uint32_t cbFormats);
- VBGLR3DECL(int) VbglR3DnDGHSendData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pszFormat, void *pvData, uint32_t cbData);
- VBGLR3DECL(int) VbglR3DnDGHSendError(PVBGLR3GUESTDNDCMDCTX pCtx, int rcOp);
- # endif /* VBOX_WITH_DRAG_AND_DROP_GH */
-@@ -838,6 +841,12 @@ VBGLR3DECL(int) VbglR3WriteVideoMode(uns
- unsigned y, unsigned fEnabled);
- /** @} */
-
-+/** @name Generic HGCM
-+ * @{ */
-+VBGLR3DECL(int) VbglR3HGCMConnect(const char *pszServiceName, HGCMCLIENTID *pidClient);
-+VBGLR3DECL(int) VbglR3HGCMDisconnect(HGCMCLIENTID idClient);
-+/** @} */
-+
- #endif /* IN_RING3 */
- /** @} */
-
---- virtualbox-5.0.16-dfsg.orig/include/VBox/VBoxVideo.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/VBoxVideo.h
-@@ -1105,6 +1105,8 @@ typedef struct VBVAMOUSEPOINTERSHAPE
- #define VBVACAPS_VIDEO_MODE_HINTS 0x00000004
- /** The guest can switch to a software cursor on demand. */
- #define VBVACAPS_DISABLE_CURSOR_INTEGRATION 0x00000008
-+/** The guest does not depend on host handling the VBE registers. */
-+#define VBVACAPS_USE_VBVA_ONLY 0x00000010
- typedef struct VBVACAPS
- {
- int32_t rc;
---- virtualbox-5.0.16-dfsg.orig/include/VBox/VBoxVideoGuest.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/VBoxVideoGuest.h
-@@ -222,6 +222,8 @@ RTDECL(void) VBoxHGSMIGetBaseMapping
- uint32_t *poffGuestHeapMemory,
- uint32_t *pcbGuestHeapMemory,
- uint32_t *poffHostFlags);
-+RTDECL(int) VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-+ HGSMIOFFSET offLocation);
- RTDECL(int) VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
- uint32_t fCaps);
- /** @todo we should provide a cleanup function too as part of the API */
---- virtualbox-5.0.16-dfsg.orig/include/VBox/usbfilter.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/usbfilter.h
-@@ -230,7 +230,8 @@ USBLIB_DECL(int) USBFilterSetIgnore(PUS
- USBLIB_DECL(int) USBFilterSetPresentOnly(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx);
- USBLIB_DECL(int) USBFilterSetNumExact(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, uint16_t u16Value, bool fMustBePresent);
- USBLIB_DECL(int) USBFilterSetNumExpression(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszExpression, bool fMustBePresent);
--USBLIB_DECL(int) USBFilterSetStringExact(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszValue, bool fMustBePresent);
-+USBLIB_DECL(int) USBFilterSetStringExact(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszValue,
-+ bool fMustBePresent, bool fPurge);
- USBLIB_DECL(int) USBFilterSetStringPattern(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszPattern, bool fMustBePresent);
- USBLIB_DECL(int) USBFilterSetMustBePresent(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, bool fMustBePresent);
-
---- virtualbox-5.0.16-dfsg.orig/include/VBox/usblib.h
-+++ virtualbox-5.0.16-dfsg/include/VBox/usblib.h
-@@ -3,7 +3,7 @@
- */
-
- /*
-- * Copyright (C) 2006-2015 Oracle Corporation
-+ * Copyright (C) 2006-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -30,6 +30,8 @@
- #include <VBox/types.h>
- #include <VBox/usb.h>
- #include <VBox/usbfilter.h>
-+#include <iprt/ctype.h>
-+#include <iprt/string.h>
-
- #ifdef RT_OS_WINDOWS
- # include <VBox/usblib-win.h>
-@@ -112,6 +114,58 @@ USBLIB_DECL(uint64_t) USBLibHashSerial(c
-
- #endif /* IN_RING3 */
-
-+/**
-+ * Purge string of non-UTF-8 encodings and control characters.
-+ *
-+ * Control characters creates problems when presented to the user and currently
-+ * also when used in XML settings. So, we must purge them in the USB vendor,
-+ * product, and serial number strings.
-+ *
-+ * @returns String length (excluding terminator).
-+ * @param psz The string to purge.
-+ */
-+DECLINLINE(size_t) USBLibPurgeEncoding(char *psz)
-+{
-+ if (psz)
-+ {
-+ size_t offSrc;
-+
-+ /* Beat it into valid UTF-8 encoding. */
-+ RTStrPurgeEncoding(psz);
-+
-+ /* Look for control characters. */
-+ for (offSrc = 0; ; offSrc++)
-+ {
-+ char ch = psz[offSrc];
-+ if (RT_UNLIKELY(RT_C_IS_CNTRL(ch) && ch != '\0'))
-+ {
-+ /* Found a control character! Replace tab by space and remove all others. */
-+ size_t offDst = offSrc;
-+ for (;; offSrc++)
-+ {
-+ ch = psz[offSrc];
-+ if (RT_C_IS_CNTRL(ch) && ch != '\0')
-+ {
-+ if (ch == '\t')
-+ ch = ' ';
-+ else
-+ continue;
-+ }
-+ psz[offDst++] = ch;
-+ if (ch == '\0')
-+ break;
-+ }
-+ return offDst;
-+ }
-+ if (ch == '\0')
-+ break;
-+ }
-+ return offSrc;
-+ }
-+ return 0;
-+}
-+
-+
- /** @} */
- RT_C_DECLS_END
-
---- virtualbox-5.0.16-dfsg.orig/include/iprt/assert.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/assert.h
-@@ -674,7 +674,7 @@ RT_C_DECLS_END
-
- /** @def AssertBreak
- * Assert that an expression is true and breaks if it isn't.
-- * In RT_STRICT mode it will hit a breakpoint before returning.
-+ * In RT_STRICT mode it will hit a breakpoint before breaking.
- *
- * @param expr Expression which should be true.
- */
-@@ -696,6 +696,30 @@ RT_C_DECLS_END
- break
- #endif
-
-+/** @def AssertContinue
-+ * Assert that an expression is true and continue if it isn't.
-+ * In RT_STRICT mode it will hit a breakpoint before continuing.
-+ *
-+ * @param expr Expression which should be true.
-+ */
-+#ifdef RT_STRICT
-+# define AssertContinue(expr) \
-+ if (RT_LIKELY(!!(expr))) \
-+ { /* likely */ } \
-+ else if (1) \
-+ { \
-+ RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
-+ RTAssertPanic(); \
-+ continue; \
-+ } else do {} while (0)
-+#else
-+# define AssertContinue(expr) \
-+ if (RT_LIKELY(!!(expr))) \
-+ { /* likely */ } \
-+ else \
-+ continue
-+#endif
-+
- /** @def AssertBreakStmt
- * Assert that an expression is true and breaks if it isn't.
- * In RT_STRICT mode it will hit a breakpoint before doing break.
---- virtualbox-5.0.16-dfsg.orig/include/iprt/ctype.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/ctype.h
-@@ -73,6 +73,8 @@ DECL_FORCE_INLINE(bool) RTLocCIsBlank(in
- *
- * @returns true / false.
- * @param ch The character to test.
-+ *
-+ * @note Will return true of ch is '\0'!
- */
- DECL_FORCE_INLINE(bool) RTLocCIsCntrl(int ch)
- {
---- virtualbox-5.0.16-dfsg.orig/include/iprt/err.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/err.h
-@@ -1452,6 +1452,8 @@ RT_C_DECLS_END
- #define VERR_LDRPE_LOAD_CONFIG_SIZE (-626)
- /** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
- #define VERR_LDRPE_LOCK_PREFIX_TABLE (-627)
-+/** The PE loader encountered some Guard CF stuff in the load config. */
-+#define VERR_LDRPE_GUARD_CF_STUFF (-628)
- /** The ELF loader doesn't handle foreign endianness. */
- #define VERR_LDRELF_ODD_ENDIAN (-630)
- /** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
---- virtualbox-5.0.16-dfsg.orig/include/iprt/mangling.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/mangling.h
-@@ -1878,18 +1878,21 @@
- # define RTUriParsedQuery RT_MANGLER(RTUriParsedQuery)
- # define RTUriIsSchemeMatch RT_MANGLER(RTUriIsSchemeMatch)
- # define RTUtf16AllocTag RT_MANGLER(RTUtf16AllocTag)
-+# define RTUtf16ReallocTag RT_MANGLER(RTUtf16ReallocTag)
- # define RTUtf16CalcLatin1Len RT_MANGLER(RTUtf16CalcLatin1Len)
- # define RTUtf16CalcLatin1LenEx RT_MANGLER(RTUtf16CalcLatin1LenEx)
- # define RTUtf16CalcUtf8Len RT_MANGLER(RTUtf16CalcUtf8Len)
- # define RTUtf16CalcUtf8LenEx RT_MANGLER(RTUtf16CalcUtf8LenEx)
- # define RTUtf16Cmp RT_MANGLER(RTUtf16Cmp)
- # define RTUtf16CmpAscii RT_MANGLER(RTUtf16CmpAscii)
-+# define RTUtf16CmpUtf8 RT_MANGLER(RTUtf16CmpUtf8)
- # define RTUtf16DupExTag RT_MANGLER(RTUtf16DupExTag)
- # define RTUtf16DupTag RT_MANGLER(RTUtf16DupTag)
- # define RTUtf16Free RT_MANGLER(RTUtf16Free)
- # define RTUtf16GetCpExInternal RT_MANGLER(RTUtf16GetCpExInternal)
- # define RTUtf16GetCpInternal RT_MANGLER(RTUtf16GetCpInternal)
- # define RTUtf16ICmp RT_MANGLER(RTUtf16ICmp)
-+# define RTUtf16ICmpUtf8 RT_MANGLER(RTUtf16ICmpUtf8)
- # define RTUtf16IsValidEncoding RT_MANGLER(RTUtf16IsValidEncoding)
- # define RTUtf16Len RT_MANGLER(RTUtf16Len)
- # define RTUtf16LocaleICmp RT_MANGLER(RTUtf16LocaleICmp)
---- virtualbox-5.0.16-dfsg.orig/include/iprt/nt/nt.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/nt/nt.h
-@@ -248,6 +248,17 @@ RTDECL(int) RTNtPathOpenDir(const char *
- RTDECL(int) RTNtPathClose(HANDLE hHandle);
-
- /**
-+ * Converts a windows-style path to NT format and encoding.
-+ *
-+ * @returns IPRT status code.
-+ * @param pNtName Where to return the NT name. Free using
-+ * RTNtPathFree.
-+ * @param phRootDir Where to return the root handle, if applicable.
-+ * @param pszPath The UTF-8 path.
-+ */
-+RTDECL(int) RTNtPathFromWinUtf8(struct _UNICODE_STRING *pNtName, PHANDLE phRootDir, const char *pszPath);
-+
-+/**
- * Converts a UTF-16 windows-style path to NT format.
- *
- * @returns IPRT status code.
-@@ -262,16 +273,61 @@ RTDECL(int) RTNtPathClose(HANDLE hHandle
- RTDECL(int) RTNtPathFromWinUtf16Ex(struct _UNICODE_STRING *pNtName, HANDLE *phRootDir, PCRTUTF16 pwszPath, size_t cwcPath);
-
- /**
-+ * Ensures that the NT string has sufficient storage to hold @a cwcMin RTUTF16
-+ * chars plus a terminator.
-+ *
-+ * The NT string must have been returned by RTNtPathFromWinUtf8 or
-+ * RTNtPathFromWinUtf16Ex.
-+ *
-+ * @returns IPRT status code.
-+ * @param pNtName The NT path string.
-+ * @param cwcMin The minimum number of RTUTF16 chars. Max 32767.
-+ * @sa RTNtPathFree
-+ */
-+RTDECL(int) RTNtPathEnsureSpace(struct _UNICODE_STRING *pNtName, size_t cwcMin);
-+
-+/**
- * Frees the native path and root handle.
- *
-- * @param pNtName The NT path after a successful
-- * RTNtPathFromWinUtf16Ex call.
-- * @param phRootDir The root handle variable after a successfull
-- * RTNtPathFromWinUtf16Ex call.
-+ * @param pNtName The NT path from a successful call to
-+ * RTNtPathFromWinUtf8 or RTNtPathFromWinUtf16Ex.
-+ * @param phRootDir The root handle variable from the same call.
- */
- RTDECL(void) RTNtPathFree(struct _UNICODE_STRING *pNtName, HANDLE *phRootDir);
-
-
-+/**
-+ * Checks whether the path could be containing alternative 8.3 names generated
-+ * by NTFS, FAT, or other similar file systems.
-+ *
-+ * @returns Pointer to the first component that might be an 8.3 name, NULL if
-+ * not 8.3 path.
-+ * @param pwszPath The path to check.
-+ *
-+ * @remarks This is making bad ASSUMPTION wrt to the naming scheme of 8.3 names,
-+ * however, non-tilde 8.3 aliases are probably rare enough to not be
-+ * worth all the extra code necessary to open each path component and
-+ * check if we've got the short name or not.
-+ */
-+RTDECL(PRTUTF16) RTNtPathFindPossible8dot3Name(PCRTUTF16 pwszPath);
-+
-+/**
-+ * Fixes up a path possibly containing one or more alternative 8-dot-3 style
-+ * components.
-+ *
-+ * The path is fixed up in place. Errors are ignored.
-+ *
-+ * @returns VINF_SUCCESS if it all went smoothly, informational status codes
-+ * indicating the nature of last problem we ran into.
-+ *
-+ * @param pUniStr The path to fix up. MaximumLength is the max buffer
-+ * length.
-+ * @param fPathOnly Whether to only process the path and leave the filename
-+ * as passed in.
-+ */
-+RTDECL(int) RTNtPathExpand8dot3Path(struct _UNICODE_STRING *pUniStr, bool fPathOnly);
-+
-+
- RT_C_DECLS_END
- /** @} */
-
---- virtualbox-5.0.16-dfsg.orig/include/iprt/req.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/req.h
-@@ -111,12 +111,25 @@ RTDECL(int) RTReqQueueDestroy(RTREQQUEUE
- /**
- * Process one or more request packets
- *
-- * @returns iprt status code.
-- * @returns VERR_TIMEOUT if cMillies was reached without the packet being added.
-+ * @returns iprt status code. Any non-VINF_SUCCESS returns from request
-+ * processing is immediately propagated to the caller.
-+ * @retval VERR_TIMEOUT if @a cMillies was reached without the packet being
-+ * added.
-+ * @retval VERR_INVALID_HANDLE if @a hQueue not a valid queue handle.
- *
- * @param hQueue The request queue.
-- * @param cMillies Number of milliseconds to wait for a pending request.
-- * Use RT_INDEFINITE_WAIT to only wait till one is added.
-+ * @param cMillies Max number of milliseconds to wait for a pending
-+ * request. This is not adjusted down before another
-+ * wait, so the function may end up waiting for much
-+ * longer than the given amount if there are requests
-+ * trickling in at a rate slightly higher than the
-+ * timeout.
-+ *
-+ * Use RT_INDEFINITE_WAIT to process requests until a
-+ * non-VINF_SUCCESS return code is encountered.
-+ *
-+ * @remarks The function may repeatedly try wait for @a cMillies on new
-+ * requests if requests arrive before it times out.
- */
- RTDECL(int) RTReqQueueProcess(RTREQQUEUE hQueue, RTMSINTERVAL cMillies);
-
---- virtualbox-5.0.16-dfsg.orig/include/iprt/sg.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/sg.h
-@@ -79,6 +79,10 @@ typedef PRTSGBUF *PPRTSGBUF;
- * @param pSgBuf Pointer to the S/G buffer to initialize.
- * @param paSegs Pointer to the start of the segment array.
- * @param cSegs Number of segments in the array.
-+ *
-+ * @note paSegs and cSegs can be NULL and 0 respectively to indicate
-+ * an empty S/G buffer. All operations on the S/G buffer will
-+ * not do anything in this case.
- */
- RTDECL(void) RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, size_t cSegs);
-
---- virtualbox-5.0.16-dfsg.orig/include/iprt/utf16.h
-+++ virtualbox-5.0.16-dfsg/include/iprt/utf16.h
-@@ -81,6 +81,78 @@ RT_C_DECLS_BEGIN
- */
- RTDECL(PRTUTF16) RTUtf16AllocTag(size_t cb, const char *pszTag);
-
-+/**
-+ * Reallocates the specified UTF-16 string (default tag).
-+ *
-+ * You should normally not use this function, except if there is some very
-+ * custom string handling you need doing that isn't covered by any of the other
-+ * APIs.
-+ *
-+ * @returns VINF_SUCCESS.
-+ * @retval VERR_NO_UTF16_MEMORY if we failed to reallocate the string, @a
-+ * *ppwsz remains unchanged.
-+ *
-+ * @param ppwsz Pointer to the string variable containing the
-+ * input and output string.
-+ *
-+ * When not freeing the string, the result will
-+ * always have the last RTUTF16 set to the
-+ * terminator character so that when used for
-+ * string truncation the result will be a valid
-+ * C-style string (your job to keep it a valid
-+ * UTF-16 string).
-+ *
-+ * When the input string is NULL and we're supposed
-+ * to reallocate, the returned string will also
-+ * have the first RTUTF16 set to the terminator
-+ * char so it will be a valid C-style string.
-+ *
-+ * @param cbNew When @a cbNew is zero, we'll behave like
-+ * RTUtf16Free and @a *ppwsz will be set to NULL.
-+ *
-+ * When not zero, this will be rounded up to a
-+ * multiple of two, and used as the new size of the
-+ * memory backing the string, i.e. it includes the
-+ * terminator (RTUTF16) char.
-+ */
-+#define RTUtf16Realloc(ppwsz, cb) RTUtf16ReallocTag((ppwsz), (cb), RTSTR_TAG)
-+
-+/**
-+ * Reallocates the specified UTF-16 string (custom tag).
-+ *
-+ * You should normally not use this function, except if there is some very
-+ * custom string handling you need doing that isn't covered by any of the other
-+ * APIs.
-+ *
-+ * @returns VINF_SUCCESS.
-+ * @retval VERR_NO_UTF16_MEMORY if we failed to reallocate the string, @a
-+ * *ppwsz remains unchanged.
-+ *
-+ * @param ppwsz Pointer to the string variable containing the
-+ * input and output string.
-+ *
-+ * When not freeing the string, the result will
-+ * always have the last RTUTF16 set to the
-+ * terminator character so that when used for
-+ * string truncation the result will be a valid
-+ * C-style string (your job to keep it a valid
-+ * UTF-16 string).
-+ *
-+ * When the input string is NULL and we're supposed
-+ * to reallocate, the returned string will also
-+ * have the first RTUTF16 set to the terminator
-+ * char so it will be a valid C-style string.
-+ *
-+ * @param cbNew When @a cbNew is zero, we'll behave like
-+ * RTUtf16Free and @a *ppwsz will be set to NULL.
-+ *
-+ * When not zero, this will be rounded up to a
-+ * multiple of two, and used as the new size of the
-+ * memory backing the string, i.e. it includes the
-+ * terminator (RTUTF16) char.
-+ * @param pszTag Allocation tag used for statistics and such.
-+ */
-+RTDECL(int) RTUtf16ReallocTag(PRTUTF16 *ppwsz, size_t cbNew, const char *pszTag);
-
- /**
- * Free a UTF-16 string allocated by RTStrToUtf16(), RTStrToUtf16Ex(),
-@@ -332,6 +404,19 @@ RTDECL(int) RTUtf16Cmp(PCRTUTF16 pwsz1,
- RTDECL(int) RTUtf16CmpAscii(PCRTUTF16 pwsz1, const char *psz2);
-
- /**
-+ * Performs a case sensitive string compare between an UTF-16 string and a UTF-8
-+ * string.
-+ *
-+ * @returns < 0 if the first string less than the second string.s
-+ * @returns 0 if the first string identical to the second string.
-+ * @returns > 0 if the first string greater than the second string.
-+ * @param pwsz1 First UTF-16 string. Null is allowed.
-+ * @param psz2 Second string, UTF-8. Null is allowed.
-+ * @remarks NULL and empty strings are treated equally.
-+ */
-+RTDECL(int) RTUtf16CmpUtf8(PCRTUTF16 pwsz1, const char *psz2);
-+
-+/**
- * Performs a case insensitive string compare between two UTF-16 strings.
- *
- * This is a simplified compare, as only the simplified lower/upper case folding
-@@ -347,6 +432,19 @@ RTDECL(int) RTUtf16CmpAscii(PCRTUTF16 pw
- RTDECL(int) RTUtf16ICmp(PCRTUTF16 pwsz1, PCRTUTF16 pwsz2);
-
- /**
-+ * Performs a case insensitive string compare between an UTF-16 string and a
-+ * UTF-8 string.
-+ *
-+ * @returns < 0 if the first string less than the second string.s
-+ * @returns 0 if the first string identical to the second string.
-+ * @returns > 0 if the first string greater than the second string.
-+ * @param pwsz1 First UTF-16 string. Null is allowed.
-+ * @param psz2 Second string, UTF-8. Null is allowed.
-+ * @remarks NULL and empty strings are treated equally.
-+ */
-+RTDECL(int) RTUtf16ICmpUtf8(PCRTUTF16 pwsz1, const char *psz2);
-+
-+/**
- * Performs a case insensitive string compare between an UTF-16 string and an
- * pure ASCII string.
- *
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
-@@ -528,7 +528,7 @@ NTSTATUS vgdrvNtInit(PDRIVER_OBJECT pDrv
- }
- #endif
-
-- if (RT_SUCCESS(rcNt))
-+ if (NT_SUCCESS(rcNt))
- {
- ULONG uValue = 0;
- NTSTATUS rcNt2 = vgdrvNtRegistryReadDWORD(RTL_REGISTRY_SERVICES, L"VBoxGuest", L"LoggingEnabled", &uValue);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
-@@ -109,6 +109,7 @@ VBoxGuestR3Lib_SOURCES = \
- VBoxGuestR3LibEvent.cpp \
- VBoxGuestR3LibGuestUser.cpp \
- VBoxGuestR3LibGR.cpp \
-+ VBoxGuestR3LibHGCM.cpp \
- VBoxGuestR3LibHostChannel.cpp \
- VBoxGuestR3LibLog.cpp \
- VBoxGuestR3LibMisc.cpp \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -47,39 +47,36 @@
- #include <VBox/GuestHost/DragAndDrop.h>
- #include <VBox/HostServices/DragAndDropSvc.h>
-
-+using namespace DragAndDropSvc;
-+
- #include "VBGLR3Internal.h"
-
--/* Here all the communication with the host over HGCM is handled platform
-- * neutral. Also the receiving of URIs content (directory trees and files) is
-- * done here. So the platform code of the guests, should not take care of that.
-- *
-- * Todo:
-- * - Sending dirs/files in the G->H case
-- * - Maybe the EOL converting of text MIME types (not fully sure, eventually
-- * better done on the host side)
-- */
-+/*********************************************************************************************************************************
-+* Forward declarations *
-+*********************************************************************************************************************************/
-
-+VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
-
- /*********************************************************************************************************************************
--* Private internal functions *
-+* Private internal functions *
- *********************************************************************************************************************************/
-
--static int vbglR3DnDQueryNextHostMessageType(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t *puMsg, uint32_t *pcParms, bool fWait)
-+static int vbglR3DnDGetNextMsgType(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t *puMsg, uint32_t *pcParms, bool fWait)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(puMsg, VERR_INVALID_POINTER);
- AssertPtrReturn(pcParms, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDNEXTMSGMSG Msg;
-+ VBOXDNDNEXTMSGMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG;
-+ Msg.hdr.u32Function = GUEST_DND_GET_NEXT_HOST_MSG;
- Msg.hdr.cParms = 3;
-
-- Msg.msg.SetUInt32(0);
-- Msg.num_parms.SetUInt32(0);
-- Msg.block.SetUInt32(fWait ? 1 : 0);
-+ Msg.uMsg.SetUInt32(0);
-+ Msg.cParms.SetUInt32(0);
-+ Msg.fBlock.SetUInt32(fWait ? 1 : 0);
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -87,24 +84,25 @@ static int vbglR3DnDQueryNextHostMessage
- rc = Msg.hdr.result;
- if (RT_SUCCESS(rc))
- {
-- rc = Msg.msg.GetUInt32(puMsg); AssertRC(rc);
-- rc = Msg.num_parms.GetUInt32(pcParms); AssertRC(rc);
-+ rc = Msg.uMsg.GetUInt32(puMsg); AssertRC(rc);
-+ rc = Msg.cParms.GetUInt32(pcParms); AssertRC(rc);
- }
- }
-
- return rc;
- }
-
--static int vbglR3DnDHGProcessActionMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t uMsg,
-- uint32_t *puScreenId,
-- uint32_t *puX,
-- uint32_t *puY,
-- uint32_t *puDefAction,
-- uint32_t *puAllActions,
-- char *pszFormats,
-- uint32_t cbFormats,
-- uint32_t *pcbFormatsRecv)
-+/** @todo r=andy Clean up the parameter list. */
-+static int vbglR3DnDHGRecvAction(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ uint32_t uMsg,
-+ uint32_t *puScreenId,
-+ uint32_t *puX,
-+ uint32_t *puY,
-+ uint32_t *puDefAction,
-+ uint32_t *puAllActions,
-+ char *pszFormats,
-+ uint32_t cbFormats,
-+ uint32_t *pcbFormatsRecv)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-@@ -116,19 +114,37 @@ static int vbglR3DnDHGProcessActionMessa
- AssertReturn(cbFormats, VERR_INVALID_PARAMETER);
- AssertPtrReturn(pcbFormatsRecv, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGACTIONMSG Msg;
-+ VBOXDNDHGACTIONMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
- Msg.hdr.u32Function = uMsg;
-- Msg.hdr.cParms = 7;
-
-- Msg.uScreenId.SetUInt32(0);
-- Msg.uX.SetUInt32(0);
-- Msg.uY.SetUInt32(0);
-- Msg.uDefAction.SetUInt32(0);
-- Msg.uAllActions.SetUInt32(0);
-- Msg.pvFormats.SetPtr(pszFormats, cbFormats);
-- Msg.cFormats.SetUInt32(0);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 7;
-+
-+ Msg.u.v1.uScreenId.SetUInt32(0);
-+ Msg.u.v1.uX.SetUInt32(0);
-+ Msg.u.v1.uY.SetUInt32(0);
-+ Msg.u.v1.uDefAction.SetUInt32(0);
-+ Msg.u.v1.uAllActions.SetUInt32(0);
-+ Msg.u.v1.pvFormats.SetPtr(pszFormats, cbFormats);
-+ Msg.u.v1.cbFormats.SetUInt32(0);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 8;
-+
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uScreenId.SetUInt32(0);
-+ Msg.u.v3.uX.SetUInt32(0);
-+ Msg.u.v3.uY.SetUInt32(0);
-+ Msg.u.v3.uDefAction.SetUInt32(0);
-+ Msg.u.v3.uAllActions.SetUInt32(0);
-+ Msg.u.v3.pvFormats.SetPtr(pszFormats, cbFormats);
-+ Msg.u.v3.cbFormats.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -136,12 +152,25 @@ static int vbglR3DnDHGProcessActionMessa
- rc = Msg.hdr.result;
- if (RT_SUCCESS(rc))
- {
-- rc = Msg.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
-- rc = Msg.uX.GetUInt32(puX); AssertRC(rc);
-- rc = Msg.uY.GetUInt32(puY); AssertRC(rc);
-- rc = Msg.uDefAction.GetUInt32(puDefAction); AssertRC(rc);
-- rc = Msg.uAllActions.GetUInt32(puAllActions); AssertRC(rc);
-- rc = Msg.cFormats.GetUInt32(pcbFormatsRecv); AssertRC(rc);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ rc = Msg.u.v1.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
-+ rc = Msg.u.v1.uX.GetUInt32(puX); AssertRC(rc);
-+ rc = Msg.u.v1.uY.GetUInt32(puY); AssertRC(rc);
-+ rc = Msg.u.v1.uDefAction.GetUInt32(puDefAction); AssertRC(rc);
-+ rc = Msg.u.v1.uAllActions.GetUInt32(puAllActions); AssertRC(rc);
-+ rc = Msg.u.v1.cbFormats.GetUInt32(pcbFormatsRecv); AssertRC(rc);
-+ }
-+ else
-+ {
-+ /** @todo Context ID not used yet. */
-+ rc = Msg.u.v3.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
-+ rc = Msg.u.v3.uX.GetUInt32(puX); AssertRC(rc);
-+ rc = Msg.u.v3.uY.GetUInt32(puY); AssertRC(rc);
-+ rc = Msg.u.v3.uDefAction.GetUInt32(puDefAction); AssertRC(rc);
-+ rc = Msg.u.v3.uAllActions.GetUInt32(puAllActions); AssertRC(rc);
-+ rc = Msg.u.v3.cbFormats.GetUInt32(pcbFormatsRecv); AssertRC(rc);
-+ }
-
- AssertReturn(cbFormats >= *pcbFormatsRecv, VERR_TOO_MUCH_DATA);
- }
-@@ -150,15 +179,26 @@ static int vbglR3DnDHGProcessActionMessa
- return rc;
- }
-
--static int vbglR3DnDHGProcessLeaveMessage(PVBGLR3GUESTDNDCMDCTX pCtx)
-+static int vbglR3DnDHGRecvLeave(PVBGLR3GUESTDNDCMDCTX pCtx)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGLEAVEMSG Msg;
-+ VBOXDNDHGLEAVEMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_EVT_LEAVE;
-- Msg.hdr.cParms = 0;
-+ Msg.hdr.u32Function = HOST_DND_HG_EVT_LEAVE;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 0;
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -167,15 +207,27 @@ static int vbglR3DnDHGProcessLeaveMessag
- return rc;
- }
-
--static int vbglR3DnDHGProcessCancelMessage(PVBGLR3GUESTDNDCMDCTX pCtx)
-+static int vbglR3DnDHGRecvCancel(PVBGLR3GUESTDNDCMDCTX pCtx)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGCANCELMSG Msg;
-+ VBOXDNDHGCANCELMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_EVT_CANCEL;
-- Msg.hdr.cParms = 0;
-+ Msg.hdr.u32Function = HOST_DND_HG_EVT_CANCEL;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 0;
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -184,11 +236,11 @@ static int vbglR3DnDHGProcessCancelMessa
- return rc;
- }
-
--static int vbglR3DnDHGProcessSendDirMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- char *pszDirname,
-- uint32_t cbDirname,
-- uint32_t *pcbDirnameRecv,
-- uint32_t *pfMode)
-+static int vbglR3DnDHGRecvDir(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ char *pszDirname,
-+ uint32_t cbDirname,
-+ uint32_t *pcbDirnameRecv,
-+ uint32_t *pfMode)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pszDirname, VERR_INVALID_POINTER);
-@@ -196,15 +248,30 @@ static int vbglR3DnDHGProcessSendDirMess
- AssertPtrReturn(pcbDirnameRecv, VERR_INVALID_POINTER);
- AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGSENDDIRMSG Msg;
-+ VBOXDNDHGSENDDIRMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_SND_DIR;
-- Msg.hdr.cParms = 3;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_DIR;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 3;
-
-- Msg.pvName.SetPtr(pszDirname, cbDirname);
-- Msg.cbName.SetUInt32(0);
-- Msg.fMode.SetUInt32(0);
-+ Msg.u.v1.pvName.SetPtr(pszDirname, cbDirname);
-+ Msg.u.v1.cbName.SetUInt32(cbDirname);
-+ Msg.u.v1.fMode.SetUInt32(0);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 4;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvName.SetPtr(pszDirname, cbDirname);
-+ Msg.u.v3.cbName.SetUInt32(cbDirname);
-+ Msg.u.v3.fMode.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -212,8 +279,17 @@ static int vbglR3DnDHGProcessSendDirMess
- rc = Msg.hdr.result;
- if (RT_SUCCESS(Msg.hdr.result))
- {
-- rc = Msg.cbName.GetUInt32(pcbDirnameRecv); AssertRC(rc);
-- rc = Msg.fMode.GetUInt32(pfMode); AssertRC(rc);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ rc = Msg.u.v1.cbName.GetUInt32(pcbDirnameRecv); AssertRC(rc);
-+ rc = Msg.u.v1.fMode.GetUInt32(pfMode); AssertRC(rc);
-+ }
-+ else
-+ {
-+ /** @todo Context ID not used yet. */
-+ rc = Msg.u.v3.cbName.GetUInt32(pcbDirnameRecv); AssertRC(rc);
-+ rc = Msg.u.v3.fMode.GetUInt32(pfMode); AssertRC(rc);
-+ }
-
- AssertReturn(cbDirname >= *pcbDirnameRecv, VERR_TOO_MUCH_DATA);
- }
-@@ -222,14 +298,14 @@ static int vbglR3DnDHGProcessSendDirMess
- return rc;
- }
-
--static int vbglR3DnDHGProcessSendFileMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- char *pszFilename,
-- uint32_t cbFilename,
-- uint32_t *pcbFilenameRecv,
-- void *pvData,
-- uint32_t cbData,
-- uint32_t *pcbDataRecv,
-- uint32_t *pfMode)
-+static int vbglR3DnDHGRecvFileData(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ char *pszFilename,
-+ uint32_t cbFilename,
-+ uint32_t *pcbFilenameRecv,
-+ void *pvData,
-+ uint32_t cbData,
-+ uint32_t *pcbDataRecv,
-+ uint32_t *pfMode)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
-@@ -240,29 +316,42 @@ static int vbglR3DnDHGProcessSendFileMes
- AssertPtrReturn(pcbDataRecv, VERR_INVALID_POINTER);
- AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGSENDFILEDATAMSG Msg;
-+ VBOXDNDHGSENDFILEDATAMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_FILE_DATA;
-
- if (pCtx->uProtocol <= 1)
- {
- Msg.u.v1.pvName.SetPtr(pszFilename, cbFilename);
-- Msg.u.v1.cbName.SetUInt32(cbFilename);
-+ Msg.u.v1.cbName.SetUInt32(0);
- Msg.u.v1.pvData.SetPtr(pvData, cbData);
-- Msg.u.v1.cbData.SetUInt32(cbData);
-+ Msg.u.v1.cbData.SetUInt32(0);
- Msg.u.v1.fMode.SetUInt32(0);
-
- Msg.hdr.cParms = 5;
- }
-- else
-+ else if (pCtx->uProtocol == 2)
- {
-- Msg.u.v2.uContext.SetUInt32(0); /** @todo Not used yet. */
-+ Msg.u.v2.uContext.SetUInt32(0);
- Msg.u.v2.pvData.SetPtr(pvData, cbData);
- Msg.u.v2.cbData.SetUInt32(cbData);
-
- Msg.hdr.cParms = 3;
- }
-+ else if (pCtx->uProtocol >= 3)
-+ {
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvData.SetPtr(pvData, cbData);
-+ Msg.u.v3.cbData.SetUInt32(0);
-+ Msg.u.v3.pvChecksum.SetPtr(NULL, 0);
-+ Msg.u.v3.cbChecksum.SetUInt32(0);
-+
-+ Msg.hdr.cParms = 5;
-+ }
-+ else
-+ AssertMsgFailed(("Protocol %RU32 not implemented\n", pCtx->uProtocol));
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -279,24 +368,33 @@ static int vbglR3DnDHGProcessSendFileMes
- AssertReturn(cbFilename >= *pcbFilenameRecv, VERR_TOO_MUCH_DATA);
- AssertReturn(cbData >= *pcbDataRecv, VERR_TOO_MUCH_DATA);
- }
-- else
-+ else if (pCtx->uProtocol == 2)
- {
-+ /** @todo Context ID not used yet. */
- rc = Msg.u.v2.cbData.GetUInt32(pcbDataRecv); AssertRC(rc);
- AssertReturn(cbData >= *pcbDataRecv, VERR_TOO_MUCH_DATA);
- }
-+ else if (pCtx->uProtocol >= 3)
-+ {
-+ /** @todo Context ID not used yet. */
-+ rc = Msg.u.v3.cbData.GetUInt32(pcbDataRecv); AssertRC(rc);
-+ AssertReturn(cbData >= *pcbDataRecv, VERR_TOO_MUCH_DATA);
-+ /** @todo Add checksum support. */
-+ }
-+ else
-+ AssertMsgFailed(("Protocol %RU32 not implemented\n", pCtx->uProtocol));
- }
- }
-
-- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--static int vbglR3DnDHGProcessSendFileHdrMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- char *pszFilename,
-- uint32_t cbFilename,
-- uint32_t *puFlags,
-- uint32_t *pfMode,
-- uint64_t *pcbTotal)
-+static int vbglR3DnDHGRecvFileHdr(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ char *pszFilename,
-+ uint32_t cbFilename,
-+ uint32_t *puFlags,
-+ uint32_t *pfMode,
-+ uint64_t *pcbTotal)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
-@@ -305,10 +403,11 @@ static int vbglR3DnDHGProcessSendFileHdr
- AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
- AssertReturn(pcbTotal, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGSENDFILEHDRMSG Msg;
-+ VBOXDNDHGSENDFILEHDRMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_FILE_HDR;
-
- int rc;
-
-@@ -318,6 +417,8 @@ static int vbglR3DnDHGProcessSendFileHdr
- }
- else
- {
-+ Msg.hdr.cParms = 6;
-+
- Msg.uContext.SetUInt32(0); /** @todo Not used yet. */
- Msg.pvName.SetPtr(pszFilename, cbFilename);
- Msg.cbName.SetUInt32(cbFilename);
-@@ -325,8 +426,6 @@ static int vbglR3DnDHGProcessSendFileHdr
- Msg.fMode.SetUInt32(0);
- Msg.cbTotal.SetUInt64(0);
-
-- Msg.hdr.cParms = 6;
--
- rc = VINF_SUCCESS;
- }
-
-@@ -347,24 +446,45 @@ static int vbglR3DnDHGProcessSendFileHdr
- return rc;
- }
-
--static int vbglR3DnDHGProcessURIMessages(PVBGLR3GUESTDNDCMDCTX pCtx,
-- void **ppvData,
-- uint32_t cbData,
-- size_t *pcbDataRecv)
-+static int vbglR3DnDHGRecvURIData(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr, DnDDroppedFiles *pDroppedFiles)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(ppvData, VERR_INVALID_POINTER);
-- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-- AssertPtrReturn(pcbDataRecv, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pDroppedFiles, VERR_INVALID_POINTER);
-+
-+ /* Only count the raw data minus the already received meta data. */
-+ Assert(pDataHdr->cbTotal >= pDataHdr->cbMeta);
-+ uint64_t cbToRecvBytes = pDataHdr->cbTotal - pDataHdr->cbMeta;
-+ uint64_t cToRecvObjs = pDataHdr->cObjects;
-+
-+ LogFlowFunc(("cbToRecvBytes=%RU64, cToRecvObjs=%RU64, (cbTotal=%RU64, cbMeta=%RU32)\n",
-+ cbToRecvBytes, cToRecvObjs, pDataHdr->cbTotal, pDataHdr->cbMeta));
-
- /*
-- * Allocate chunk buffer.
-+ * Only do accounting for protocol v3 and up.
-+ * The older protocols did not have any data accounting available, so
-+ * we simply tried to receive as much data as available and bail out.
- */
-- uint32_t cbChunkMax = _64K; /** @todo Make this configurable? */
-+ const bool fDoAccounting = pCtx->uProtocol >= 3;
-+
-+ /* Anything to do at all? */
-+ if (fDoAccounting)
-+ {
-+ if ( !cbToRecvBytes
-+ && !cToRecvObjs)
-+ {
-+ return VINF_SUCCESS;
-+ }
-+ }
-+
-+ /*
-+ * Allocate temporary chunk buffer.
-+ */
-+ uint32_t cbChunkMax = pCtx->cbMaxChunkSize;
- void *pvChunk = RTMemAlloc(cbChunkMax);
- if (!pvChunk)
- return VERR_NO_MEMORY;
-- uint32_t cbChunkRead = 0;
-+ uint32_t cbChunkRead = 0;
-
- uint64_t cbFileSize = 0; /* Total file size (in bytes). */
- uint64_t cbFileWritten = 0; /* Written bytes. */
-@@ -372,41 +492,53 @@ static int vbglR3DnDHGProcessURIMessages
- /*
- * Create and query the (unique) drop target directory in the user's temporary directory.
- */
-- DNDDIRDROPPEDFILES dirDroppedFiles;
-- const char *pszDropDir = NULL;
-- int rc = DnDDirDroppedFilesCreateAndOpenTemp(&dirDroppedFiles);
-- if (RT_SUCCESS(rc))
-- pszDropDir = DnDDirDroppedFilesGetDirAbs(&dirDroppedFiles);
-+ int rc = pDroppedFiles->OpenTemp(0 /* fFlags */);
-+ if (RT_FAILURE(rc))
-+ {
-+ RTMemFree(pvChunk);
-+ return VERR_NO_MEMORY;
-+ }
-+
-+ const char *pszDropDir = pDroppedFiles->GetDirAbs();
-+ AssertPtr(pszDropDir);
-
- /*
- * Enter the main loop of retieving files + directories.
- */
-- DnDURIList lstURI;
- DnDURIObject objFile(DnDURIObject::File);
-
- char szPathName[RTPATH_MAX] = { 0 };
- uint32_t cbPathName = 0;
-- uint32_t fFlags = 0;
-- uint32_t fMode = 0;
-+ uint32_t fFlags = 0;
-+ uint32_t fMode = 0;
-
-- while (RT_SUCCESS(rc))
-+ /*
-+ * Only wait for new incoming commands for protocol v3 and up.
-+ * The older protocols did not have any data accounting available, so
-+ * we simply tried to receive as much data as available and bail out.
-+ */
-+ const bool fWait = pCtx->uProtocol >= 3;
-+
-+ do
- {
-+ LogFlowFunc(("Wating for new message ...\n"));
-+
- uint32_t uNextMsg;
- uint32_t cNextParms;
-- rc = vbglR3DnDQueryNextHostMessageType(pCtx, &uNextMsg, &cNextParms, false /* fWait */);
-+ rc = vbglR3DnDGetNextMsgType(pCtx, &uNextMsg, &cNextParms, fWait);
- if (RT_SUCCESS(rc))
- {
- LogFlowFunc(("uNextMsg=%RU32, cNextParms=%RU32\n", uNextMsg, cNextParms));
-
- switch (uNextMsg)
- {
-- case DragAndDropSvc::HOST_DND_HG_SND_DIR:
-+ case HOST_DND_HG_SND_DIR:
- {
-- rc = vbglR3DnDHGProcessSendDirMessage(pCtx,
-- szPathName,
-- sizeof(szPathName),
-- &cbPathName,
-- &fMode);
-+ rc = vbglR3DnDHGRecvDir(pCtx,
-+ szPathName,
-+ sizeof(szPathName),
-+ &cbPathName,
-+ &fMode);
- LogFlowFunc(("HOST_DND_HG_SND_DIR pszPathName=%s, cbPathName=%RU32, fMode=0x%x, rc=%Rrc\n",
- szPathName, cbPathName, fMode, rc));
-
-@@ -420,7 +552,14 @@ static int vbglR3DnDHGProcessURIMessages
- #endif
- rc = RTDirCreate(pszPathAbs, fCreationMode, 0);
- if (RT_SUCCESS(rc))
-- rc = DnDDirDroppedAddDir(&dirDroppedFiles, pszPathAbs);
-+ rc = pDroppedFiles->AddDir(pszPathAbs);
-+
-+ if ( RT_SUCCESS(rc)
-+ && fDoAccounting)
-+ {
-+ Assert(cToRecvObjs);
-+ cToRecvObjs--;
-+ }
-
- RTStrFree(pszPathAbs);
- }
-@@ -428,38 +567,40 @@ static int vbglR3DnDHGProcessURIMessages
- rc = VERR_NO_MEMORY;
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR:
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA:
-+ case HOST_DND_HG_SND_FILE_HDR:
-+ case HOST_DND_HG_SND_FILE_DATA:
- {
-- if (uNextMsg == DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR)
-+ if (uNextMsg == HOST_DND_HG_SND_FILE_HDR)
- {
-- rc = vbglR3DnDHGProcessSendFileHdrMessage(pCtx,
-- szPathName,
-- sizeof(szPathName),
-- &fFlags,
-- &fMode,
-- &cbFileSize);
-- LogFlowFunc(("HOST_DND_HG_SND_FILE_HDR szPathName=%s, fFlags=0x%x, fMode=0x%x, cbFileSize=%RU64, rc=%Rrc\n",
-+ rc = vbglR3DnDHGRecvFileHdr(pCtx,
-+ szPathName,
-+ sizeof(szPathName),
-+ &fFlags,
-+ &fMode,
-+ &cbFileSize);
-+ LogFlowFunc(("HOST_DND_HG_SND_FILE_HDR: "
-+ "szPathName=%s, fFlags=0x%x, fMode=0x%x, cbFileSize=%RU64, rc=%Rrc\n",
- szPathName, fFlags, fMode, cbFileSize, rc));
- }
- else
- {
-- rc = vbglR3DnDHGProcessSendFileMessage(pCtx,
-- szPathName,
-- sizeof(szPathName),
-- &cbPathName,
-- pvChunk,
-- cbChunkMax,
-- &cbChunkRead,
-- &fMode);
-- LogFlowFunc(("HOST_DND_HG_SND_FILE_DATA "
-+ rc = vbglR3DnDHGRecvFileData(pCtx,
-+ szPathName,
-+ sizeof(szPathName),
-+ &cbPathName,
-+ pvChunk,
-+ cbChunkMax,
-+ &cbChunkRead,
-+ &fMode);
-+
-+ LogFlowFunc(("HOST_DND_HG_SND_FILE_DATA: "
- "szPathName=%s, cbPathName=%RU32, cbChunkRead=%RU32, fMode=0x%x, rc=%Rrc\n",
- szPathName, cbPathName, cbChunkRead, fMode, rc));
- }
-
- if ( RT_SUCCESS(rc)
-- && ( uNextMsg == DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR
-- /* Protocol v1 always sends the file name, so opening the file every time. */
-+ && ( uNextMsg == HOST_DND_HG_SND_FILE_HDR
-+ /* Protocol v1 always sends the file name, so opening the file every time. */
- || pCtx->uProtocol <= 1)
- )
- {
-@@ -487,7 +628,7 @@ static int vbglR3DnDHGProcessURIMessages
- rc = objFile.OpenEx(strPathAbs, DnDURIObject::File, DnDURIObject::Target, fOpen, fCreationMode);
- if (RT_SUCCESS(rc))
- {
-- rc = DnDDirDroppedAddFile(&dirDroppedFiles, strPathAbs.c_str());
-+ rc = pDroppedFiles->AddFile(strPathAbs.c_str());
- if (RT_SUCCESS(rc))
- {
- cbFileWritten = 0;
-@@ -498,7 +639,10 @@ static int vbglR3DnDHGProcessURIMessages
- }
- }
- else
-+ {
-+ AssertMsgFailed(("ObjType=%RU32, Proto=%RU32\n", objFile.GetType(), pCtx->uProtocol));
- rc = VERR_WRONG_ORDER;
-+ }
-
- RTStrFree(pszPathAbs);
- }
-@@ -507,37 +651,55 @@ static int vbglR3DnDHGProcessURIMessages
- }
-
- if ( RT_SUCCESS(rc)
-- && uNextMsg == DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA)
-+ && uNextMsg == HOST_DND_HG_SND_FILE_DATA)
- {
-- bool fClose = false;
--
- uint32_t cbChunkWritten;
- rc = objFile.Write(pvChunk, cbChunkRead, &cbChunkWritten);
- if (RT_SUCCESS(rc))
- {
-- if (pCtx->uProtocol >= 2)
-- {
-- /* Data transfer complete? Close the file. */
-- fClose = objFile.IsComplete();
-- }
-- else
-- fClose = true; /* Always close the file after each chunk. */
-+ LogFlowFunc(("HOST_DND_HG_SND_FILE_DATA "
-+ "cbChunkRead=%RU32, cbChunkWritten=%RU32, cbFileWritten=%RU64 cbFileSize=%RU64\n",
-+ cbChunkRead, cbChunkWritten, cbFileWritten + cbChunkWritten, cbFileSize));
-
- cbFileWritten += cbChunkWritten;
-- Assert(cbFileWritten <= cbFileSize);
-+
-+ if (fDoAccounting)
-+ {
-+ Assert(cbChunkRead <= cbToRecvBytes);
-+ cbToRecvBytes -= cbChunkRead;
-+ }
- }
-+ }
-
-- if (fClose)
-+ bool fClose = false;
-+ if (pCtx->uProtocol >= 2)
-+ {
-+ /* Data transfer complete? Close the file. */
-+ fClose = objFile.IsComplete();
-+ if ( fClose
-+ && fDoAccounting)
- {
-- LogFlowFunc(("Closing file\n"));
-- objFile.Close();
-+ Assert(cToRecvObjs);
-+ cToRecvObjs--;
- }
-+
-+ /* Only since protocol v2 we know the file size upfront. */
-+ Assert(cbFileWritten <= cbFileSize);
- }
-+ else
-+ fClose = true; /* Always close the file after each chunk. */
-+
-+ if (fClose)
-+ {
-+ LogFlowFunc(("Closing file\n"));
-+ objFile.Close();
-+ }
-+
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_EVT_CANCEL:
-+ case HOST_DND_HG_EVT_CANCEL:
- {
-- rc = vbglR3DnDHGProcessCancelMessage(pCtx);
-+ rc = vbglR3DnDHGRecvCancel(pCtx);
- if (RT_SUCCESS(rc))
- rc = VERR_CANCELLED;
- break;
-@@ -554,7 +716,17 @@ static int vbglR3DnDHGProcessURIMessages
- if (RT_FAILURE(rc))
- break;
-
-- } /* while */
-+ if (fDoAccounting)
-+ {
-+ LogFlowFunc(("cbToRecvBytes=%RU64, cToRecvObjs=%RU64\n", cbToRecvBytes, cToRecvObjs));
-+ if ( !cbToRecvBytes
-+ && !cToRecvObjs)
-+ {
-+ break;
-+ }
-+ }
-+
-+ } while (RT_SUCCESS(rc));
-
- LogFlowFunc(("Loop ended with %Rrc\n", rc));
-
-@@ -562,7 +734,7 @@ static int vbglR3DnDHGProcessURIMessages
- if (rc == VERR_NO_DATA)
- rc = VINF_SUCCESS;
-
-- /* Delete chunk buffer again. */
-+ /* Delete temp buffer again. */
- if (pvChunk)
- RTMemFree(pvChunk);
-
-@@ -570,131 +742,199 @@ static int vbglR3DnDHGProcessURIMessages
- * something else went wrong. */
- if (RT_FAILURE(rc))
- {
-- int rc2 = DnDDirDroppedFilesRollback(&dirDroppedFiles);
-- AssertRC(rc2); /* Not fatal, don't report back to host. */
-+ objFile.Close();
-+ pDroppedFiles->Rollback();
- }
- else
- {
-- /*
-- * Now we need to transform the URI list which came from the host into
-- * an URI list which also has the final "Dropped Files" directory as a prefix
-- * for each URI entry.
-- *
-- * So patch the old drop data with the new drop directory to let the drop
-- * target on the guest can find the files later.
-- */
-- void *pvURIData = *ppvData;
-- size_t cbURIData = *pcbDataRecv;
-+ /** @todo Compare the URI list with the dirs/files we really transferred. */
-+ /** @todo Implement checksum verification, if any. */
-+ }
-
-- rc = lstURI.RootFromURIData(pvURIData, cbURIData, 0 /* fFlags */);
-- if (RT_SUCCESS(rc))
-+ /*
-+ * Close the dropped files directory.
-+ * Don't try to remove it here, however, as the files are being needed
-+ * by the client's drag'n drop operation lateron.
-+ */
-+ int rc2 = pDroppedFiles->Reset(false /* fRemoveDropDir */);
-+ if (RT_FAILURE(rc2)) /* Not fatal, don't report back to host. */
-+ LogFlowFunc(("Closing dropped files directory failed with %Rrc\n", rc2));
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
-+static int vbglR3DnDHGRecvDataRaw(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr,
-+ void *pvData, uint32_t cbData, uint32_t *pcbDataRecv)
-+{
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-+ AssertReturn(cbData, VERR_INVALID_PARAMETER);
-+ /* pcbDataRecv is optional. */
-+
-+ int rc;
-+
-+ LogFlowFunc(("pvDate=%p, cbData=%RU32\n", pvData, cbData));
-+
-+ VBOXDNDHGSENDDATAMSG Msg;
-+ RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
-+ Msg.hdr.u32ClientID = pCtx->uClientID;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_DATA;
-+
-+ do
-+ {
-+ uint32_t cbDataRecv;
-+
-+ if (pCtx->uProtocol < 3)
- {
-- /* Cleanup the old data and write the new data back to the event. */
-- RTMemFree(pvURIData);
-+ Msg.hdr.cParms = 5;
-
-- RTCString strData = lstURI.RootToString(pszDropDir);
-- Assert(!strData.isEmpty());
-- LogFlowFunc(("New URI list now has %zu bytes (formerly %RU32 bytes)\n", strData.length() + 1, cbURIData));
-+ Msg.u.v1.uScreenId.SetUInt32(0);
-+ Msg.u.v1.pvFormat.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);
-+ Msg.u.v1.cbFormat.SetUInt32(0);
-+ Msg.u.v1.pvData.SetPtr(pvData, cbData);
-+ Msg.u.v1.cbData.SetUInt32(0);
-
-- pvURIData = RTStrDupN(strData.c_str(), strData.length());
-- if (pvURIData)
-+ rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-+ if (RT_SUCCESS(rc))
- {
-- cbURIData = strData.length() + 1;
-+ rc = Msg.hdr.result;
-+ if ( RT_SUCCESS(rc)
-+ || rc == VERR_BUFFER_OVERFLOW)
-+ {
-+ rc = Msg.u.v1.uScreenId.GetUInt32(&pDataHdr->uScreenId);
-+ AssertRC(rc);
-+
-+ /*
-+ * In case of VERR_BUFFER_OVERFLOW get the data sizes required
-+ * for the format + data blocks.
-+ */
-+ uint32_t cbFormatRecv;
-+ rc = Msg.u.v1.cbFormat.GetUInt32(&cbFormatRecv);
-+ AssertRC(rc);
-+ if (cbFormatRecv >= pDataHdr->cbMetaFmt)
-+ {
-+ rc = VERR_TOO_MUCH_DATA;
-+ break;
-+ }
-+
-+ rc = Msg.u.v1.cbData.GetUInt32(&cbDataRecv);
-+ AssertRC(rc);
-+ if (cbDataRecv >= pDataHdr->cbMeta)
-+ {
-+ rc = VERR_TOO_MUCH_DATA;
-+ break;
-+ }
-+
-+ pDataHdr->cbMetaFmt = cbFormatRecv;
-+ }
- }
-- else
-- rc = VERR_NO_MEMORY;
-- }
-
-- if (RT_SUCCESS(rc))
-+ if (RT_FAILURE(rc))
-+ break;
-+ }
-+ else /* Protocol v3 and up. */
- {
-- *ppvData = pvURIData;
-- *pcbDataRecv = cbURIData;
-+ Msg.hdr.cParms = 5;
-+
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvData.SetPtr(pvData, cbData);
-+ Msg.u.v3.cbData.SetUInt32(0);
-+ Msg.u.v3.pvChecksum.SetPtr(NULL, 0);
-+ Msg.u.v3.cbChecksum.SetUInt32(0);
-+
-+ rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = Msg.hdr.result;
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = Msg.u.v3.cbData.GetUInt32(&cbDataRecv);
-+ AssertRC(rc);
-+ }
-+
-+ /** @todo Use checksum for validating the received data. */
-+ }
-+
-+ if (RT_FAILURE(rc))
-+ break;
- }
-
-- /** @todo Compare the URI list with the dirs/files we really transferred. */
-- }
-+ if (pcbDataRecv)
-+ *pcbDataRecv = cbDataRecv;
-
-- /*
-- * Close the dropped files directory.
-- * Don't try to remove it here, however, as the files are being needed
-- * by the client's drag'n drop operation lateron.
-- */
-- int rc2 = DnDDirDroppedFilesClose(&dirDroppedFiles, false);
-- if (RT_FAILURE(rc2)) /* Not fatal, don't report back to host. */
-- LogFlowFunc(("Closing dropped files directory failed with %Rrc\n", rc2));
-+ } while (0);
-
- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--static int vbglR3DnDHGProcessDataMessageInternal(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t *puScreenId,
-- char *pszFormat,
-- uint32_t cbFormat,
-- uint32_t *pcbFormatRecv,
-- void *pvData,
-- uint32_t cbData,
-- uint32_t *pcbDataTotal)
-+static int vbglR3DnDHGRecvDataHdr(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-- AssertPtrReturn(pszFormat, VERR_INVALID_POINTER);
-- AssertReturn(cbFormat, VERR_INVALID_PARAMETER);
-- AssertPtrReturn(pcbFormatRecv, VERR_INVALID_POINTER);
-- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-- AssertPtrReturn(pcbDataTotal, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGSENDDATAMSG Msg;
-+ Assert(pCtx->uProtocol >= 3); /* Only for protocol v3 and up. */
-+
-+ VBOXDNDHGSENDDATAHDRMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_SND_DATA;
-- Msg.hdr.cParms = 5;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_DATA_HDR;
-+ Msg.hdr.cParms = 12;
-
-+ Msg.uContext.SetUInt32(0);
-+ Msg.uFlags.SetUInt32(0);
- Msg.uScreenId.SetUInt32(0);
-- Msg.pvFormat.SetPtr(pszFormat, cbFormat);
-- Msg.cFormat.SetUInt32(0);
-- Msg.pvData.SetPtr(pvData, cbData);
-- Msg.cbData.SetUInt32(0);
-+ Msg.cbTotal.SetUInt64(0);
-+ Msg.cbMeta.SetUInt32(0);
-+ Msg.pvMetaFmt.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);
-+ Msg.cbMetaFmt.SetUInt32(0);
-+ Msg.cObjects.SetUInt64(0);
-+ Msg.enmCompression.SetUInt32(0);
-+ Msg.enmChecksumType.SetUInt32(0);
-+ Msg.pvChecksum.SetPtr(pDataHdr->pvChecksum, pDataHdr->cbChecksum);
-+ Msg.cbChecksum.SetUInt32(0);
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
- {
- rc = Msg.hdr.result;
-- if ( RT_SUCCESS(rc)
-- || rc == VERR_BUFFER_OVERFLOW)
-+ if (RT_SUCCESS(rc))
- {
-- rc = Msg.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
--
-- /*
-- * In case of VERR_BUFFER_OVERFLOW get the data sizes required
-- * for the format + data blocks.
-- */
-- rc = Msg.cFormat.GetUInt32(pcbFormatRecv); AssertRC(rc);
-- rc = Msg.cbData.GetUInt32(pcbDataTotal); AssertRC(rc);
--
-- AssertReturn(cbFormat >= *pcbFormatRecv, VERR_TOO_MUCH_DATA);
-- AssertReturn(cbData >= *pcbDataTotal, VERR_TOO_MUCH_DATA);
-+ /* Msg.uContext not needed here. */
-+ Msg.uFlags.GetUInt32(&pDataHdr->uFlags);
-+ Msg.uScreenId.GetUInt32(&pDataHdr->uScreenId);
-+ Msg.cbTotal.GetUInt64(&pDataHdr->cbTotal);
-+ Msg.cbMeta.GetUInt32(&pDataHdr->cbMeta);
-+ Msg.cbMetaFmt.GetUInt32(&pDataHdr->cbMetaFmt);
-+ Msg.cObjects.GetUInt64(&pDataHdr->cObjects);
-+ Msg.enmCompression.GetUInt32(&pDataHdr->enmCompression);
-+ Msg.enmChecksumType.GetUInt32((uint32_t *)&pDataHdr->enmChecksumType);
-+ Msg.cbChecksum.GetUInt32(&pDataHdr->cbChecksum);
- }
- }
-
-+ LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--static int vbglR3DnDHGProcessMoreDataMessageInternal(PVBGLR3GUESTDNDCMDCTX pCtx,
-- void *pvData,
-- uint32_t cbData,
-- uint32_t *pcbDataTotal)
-+/** @todo Deprecated function; will be removed. */
-+static int vbglR3DnDHGRecvMoreData(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ void *pvData, uint32_t cbData, uint32_t *pcbDataRecv)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-- AssertPtrReturn(pcbDataTotal, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-+ AssertReturn(cbData, VERR_INVALID_PARAMETER);
-+ AssertPtrReturn(pcbDataRecv, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGSENDMOREDATAMSG Msg;
-+ VBOXDNDHGSENDMOREDATAMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_HG_SND_MORE_DATA;
-+ Msg.hdr.u32Function = HOST_DND_HG_SND_MORE_DATA;
- Msg.hdr.cParms = 2;
-
- Msg.pvData.SetPtr(pvData, cbData);
-@@ -707,155 +947,300 @@ static int vbglR3DnDHGProcessMoreDataMes
- if ( RT_SUCCESS(rc)
- || rc == VERR_BUFFER_OVERFLOW)
- {
-- rc = Msg.cbData.GetUInt32(pcbDataTotal); AssertRC(rc);
-- AssertReturn(cbData >= *pcbDataTotal, VERR_TOO_MUCH_DATA);
-+ rc = Msg.cbData.GetUInt32(pcbDataRecv); AssertRC(rc);
-+ AssertReturn(cbData >= *pcbDataRecv, VERR_TOO_MUCH_DATA);
- }
- }
- return rc;
- }
-
--static int vbglR3DnDHGProcessSendDataMessageLoop(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t *puScreenId,
-- char *pszFormat,
-- uint32_t cbFormat,
-- uint32_t *pcbFormatRecv,
-- void **ppvData,
-- uint32_t cbData,
-- size_t *pcbDataRecv)
-+static int vbglR3DnDHGRecvDataLoop(PVBGLR3GUESTDNDCMDCTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr,
-+ void **ppvData, uint64_t *pcbData)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-- AssertPtrReturn(pszFormat, VERR_INVALID_POINTER);
-- AssertPtrReturn(pcbFormatRecv, VERR_INVALID_POINTER);
-- AssertPtrReturn(ppvData, VERR_INVALID_POINTER);
-- /* pcbDataRecv is optional. */
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-+ AssertPtrReturn(ppvData, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pcbData, VERR_INVALID_POINTER);
-
-- uint32_t cbDataReq = 0;
-- int rc = vbglR3DnDHGProcessDataMessageInternal(pCtx,
-- puScreenId,
-- pszFormat,
-- cbFormat,
-- pcbFormatRecv,
-- *ppvData,
-- cbData,
-- &cbDataReq);
-- uint32_t cbDataTotal = cbDataReq;
-- void *pvData = *ppvData;
-+ int rc;
-+ uint32_t cbDataRecv;
-
-- LogFlowFunc(("HOST_DND_HG_SND_DATA cbDataReq=%RU32, rc=%Rrc\n", cbDataTotal, rc));
-+ LogFlowFuncEnter();
-
-- while (rc == VERR_BUFFER_OVERFLOW)
-+ if (pCtx->uProtocol < 3)
- {
-- uint32_t uNextMsg;
-- uint32_t cNextParms;
-- rc = vbglR3DnDQueryNextHostMessageType(pCtx, &uNextMsg, &cNextParms, false);
-- if (RT_SUCCESS(rc))
-+ uint64_t cbDataTmp = pCtx->cbMaxChunkSize;
-+ void *pvDataTmp = RTMemAlloc(cbDataTmp);
-+
-+ if (!cbDataTmp)
-+ return VERR_NO_MEMORY;
-+
-+ /**
-+ * Protocols < v3 contain the header information in every HOST_DND_HG_SND_DATA
-+ * message, so do the actual retrieving immediately.
-+ *
-+ * Also, the initial implementation used VERR_BUFFER_OVERFLOW as a return code to
-+ * indicate that there will be more data coming in after the initial data chunk. There
-+ * was no way of telling the total data size upfront (in form of a header or some such),
-+ * so also handle this case to not break backwards compatibility.
-+ */
-+ rc = vbglR3DnDHGRecvDataRaw(pCtx, pDataHdr, pvDataTmp, pCtx->cbMaxChunkSize, &cbDataRecv);
-+
-+ /* See comment above. */
-+ while (rc == VERR_BUFFER_OVERFLOW)
- {
-- switch(uNextMsg)
-+ uint32_t uNextMsg;
-+ uint32_t cNextParms;
-+ rc = vbglR3DnDGetNextMsgType(pCtx, &uNextMsg, &cNextParms, false /* fBlock */);
-+ if (RT_SUCCESS(rc))
- {
-- case DragAndDropSvc::HOST_DND_HG_SND_MORE_DATA:
-+ switch(uNextMsg)
- {
-- /** @todo r=andy Don't use reallocate here; can go wrong with *really* big URI lists.
-- * Instead send as many URI entries as possible per chunk and add those entries
-- * to our to-process list for immediata processing. Repeat the step after processing then. */
-- LogFlowFunc(("HOST_DND_HG_SND_MORE_DATA cbDataTotal: %RU32 -> %RU32\n", cbDataReq, cbDataReq + cbData));
-- pvData = RTMemRealloc(*ppvData, cbDataTotal + cbData);
-- if (!pvData)
-+ case HOST_DND_HG_SND_MORE_DATA:
- {
-- rc = VERR_NO_MEMORY;
-+ /** @todo r=andy Don't use reallocate here; can go wrong with *really* big URI lists.
-+ * Instead send as many URI entries as possible per chunk and add those entries
-+ * to our to-process list for immediata processing. Repeat the step after processing then. */
-+ LogFlowFunc(("HOST_DND_HG_SND_MORE_DATA cbDataTotal: %RU64 -> %RU64\n",
-+ cbDataTmp, cbDataTmp + pCtx->cbMaxChunkSize));
-+ void *pvDataNew = RTMemRealloc(pvDataTmp, cbDataTmp + pCtx->cbMaxChunkSize);
-+ if (!pvDataNew)
-+ {
-+ rc = VERR_NO_MEMORY;
-+ break;
-+ }
-+
-+ pvDataTmp = pvDataNew;
-+
-+ uint8_t *pvDataOff = (uint8_t *)pvDataTmp + cbDataTmp;
-+ rc = vbglR3DnDHGRecvMoreData(pCtx, pvDataOff, pCtx->cbMaxChunkSize, &cbDataRecv);
-+ if ( RT_SUCCESS(rc)
-+ || rc == VERR_BUFFER_OVERFLOW) /* Still can return VERR_BUFFER_OVERFLOW. */
-+ {
-+ cbDataTmp += cbDataRecv;
-+ }
-+ break;
-+ }
-+ case HOST_DND_HG_EVT_CANCEL:
-+ default:
-+ {
-+ rc = vbglR3DnDHGRecvCancel(pCtx);
-+ if (RT_SUCCESS(rc))
-+ rc = VERR_CANCELLED;
- break;
- }
-- rc = vbglR3DnDHGProcessMoreDataMessageInternal(pCtx,
-- &((char *)pvData)[cbDataTotal],
-- cbData,
-- &cbDataReq);
-- cbDataTotal += cbDataReq;
-- break;
-- }
-- case DragAndDropSvc::HOST_DND_HG_EVT_CANCEL:
-- default:
-- {
-- rc = vbglR3DnDHGProcessCancelMessage(pCtx);
-- if (RT_SUCCESS(rc))
-- rc = VERR_CANCELLED;
-- break;
- }
- }
- }
-- }
-
-- if (RT_SUCCESS(rc))
-+ if (RT_SUCCESS(rc))
-+ {
-+ /* There was no way of telling the total data size upfront
-+ * (in form of a header or some such), so set the total data size here. */
-+ pDataHdr->cbTotal = cbDataTmp;
-+
-+ *ppvData = pvDataTmp;
-+ *pcbData = cbDataTmp;
-+ }
-+ else
-+ RTMemFree(pvDataTmp);
-+ }
-+ else /* Protocol v3 and up. */
- {
-- *ppvData = pvData;
-- if (pcbDataRecv)
-- *pcbDataRecv = cbDataTotal;
-+ rc = vbglR3DnDHGRecvDataHdr(pCtx, pDataHdr);
-+ if (RT_SUCCESS(rc))
-+ {
-+ LogFlowFunc(("cbTotal=%RU64, cbMeta=%RU32\n", pDataHdr->cbTotal, pDataHdr->cbMeta));
-+ if (pDataHdr->cbMeta)
-+ {
-+ uint64_t cbDataTmp = 0;
-+ void *pvDataTmp = RTMemAlloc(pDataHdr->cbMeta);
-+ if (!pvDataTmp)
-+ rc = VERR_NO_MEMORY;
-+
-+ if (RT_SUCCESS(rc))
-+ {
-+ uint8_t *pvDataOff = (uint8_t *)pvDataTmp;
-+ while (cbDataTmp < pDataHdr->cbMeta)
-+ {
-+ rc = vbglR3DnDHGRecvDataRaw(pCtx, pDataHdr,
-+ pvDataOff, RT_MIN(pDataHdr->cbMeta - cbDataTmp, pCtx->cbMaxChunkSize),
-+ &cbDataRecv);
-+ if (RT_SUCCESS(rc))
-+ {
-+ LogFlowFunc(("cbDataRecv=%RU32, cbDataTmp=%RU64\n", cbDataRecv, cbDataTmp));
-+ Assert(cbDataTmp + cbDataRecv <= pDataHdr->cbMeta);
-+ cbDataTmp += cbDataRecv;
-+ pvDataOff += cbDataRecv;
-+ }
-+ else
-+ break;
-+ }
-+
-+ if (RT_SUCCESS(rc))
-+ {
-+ Assert(cbDataTmp == pDataHdr->cbMeta);
-+
-+ LogFlowFunc(("Received %RU64 bytes of data\n", cbDataTmp));
-+
-+ *ppvData = pvDataTmp;
-+ *pcbData = cbDataTmp;
-+ }
-+ else
-+ RTMemFree(pvDataTmp);
-+ }
-+ }
-+ else
-+ {
-+ *ppvData = NULL;
-+ *pcbData = 0;
-+ }
-+ }
- }
-
- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--static int vbglR3DnDHGProcessSendDataMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t *puScreenId,
-- char *pszFormat,
-- uint32_t cbFormat,
-- uint32_t *pcbFormatRecv,
-- void **ppvData,
-- uint32_t cbData,
-- size_t *pcbDataRecv)
-+/** @todo Replace the parameters (except pCtx) with PVBOXDNDSNDDATAHDR. Later. */
-+/** @todo Hand in the DnDURIList + DnDDroppedFiles objects so that this function
-+ * can fill it directly instead of passing huge blobs of data around. */
-+static int vbglR3DnDHGRecvDataMain(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ uint32_t *puScreenId,
-+ char **ppszFormat,
-+ uint32_t *pcbFormat,
-+ void **ppvData,
-+ uint32_t *pcbData)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-- AssertPtrReturn(pszFormat, VERR_INVALID_POINTER);
-- AssertPtrReturn(pcbFormatRecv, VERR_INVALID_POINTER);
-- AssertPtrReturn(ppvData, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-+ AssertPtrReturn(ppszFormat, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pcbFormat, VERR_INVALID_POINTER);
-+ AssertPtrReturn(ppvData, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pcbData, VERR_INVALID_POINTER);
-+
-+ VBOXDNDDATAHDR dataHdr; /** @todo See todo above. */
-+ RT_ZERO(dataHdr);
-+
-+ dataHdr.cbMetaFmt = _64K; /** @todo Make this configurable? */
-+ dataHdr.pvMetaFmt = RTMemAlloc(dataHdr.cbMetaFmt);
-+ if (!dataHdr.pvMetaFmt)
-+ return VERR_NO_MEMORY;
-+
-+ DnDURIList lstURI;
-+ DnDDroppedFiles droppedFiles;
-
-- int rc = vbglR3DnDHGProcessSendDataMessageLoop(pCtx,
-- puScreenId,
-- pszFormat,
-- cbFormat,
-- pcbFormatRecv,
-- ppvData,
-- cbData,
-- pcbDataRecv);
-+ void *pvData; /** @todo See todo above. */
-+ uint64_t cbData; /** @todo See todo above. */
-+
-+ int rc = vbglR3DnDHGRecvDataLoop(pCtx, &dataHdr, &pvData, &cbData);
- if (RT_SUCCESS(rc))
- {
-- /* Check if this is an URI event. If so, let VbglR3 do all the actual
-+ /**
-+ * Check if this is an URI event. If so, let VbglR3 do all the actual
- * data transfer + file/directory creation internally without letting
- * the caller know.
- *
- * This keeps the actual (guest OS-)dependent client (like VBoxClient /
-- * VBoxTray) small by not having too much redundant code. */
-- AssertPtr(pcbFormatRecv);
-- if (DnDMIMEHasFileURLs(pszFormat, *pcbFormatRecv))
-- rc = vbglR3DnDHGProcessURIMessages(pCtx,
-- ppvData,
-- cbData,
-- pcbDataRecv);
-- if (RT_FAILURE(rc))
-+ * VBoxTray) small by not having too much redundant code.
-+ */
-+ Assert(dataHdr.cbMetaFmt);
-+ AssertPtr(dataHdr.pvMetaFmt);
-+ if (DnDMIMEHasFileURLs((char *)dataHdr.pvMetaFmt, dataHdr.cbMetaFmt))
-+ {
-+ AssertPtr(pvData);
-+ Assert(cbData);
-+ rc = lstURI.RootFromURIData(pvData, cbData, 0 /* fFlags */);
-+ if (RT_SUCCESS(rc))
-+ rc = vbglR3DnDHGRecvURIData(pCtx, &dataHdr, &droppedFiles);
-+
-+ if (RT_SUCCESS(rc)) /** @todo Remove this block as soon as we hand in DnDURIList. */
-+ {
-+ if (pvData)
-+ {
-+ /* Reuse data buffer to fill in the transformed URI file list. */
-+ RTMemFree(pvData);
-+ pvData = NULL;
-+ }
-+
-+ RTCString strData = lstURI.RootToString(droppedFiles.GetDirAbs());
-+ Assert(!strData.isEmpty());
-+
-+ cbData = strData.length() + 1;
-+ LogFlowFunc(("URI list has %zu bytes\n", cbData));
-+
-+ pvData = RTMemAlloc(cbData);
-+ if (pvData)
-+ {
-+ memcpy(pvData, strData.c_str(), cbData);
-+ }
-+ else
-+ rc = VERR_NO_MEMORY;
-+ }
-+ }
-+ else /* Raw data. */
- {
-- int rc2 = VbglR3DnDHGSetProgress(pCtx, DragAndDropSvc::DND_PROGRESS_ERROR, 100 /* Percent */, rc);
-- AssertRC(rc2);
-+ const uint32_t cbDataRaw = dataHdr.cbMetaFmt;
-+ if (cbData >= cbDataRaw)
-+ {
-+ if (cbDataRaw)
-+ memcpy(pvData, dataHdr.pvMetaFmt, cbDataRaw);
-+ cbData = cbDataRaw;
-+ }
-+ else
-+ rc = VERR_BUFFER_OVERFLOW;
- }
- }
-
-+ if ( RT_FAILURE(rc)
-+ && rc != VERR_CANCELLED)
-+ {
-+ if (dataHdr.pvMetaFmt)
-+ RTMemFree(dataHdr.pvMetaFmt);
-+ if (pvData)
-+ RTMemFree(pvData);
-+
-+ int rc2 = VbglR3DnDHGSendProgress(pCtx, DND_PROGRESS_ERROR, 100 /* Percent */, rc);
-+ if (RT_FAILURE(rc2))
-+ LogFlowFunc(("Unable to send progress error %Rrc to host: %Rrc\n", rc, rc2));
-+ }
-+ else if (RT_SUCCESS(rc))
-+ {
-+ *ppszFormat = (char *)dataHdr.pvMetaFmt;
-+ *pcbFormat = dataHdr.cbMetaFmt;
-+ *ppvData = pvData;
-+ *pcbData = cbData;
-+ }
-+
- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--static int vbglR3DnDGHProcessRequestPendingMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t *puScreenId)
-+static int vbglR3DnDGHRecvPending(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t *puScreenId)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(puScreenId, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDGHREQPENDINGMSG Msg;
-+ VBOXDNDGHREQPENDINGMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_GH_REQ_PENDING;
-- Msg.hdr.cParms = 1;
-+ Msg.hdr.u32Function = HOST_DND_GH_REQ_PENDING;
-
-- Msg.uScreenId.SetUInt32(0);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ Msg.u.v1.uScreenId.SetUInt32(0);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 2;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uScreenId.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -863,18 +1248,26 @@ static int vbglR3DnDGHProcessRequestPend
- rc = Msg.hdr.result;
- if (RT_SUCCESS(rc))
- {
-- rc = Msg.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ rc = Msg.u.v1.uScreenId.GetUInt32(puScreenId); AssertRC(rc);
-+ }
-+ else
-+ {
-+ /** @todo Context ID not used yet. */
-+ rc = Msg.u.v3.uContext.GetUInt32(puScreenId); AssertRC(rc);
-+ }
- }
- }
-
- return rc;
- }
-
--static int vbglR3DnDGHProcessDroppedMessage(PVBGLR3GUESTDNDCMDCTX pCtx,
-- char *pszFormat,
-- uint32_t cbFormat,
-- uint32_t *pcbFormatRecv,
-- uint32_t *puAction)
-+static int vbglR3DnDGHRecvDropped(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ char *pszFormat,
-+ uint32_t cbFormat,
-+ uint32_t *pcbFormatRecv,
-+ uint32_t *puAction)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pszFormat, VERR_INVALID_POINTER);
-@@ -882,15 +1275,29 @@ static int vbglR3DnDGHProcessDroppedMess
- AssertPtrReturn(pcbFormatRecv, VERR_INVALID_POINTER);
- AssertPtrReturn(puAction, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDGHDROPPEDMSG Msg;
-+ VBOXDNDGHDROPPEDMSG Msg;
- RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::HOST_DND_GH_EVT_DROPPED;
-- Msg.hdr.cParms = 3;
-+ Msg.hdr.u32Function = HOST_DND_GH_EVT_DROPPED;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ Msg.u.v1.pvFormat.SetPtr(pszFormat, cbFormat);
-+ Msg.u.v1.cbFormat.SetUInt32(0);
-+ Msg.u.v1.uAction.SetUInt32(0);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 4;
-
-- Msg.pvFormat.SetPtr(pszFormat, cbFormat);
-- Msg.cFormat.SetUInt32(0);
-- Msg.uAction.SetUInt32(0);
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvFormat.SetPtr(pszFormat, cbFormat);
-+ Msg.u.v3.cbFormat.SetUInt32(0);
-+ Msg.u.v3.uAction.SetUInt32(0);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -898,8 +1305,17 @@ static int vbglR3DnDGHProcessDroppedMess
- rc = Msg.hdr.result;
- if (RT_SUCCESS(rc))
- {
-- rc = Msg.cFormat.GetUInt32(pcbFormatRecv); AssertRC(rc);
-- rc = Msg.uAction.GetUInt32(puAction); AssertRC(rc);
-+ if (pCtx->uProtocol < 3)
-+ {
-+ rc = Msg.u.v1.cbFormat.GetUInt32(pcbFormatRecv); AssertRC(rc);
-+ rc = Msg.u.v1.uAction.GetUInt32(puAction); AssertRC(rc);
-+ }
-+ else
-+ {
-+ /** @todo Context ID not used yet. */
-+ rc = Msg.u.v3.cbFormat.GetUInt32(pcbFormatRecv); AssertRC(rc);
-+ rc = Msg.u.v3.uAction.GetUInt32(puAction); AssertRC(rc);
-+ }
-
- AssertReturn(cbFormat >= *pcbFormatRecv, VERR_TOO_MUCH_DATA);
- }
-@@ -938,7 +1354,7 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- if (RT_SUCCESS(rc))
- {
- /* Set the default protocol version to use. */
-- pCtx->uProtocol = 2;
-+ pCtx->uProtocol = 3;
-
- Assert(Info.u32ClientID);
- pCtx->uClientID = Info.u32ClientID;
-@@ -946,6 +1362,14 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- }
-
- /*
-+ * Get the VM's session ID.
-+ * This is not fatal in case we're running with an ancient VBox version.
-+ */
-+ pCtx->uSessionID = 0;
-+ int rc2 = VbglR3GetSessionId(&pCtx->uSessionID);
-+ LogFlowFunc(("uSessionID=%RU64, rc=%Rrc\n", pCtx->uSessionID, rc2));
-+
-+ /*
- * Check if the host is >= VBox 5.0 which in case supports GUEST_DND_CONNECT.
- */
- bool fSupportsConnectReq = false;
-@@ -953,7 +1377,7 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- {
- /* The guest property service might not be available. Not fatal. */
- uint32_t uGuestPropSvcClientID;
-- int rc2 = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
-+ rc2 = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
- if (RT_SUCCESS(rc2))
- {
- char *pszHostVersion;
-@@ -961,11 +1385,15 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- if (RT_SUCCESS(rc2))
- {
- fSupportsConnectReq = RTStrVersionCompare(pszHostVersion, "5.0") >= 0;
-+ LogFlowFunc(("pszHostVersion=%s, fSupportsConnectReq=%RTbool\n", pszHostVersion, fSupportsConnectReq));
- VbglR3GuestPropReadValueFree(pszHostVersion);
- }
-
- VbglR3GuestPropDisconnect(uGuestPropSvcClientID);
- }
-+
-+ if (RT_FAILURE(rc2))
-+ LogFlowFunc(("Retrieving host version failed with rc=%Rrc\n", rc2));
- }
-
- if (fSupportsConnectReq)
-@@ -975,17 +1403,30 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- * Note: This might fail when the Guest Additions run on an older VBox host (< VBox 5.0) which
- * does not implement this command.
- */
-- DragAndDropSvc::VBOXDNDCONNECTMSG Msg;
-+ VBOXDNDCONNECTMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_CONNECT;
-- Msg.hdr.cParms = 2;
-+ Msg.hdr.u32Function = GUEST_DND_CONNECT;
-
-- Msg.uProtocol.SetUInt32(pCtx->uProtocol);
-- Msg.uFlags.SetUInt32(0); /* Unused at the moment. */
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 2;
-+
-+ Msg.u.v2.uProtocol.SetUInt32(pCtx->uProtocol);
-+ Msg.u.v2.uFlags.SetUInt32(0); /* Unused at the moment. */
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uProtocol.SetUInt32(pCtx->uProtocol);
-+ Msg.u.v3.uFlags.SetUInt32(0); /* Unused at the moment. */
-+ }
-
-- int rc2 = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-+ rc2 = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc2))
- rc2 = Msg.hdr.result; /* Not fatal. */
-
-@@ -999,6 +1440,8 @@ VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3
- if (!fSupportsConnectReq)
- pCtx->uProtocol = 1; /* Fall back to protocol version 1 (< VBox 5.0). */
-
-+ pCtx->cbMaxChunkSize = _64K; /** @todo Use a scratch buffer on the heap? */
-+
- LogFlowFunc(("uClient=%RU32, uProtocol=%RU32, rc=%Rrc\n", pCtx->uClientID, pCtx->uProtocol, rc));
- return rc;
- }
-@@ -1018,113 +1461,122 @@ VBGLR3DECL(int) VbglR3DnDDisconnect(PVBG
- return rc;
- }
-
--VBGLR3DECL(int) VbglR3DnDProcessNextMessage(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent)
-+VBGLR3DECL(int) VbglR3DnDRecvNextMsg(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
-
-- uint32_t uMsg = 0;
-- uint32_t uNumParms = 0;
-- const uint32_t ccbFormats = _64K;
-- const uint32_t ccbData = _64K;
-- int rc = vbglR3DnDQueryNextHostMessageType(pCtx, &uMsg, &uNumParms,
-- true /* fWait */);
-+ uint32_t uMsg = 0;
-+ uint32_t uNumParms = 0;
-+
-+ const uint32_t cbDataMax = pCtx->cbMaxChunkSize;
-+ const uint32_t cbFormatMax = pCtx->cbMaxChunkSize;
-+
-+ int rc = vbglR3DnDGetNextMsgType(pCtx, &uMsg, &uNumParms, true /* fWait */);
-+ if (RT_SUCCESS(rc))
-+ {
-+ /* Check for VM session change. */
-+ uint64_t uSessionID;
-+ int rc2 = VbglR3GetSessionId(&uSessionID);
-+ if ( RT_SUCCESS(rc2)
-+ && (uSessionID != pCtx->uSessionID))
-+ {
-+ LogFlowFunc(("VM session ID changed to %RU64, doing reconnect\n", uSessionID));
-+
-+ /* Try a reconnect to the DnD service. */
-+ rc2 = VbglR3DnDDisconnect(pCtx);
-+ AssertRC(rc2);
-+ rc2 = VbglR3DnDConnect(pCtx);
-+ AssertRC(rc2);
-+
-+ /* At this point we continue processing the messsages with the new client ID. */
-+ }
-+ }
-+
- if (RT_SUCCESS(rc))
- {
- pEvent->uType = uMsg;
-
- switch(uMsg)
- {
-- case DragAndDropSvc::HOST_DND_HG_EVT_ENTER:
-- case DragAndDropSvc::HOST_DND_HG_EVT_MOVE:
-- case DragAndDropSvc::HOST_DND_HG_EVT_DROPPED:
-+ case HOST_DND_HG_EVT_ENTER:
-+ case HOST_DND_HG_EVT_MOVE:
-+ case HOST_DND_HG_EVT_DROPPED:
- {
-- pEvent->pszFormats = static_cast<char*>(RTMemAlloc(ccbFormats));
-+ pEvent->pszFormats = static_cast<char*>(RTMemAlloc(cbFormatMax));
- if (!pEvent->pszFormats)
- rc = VERR_NO_MEMORY;
-
- if (RT_SUCCESS(rc))
-- rc = vbglR3DnDHGProcessActionMessage(pCtx,
-- uMsg,
-- &pEvent->uScreenId,
-- &pEvent->u.a.uXpos,
-- &pEvent->u.a.uYpos,
-- &pEvent->u.a.uDefAction,
-- &pEvent->u.a.uAllActions,
-- pEvent->pszFormats,
-- ccbFormats,
-- &pEvent->cbFormats);
-+ rc = vbglR3DnDHGRecvAction(pCtx,
-+ uMsg,
-+ &pEvent->uScreenId,
-+ &pEvent->u.a.uXpos,
-+ &pEvent->u.a.uYpos,
-+ &pEvent->u.a.uDefAction,
-+ &pEvent->u.a.uAllActions,
-+ pEvent->pszFormats,
-+ cbFormatMax,
-+ &pEvent->cbFormats);
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_EVT_LEAVE:
-+ case HOST_DND_HG_EVT_LEAVE:
- {
-- rc = vbglR3DnDHGProcessLeaveMessage(pCtx);
-+ rc = vbglR3DnDHGRecvLeave(pCtx);
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_SND_DATA:
-+ case HOST_DND_HG_SND_DATA:
-+ /* Protocol v1 + v2: Also contains the header data.
-+ * Note: Fall through is intentional. */
-+ case HOST_DND_HG_SND_DATA_HDR:
- {
-- pEvent->pszFormats = static_cast<char*>(RTMemAlloc(ccbFormats));
-- if (!pEvent->pszFormats)
-- rc = VERR_NO_MEMORY;
--
-- if (RT_SUCCESS(rc))
-- {
-- pEvent->u.b.pvData = RTMemAlloc(ccbData);
-- if (!pEvent->u.b.pvData)
-- {
-- RTMemFree(pEvent->pszFormats);
-- pEvent->pszFormats = NULL;
--
-- rc = VERR_NO_MEMORY;
-- }
-- }
--
-- if (RT_SUCCESS(rc))
-- rc = vbglR3DnDHGProcessSendDataMessage(pCtx,
-- &pEvent->uScreenId,
-- pEvent->pszFormats,
-- ccbFormats,
-- &pEvent->cbFormats,
-- &pEvent->u.b.pvData,
-- ccbData,
-- &pEvent->u.b.cbData);
-+ rc = vbglR3DnDHGRecvDataMain(pCtx,
-+ /* Screen ID */
-+ &pEvent->uScreenId,
-+ /* Format */
-+ &pEvent->pszFormats,
-+ &pEvent->cbFormats,
-+ /* Data */
-+ &pEvent->u.b.pvData,
-+ &pEvent->u.b.cbData);
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_SND_MORE_DATA:
-- case DragAndDropSvc::HOST_DND_HG_SND_DIR:
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA:
-+ case HOST_DND_HG_SND_MORE_DATA:
-+ case HOST_DND_HG_SND_DIR:
-+ case HOST_DND_HG_SND_FILE_DATA:
- {
- /*
- * All messages in this case are handled internally
-- * by vbglR3DnDHGProcessSendDataMessage() and must
-- * be specified by a preceding HOST_DND_HG_SND_DATA call.
-+ * by vbglR3DnDHGRecvDataMain() and must be specified
-+ * by a preceding HOST_DND_HG_SND_DATA or HOST_DND_HG_SND_DATA_HDR
-+ * calls.
- */
- rc = VERR_WRONG_ORDER;
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_EVT_CANCEL:
-+ case HOST_DND_HG_EVT_CANCEL:
- {
-- rc = vbglR3DnDHGProcessCancelMessage(pCtx);
-+ rc = vbglR3DnDHGRecvCancel(pCtx);
- break;
- }
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
-- case DragAndDropSvc::HOST_DND_GH_REQ_PENDING:
-+ case HOST_DND_GH_REQ_PENDING:
- {
-- rc = vbglR3DnDGHProcessRequestPendingMessage(pCtx, &pEvent->uScreenId);
-+ rc = vbglR3DnDGHRecvPending(pCtx, &pEvent->uScreenId);
- break;
- }
-- case DragAndDropSvc::HOST_DND_GH_EVT_DROPPED:
-+ case HOST_DND_GH_EVT_DROPPED:
- {
-- pEvent->pszFormats = static_cast<char*>(RTMemAlloc(ccbFormats));
-+ pEvent->pszFormats = static_cast<char*>(RTMemAlloc(cbFormatMax));
- if (!pEvent->pszFormats)
- rc = VERR_NO_MEMORY;
-
- if (RT_SUCCESS(rc))
-- rc = vbglR3DnDGHProcessDroppedMessage(pCtx,
-- pEvent->pszFormats,
-- ccbFormats,
-- &pEvent->cbFormats,
-- &pEvent->u.a.uDefAction);
-+ rc = vbglR3DnDGHRecvDropped(pCtx,
-+ pEvent->pszFormats,
-+ cbFormatMax,
-+ &pEvent->cbFormats,
-+ &pEvent->u.a.uDefAction);
- break;
- }
- #endif
-@@ -1136,21 +1588,37 @@ VBGLR3DECL(int) VbglR3DnDProcessNextMess
- }
- }
-
-+ if (RT_FAILURE(rc))
-+ LogFlowFunc(("Returning error %Rrc\n", rc));
- return rc;
- }
-
--VBGLR3DECL(int) VbglR3DnDHGAcknowledgeOperation(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction)
-+VBGLR3DECL(int) VbglR3DnDHGSendAckOp(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGACKOPMSG Msg;
-+ VBOXDNDHGACKOPMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_HG_ACK_OP;
-- Msg.hdr.cParms = 1;
-+ Msg.hdr.u32Function = GUEST_DND_HG_ACK_OP;
-+
-+ LogFlowFunc(("uProto=%RU32\n", pCtx->uProtocol));
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ Msg.u.v1.uAction.SetUInt32(uAction);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 2;
-
-- Msg.uAction.SetUInt32(uAction);
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uAction.SetUInt32(uAction);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -1159,19 +1627,37 @@ VBGLR3DECL(int) VbglR3DnDHGAcknowledgeOp
- return rc;
- }
-
--VBGLR3DECL(int) VbglR3DnDHGRequestData(PVBGLR3GUESTDNDCMDCTX pCtx, const char* pcszFormat)
-+VBGLR3DECL(int) VbglR3DnDHGSendReqData(PVBGLR3GUESTDNDCMDCTX pCtx, const char* pcszFormat)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pcszFormat, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDHGREQDATAMSG Msg;
-+ VBOXDNDHGREQDATAMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_HG_REQ_DATA;
-- Msg.hdr.cParms = 1;
-+ Msg.hdr.u32Function = GUEST_DND_HG_REQ_DATA;
-+
-+ if (!RTStrIsValidEncoding(pcszFormat))
-+ return VERR_INVALID_PARAMETER;
-+
-+ const uint32_t cbFormat = (uint32_t)strlen(pcszFormat) + 1; /* Include termination */
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ Msg.u.v1.pvFormat.SetPtr((void*)pcszFormat, cbFormat);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 3;
-
-- Msg.pFormat.SetPtr((void*)pcszFormat, (uint32_t)strlen(pcszFormat) + 1);
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvFormat.SetPtr((void*)pcszFormat, cbFormat);
-+ Msg.u.v3.cbFormat.SetUInt32(cbFormat);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -1180,21 +1666,35 @@ VBGLR3DECL(int) VbglR3DnDHGRequestData(P
- return rc;
- }
-
--VBGLR3DECL(int) VbglR3DnDHGSetProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr)
-+VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertReturn(uStatus > DragAndDropSvc::DND_PROGRESS_UNKNOWN, VERR_INVALID_PARAMETER);
-+ AssertReturn(uStatus > DND_PROGRESS_UNKNOWN, VERR_INVALID_PARAMETER);
-
-- DragAndDropSvc::VBOXDNDHGEVTPROGRESSMSG Msg;
-+ VBOXDNDHGEVTPROGRESSMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
- Msg.hdr.u32Function = uStatus;
-- Msg.hdr.cParms = 3;
-
-- Msg.uStatus.SetUInt32(uStatus);
-- Msg.uPercent.SetUInt32(uPercent);
-- Msg.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ Msg.u.v1.uStatus.SetUInt32(uStatus);
-+ Msg.u.v1.uPercent.SetUInt32(uPercent);
-+ Msg.u.v1.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 4;
-+
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uStatus.SetUInt32(uStatus);
-+ Msg.u.v3.uPercent.SetUInt32(uPercent);
-+ Msg.u.v3.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -1204,22 +1704,41 @@ VBGLR3DECL(int) VbglR3DnDHGSetProgress(P
- }
-
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
--VBGLR3DECL(int) VbglR3DnDGHAcknowledgePending(PVBGLR3GUESTDNDCMDCTX pCtx,
-- uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats)
-+VBGLR3DECL(int) VbglR3DnDGHSendAckPending(PVBGLR3GUESTDNDCMDCTX pCtx,
-+ uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats, uint32_t cbFormats)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pcszFormats, VERR_INVALID_POINTER);
-+ AssertReturn(cbFormats, VERR_INVALID_PARAMETER);
-
-- DragAndDropSvc::VBOXDNDGHACKPENDINGMSG Msg;
-+ if (!RTStrIsValidEncoding(pcszFormats))
-+ return VERR_INVALID_UTF8_ENCODING;
-+
-+ VBOXDNDGHACKPENDINGMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_ACK_PENDING;
-- Msg.hdr.cParms = 3;
-+ Msg.hdr.u32Function = GUEST_DND_GH_ACK_PENDING;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ Msg.u.v1.uDefAction.SetUInt32(uDefAction);
-+ Msg.u.v1.uAllActions.SetUInt32(uAllActions);
-+ Msg.u.v1.pvFormats.SetPtr((void*)pcszFormats, cbFormats);
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 5;
-
-- Msg.uDefAction.SetUInt32(uDefAction);
-- Msg.uAllActions.SetUInt32(uAllActions);
-- Msg.pFormat.SetPtr((void*)pcszFormats, (uint32_t)strlen(pcszFormats) + 1);
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.uDefAction.SetUInt32(uDefAction);
-+ Msg.u.v3.uAllActions.SetUInt32(uAllActions);
-+ Msg.u.v3.pvFormats.SetPtr((void*)pcszFormats, cbFormats);
-+ Msg.u.v3.cbFormats.SetUInt32(cbFormats);
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -1229,49 +1748,106 @@ VBGLR3DECL(int) VbglR3DnDGHAcknowledgePe
- }
-
- static int vbglR3DnDGHSendDataInternal(PVBGLR3GUESTDNDCMDCTX pCtx,
-- void *pvData, uint32_t cbData, uint32_t cbAdditionalData)
-+ void *pvData, uint64_t cbData, PVBOXDNDSNDDATAHDR pDataHdr)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
- AssertReturn(cbData, VERR_INVALID_PARAMETER);
- /* cbAdditionalData is optional. */
--
-- DragAndDropSvc::VBOXDNDGHSENDDATAMSG Msg;
-- RT_ZERO(Msg);
-- Msg.hdr.result = VERR_WRONG_ORDER;
-- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_SND_DATA;
-- Msg.hdr.cParms = 2;
--
-- /* Total amount of bytes to send (including this data block). */
-- Msg.cbTotalBytes.SetUInt32(cbData + cbAdditionalData);
-+ /* pDataHdr is optional in protocols < v3. */
-
- int rc = VINF_SUCCESS;
-
-- uint32_t cbCurChunk;
-- uint32_t cbMaxChunk = _64K; /** @todo Transfer max. 64K chunks per message. Configurable? */
-- uint32_t cbSent = 0;
--
-- while (cbSent < cbData)
-+ /* For protocol v3 and up we need to send the data header first. */
-+ if (pCtx->uProtocol >= 3)
- {
-- cbCurChunk = RT_MIN(cbData - cbSent, cbMaxChunk);
-- Msg.pvData.SetPtr(static_cast<uint8_t *>(pvData) + cbSent, cbCurChunk);
-+ AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
-+
-+ VBOXDNDGHSENDDATAHDRMSG Msg;
-+ RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
-+ Msg.hdr.u32ClientID = pCtx->uClientID;
-+ Msg.hdr.u32Function = GUEST_DND_GH_SND_DATA_HDR;
-+ Msg.hdr.cParms = 12;
-+
-+ Msg.uContext.SetUInt32(0); /** @todo Not used yet. */
-+ Msg.uFlags.SetUInt32(0); /** @todo Not used yet. */
-+ Msg.uScreenId.SetUInt32(0); /** @todo Not used for guest->host (yet). */
-+ Msg.cbTotal.SetUInt64(pDataHdr->cbTotal);
-+ Msg.cbMeta.SetUInt32(pDataHdr->cbMeta);
-+ Msg.pvMetaFmt.SetPtr(pDataHdr->pvMetaFmt, pDataHdr->cbMetaFmt);
-+ Msg.cbMetaFmt.SetUInt32(pDataHdr->cbMetaFmt);
-+ Msg.cObjects.SetUInt64(pDataHdr->cObjects);
-+ Msg.enmCompression.SetUInt32(0); /** @todo Not used yet. */
-+ Msg.enmChecksumType.SetUInt32(RTDIGESTTYPE_INVALID); /** @todo Not used yet. */
-+ Msg.pvChecksum.SetPtr(NULL, 0); /** @todo Not used yet. */
-+ Msg.cbChecksum.SetUInt32(0); /** @todo Not used yet. */
-
- rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
- rc = Msg.hdr.result;
-
-- if (RT_FAILURE(rc))
-- break;
--
-- cbSent += cbCurChunk;
-+ LogFlowFunc(("cbTotal=%RU64, cbMeta=%RU32, cObjects=%RU64, rc=%Rrc\n",
-+ pDataHdr->cbTotal, pDataHdr->cbMeta, pDataHdr->cObjects, rc));
- }
-
- if (RT_SUCCESS(rc))
-- Assert(cbSent == cbData);
-+ {
-+ VBOXDNDGHSENDDATAMSG Msg;
-+ RT_ZERO(Msg);
-+ Msg.hdr.result = VERR_WRONG_ORDER;
-+ Msg.hdr.u32ClientID = pCtx->uClientID;
-+ Msg.hdr.u32Function = GUEST_DND_GH_SND_DATA;
-+
-+ if (pCtx->uProtocol >= 3)
-+ {
-+ Msg.hdr.cParms = 5;
-+
-+ Msg.u.v3.uContext.SetUInt32(0); /** @todo Not used yet. */
-+ Msg.u.v3.pvChecksum.SetPtr(NULL, 0); /** @todo Not used yet. */
-+ Msg.u.v3.cbChecksum.SetUInt32(0); /** @todo Not used yet. */
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 2;
-+
-+ /* Total amount of bytes to send (meta data + all directory/file objects). */
-+ /* Note: Only supports uint32_t, so this is *not* a typo. */
-+ Msg.u.v1.cbTotalBytes.SetUInt32((uint32_t)pDataHdr->cbTotal);
-+ }
-+
-+ uint32_t cbCurChunk;
-+ const uint32_t cbMaxChunk = pCtx->cbMaxChunkSize;
-+ uint32_t cbSent = 0;
-+
-+ HGCMFunctionParameter *pParm = (pCtx->uProtocol >= 3)
-+ ? &Msg.u.v3.pvData
-+ : &Msg.u.v1.pvData;
-+ while (cbSent < cbData)
-+ {
-+ cbCurChunk = RT_MIN(cbData - cbSent, cbMaxChunk);
-+ pParm->SetPtr(static_cast<uint8_t *>(pvData) + cbSent, cbCurChunk);
-+ if (pCtx->uProtocol > 2)
-+ Msg.u.v3.cbData.SetUInt32(cbCurChunk);
-+
-+ rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-+ if (RT_SUCCESS(rc))
-+ rc = Msg.hdr.result;
-+
-+ if (RT_FAILURE(rc))
-+ break;
-+
-+ cbSent += cbCurChunk;
-+ }
-
-- LogFlowFunc(("Returning rc=%Rrc, cbData=%RU32, cbAddtionalData=%RU32, cbSent=%RU32\n",
-- rc, cbData, cbAdditionalData, cbSent));
-+ LogFlowFunc(("cbMaxChunk=%RU32, cbData=%RU64, cbSent=%RU32, rc=%Rrc\n",
-+ cbMaxChunk, cbData, cbSent, rc));
-+
-+ if (RT_SUCCESS(rc))
-+ Assert(cbSent == cbData);
-+ }
-+
-+ LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
-@@ -1281,20 +1857,39 @@ static int vbglR3DnDGHSendDir(PVBGLR3GUE
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertReturn(pObj->GetType() == DnDURIObject::Directory, VERR_INVALID_PARAMETER);
-
-- DragAndDropSvc::VBOXDNDGHSENDDIRMSG Msg;
-+ RTCString strPath = pObj->GetDestPath();
-+ LogFlowFunc(("strDir=%s (%zu), fMode=0x%x\n",
-+ strPath.c_str(), strPath.length(), pObj->GetMode()));
-+
-+ if (strPath.length() > RTPATH_MAX)
-+ return VERR_INVALID_PARAMETER;
-+
-+ const uint32_t cbPath = (uint32_t)strPath.length() + 1; /* Include termination. */
-+
-+ VBOXDNDGHSENDDIRMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_SND_DIR;
-- Msg.hdr.cParms = 3;
-+ Msg.hdr.u32Function = GUEST_DND_GH_SND_DIR;
-
-- RTCString strPath = pObj->GetDestPath();
-- LogFlowFunc(("strDir=%s (%zu), fMode=0x%x\n",
-- strPath.c_str(), strPath.length(), pObj->GetMode()));
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ Msg.u.v1.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)cbPath);
-+ Msg.u.v1.cbName.SetUInt32((uint32_t)cbPath);
-+ Msg.u.v1.fMode.SetUInt32(pObj->GetMode());
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 4;
-
-- Msg.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1));
-- Msg.cbName.SetUInt32((uint32_t)(strPath.length() + 1));
-- Msg.fMode.SetUInt32(pObj->GetMode());
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)cbPath);
-+ Msg.u.v3.cbName.SetUInt32((uint32_t)cbPath);
-+ Msg.u.v3.fMode.SetUInt32(pObj->GetMode());
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-@@ -1326,11 +1921,11 @@ static int vbglR3DnDGHSendFile(PVBGLR3GU
-
- if (pCtx->uProtocol >= 2) /* Protocol version 2 and up sends a file header first. */
- {
-- DragAndDropSvc::VBOXDNDGHSENDFILEHDRMSG MsgHdr;
-+ VBOXDNDGHSENDFILEHDRMSG MsgHdr;
- RT_ZERO(MsgHdr);
- MsgHdr.hdr.result = VERR_WRONG_ORDER;
- MsgHdr.hdr.u32ClientID = pCtx->uClientID;
-- MsgHdr.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR;
-+ MsgHdr.hdr.u32Function = GUEST_DND_GH_SND_FILE_HDR;
- MsgHdr.hdr.cParms = 6;
-
- MsgHdr.uContext.SetUInt32(0); /* Context ID; unused at the moment. */
-@@ -1354,26 +1949,41 @@ static int vbglR3DnDGHSendFile(PVBGLR3GU
- /*
- * Send the actual file data, chunk by chunk.
- */
-- DragAndDropSvc::VBOXDNDGHSENDFILEDATAMSG Msg;
-+ VBOXDNDGHSENDFILEDATAMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA;
-+ Msg.hdr.u32Function = GUEST_DND_GH_SND_FILE_DATA;
-
-- if (pCtx->uProtocol <= 1)
-+ switch (pCtx->uProtocol)
- {
-- Msg.hdr.cParms = 5;
-+ case 3:
-+ {
-+ Msg.hdr.cParms = 5;
-
-- Msg.u.v1.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1));
-- Msg.u.v1.cbName.SetUInt32((uint32_t)(strPath.length() + 1));
-- Msg.u.v1.fMode.SetUInt32(pObj->GetMode());
-- }
-- else
-- {
-- /* Only send context ID, file chunk + chunk size. */
-- Msg.hdr.cParms = 3;
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.pvChecksum.SetPtr(NULL, 0);
-+ Msg.u.v3.cbChecksum.SetUInt32(0);
-+ break;
-+ }
-+
-+ case 2:
-+ {
-+ Msg.hdr.cParms = 3;
-+
-+ Msg.u.v2.uContext.SetUInt32(0);
-+ break;
-+ }
-+
-+ default: /* Protocol v1 */
-+ {
-+ Msg.hdr.cParms = 5;
-
-- Msg.u.v2.uContext.SetUInt32(0); /** @todo Set context ID. */
-+ Msg.u.v1.pvName.SetPtr((void *)strPath.c_str(), (uint32_t)(strPath.length() + 1));
-+ Msg.u.v1.cbName.SetUInt32((uint32_t)(strPath.length() + 1));
-+ Msg.u.v1.fMode.SetUInt32(pObj->GetMode());
-+ break;
-+ }
- }
-
- uint64_t cbToReadTotal = pObj->GetSize();
-@@ -1391,15 +2001,29 @@ static int vbglR3DnDGHSendFile(PVBGLR3GU
- if ( RT_SUCCESS(rc)
- && cbRead)
- {
-- if (pCtx->uProtocol <= 1)
-- {
-- Msg.u.v1.pvData.SetPtr(pvBuf, cbRead);
-- Msg.u.v1.cbData.SetUInt32(cbRead);
-- }
-- else
-+ switch (pCtx->uProtocol)
- {
-- Msg.u.v2.pvData.SetPtr(pvBuf, cbRead);
-- Msg.u.v2.cbData.SetUInt32(cbRead);
-+ case 3:
-+ {
-+ Msg.u.v3.pvData.SetPtr(pvBuf, cbRead);
-+ Msg.u.v3.cbData.SetUInt32(cbRead);
-+ /** @todo Calculate + set checksums. */
-+ break;
-+ }
-+
-+ case 2:
-+ {
-+ Msg.u.v2.pvData.SetPtr(pvBuf, cbRead);
-+ Msg.u.v2.cbData.SetUInt32(cbRead);
-+ break;
-+ }
-+
-+ default:
-+ {
-+ Msg.u.v1.pvData.SetPtr(pvBuf, cbRead);
-+ Msg.u.v1.cbData.SetUInt32(cbRead);
-+ break;
-+ }
- }
-
- rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
-@@ -1453,8 +2077,22 @@ static int vbglR3DnDGHSendURIObject(PVBG
- return rc;
- }
-
--static int vbglR3DnDGHProcessURIMessages(PVBGLR3GUESTDNDCMDCTX pCtx,
-- const void *pvData, uint32_t cbData)
-+static int vbglR3DnDGHSendRawData(PVBGLR3GUESTDNDCMDCTX pCtx, void *pvData, size_t cbData)
-+{
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-+ /* cbData can be 0. */
-+
-+ VBOXDNDDATAHDR dataHdr;
-+ RT_ZERO(dataHdr);
-+
-+ /* For raw data only the total size is required to be specified. */
-+ dataHdr.cbTotal = cbData;
-+
-+ return vbglR3DnDGHSendDataInternal(pCtx, pvData, cbData, &dataHdr);
-+}
-+
-+static int vbglR3DnDGHSendURIData(PVBGLR3GUESTDNDCMDCTX pCtx, const void *pvData, size_t cbData)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-@@ -1471,18 +2109,37 @@ static int vbglR3DnDGHProcessURIMessages
- int rc = lstURI.AppendURIPathsFromList(lstPaths, fFlags);
- if (RT_SUCCESS(rc))
- {
-- /* Send metadata; in this case it's the (non-recursive) file/directory
-- * URI list the host needs to know to initialize the drag'n drop operation. */
-+ /*
-+ * Send the (meta) data; in case of URIs it's the (non-recursive) file/directory
-+ * URI list the host needs to know upfront to set up the drag'n drop operation.
-+ */
- RTCString strRootDest = lstURI.RootToString();
-- Assert(strRootDest.isNotEmpty());
-+ if (strRootDest.isNotEmpty())
-+ {
-+ void *pvURIList = (void *)strRootDest.c_str(); /* URI root list. */
-+ uint32_t cbURLIist = (uint32_t)strRootDest.length() + 1; /* Include string termination. */
-
-- void *pvToSend = (void *)strRootDest.c_str();
-- uint32_t cbToSend = (uint32_t)strRootDest.length() + 1; /* Include string termination. */
-+ /* The total size also contains the size of the meta data. */
-+ uint64_t cbTotal = cbURLIist;
-+ cbTotal += lstURI.TotalBytes();
-+
-+ /* We're going to send an URI list in text format. */
-+ const char szMetaFmt[] = "text/uri-list";
-+ const uint32_t cbMetaFmt = (uint32_t)strlen(szMetaFmt) + 1; /* Include termination. */
-+
-+ VBOXDNDDATAHDR dataHdr;
-+ dataHdr.uFlags = 0; /* Flags not used yet. */
-+ dataHdr.cbTotal = cbTotal;
-+ dataHdr.cbMeta = cbURLIist;
-+ dataHdr.pvMetaFmt = (void *)szMetaFmt;
-+ dataHdr.cbMetaFmt = cbMetaFmt;
-+ dataHdr.cObjects = lstURI.TotalCount();
-
-- rc = vbglR3DnDGHSendDataInternal(pCtx, pvToSend, cbToSend,
-- /* Include total bytes of all file paths,
-- * file sizes etc. */
-- (uint32_t)lstURI.TotalBytes());
-+ rc = vbglR3DnDGHSendDataInternal(pCtx,
-+ pvURIList, cbURLIist, &dataHdr);
-+ }
-+ else
-+ rc = VERR_INVALID_PARAMETER;
- }
-
- if (RT_SUCCESS(rc))
-@@ -1514,12 +2171,11 @@ VBGLR3DECL(int) VbglR3DnDGHSendData(PVBG
- int rc;
- if (DnDMIMEHasFileURLs(pszFormat, strlen(pszFormat)))
- {
-- rc = vbglR3DnDGHProcessURIMessages(pCtx, pvData, cbData);
-+ /* Send file data. */
-+ rc = vbglR3DnDGHSendURIData(pCtx, pvData, cbData);
- }
- else
-- {
-- rc = vbglR3DnDGHSendDataInternal(pCtx, pvData, cbData, 0 /* cbAdditionalData */);
-- }
-+ rc = vbglR3DnDGHSendRawData(pCtx, pvData, cbData);
-
- if (RT_FAILURE(rc))
- {
-@@ -1535,20 +2191,41 @@ VBGLR3DECL(int) VbglR3DnDGHSendError(PVB
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-
-- DragAndDropSvc::VBOXDNDGHEVTERRORMSG Msg;
-+ VBOXDNDGHEVTERRORMSG Msg;
- RT_ZERO(Msg);
- Msg.hdr.result = VERR_WRONG_ORDER;
- Msg.hdr.u32ClientID = pCtx->uClientID;
-- Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_GH_EVT_ERROR;
-- Msg.hdr.cParms = 1;
-+ Msg.hdr.u32Function = GUEST_DND_GH_EVT_ERROR;
-+
-+ if (pCtx->uProtocol < 3)
-+ {
-+ Msg.hdr.cParms = 1;
-+
-+ Msg.u.v1.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ }
-+ else
-+ {
-+ Msg.hdr.cParms = 2;
-
-- Msg.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ /** @todo Context ID not used yet. */
-+ Msg.u.v3.uContext.SetUInt32(0);
-+ Msg.u.v3.rc.SetUInt32((uint32_t)rcErr); /* uint32_t vs. int. */
-+ }
-
- int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
- if (RT_SUCCESS(rc))
-- rc = Msg.hdr.result;
-+ {
-+ if (RT_FAILURE(Msg.hdr.result))
-+ {
-+ LogFlowFunc(("Sending error %Rrc failed with rc=%Rrc\n", rcErr, Msg.hdr.result));
-+
-+ /* Never return an error if the host did not accept the error at
-+ * the current time. This can be due to the host not having any appropriate
-+ * callbacks set which would handle that error. */
-+ rc = VINF_SUCCESS;
-+ }
-+ }
-
-- LogFlowFunc(("Sending error %Rrc returned with rc=%Rrc\n", rcErr, rc));
- return rc;
- }
- #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHGCM.cpp
-@@ -0,0 +1,84 @@
-+/* $Id: VBoxGuestR3LibHGCM.cpp $ */
-+/** @file
-+ * VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions,
-+ * generic HGCM.
-+ */
-+
-+/*
-+ * Copyright (C) 2015 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ *
-+ * The contents of this file may alternatively be used under the terms
-+ * of the Common Development and Distribution License Version 1.0
-+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+ * VirtualBox OSE distribution, in which case the provisions of the
-+ * CDDL are applicable instead of those of the GPL.
-+ *
-+ * You may elect to license modified versions of this file under the
-+ * terms and conditions of either the GPL or the CDDL or both.
-+ */
-+
-+/*********************************************************************************************************************************
-+* Header Files *
-+*********************************************************************************************************************************/
-+#include "VBGLR3Internal.h"
-+
-+#include <VBox/VBoxGuestLib.h>
-+
-+#include <iprt/string.h>
-+
-+/**
-+ * Connects to an HGCM service.
-+ *
-+ * @returns VBox status code
-+ * @returns VERR_NOT_SUPPORTED if pass-through is not available on the host.
-+ * @param pszServiceName Name of the host service.
-+ * @param pidClient Where to put the client ID on success. The client ID
-+ * must be passed to all the other calls to the service.
-+ */
-+VBGLR3DECL(int) VbglR3HGCMConnect(const char *pszServiceName, HGCMCLIENTID *pidClient)
-+{
-+ VBoxGuestHGCMConnectInfo Info;
-+ Info.result = VERR_WRONG_ORDER;
-+ Info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
-+ RT_ZERO(Info.Loc.u);
-+ strcpy(Info.Loc.u.host.achName, pszServiceName);
-+ Info.u32ClientID = UINT32_MAX; /* try make valgrind shut up. */
-+
-+ int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CONNECT, &Info, sizeof(Info));
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = Info.result;
-+ if (RT_SUCCESS(rc))
-+ *pidClient = Info.u32ClientID;
-+ if (rc == VERR_NOT_IMPLEMENTED || rc == VERR_HGCM_SERVICE_NOT_FOUND)
-+ rc = VERR_NOT_SUPPORTED;
-+ }
-+ return rc;
-+}
-+
-+
-+/**
-+ * Disconnect from an HGCM service.
-+ *
-+ * @returns VBox status code.
-+ * @param idClient The client id returned by VbglR3InfoSvcConnect().
-+ */
-+VBGLR3DECL(int) VbglR3HGCMDisconnect(HGCMCLIENTID idClient)
-+{
-+ VBoxGuestHGCMDisconnectInfo Info;
-+ Info.result = VERR_WRONG_ORDER;
-+ Info.u32ClientID = idClient;
-+
-+ int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
-+ if (RT_SUCCESS(rc))
-+ rc = Info.result;
-+ return rc;
-+}
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
-@@ -719,7 +719,7 @@ static int vgsvcGstCtrlProcessProcLoop(P
- fProcessAlive = false;
- }
- else if (RT_FAILURE(rc2))
-- VGSvcError("PID %RU32]: Killing process failed with rc=%Rrc\n", pProcess->uPID, rc2);
-+ VGSvcError("[PID %RU32]: Killing process failed with rc=%Rrc\n", pProcess->uPID, rc2);
- RTThreadSleep(500);
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
-@@ -225,8 +225,8 @@ static void vgsvcVMStatsReport(void)
- /* Unfortunately GetSystemTimes is XP SP1 and up only, so we need to use the semi-undocumented NtQuerySystemInformation */
- bool fCpuInfoAvail = false;
- DWORD cbReturned;
-- NTSTATUS rc = g_VMStat.pfnNtQuerySystemInformation(SystemProcessorPerformanceInformation, pProcInfo, cbStruct, &cbReturned);
-- if ( !rc
-+ NTSTATUS rcNt = g_VMStat.pfnNtQuerySystemInformation(SystemProcessorPerformanceInformation, pProcInfo, cbStruct, &cbReturned);
-+ if ( !rcNt
- && cbReturned == cbStruct)
- {
- for (uint32_t i = 0; i < systemInfo.dwNumberOfProcessors; i++)
-@@ -246,8 +246,8 @@ static void vgsvcVMStatsReport(void)
-
- Sleep(250);
-
-- rc = g_VMStat.pfnNtQuerySystemInformation(SystemProcessorPerformanceInformation, pProcInfo, cbStruct, &cbReturned);
-- Assert(!rc);
-+ rcNt = g_VMStat.pfnNtQuerySystemInformation(SystemProcessorPerformanceInformation, pProcInfo, cbStruct, &cbReturned);
-+ Assert(!rcNt);
- }
-
- uint64_t deltaIdle = (pProcInfo[i].IdleTime.QuadPart - g_VMStat.au64LastCpuLoad_Idle[i]);
-@@ -265,7 +265,7 @@ static void vgsvcVMStatsReport(void)
- req.guestStats.u32StatCaps |= VBOX_GUEST_STAT_CPU_LOAD_IDLE | VBOX_GUEST_STAT_CPU_LOAD_KERNEL
- | VBOX_GUEST_STAT_CPU_LOAD_USER;
- req.guestStats.u32CpuId = i;
-- rc = VbglR3StatReport(&req);
-+ int rc = VbglR3StatReport(&req);
- if (RT_SUCCESS(rc))
- VGSvcVerbose(3, "vgsvcVMStatsReport: new statistics (CPU %u) reported successfully!\n", i);
- else
-@@ -281,7 +281,7 @@ static void vgsvcVMStatsReport(void)
- if (!fCpuInfoAvail)
- {
- VGSvcVerbose(3, "vgsvcVMStatsReport: CPU info not available!\n");
-- rc = VbglR3StatReport(&req);
-+ int rc = VbglR3StatReport(&req);
- if (RT_SUCCESS(rc))
- VGSvcVerbose(3, "vgsvcVMStatsReport: new statistics reported successfully!\n");
- else
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
-@@ -1083,8 +1083,7 @@ static int vgsvcVMInfoWriteNetwork(void)
- }
- if (pAdpInfo)
- RTMemFree(pAdpInfo);
-- if (sd >= 0)
-- closesocket(sd);
-+ closesocket(sd);
-
- #elif defined(RT_OS_HAIKU)
- /** @todo Haiku: implement network info. retreival */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
-@@ -206,6 +206,23 @@ static int vboxHGSMIReportFlagsLocation(
- }
-
-
-+/**
-+ * Inform the host of the location of the host flags in VRAM via an HGSMI
-+ * command.
-+ * @returns IPRT status value.
-+ * @returns VERR_NOT_IMPLEMENTED if the host does not support the command.
-+ * @returns VERR_NO_MEMORY if a heap allocation fails.
-+ * @param pCtx the context of the guest heap to use.
-+ * @param offLocation the offset chosen for the flags withing guest
-+ * VRAM.
-+ */
-+RTDECL(int) VBoxHGSMIReportFlagsLocation(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-+ HGSMIOFFSET offLocation)
-+{
-+ return vboxHGSMIReportFlagsLocation(pCtx, offLocation);
-+}
-+
-+
- /** Notify the host of HGSMI-related guest capabilities via an HGSMI command.
- */
- static int vboxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx,
-@@ -646,7 +663,7 @@ RTDECL(int) VBoxHGSMICursorPosition(PHGS
- *pxHost = p->x;
- if (pyHost)
- *pyHost = p->y;
-- Log(("%s: return: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)x, (unsigned)y));
-+ Log(("%s: return: x=%u, y=%u\n", __PRETTY_FUNCTION__, (unsigned)p->x, (unsigned)p->y));
- }
- /* Free the IO buffer. */
- VBoxHGSMIBufferFree(pCtx, p);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
-@@ -297,7 +297,7 @@ RTDECL(int) VBoxHGSMIUpdateInputMap
- {
- int rc = VINF_SUCCESS;
- VBVAREPORTINPUTMAPPING *p;
-- Log(("%s: cOriginX=%u, cOriginY=%u, cWidth=%u, cHeight=%u\n", __PRETTY_FUNCTION__, (unsigned)cOriginX, (unsigned)cOriginX,
-+ Log(("%s: cOriginX=%d, cOriginY=%d, cWidth=%u, cHeight=%u\n", __PRETTY_FUNCTION__, (int)cOriginX, (int)cOriginX,
- (unsigned)cWidth, (unsigned)cHeight));
-
- /* Allocate the IO buffer. */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/crOpenGL/Makefile.kmk
-@@ -46,7 +46,8 @@ endif
-
- if1of ($(KBUILD_TARGET), linux solaris freebsd)
- #VBoxOGL_DRI = 1
-- ifn1of ($(KBUILD_TARGET),solaris) # No DRI on Solaris yet
-+ DLLS += VBoxEGL
-+ ifn1of ($(KBUILD_TARGET),linux solaris) # No DRI on Solaris yet
- VBoxOGL_FAKEDRI = 1
- endif
-
-@@ -155,7 +156,7 @@ if1of ($(KBUILD_TARGET), linux solaris f
- endif
- else
- VBoxOGL_SOURCES.linux += \
-- $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
-+ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c
- VBoxOGL_SOURCES.solaris += \
- $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
- VBoxOGL_SOURCES.freebsd += \
-@@ -174,7 +175,7 @@ VBoxOGL_CLEAN = \
- $(VBOX_PATH_CROGL_GENFILES)/NULLfuncs.c \
- $(VBOX_PATH_CROGL_GENFILES)/tsfuncs.c
- VBoxOGL_CLEAN.linux += \
-- $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
-+ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c
- VBoxOGL_CLEAN.solaris += \
- $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
- VBoxOGL_CLEAN.win = \
-@@ -219,6 +220,9 @@ if1of ($(KBUILD_TARGET), linux solaris f
- VBoxOGL_LIBS += \
- dl
- endif
-+ else
-+ VBoxOGL_SONAME.linux = libGL.so.1
-+ VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain
- endif
- endif
- ifdef VBOX_WITH_CRHGSMI
-@@ -323,8 +327,8 @@ $(VBOX_PATH_CROGL_GENFILES)/freebsd_expo
- $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
-
- else
--$(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm: \
-- $(PATH_SUB_CURRENT)/Linux_i386_exports.py \
-+$(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \
-+ $(PATH_SUB_CURRENT)/Linux_exports.py \
- $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
- | $$(dir $$@)
- $(call MSG_GENERATE,python,$@,$<)
-@@ -697,5 +701,11 @@ $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_
- $(call MSG_GENERATE,python,$@,$<)
- $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
-
-+VBoxEGL_TEMPLATE = VBOXCROGLR3GUESTDLL
-+VBoxEGL_SOURCES = egl.c
-+VBoxEGL_INCS = $(VBOX_PATH_X11_ROOT)/mesa-11.0.7
-+VBoxEGL_LIBS = $(VBOX_LIB_OGL) $(VBOX_LIB_IPRT_GUEST_R3_SHARED)
-+VBoxEGL_SONAME.linux = libEGL.so.1
-+
- include $(FILE_KBUILD_SUB_FOOTER)
-
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/crOpenGL/egl.c
-@@ -0,0 +1,936 @@
-+/* $Id: egl.c $ */
-+
-+/** @file
-+ * VBox OpenGL EGL implentation.
-+ */
-+
-+/*
-+ * Copyright (C) 2009-2015 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ */
-+
-+/*******************************************************************************
-+* Header Files *
-+*******************************************************************************/
-+#include <iprt/cdefs.h>
-+#include <iprt/initterm.h>
-+#include <iprt/mem.h>
-+#include <iprt/once.h>
-+#include <iprt/thread.h>
-+
-+#include <EGL/egl.h>
-+#include <GL/glx.h>
-+#include <X11/Xlib.h>
-+
-+/*******************************************************************************
-+* Structures and Typedefs *
-+*******************************************************************************/
-+
-+struct VBEGLTLS
-+{
-+ /** The last EGL error. */
-+ EGLint cErr;
-+ /** The EGL API currently bound to this thread. */
-+ EGLenum enmAPI;
-+ /** The current context. */
-+ EGLContext hCurrent;
-+ /** The display bound to the current context. */
-+ EGLDisplay hCurrentDisplay;
-+ /** The draw surface bound to the current context. */
-+ EGLSurface hCurrentDraw;
-+ /** The read surface bound to the current context. */
-+ EGLSurface hCurrentRead;
-+};
-+
-+/*******************************************************************************
-+* Defined Constants And Macros *
-+*******************************************************************************/
-+/** @note IDs returned for surfaces should always be lower than these constants.
-+ */
-+/** This is OR-ed with a surface ID to mark it as a window, as GLX needs to
-+ * know. */
-+#define VBEGL_WINDOW_SURFACE 0x20000000
-+/** This is OR-ed with a surface ID to mark it as a pbuffer, as GLX needs to
-+ * know. */
-+#define VBEGL_PBUFFER_SURFACE 0x40000000
-+/** This is OR-ed with a surface ID to mark it as a pixmap, as GLX needs to
-+ * know. */
-+#define VBEGL_PIXMAP_SURFACE 0x80000000
-+#define VBEGL_ANY_SURFACE (VBEGL_WINDOW_SURFACE | VBEGL_PBUFFER_SURFACE | VBEGL_PIXMAP_SURFACE)
-+
-+/*******************************************************************************
-+* Global variables *
-+*******************************************************************************/
-+
-+static RTTLS g_tls = NIL_RTTLS;
-+static RTONCE g_tlsOnce = RTONCE_INITIALIZER;
-+static Display *g_pDefaultDisplay = NULL;
-+static RTONCE g_defaultDisplayOnce = RTONCE_INITIALIZER;
-+
-+static int32_t tlsInitOnce(void *pv)
-+{
-+ NOREF(pv);
-+ g_tls = RTTlsAlloc();
-+ return VINF_SUCCESS;
-+}
-+
-+static struct VBEGLTLS *getTls(void)
-+{
-+ struct VBEGLTLS *pTls;
-+
-+ RTOnce(&g_tlsOnce, tlsInitOnce, NULL);
-+ pTls = (struct VBEGLTLS *)RTTlsGet(g_tls);
-+ if (RT_LIKELY(pTls))
-+ return pTls;
-+ pTls = (struct VBEGLTLS *)RTMemAlloc(sizeof(*pTls));
-+ if (!VALID_PTR(pTls))
-+ return NULL;
-+ pTls->cErr = EGL_SUCCESS;
-+ pTls->enmAPI = EGL_NONE;
-+ pTls->hCurrent = EGL_NO_CONTEXT;
-+ pTls->hCurrentDisplay = EGL_NO_DISPLAY;
-+ pTls->hCurrentDraw = EGL_NO_SURFACE;
-+ pTls->hCurrentRead = EGL_NO_SURFACE;
-+ RTTlsSet(g_tls, pTls);
-+ return pTls;
-+}
-+
-+static int32_t defaultDisplayInitOnce(void *pv)
-+{
-+ NOREF(pv);
-+ g_pDefaultDisplay = XOpenDisplay(NULL);
-+ return VINF_SUCCESS;
-+}
-+
-+static EGLBoolean clearEGLError(void)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!VALID_PTR(pTls))
-+ return EGL_FALSE;
-+ pTls->cErr = EGL_SUCCESS;
-+ return EGL_TRUE;
-+}
-+
-+static EGLBoolean setEGLError(EGLint cErr)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (pTls)
-+ pTls->cErr = cErr;
-+ return EGL_FALSE;
-+}
-+
-+DECLEXPORT(EGLDisplay) eglGetDisplay(EGLNativeDisplayType hDisplay)
-+{
-+ Display *pDisplay;
-+ int rc, cError, cEvent, cMajor, cMinor;
-+
-+ rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
-+ if (RT_FAILURE(rc))
-+ return EGL_NO_DISPLAY;
-+ if (!clearEGLError()) /* Set up our tls. */
-+ return EGL_NO_DISPLAY;
-+ if (hDisplay != EGL_DEFAULT_DISPLAY)
-+ pDisplay = hDisplay;
-+ else
-+ {
-+ RTOnce(&g_defaultDisplayOnce, defaultDisplayInitOnce, NULL);
-+ pDisplay = g_pDefaultDisplay;
-+ }
-+ if (pDisplay && glXQueryExtension(pDisplay, &cError, &cEvent))
-+ if (glXQueryVersion(pDisplay, &cMajor, &cMinor))
-+ if (cMajor > 1 || (cMajor == 1 && cMinor >= 3))
-+ return (EGLDisplay) pDisplay;
-+ return EGL_NO_DISPLAY;
-+}
-+
-+DECLEXPORT(EGLint) eglGetError(void)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (pTls)
-+ return pTls->cErr;
-+ return EGL_NOT_INITIALIZED;
-+}
-+
-+DECLEXPORT(EGLBoolean) eglInitialize (EGLDisplay hDisplay, EGLint *pcMajor, EGLint *pcMinor)
-+{
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_BAD_DISPLAY);
-+ if (pcMajor)
-+ *pcMajor = 1;
-+ if (pcMinor)
-+ *pcMinor = 4;
-+ return clearEGLError();
-+}
-+
-+/** @todo This function should terminate all allocated resources. */
-+DECLEXPORT(EGLBoolean) eglTerminate(EGLDisplay hDisplay)
-+{
-+ if (!VALID_PTR(hDisplay))
-+ return EGL_FALSE;
-+ return EGL_TRUE;
-+}
-+
-+DECLEXPORT(const char *) eglQueryString(EGLDisplay hDisplay, EGLint name)
-+{
-+ switch (name)
-+ {
-+ case EGL_CLIENT_APIS:
-+ return "OpenGL";
-+ case EGL_VENDOR:
-+ return "Chromium";
-+ case EGL_VERSION:
-+ return "1.4 Chromium";
-+ case EGL_EXTENSIONS:
-+ return "";
-+ default:
-+ return NULL;
-+ }
-+}
-+
-+DECLEXPORT(EGLBoolean) eglGetConfigs (EGLDisplay hDisplay, EGLConfig *paConfigs, EGLint caConfigs, EGLint *pcaConfigs)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ GLXFBConfig *paFBConfigs;
-+ int caFBConfigs, i;
-+
-+ if (!VALID_PTR(pDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ if (!VALID_PTR(pcaConfigs))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ if (caConfigs > 0 && !VALID_PTR(paConfigs))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ paFBConfigs = glXGetFBConfigs(pDisplay, DefaultScreen(pDisplay), &caFBConfigs);
-+ AssertPtrReturn(paFBConfigs, setEGLError(EGL_BAD_PARAMETER));
-+ if (caFBConfigs > caConfigs)
-+ caFBConfigs = caConfigs;
-+ *pcaConfigs = caFBConfigs;
-+ for (i = 0; i < caFBConfigs; ++i)
-+ paConfigs[i] = (EGLConfig)paFBConfigs[i];
-+ XFree(paFBConfigs);
-+ return clearEGLError();
-+}
-+
-+static int convertEGLAttribToGLX(EGLint EGLAttrib)
-+{
-+ switch (EGLAttrib)
-+ {
-+ case EGL_BUFFER_SIZE:
-+ return GLX_BUFFER_SIZE;
-+ case EGL_RED_SIZE:
-+ return GLX_RED_SIZE;
-+ case EGL_GREEN_SIZE:
-+ return GLX_GREEN_SIZE;
-+ case EGL_BLUE_SIZE:
-+ return GLX_BLUE_SIZE;
-+ case EGL_LUMINANCE_SIZE:
-+ return GLX_RED_SIZE;
-+ case EGL_ALPHA_SIZE:
-+ return GLX_ALPHA_SIZE;
-+ /* case EGL_ALPHA_MASK_SIZE: */
-+ /* case EGL_BIND_TO_TEXTURE_RGB: */
-+ /* case EGL_BIND_TO_TEXTURE_RGBA: */
-+ /* case EGL_COLOR_BUFFER_TYPE: */
-+ /* case EGL_CONFIG_CAVEAT: */
-+ case EGL_CONFIG_ID:
-+ return GLX_FBCONFIG_ID;
-+ /* case EGL_CONFORMANT: */
-+ case EGL_DEPTH_SIZE:
-+ return GLX_DEPTH_SIZE;
-+ case EGL_LEVEL:
-+ return GLX_LEVEL;
-+ case EGL_MAX_PBUFFER_WIDTH:
-+ return GLX_MAX_PBUFFER_WIDTH;
-+ case EGL_MAX_PBUFFER_HEIGHT:
-+ return GLX_MAX_PBUFFER_HEIGHT;
-+ case EGL_MAX_PBUFFER_PIXELS:
-+ return GLX_MAX_PBUFFER_PIXELS;
-+ /* case EGL_MATCH_NATIVE_PIXMAP: */
-+ /* case EGL_MAX_SWAP_INTERVAL: */
-+ /* case EGL_MIN_SWAP_INTERVAL: */
-+ case EGL_NATIVE_RENDERABLE:
-+ return GLX_X_RENDERABLE;
-+ case EGL_NATIVE_VISUAL_ID:
-+ return GLX_VISUAL_ID;
-+ /* case EGL_NATIVE_VISUAL_TYPE: */
-+ /* case EGL_RENDERABLE_TYPE: */
-+ case EGL_SAMPLE_BUFFERS:
-+ return GLX_SAMPLE_BUFFERS;
-+ case EGL_SAMPLES:
-+ return GLX_SAMPLES;
-+ case EGL_STENCIL_SIZE:
-+ return GLX_STENCIL_SIZE;
-+ /* case EGL_SURFACE_TYPE: */
-+ /* case EGL_TRANSPARENT_TYPE: */
-+ case EGL_TRANSPARENT_RED_VALUE:
-+ return GLX_TRANSPARENT_RED_VALUE;
-+ case EGL_TRANSPARENT_GREEN_VALUE:
-+ return GLX_TRANSPARENT_GREEN_VALUE;
-+ case EGL_TRANSPARENT_BLUE_VALUE:
-+ return GLX_TRANSPARENT_BLUE_VALUE;
-+ default:
-+ return None;
-+ }
-+}
-+
-+DECLEXPORT(EGLBoolean) eglChooseConfig (EGLDisplay hDisplay, const EGLint *paAttribs, EGLConfig *paConfigs, EGLint caConfigs,
-+ EGLint *pcConfigs)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ int aAttribList[256]; /* The list cannot be this long. */
-+ unsigned cAttribs = 0, i;
-+ const EGLint *pAttrib, *pAttrib2;
-+ EGLint cRenderableType = EGL_OPENGL_ES_BIT;
-+ int cConfigCaveat = GLX_DONT_CARE, cConformant = GLX_DONT_CARE;
-+ GLXFBConfig *paFBConfigs;
-+ int caFBConfigs;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ if (!VALID_PTR(pcConfigs))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ if (caConfigs > 0 && !VALID_PTR(paConfigs))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ for (pAttrib = paAttribs; pAttrib != NULL && *pAttrib != EGL_NONE; pAttrib += 2)
-+ {
-+ bool fSkip = false;
-+ int cGLXAttrib;
-+
-+ /* Check for illegal values. */
-+ if ((*pAttrib == EGL_LEVEL || *pAttrib == EGL_MATCH_NATIVE_PIXMAP) && pAttrib[1] == EGL_DONT_CARE)
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ /* Check for values we can't handle. */
-+ if ( (*pAttrib == EGL_ALPHA_MASK_SIZE)
-+ && pAttrib[1] != EGL_DONT_CARE && pAttrib[1] != 0)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ /** @todo try creating a pixmap from a native one with the configurations returned. */
-+ if (*pAttrib == EGL_MATCH_NATIVE_PIXMAP)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ if ( ( *pAttrib == EGL_MIN_SWAP_INTERVAL || *pAttrib == EGL_MAX_SWAP_INTERVAL
-+ || *pAttrib == EGL_BIND_TO_TEXTURE_RGB || *pAttrib == EGL_BIND_TO_TEXTURE_RGBA)
-+ && pAttrib[1] != EGL_DONT_CARE)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ /* Ignore attributes which are repeated later. */
-+ for (pAttrib2 = pAttrib + 2; *pAttrib2 != EGL_NONE; pAttrib2 += 2)
-+ if (*pAttrib2 == *pAttrib)
-+ fSkip == true;
-+ if (fSkip)
-+ continue;
-+ cGLXAttrib = convertEGLAttribToGLX(*pAttrib);
-+ if (cGLXAttrib != None)
-+ {
-+ aAttribList[cAttribs] = cGLXAttrib;
-+ if (pAttrib[1] == EGL_DONT_CARE)
-+ aAttribList[cAttribs + 1] = GLX_DONT_CARE;
-+ else
-+ aAttribList[cAttribs + 1] = pAttrib[1];
-+ cAttribs += 2;
-+ }
-+ else
-+ {
-+ switch (*pAttrib)
-+ {
-+ if ( *pAttrib == EGL_COLOR_BUFFER_TYPE
-+ && pAttrib[1] != EGL_DONT_CARE && pAttrib[1] != EGL_RGB_BUFFER)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ case EGL_COLOR_BUFFER_TYPE:
-+ aAttribList[cAttribs] = GLX_X_VISUAL_TYPE;
-+ aAttribList[cAttribs + 1] = pAttrib[1] == EGL_DONT_CARE ? GLX_DONT_CARE
-+ : pAttrib[1] == EGL_RGB_BUFFER ? GLX_TRUE_COLOR
-+ : pAttrib[1] == EGL_LUMINANCE_BUFFER ? GLX_GRAY_SCALE
-+ : GL_FALSE;
-+ break;
-+ case EGL_CONFIG_CAVEAT:
-+ cConfigCaveat = pAttrib[1] == EGL_DONT_CARE ? GLX_DONT_CARE
-+ : pAttrib[1] == EGL_NONE ? GLX_NONE
-+ : pAttrib[1] == EGL_SLOW_CONFIG ? GLX_SLOW_CONFIG
-+ : pAttrib[1] == EGL_NON_CONFORMANT_CONFIG ? GLX_NON_CONFORMANT_CONFIG
-+ : GL_FALSE;
-+ if (!cConfigCaveat)
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ cAttribs -= 2;
-+ break;
-+ case EGL_CONFORMANT:
-+ if (pAttrib[1] != EGL_OPENGL_BIT && pAttrib[1] != 0)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ cConformant = pAttrib[1] == EGL_OPENGL_BIT ? GL_TRUE : GL_FALSE;
-+ cAttribs -= 2;
-+ break;
-+ case EGL_NATIVE_VISUAL_TYPE:
-+ aAttribList[cAttribs] = GLX_X_VISUAL_TYPE;
-+ aAttribList[cAttribs + 1] = pAttrib[1] == EGL_DONT_CARE ? GLX_DONT_CARE
-+ : pAttrib[1] == StaticGray ? GLX_STATIC_GRAY
-+ : pAttrib[1] == StaticColor ? GLX_STATIC_COLOR
-+ : pAttrib[1] == TrueColor ? GLX_TRUE_COLOR
-+ : pAttrib[1] == GrayScale ? GLX_GRAY_SCALE
-+ : pAttrib[1] == PseudoColor ? GLX_PSEUDO_COLOR
-+ : pAttrib[1] == DirectColor ? GLX_DIRECT_COLOR
-+ : GL_FALSE;
-+ break;
-+ case EGL_RENDERABLE_TYPE:
-+ cRenderableType = pAttrib[1];
-+ break;
-+ case EGL_SURFACE_TYPE:
-+ if (pAttrib[1] & ~(EGL_PBUFFER_BIT | EGL_PIXMAP_BIT | EGL_WINDOW_BIT))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ aAttribList[cAttribs] = GLX_DRAWABLE_TYPE;
-+ aAttribList[cAttribs + 1] = (pAttrib[1] & EGL_PBUFFER_BIT ? GLX_PBUFFER_BIT : 0)
-+ | (pAttrib[1] & EGL_PIXMAP_BIT ? GLX_PIXMAP_BIT : 0)
-+ | (pAttrib[1] & EGL_WINDOW_BIT ? GLX_WINDOW_BIT : 0);
-+ break;
-+ case EGL_TRANSPARENT_TYPE:
-+ aAttribList[cAttribs] = GLX_TRANSPARENT_TYPE;
-+ aAttribList[cAttribs + 1] = pAttrib[1] == EGL_DONT_CARE ? GLX_DONT_CARE
-+ : pAttrib[1] == EGL_NONE ? GLX_NONE
-+ : pAttrib[1] == EGL_TRANSPARENT_RGB ? GLX_TRANSPARENT_RGB
-+ : GL_FALSE;
-+ break;
-+ default:
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ }
-+ cAttribs += 2;
-+ }
-+ }
-+ if (cConfigCaveat != GLX_DONT_CARE || cConformant != GLX_DONT_CARE)
-+ {
-+ aAttribList[cAttribs] = GLX_CONFIG_CAVEAT;
-+ aAttribList[cAttribs + 1] = cConformant == GL_FALSE ? GLX_NON_CONFORMANT_CONFIG
-+ : cConfigCaveat == EGL_SLOW_CONFIG ? GLX_SLOW_CONFIG
-+ : GLX_NONE;
-+ cAttribs += 2;
-+ }
-+ aAttribList[cAttribs] = GLX_RENDER_TYPE;
-+ aAttribList[cAttribs + 1] = GLX_RGBA_BIT;
-+ cAttribs += 2;
-+ if (paAttribs != NULL)
-+ {
-+ aAttribList[cAttribs] = None;
-+ AssertRelease(cAttribs < RT_ELEMENTS(aAttribList));
-+ if (!(cRenderableType & EGL_OPENGL_BIT))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ }
-+ paFBConfigs = glXChooseFBConfig(pDisplay, DefaultScreen(pDisplay), paAttribs != NULL ? aAttribList : NULL, &caFBConfigs);
-+ if (paFBConfigs == NULL)
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pcConfigs = caFBConfigs;
-+ for (i = 0; i < caConfigs && i < caFBConfigs; ++i)
-+ paConfigs[i] = (EGLConfig)paFBConfigs[i];
-+ XFree(paFBConfigs);
-+ return clearEGLError();
-+}
-+
-+DECLEXPORT(EGLBoolean) eglGetConfigAttrib (EGLDisplay hDisplay, EGLConfig cConfig, EGLint cAttribute, EGLint *pValue)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ int cGLXAttribute = convertEGLAttribToGLX(cAttribute);
-+ int cValue;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ if (!VALID_PTR(pValue))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_FBCONFIG_ID, &cValue))
-+ return setEGLError(EGL_BAD_CONFIG);
-+ if (cGLXAttribute != None)
-+ {
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, cGLXAttribute, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue;
-+ return clearEGLError();
-+ }
-+ switch (cAttribute)
-+ {
-+ case EGL_ALPHA_MASK_SIZE:
-+ *pValue = 0;
-+ return clearEGLError();
-+ case EGL_LUMINANCE_SIZE:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_X_VISUAL_TYPE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ if (cValue == GLX_STATIC_GRAY || cValue == GLX_GRAY_SCALE)
-+ {
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_RED_SIZE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue;
-+ }
-+ else
-+ *pValue = 0;
-+ return clearEGLError();
-+ case EGL_COLOR_BUFFER_TYPE:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_X_VISUAL_TYPE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ if (cValue == GLX_STATIC_GRAY || cValue == GLX_GRAY_SCALE)
-+ *pValue = EGL_LUMINANCE_BUFFER;
-+ else
-+ *pValue = EGL_RGB_BUFFER;
-+ return clearEGLError();
-+ case EGL_CONFIG_CAVEAT:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_CONFIG_CAVEAT, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue == GLX_NONE ? EGL_NONE : cValue == GLX_SLOW_CONFIG ? EGL_SLOW_CONFIG : GLX_NON_CONFORMANT_CONFIG;
-+ return clearEGLError();
-+ case EGL_CONFORMANT:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_CONFIG_CAVEAT, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue == GLX_NON_CONFORMANT_CONFIG ? 0 : EGL_OPENGL_BIT;
-+ return clearEGLError();
-+ case EGL_MATCH_NATIVE_PIXMAP:
-+ case EGL_MIN_SWAP_INTERVAL:
-+ case EGL_MAX_SWAP_INTERVAL:
-+ return setEGLError(EGL_BAD_ACCESS);
-+ case EGL_NATIVE_VISUAL_TYPE:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_X_VISUAL_TYPE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue == GLX_STATIC_GRAY ? StaticGray
-+ : cValue == GLX_STATIC_COLOR ? StaticColor
-+ : cValue == GLX_TRUE_COLOR ? TrueColor
-+ : cValue == GLX_GRAY_SCALE ? GrayScale
-+ : cValue == GLX_PSEUDO_COLOR ? PseudoColor
-+ : cValue == GLX_DIRECT_COLOR ? DirectColor
-+ : -1;
-+ return clearEGLError();
-+ case EGL_RENDERABLE_TYPE:
-+ *pValue = EGL_OPENGL_BIT;
-+ return clearEGLError();
-+ case EGL_SURFACE_TYPE:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_DRAWABLE_TYPE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = (cValue & GLX_PBUFFER_BIT ? EGL_PBUFFER_BIT : 0)
-+ | (cValue & GLX_PIXMAP_BIT ? EGL_PIXMAP_BIT : 0)
-+ | (cValue & GLX_WINDOW_BIT ? EGL_WINDOW_BIT : 0);
-+ return clearEGLError();
-+ case EGL_TRANSPARENT_TYPE:
-+ if (glXGetFBConfigAttrib(pDisplay, (GLXFBConfig)cConfig, GLX_TRANSPARENT_TYPE, &cValue))
-+ return setEGLError(EGL_BAD_ACCESS);
-+ *pValue = cValue == GLX_NONE ? EGL_NONE
-+ : cValue == GLX_TRANSPARENT_RGB ? EGL_TRANSPARENT_RGB
-+ : EGL_FALSE;
-+ return *pValue != EGL_FALSE ? clearEGLError() : setEGLError(EGL_BAD_ACCESS);
-+ default:
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ }
-+ return clearEGLError();
-+}
-+
-+DECLEXPORT(EGLSurface) eglCreateWindowSurface(EGLDisplay hDisplay, EGLConfig config, EGLNativeWindowType hWindow,
-+ const EGLint *paAttributes)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ GLXWindow hGLXWindow;
-+
-+ if (!VALID_PTR(hDisplay))
-+ {
-+ setEGLError(EGL_NOT_INITIALIZED);
-+ return EGL_NO_SURFACE;
-+ }
-+ if (paAttributes != NULL) /* Sanity test only. */
-+ while (*paAttributes != EGL_NONE)
-+ {
-+ if (*paAttributes != EGL_RENDER_BUFFER)
-+ {
-+ setEGLError(EGL_BAD_MATCH);
-+ return EGL_NO_SURFACE;
-+ }
-+ paAttributes += 2;
-+ }
-+ hGLXWindow = glXCreateWindow(pDisplay, (GLXFBConfig)config, (Window)hWindow, NULL);
-+ if (hGLXWindow == None)
-+ {
-+ setEGLError(EGL_BAD_ALLOC);
-+ return EGL_NO_SURFACE;
-+ }
-+ AssertRelease(hGLXWindow < VBEGL_WINDOW_SURFACE); /* Greater than the maximum XID. */
-+ clearEGLError();
-+ return (EGLSurface)(hGLXWindow | VBEGL_WINDOW_SURFACE);
-+}
-+
-+static void setAttribute(int *pcStoreIndex, int *pcCurIndex, int *paGLXAttributes, int cAttribute, int cValue)
-+{
-+ if (*pcStoreIndex < 0)
-+ {
-+ *pcStoreIndex = *pcCurIndex;
-+ *pcCurIndex += 2;
-+ paGLXAttributes[*pcStoreIndex] = cAttribute;
-+ }
-+ paGLXAttributes[*pcStoreIndex + 1] = cValue;
-+}
-+
-+DECLEXPORT(EGLSurface) eglCreatePbufferSurface(EGLDisplay hDisplay, EGLConfig config, EGLint const *paAttributes)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ enum { CPS_WIDTH = 0, CPS_HEIGHT, CPS_LARGEST, CPS_PRESERVED, CPS_TEX_FORMAT, CPS_TEX_TARGET, CPS_MIPMAP_TEX, CPS_END };
-+ int acIndices[CPS_END];
-+ int aAttributes[CPS_END * 2];
-+ int cIndex = 0;
-+ unsigned i;
-+ GLXPbuffer hPbuffer;
-+
-+ if (!VALID_PTR(hDisplay))
-+ {
-+ setEGLError(EGL_NOT_INITIALIZED);
-+ return EGL_NO_SURFACE;
-+ }
-+ for (i = 0; i < RT_ELEMENTS(acIndices); ++i)
-+ acIndices[i] = -1;
-+ if (paAttributes != NULL)
-+ while (*paAttributes != EGL_NONE)
-+ {
-+ switch (*paAttributes)
-+ {
-+ case EGL_WIDTH:
-+ setAttribute(&acIndices[CPS_WIDTH], &cIndex, aAttributes, GLX_PBUFFER_WIDTH, paAttributes[1]);
-+ break;
-+ case EGL_HEIGHT:
-+ setAttribute(&acIndices[CPS_HEIGHT], &cIndex, aAttributes, GLX_LARGEST_PBUFFER, paAttributes[1]);
-+ break;
-+ case EGL_LARGEST_PBUFFER:
-+ setAttribute(&acIndices[CPS_LARGEST], &cIndex, aAttributes, GLX_PBUFFER_HEIGHT, paAttributes[1]);
-+ break;
-+ case EGL_BUFFER_PRESERVED:
-+ setAttribute(&acIndices[CPS_PRESERVED], &cIndex, aAttributes, GLX_PRESERVED_CONTENTS, paAttributes[1]);
-+ break;
-+ case EGL_TEXTURE_FORMAT:
-+ setAttribute(&acIndices[CPS_TEX_FORMAT], &cIndex, aAttributes, GLX_TEXTURE_FORMAT_EXT, paAttributes[1]);
-+ break;
-+ case EGL_TEXTURE_TARGET:
-+ setAttribute(&acIndices[CPS_TEX_TARGET], &cIndex, aAttributes, GLX_TEXTURE_TARGET_EXT, paAttributes[1]);
-+ break;
-+ case EGL_MIPMAP_TEXTURE:
-+ setAttribute(&acIndices[CPS_MIPMAP_TEX], &cIndex, aAttributes, GLX_MIPMAP_TEXTURE_EXT, paAttributes[1]);
-+ break;
-+ case EGL_VG_ALPHA_FORMAT:
-+ case EGL_VG_COLORSPACE:
-+ {
-+ setEGLError(EGL_BAD_MATCH);
-+ return EGL_NO_SURFACE;
-+ }
-+ }
-+ paAttributes += 2;
-+ }
-+ AssertRelease(cIndex < RT_ELEMENTS(aAttributes) - 1);
-+ aAttributes[cIndex + 1] = None;
-+ hPbuffer = glXCreatePbuffer(pDisplay, (GLXFBConfig)config, aAttributes);
-+ if (hPbuffer == None)
-+ {
-+ setEGLError(EGL_BAD_ALLOC);
-+ return EGL_NO_SURFACE;
-+ }
-+ AssertRelease(hPbuffer < VBEGL_WINDOW_SURFACE); /* Greater than the maximum XID. */
-+ clearEGLError();
-+ return (EGLSurface)(hPbuffer | VBEGL_PBUFFER_SURFACE);
-+}
-+
-+DECLEXPORT(EGLSurface) eglCreatePixmapSurface(EGLDisplay hDisplay, EGLConfig config, EGLNativePixmapType hPixmap,
-+ const EGLint *paAttributes)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ GLXPixmap hGLXPixmap;
-+
-+ if (!VALID_PTR(hDisplay))
-+ {
-+ setEGLError(EGL_NOT_INITIALIZED);
-+ return EGL_NO_SURFACE;
-+ }
-+ if (paAttributes != NULL) /* Sanity test only. */
-+ if (*paAttributes != EGL_NONE)
-+ {
-+ if (*paAttributes == EGL_VG_COLORSPACE || *paAttributes == EGL_VG_ALPHA_FORMAT)
-+ {
-+ setEGLError(EGL_BAD_MATCH);
-+ return EGL_NO_SURFACE;
-+ }
-+ else
-+ {
-+ setEGLError(EGL_BAD_ATTRIBUTE);
-+ return EGL_NO_SURFACE;
-+ }
-+ }
-+ hGLXPixmap = glXCreatePixmap(pDisplay, (GLXFBConfig)config, (Pixmap)hPixmap, NULL);
-+ if (hGLXPixmap == None)
-+ {
-+ setEGLError(EGL_BAD_MATCH);
-+ return EGL_NO_SURFACE;
-+ }
-+ AssertRelease(hGLXPixmap < VBEGL_WINDOW_SURFACE); /* Greater than the maximum XID. */
-+ clearEGLError();
-+ return (EGLSurface)(hGLXPixmap | VBEGL_PIXMAP_SURFACE);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglDestroySurface(EGLDisplay hDisplay, EGLSurface hSurface)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ switch ((GLXDrawable)hSurface & VBEGL_ANY_SURFACE)
-+ {
-+ case VBEGL_WINDOW_SURFACE:
-+ glXDestroyWindow(pDisplay, (GLXWindow)hSurface & ~VBEGL_WINDOW_SURFACE);
-+ return clearEGLError();
-+ case VBEGL_PBUFFER_SURFACE:
-+ glXDestroyPbuffer(pDisplay, (GLXPbuffer)hSurface & ~VBEGL_PBUFFER_SURFACE);
-+ return clearEGLError();
-+ case VBEGL_PIXMAP_SURFACE:
-+ glXDestroyPixmap(pDisplay, (GLXPixmap)hSurface & ~VBEGL_PIXMAP_SURFACE);
-+ return clearEGLError();
-+ default:
-+ return setEGLError(EGL_BAD_SURFACE);
-+ }
-+}
-+
-+DECLEXPORT(EGLBoolean) eglSurfaceAttrib(EGLDisplay hDisplay, EGLSurface hSurface, EGLint cAttribute, EGLint cValue)
-+{
-+ NOREF(hDisplay);
-+ NOREF(hSurface);
-+ NOREF(cValue);
-+ switch (cAttribute)
-+ {
-+ case EGL_MIPMAP_LEVEL:
-+ case EGL_MULTISAMPLE_RESOLVE:
-+ case EGL_SWAP_BEHAVIOR:
-+ return setEGLError(EGL_BAD_MATCH);
-+ default:
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ }
-+}
-+
-+DECLEXPORT(EGLBoolean) eglQuerySurface(EGLDisplay hDisplay, EGLSurface hSurface, EGLint cAttribute, EGLint *cValue)
-+{
-+ NOREF(hDisplay);
-+ NOREF(hSurface);
-+ NOREF(cAttribute);
-+ NOREF(cValue);
-+ return setEGLError(EGL_BAD_MATCH);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglBindTexImage(EGLDisplay hDisplay, EGLSurface hSurface, EGLint cBuffer)
-+{
-+ NOREF(hDisplay);
-+ NOREF(hSurface);
-+ NOREF(cBuffer);
-+ return setEGLError(EGL_BAD_MATCH);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglReleaseTexImage(EGLDisplay hDisplay, EGLSurface hSurface, EGLint cBuffer)
-+{
-+ NOREF(hDisplay);
-+ NOREF(hSurface);
-+ NOREF(cBuffer);
-+ return setEGLError(EGL_BAD_MATCH);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglBindAPI(EGLenum enmApi)
-+{
-+ return enmApi == EGL_OPENGL_API ? clearEGLError() : setEGLError(EGL_BAD_PARAMETER);
-+}
-+
-+DECLEXPORT(EGLenum) eglQueryAPI(void)
-+{
-+ return EGL_OPENGL_API;
-+}
-+
-+DECLEXPORT(EGLContext) eglCreateContext(EGLDisplay hDisplay, EGLConfig hConfig, EGLContext hSharedContext,
-+ const EGLint *paAttribs)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ GLXContext hNewContext;
-+
-+ if (!VALID_PTR(hDisplay))
-+ {
-+ setEGLError(EGL_NOT_INITIALIZED);
-+ return EGL_NO_CONTEXT;
-+ }
-+ if (paAttribs != NULL && *paAttribs != EGL_NONE)
-+ {
-+ setEGLError(EGL_BAD_ATTRIBUTE);
-+ return EGL_NO_CONTEXT;
-+ }
-+ hNewContext = glXCreateNewContext(pDisplay, (GLXFBConfig)hConfig, GLX_RGBA_TYPE, (GLXContext)hSharedContext, true);
-+ if (hNewContext)
-+ {
-+ clearEGLError();
-+ return (EGLContext)hNewContext;
-+ }
-+ setEGLError(EGL_BAD_MATCH);
-+ return EGL_NO_CONTEXT;
-+}
-+
-+DECLEXPORT(EGLBoolean) eglDestroyContext(EGLDisplay hDisplay, EGLContext hContext)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ glXDestroyContext(pDisplay, (GLXContext) hContext);
-+ return clearEGLError();
-+}
-+
-+DECLEXPORT(EGLBoolean) eglMakeCurrent(EGLDisplay hDisplay, EGLSurface hDraw, EGLSurface hRead, EGLContext hContext)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+ GLXDrawable hGLXDraw = hDraw == EGL_NO_SURFACE ? None : (GLXDrawable)hDraw & ~VBEGL_ANY_SURFACE;
-+ GLXDrawable hGLXRead = hRead == EGL_NO_SURFACE ? None : (GLXDrawable)hRead & ~VBEGL_ANY_SURFACE;
-+ GLXContext hGLXContext = hContext == EGL_NO_CONTEXT ? None : (GLXContext)hContext;
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!VALID_PTR(hDisplay) || !VALID_PTR(pTls))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ if (glXMakeContextCurrent(pDisplay, hGLXDraw, hGLXRead, hGLXContext))
-+ {
-+ pTls->hCurrent = hContext;
-+ pTls->hCurrentDraw = hDraw;
-+ pTls->hCurrentRead = hRead;
-+ return clearEGLError();
-+ }
-+ else
-+ return setEGLError(EGL_BAD_MATCH);
-+}
-+
-+DECLEXPORT(EGLContext) eglGetCurrentContext(void)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!VALID_PTR(pTls))
-+ return EGL_NO_CONTEXT;
-+ clearEGLError();
-+ return pTls->hCurrent;
-+}
-+
-+DECLEXPORT(EGLSurface) eglGetCurrentSurface(EGLint cOp)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!VALID_PTR(pTls))
-+ return EGL_NO_SURFACE;
-+ clearEGLError();
-+ switch (cOp)
-+ {
-+ case EGL_DRAW:
-+ return pTls->hCurrentDraw;
-+ case EGL_READ:
-+ return pTls->hCurrentRead;
-+ default:
-+ setEGLError(EGL_BAD_PARAMETER);
-+ return EGL_NO_SURFACE;
-+ }
-+}
-+
-+DECLEXPORT(EGLDisplay) eglGetCurrentDisplay(void)
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!VALID_PTR(pTls))
-+ return EGL_NO_DISPLAY;
-+ clearEGLError();
-+ return pTls->hCurrentDisplay;
-+}
-+
-+DECLEXPORT(EGLBoolean) eglQueryContext(EGLDisplay hDisplay, EGLContext hContext, EGLint cAttribute, EGLint *pcValue)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ if (!VALID_PTR(pcValue))
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ switch (cAttribute)
-+ {
-+ case EGL_CONFIG_ID:
-+ {
-+ int cValue = 0;
-+
-+ if (glXQueryContext(pDisplay, (GLXContext)hContext, GLX_FBCONFIG_ID, &cValue) == Success)
-+ {
-+ *pcValue = cValue;
-+ return clearEGLError();
-+ }
-+ return setEGLError(EGL_BAD_MATCH);
-+ }
-+ case EGL_CONTEXT_CLIENT_TYPE:
-+ *pcValue = EGL_OPENGL_API;
-+ return clearEGLError();
-+ case EGL_CONTEXT_CLIENT_VERSION:
-+ *pcValue = 0;
-+ return clearEGLError();
-+ case EGL_RENDER_BUFFER:
-+ *pcValue = EGL_BACK_BUFFER;
-+ return clearEGLError();
-+ default:
-+ return setEGLError(EGL_BAD_ATTRIBUTE);
-+ }
-+}
-+
-+DECLEXPORT(EGLBoolean) eglWaitClient(void)
-+{
-+ glXWaitGL();
-+ return clearEGLError();
-+}
-+
-+DECLEXPORT(EGLBoolean) eglWaitGL(void)
-+{
-+ return setEGLError(EGL_BAD_PARAMETER); /* OpenGL ES only. */
-+}
-+
-+DECLEXPORT(EGLBoolean) eglWaitNative(EGLint cEngine)
-+{
-+ if (cEngine != EGL_CORE_NATIVE_ENGINE)
-+ return setEGLError(EGL_BAD_PARAMETER);
-+ glXWaitX();
-+ return clearEGLError();
-+}
-+
-+DECLEXPORT(EGLBoolean) eglSwapBuffers(EGLDisplay hDisplay, EGLSurface hSurface)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+ glXSwapBuffers(pDisplay, (GLXDrawable)hSurface & ~VBEGL_ANY_SURFACE);
-+ return clearEGLError();
-+}
-+
-+/** @todo Work out how this fits over what Chromium has to offer. */
-+DECLEXPORT(EGLBoolean) eglCopyBuffers(EGLDisplay hDisplay, EGLSurface hSurface, EGLNativePixmapType hPixmap)
-+{
-+ Display *pDisplay = (Display *)hDisplay;
-+
-+ if (!VALID_PTR(hDisplay))
-+ return setEGLError(EGL_NOT_INITIALIZED);
-+
-+ NOREF(hSurface);
-+ NOREF(hPixmap);
-+ return setEGLError(EGL_BAD_MATCH);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglSwapInterval (EGLDisplay dpy, EGLint interval)
-+{
-+ NOREF(dpy);
-+ NOREF(interval);
-+ return EGL_TRUE;
-+}
-+
-+typedef void (*VBEGLFuncPtr)(void);
-+DECLEXPORT(VBEGLFuncPtr)eglGetProcAddress(const char *pszName)
-+{
-+ clearEGLError();
-+ return glXGetProcAddress((const GLubyte *)pszName);
-+}
-+
-+DECLEXPORT(EGLBoolean) eglReleaseThread()
-+{
-+ struct VBEGLTLS *pTls = getTls();
-+
-+ if (!(pTls))
-+ return EGL_TRUE;
-+ RTMemFree(pTls);
-+ RTTlsSet(g_tls, NULL);
-+ return EGL_TRUE;
-+}
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/crOpenGL/load.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/crOpenGL/load.c
-@@ -985,7 +985,11 @@ stubInitLocked(void)
- if (!ns.conn)
- {
- crWarning("Failed to connect to host. Make sure 3D acceleration is enabled for this VM.");
-+# ifdef VBOXOGL_FAKEDRI
- return false;
-+# else
-+ exit(1);
-+# endif
- }
- else
- {
-@@ -1119,14 +1123,38 @@ stubInit(void)
- return bRc;
- }
-
--/* Sigh -- we can't do initialization at load time, since Windows forbids
-- * the loading of other libraries from DLLMain. */
-+#if defined(Linux) && !defined(VBOXOGL_FAKEDRI)
-+# include <dlfcn.h>
-+/* We only support being used by GLX clients. If the X server GLX extension
-+ * tries to use our OpenGL library it will fail, as it is written specifically
-+ * against Mesa. So we detect this with the assumption that the server will
-+ * not have the DISPLAY variable set, and a client will do or we can't do much
-+ * with it anyway. This is only needed on Linux, as Solaris lets us replace
-+ * the client library only. To avoid complications with iprt initialisation
-+ * we use native system/C library APIs.
-+ * We do this in a very naive way, not even checking for failure (not much we
-+ * can do, better for GLX to fail than the whole X server). To keep things as
-+ * simple and fail-safe as possible, we use a fixed path to the system GL
-+ * library. */
-+#ifndef RTLD_DEEPBIND
-+# define RTLD_DEEPBIND 0x8
-+#endif
-+
-+void __attribute__ ((constructor)) checkServerGLX(void)
-+{
-+ char *pszDisplay = getenv("DISPLAY");
-
--#ifdef LINUX
--/* GCC crap
-- *void (*stub_init_ptr)(void) __attribute__((section(".ctors"))) = __stubInit; */
-+ if (!pszDisplay || !*pszDisplay)
-+ {
-+ dlopen("/tmp/VBoxOGL/system/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
-+ dlopen("/tmp/VBoxOGL/system/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
-+ }
-+}
- #endif
-
-+/* Sigh -- we can't do initialization at load time, since Windows forbids
-+ * the loading of other libraries from DLLMain. */
-+
- #ifdef WINDOWS
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/common/crOpenGL/stub.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/common/crOpenGL/stub.c
-@@ -524,7 +524,7 @@ GLboolean stubUpdateWindowVisibileRegion
- pWindow->pVisibleRegions = pXRects;
- pWindow->cVisibleRegions = cRects;
-
-- pGLRects = crAlloc(4*cRects*sizeof(GLint));
-+ pGLRects = crAlloc(cRects ? 4*cRects*sizeof(GLint) : 4*sizeof(GLint));
- if (!pGLRects)
- {
- crWarning("stubUpdateWindowVisibileRegions: failed to allocate %lu bytes",
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/Makefile.kmk
-@@ -133,7 +133,8 @@ VBOX_ADD_STRIP_LIB += \
- VBoxOGLfeedbackspu.so \
- VBoxOGLpackspu.so \
- VBoxOGLpassthroughspu.so \
-- VBoxOGL.so
-+ VBoxOGL.so \
-+ VBoxEGL.so
- endif
-
- VBOX_ADD_STRIP_MOD.linux = \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/Makefile.kmk
-@@ -22,11 +22,7 @@ include $(KBUILD_PATH)/subheader.kmk
- # Populate FILES_VBOXVIDEO_DRM_NOBIN
- #
- INSTALLS += vboxvideo_drm-mod
--if !defined(VBOX_WITH_GUEST_KMS_DRIVER)
-- include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
--else
-- include $(PATH_SUB_CURRENT)/files_vboxvideo_drv
--endif
-+include $(PATH_SUB_CURRENT)/files_vboxvideo_drv
- vboxvideo_drm-mod_INST = $(INST_ADDITIONS)src/vboxvideo/
- vboxvideo_drm-mod_SOURCES = \
- $(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN))
-@@ -43,14 +39,8 @@ vboxvideo_drm-mod_EXEC_SOURCES = \
- # Note! The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels.
- #
- if defined(VBOX_WITH_ADDITION_DRIVERS)
-- if !defined(VBOX_WITH_GUEST_KMS_DRIVER)
-- if "$(strip $(foreach inc,$(VBOX_LINUX_INCS),$(wildcard $(inc)/drm/drmP.h)))" != ""
-- SYSMODS += vboxvideo_drm
-- endif
-- else
-- if "$(shell grep -s 'DRIVER_MODESET' $(foreach inc,$(VBOX_LINUX_INCS),$(inc)/drm/drmP.h))" != ""
-- SYSMODS += vboxvideo_drm
-- endif
-+ if "$(shell grep -s 'DRM_IOCTL_MODE_CURSOR2' $(foreach inc,$(VBOX_LINUX_INCS),$(inc)/uapi/drm/drm.h))" != ""
-+ SYSMODS += vboxvideo_drm
- endif
- endif
-
-@@ -61,25 +51,22 @@ vboxvideo_drm_DEFS = \
- KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
- KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
- DEBUG_HASH=2 DEBUG_HASH2=3
--if !defined(VBOX_WITH_GUEST_KMS_DRIVER)
-- vboxvideo_drm_SOURCES = vboxvideo_drm.c
--else
-- vboxvideo_drm_INCS += \
-- ../../../Runtime/include \
-- ../../../Runtime/r0drv/linux
-- vboxvideo_drm_SOURCES = \
-- ../../common/VBoxVideo/HGSMIBase.cpp \
-- ../../common/VBoxVideo/Modesetting.cpp \
-- ../../common/VBoxVideo/VBVABase.cpp \
-- ../../../GuestHost/HGSMI/HGSMICommon.cpp \
-- ../../../GuestHost/HGSMI/HGSMIMemAlloc.cpp \
-- ../../../Runtime/common/alloc/heapoffset.cpp \
-- vbox_drv.c \
-- vbox_fb.c \
-- vbox_main.c \
-- vbox_mode.c \
-- vbox_ttm.c
--endif
-+vboxvideo_drm_INCS += \
-+ ../../../Runtime/include \
-+ ../../../Runtime/r0drv/linux
-+vboxvideo_drm_SOURCES = \
-+ ../../common/VBoxVideo/HGSMIBase.cpp \
-+ ../../common/VBoxVideo/Modesetting.cpp \
-+ ../../common/VBoxVideo/VBVABase.cpp \
-+ ../../../GuestHost/HGSMI/HGSMICommon.cpp \
-+ ../../../GuestHost/HGSMI/HGSMIMemAlloc.cpp \
-+ ../../../Runtime/common/alloc/heapoffset.cpp \
-+ vbox_drv.c \
-+ vbox_fb.c \
-+ vbox_irq.c \
-+ vbox_main.c \
-+ vbox_mode.c \
-+ vbox_ttm.c
-
- include $(FILE_KBUILD_SUB_FOOTER)
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/Makefile.module.kms
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/Makefile.module.kms
-@@ -23,16 +23,21 @@ include $(obj)/Makefile.include.header
-
- MOD_NAME = vboxvideo
-
-+ifeq ($(filter 1.% 2.% 3.0.% 3.1.% 3.2.% 3.3.% 3.4.% 3.5.% 3.6.% 3.7.% \
-+3.8.% 3.9.% 3.10.%,$(KERNELRELEASE)),)
- MOD_OBJS = HGSMIBase.o HGSMICommon.o HGSMIMemAlloc.o heapoffset.o \
-- Modesetting.o vbox_drv.o vbox_fb.o vbox_main.o vbox_mode.o \
-- vbox_ttm.o VBVABase.o
-+ Modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o \
-+ vbox_mode.o vbox_ttm.o VBVABase.o
-+else
-+MOD_OBJS = vbox_dummy.o
-+endif
-
- ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxvideo),)
- MANGLING := $(KBUILD_EXTMOD)/vboxvideo/include/VBox/VBoxGuestMangling.h
- else
- MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
- endif
--MOD_CFLAGS = -fshort-wchar -include $(MANGLING)
-+MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING)
- MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
- # What on earth is this?
- MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/files_vboxvideo_drv
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/files_vboxvideo_drv
-@@ -59,7 +59,9 @@ FILES_VBOXVIDEO_DRM_NOBIN=" \
- ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp=>VBVABase.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_drv.c=>vbox_drv.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_drv.h=>vbox_drv.h \
-+ ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_dummy.c=>vbox_dummy.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_fb.c=>vbox_fb.c \
-+ ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_irq.c=>vbox_irq.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_main.c=>vbox_main.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_mode.c=>vbox_mode.c \
- ${PATH_ROOT}/src/VBox/Additions/linux/drm/vbox_ttm.c=>vbox_ttm.c \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_drv.c
-@@ -51,6 +51,7 @@
-
- #include <linux/module.h>
- #include <linux/console.h>
-+#include <linux/vt_kern.h>
-
- #include <drm/drmP.h>
- #include <drm/drm_crtc_helper.h>
-@@ -84,15 +85,113 @@ static void vbox_pci_remove(struct pci_d
- }
-
-
-+
-+static int vbox_drm_freeze(struct drm_device *dev)
-+{
-+ drm_kms_helper_poll_disable(dev);
-+
-+ pci_save_state(dev->pdev);
-+
-+ console_lock();
-+ vbox_fbdev_set_suspend(dev, 1);
-+ console_unlock();
-+ return 0;
-+}
-+
-+static int vbox_drm_thaw(struct drm_device *dev)
-+{
-+ int error = 0;
-+
-+ drm_mode_config_reset(dev);
-+ drm_helper_resume_force_mode(dev);
-+
-+ console_lock();
-+ vbox_fbdev_set_suspend(dev, 0);
-+ console_unlock();
-+ return error;
-+}
-+
-+static int vbox_drm_resume(struct drm_device *dev)
-+{
-+ int ret;
-+
-+ if (pci_enable_device(dev->pdev))
-+ return -EIO;
-+
-+ ret = vbox_drm_thaw(dev);
-+ if (ret)
-+ return ret;
-+
-+ drm_kms_helper_poll_enable(dev);
-+ return 0;
-+}
-+
-+static int vbox_pm_suspend(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *ddev = pci_get_drvdata(pdev);
-+ int error;
-+
-+ error = vbox_drm_freeze(ddev);
-+ if (error)
-+ return error;
-+
-+ pci_disable_device(pdev);
-+ pci_set_power_state(pdev, PCI_D3hot);
-+ return 0;
-+}
-+
-+static int vbox_pm_resume(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *ddev = pci_get_drvdata(pdev);
-+ return vbox_drm_resume(ddev);
-+}
-+
-+static int vbox_pm_freeze(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *ddev = pci_get_drvdata(pdev);
-+
-+ if (!ddev || !ddev->dev_private)
-+ return -ENODEV;
-+ return vbox_drm_freeze(ddev);
-+
-+}
-+
-+static int vbox_pm_thaw(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *ddev = pci_get_drvdata(pdev);
-+ return vbox_drm_thaw(ddev);
-+}
-+
-+static int vbox_pm_poweroff(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *ddev = pci_get_drvdata(pdev);
-+
-+ return vbox_drm_freeze(ddev);
-+}
-+
-+static const struct dev_pm_ops vbox_pm_ops = {
-+ .suspend = vbox_pm_suspend,
-+ .resume = vbox_pm_resume,
-+ .freeze = vbox_pm_freeze,
-+ .thaw = vbox_pm_thaw,
-+ .poweroff = vbox_pm_poweroff,
-+ .restore = vbox_pm_resume,
-+};
-+
- static struct pci_driver vbox_pci_driver =
- {
- .name = DRIVER_NAME,
- .id_table = pciidlist,
- .probe = vbox_pci_probe,
- .remove = vbox_pci_remove,
-+ .driver.pm = &vbox_pm_ops,
- };
-
--
- static const struct file_operations vbox_fops =
- {
- .owner = THIS_MODULE,
-@@ -110,16 +209,41 @@ static const struct file_operations vbox
- .read = drm_read,
- };
-
-+static int vbox_master_set(struct drm_device *dev,
-+ struct drm_file *file_priv,
-+ bool from_open)
-+{
-+ struct vbox_private *vbox = dev->dev_private;
-+ vbox->initial_mode_queried = false;
-+ vbox_disable_accel(vbox);
-+ return 0;
-+}
-+
-+static void vbox_master_drop(struct drm_device *dev,
-+ struct drm_file *file_priv,
-+ bool from_release)
-+{
-+ struct vbox_private *vbox = dev->dev_private;
-+ vbox->initial_mode_queried = false;
-+ vbox_disable_accel(vbox);
-+}
-+
- static struct drm_driver driver =
- {
-- .driver_features = DRIVER_MODESET | DRIVER_GEM,
-+ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
- .dev_priv_size = 0,
-
- .load = vbox_driver_load,
- .unload = vbox_driver_unload,
- .lastclose = vbox_driver_lastclose,
-+ .master_set = vbox_master_set,
-+ .master_drop = vbox_master_drop,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
-+ .set_busid = drm_pci_set_busid,
-+#endif
-
- .fops = &vbox_fops,
-+ .irq_handler = vbox_irq_handler,
- .name = DRIVER_NAME,
- .desc = DRIVER_DESC,
- .date = DRIVER_DATE,
-@@ -130,12 +254,18 @@ static struct drm_driver driver =
- .gem_free_object = vbox_gem_free_object,
- .dumb_create = vbox_dumb_create,
- .dumb_map_offset = vbox_dumb_mmap_offset,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
- .dumb_destroy = vbox_dumb_destroy,
-+#else
-+ .dumb_destroy = drm_gem_dumb_destroy,
-+#endif
-
- };
-
- static int __init vbox_init(void)
- {
-+ unsigned i;
-+
- #ifdef CONFIG_VGA_CONSOLE
- if (vgacon_text_force() && vbox_modeset == -1)
- return -EINVAL;
-@@ -143,6 +273,13 @@ static int __init vbox_init(void)
-
- if (vbox_modeset == 0)
- return -EINVAL;
-+
-+ /* Do not load if any of the virtual consoles is in graphics mode to be
-+ * sure that we do not pick a fight with a user-mode driver or VESA. */
-+ for (i = 0; i < MAX_NR_CONSOLES - 1; ++i)
-+ if (vc_cons[i].d && vc_cons[i].d->vc_mode == KD_GRAPHICS)
-+ return -EINVAL;
-+
- return drm_pci_init(&driver, &vbox_pci_driver);
- }
- static void __exit vbox_exit(void)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_drv.h
-@@ -48,11 +48,12 @@
- #ifndef __VBOX_DRV_H__
- #define __VBOX_DRV_H__
-
-+#define LOG_GROUP LOG_GROUP_DEV_VGA
-+
- #include "the-linux-kernel.h"
-
- #include <VBox/VBoxVideoGuest.h>
--
--#include <iprt/log.h>
-+#include <VBox/log.h>
-
- #include <drm/drmP.h>
- #include <drm/drm_fb_helper.h>
-@@ -83,90 +84,108 @@
-
- #define VBOX_MAX_CURSOR_WIDTH 64
- #define VBOX_MAX_CURSOR_HEIGHT 64
-+#define CURSOR_PIXEL_COUNT VBOX_MAX_CURSOR_WIDTH * VBOX_MAX_CURSOR_HEIGHT
-+#define CURSOR_DATA_SIZE CURSOR_PIXEL_COUNT * 4 + CURSOR_PIXEL_COUNT / 8
-
- struct vbox_fbdev;
-
--struct vbox_private
--{
-+struct vbox_private {
- struct drm_device *dev;
-
-- void __iomem *vram;
-- HGSMIGUESTCOMMANDCONTEXT Ctx;
-- struct VBVABUFFERCONTEXT *paVBVACtx;
-- bool fAnyX;
-- unsigned cCrtcs;
-+ uint8_t __iomem *vram;
-+ HGSMIGUESTCOMMANDCONTEXT submit_info;
-+ struct VBVABUFFERCONTEXT *vbva_info;
-+ bool any_pitch;
-+ unsigned num_crtcs;
- bool vga2_clone;
- /** Amount of available VRAM, including space used for buffers. */
- uint32_t full_vram_size;
- /** Amount of available VRAM, not including space used for buffers. */
- uint32_t vram_size;
-+ /** Offset to the host flags in the VRAM. */
-+ uint32_t host_flags_offset;
-+ /** Array of structures for receiving mode hints. */
-+ VBVAMODEHINT *last_mode_hints;
-
- struct vbox_fbdev *fbdev;
-
- int fb_mtrr;
-
-- struct
-- {
-+ struct {
- struct drm_global_reference mem_global_ref;
- struct ttm_bo_global_ref bo_global_ref;
- struct ttm_bo_device bdev;
-+ bool mm_initialised;
- } ttm;
-
-- spinlock_t dev_lock;
-+ struct mutex hw_mutex;
-+ bool isr_installed;
-+ /** We decide whether or not user-space supports display hot-plug
-+ * depending on whether they react to a hot-plug event after the initial
-+ * mode query. */
-+ bool initial_mode_queried;
-+ struct work_struct hotplug_work;
-+ uint32_t input_mapping_width;
-+ uint32_t input_mapping_height;
-+ uint32_t cursor_width;
-+ uint32_t cursor_height;
-+ uint32_t cursor_hot_x;
-+ uint32_t cursor_hot_y;
-+ size_t cursor_data_size;
-+ uint8_t cursor_data[CURSOR_DATA_SIZE];
- };
-
-+#undef CURSOR_PIXEL_COUNT
-+#undef CURSOR_DATA_SIZE
-+
- int vbox_driver_load(struct drm_device *dev, unsigned long flags);
- int vbox_driver_unload(struct drm_device *dev);
--void vbox_driver_lastclose(struct drm_device *pDev);
-+void vbox_driver_lastclose(struct drm_device *dev);
-
- struct vbox_gem_object;
-
--struct vbox_connector
--{
-+#ifndef VGA_PORT_HGSMI_HOST
-+# define VGA_PORT_HGSMI_HOST 0x3b0
-+# define VGA_PORT_HGSMI_GUEST 0x3d0
-+#endif
-+
-+struct vbox_connector {
- struct drm_connector base;
-- char szName[32];
-- /** Device attribute for sysfs file used for receiving mode hints from user
-- * space. */
-- struct device_attribute deviceAttribute;
-- struct
-- {
-- uint16_t cX;
-- uint16_t cY;
-- } modeHint;
-+ char name[32];
-+ struct vbox_crtc *vbox_crtc;
-+ struct {
-+ uint16_t width;
-+ uint16_t height;
-+ bool disconnected;
-+ } mode_hint;
- };
-
--struct vbox_crtc
--{
-+struct vbox_crtc {
- struct drm_crtc base;
-- bool fBlanked;
-+ bool blanked;
-+ bool disconnected;
- unsigned crtc_id;
-- uint32_t offFB;
-- struct drm_gem_object *cursor_bo;
-- uint64_t cursor_addr;
-- int cursor_width, cursor_height;
-- u8 offset_x, offset_y;
-+ uint32_t fb_offset;
-+ bool cursor_enabled;
- };
-
--struct vbox_encoder
--{
-+struct vbox_encoder {
- struct drm_encoder base;
- };
-
--struct vbox_framebuffer
--{
-+struct vbox_framebuffer {
- struct drm_framebuffer base;
- struct drm_gem_object *obj;
- };
-
--struct vbox_fbdev
--{
-+struct vbox_fbdev {
- struct drm_fb_helper helper;
- struct vbox_framebuffer afb;
-- struct list_head fbdev_list;
- void *sysram;
- int size;
- struct ttm_bo_kmap_obj mapping;
- int x1, y1, x2, y2; /* dirty rect */
-+ spinlock_t dirty_lock;
- };
-
- #define to_vbox_crtc(x) container_of(x, struct vbox_crtc, base)
-@@ -176,7 +195,6 @@ struct vbox_fbdev
-
- extern int vbox_mode_init(struct drm_device *dev);
- extern void vbox_mode_fini(struct drm_device *dev);
--extern void VBoxRefreshModes(struct drm_device *pDev);
-
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
- # define DRM_MODE_FB_CMD drm_mode_fb_cmd
-@@ -190,12 +208,19 @@ extern void VBoxRefreshModes(struct drm_
- # define CRTC_FB(crtc) (crtc)->primary->fb
- #endif
-
-+void vbox_enable_accel(struct vbox_private *vbox);
-+void vbox_disable_accel(struct vbox_private *vbox);
-+void vbox_enable_caps(struct vbox_private *vbox);
-+
- void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
-- struct drm_clip_rect *pRects,
-- unsigned cRects);
-+ struct drm_clip_rect *rects,
-+ unsigned num_rects);
-
- int vbox_framebuffer_init(struct drm_device *dev,
- struct vbox_framebuffer *vbox_fb,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+ const
-+#endif
- struct DRM_MODE_FB_CMD *mode_cmd,
- struct drm_gem_object *obj);
-
-@@ -203,8 +228,7 @@ int vbox_fbdev_init(struct drm_device *d
- void vbox_fbdev_fini(struct drm_device *dev);
- void vbox_fbdev_set_suspend(struct drm_device *dev, int state);
-
--struct vbox_bo
--{
-+struct vbox_bo {
- struct ttm_buffer_object bo;
- struct ttm_placement placement;
- struct ttm_bo_kmap_obj kmap;
-@@ -218,7 +242,8 @@ struct vbox_bo
- };
- #define gem_to_vbox_bo(gobj) container_of((gobj), struct vbox_bo, gem)
-
--static inline struct vbox_bo * vbox_bo(struct ttm_buffer_object *bo)
-+static inline struct vbox_bo *
-+vbox_bo(struct ttm_buffer_object *bo)
- {
- return container_of(bo, struct vbox_bo, bo);
- }
-@@ -229,9 +254,11 @@ static inline struct vbox_bo * vbox_bo(s
- extern int vbox_dumb_create(struct drm_file *file,
- struct drm_device *dev,
- struct drm_mode_create_dumb *args);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
- extern int vbox_dumb_destroy(struct drm_file *file,
- struct drm_device *dev,
- uint32_t handle);
-+#endif
-
- extern void vbox_gem_free_object(struct drm_gem_object *obj);
- extern int vbox_dumb_mmap_offset(struct drm_file *file,
-@@ -254,12 +281,32 @@ int vbox_gem_create(struct drm_device *d
- int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr);
- int vbox_bo_unpin(struct vbox_bo *bo);
-
--int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait);
--void vbox_bo_unreserve(struct vbox_bo *bo);
-+static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
-+{
-+ int ret;
-+
-+ ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
-+ if (ret)
-+ {
-+ if (ret != -ERESTARTSYS && ret != -EBUSY)
-+ DRM_ERROR("reserve failed %p\n", bo);
-+ return ret;
-+ }
-+ return 0;
-+}
-+
-+static inline void vbox_bo_unreserve(struct vbox_bo *bo)
-+{
-+ ttm_bo_unreserve(&bo->bo);
-+}
-+
- void vbox_ttm_placement(struct vbox_bo *bo, int domain);
- int vbox_bo_push_sysram(struct vbox_bo *bo);
- int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
-
--/* vbox post */
--void vbox_post_gpu(struct drm_device *dev);
-+/* vbox_irq.c */
-+int vbox_irq_init(struct vbox_private *vbox);
-+void vbox_irq_fini(struct vbox_private *vbox);
-+void vbox_report_hotplug(struct vbox_private *vbox);
-+irqreturn_t vbox_irq_handler(int irq, void *arg);
- #endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_dummy.c
-@@ -0,0 +1,32 @@
-+/* $Id: vbox_dummy.c $ */
-+/** @file
-+ * VirtualBox Additions Linux kernel video driver, dummy driver for
-+ * older kernels.
-+ */
-+
-+/*
-+ * Copyright (C) 2016 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ */
-+
-+#include <linux/module.h>
-+
-+static int __init vbox_init(void)
-+{
-+ return -EINVAL;
-+}
-+static void __exit vbox_exit(void)
-+{
-+}
-+
-+module_init(vbox_init);
-+module_exit(vbox_exit);
-+
-+MODULE_LICENSE("GPL");
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_fb.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_fb.c
-@@ -65,46 +65,23 @@
- #include <drm/drmP.h>
- #include <drm/drm_crtc.h>
- #include <drm/drm_fb_helper.h>
-+#include <drm/drm_crtc_helper.h>
- #include "vbox_drv.h"
-
--/** This is called whenever there is a virtual console switch. We do two things
-- * here. First we re-set all video modes in case the last console owner
-- * programmed the card directly. Second we disable VBVA in case the new console
-- * owner is about to programme the card directly and doesn't know about VBVA.
-- * We re-enable VBVA if necessary when we get dirty rectangle information, as
-- * the owner should not be sending that if they plan to programme the card
-- * themselves. */
--static int VBoxSetPar(struct fb_info *pInfo)
--{
-- struct vbox_fbdev *pVFBDev = pInfo->par;
-- struct drm_device *pDev;
-- struct vbox_private *pVBox;
-- unsigned i;
--
-- LogFunc(("vboxvideo: %d\n", __LINE__));
-- pDev = pVFBDev->helper.dev;
-- pVBox = pDev->dev_private;
-- VBoxRefreshModes(pDev);
-- for (i = 0; i < pVBox->cCrtcs; ++i)
-- VBoxVBVADisable(&pVBox->paVBVACtx[i], &pVBox->Ctx, i);
-- return drm_fb_helper_set_par(pInfo);
--}
--
- /**
- * Tell the host about dirty rectangles to update.
- */
--static void vbox_dirty_update(struct vbox_fbdev *afbdev,
-+static void vbox_dirty_update(struct vbox_fbdev *fbdev,
- int x, int y, int width, int height)
- {
-- struct drm_device *dev = afbdev->helper.dev;
-- struct vbox_private *vbox = dev->dev_private;
-+ struct drm_device *dev = fbdev->helper.dev;
- int i;
-
- struct drm_gem_object *obj;
- struct vbox_bo *bo;
- int src_offset, dst_offset;
-- int bpp = (afbdev->afb.base.bits_per_pixel + 7)/8;
-- int ret;
-+ int bpp = (fbdev->afb.base.bits_per_pixel + 7)/8;
-+ int ret = -EBUSY;
- bool unmap = false;
- bool store_for_later = false;
- int x2, y2;
-@@ -112,7 +89,7 @@ static void vbox_dirty_update(struct vbo
- struct drm_clip_rect rect;
-
- LogFunc(("vboxvideo: %d\n", __LINE__));
-- obj = afbdev->afb.obj;
-+ obj = fbdev->afb.obj;
- bo = gem_to_vbox_bo(obj);
-
- /*
-@@ -120,9 +97,9 @@ static void vbox_dirty_update(struct vbo
- * then the BO is being moved and we should
- * store up the damage until later.
- */
-- ret = vbox_bo_reserve(bo, true);
-- if (ret)
-- {
-+ if (drm_can_sleep())
-+ ret = vbox_bo_reserve(bo, true);
-+ if (ret) {
- if (ret != -EBUSY)
- return;
-
-@@ -131,48 +108,44 @@ static void vbox_dirty_update(struct vbo
-
- x2 = x + width - 1;
- y2 = y + height - 1;
-- spin_lock_irqsave(&vbox->dev_lock, flags);
-+ spin_lock_irqsave(&fbdev->dirty_lock, flags);
-
-- if (afbdev->y1 < y)
-- y = afbdev->y1;
-- if (afbdev->y2 > y2)
-- y2 = afbdev->y2;
-- if (afbdev->x1 < x)
-- x = afbdev->x1;
-- if (afbdev->x2 > x2)
-- x2 = afbdev->x2;
--
-- if (store_for_later)
-- {
-- afbdev->x1 = x;
-- afbdev->x2 = x2;
-- afbdev->y1 = y;
-- afbdev->y2 = y2;
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-+ if (fbdev->y1 < y)
-+ y = fbdev->y1;
-+ if (fbdev->y2 > y2)
-+ y2 = fbdev->y2;
-+ if (fbdev->x1 < x)
-+ x = fbdev->x1;
-+ if (fbdev->x2 > x2)
-+ x2 = fbdev->x2;
-+
-+ if (store_for_later) {
-+ fbdev->x1 = x;
-+ fbdev->x2 = x2;
-+ fbdev->y1 = y;
-+ fbdev->y2 = y2;
-+ spin_unlock_irqrestore(&fbdev->dirty_lock, flags);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return;
- }
-
-- afbdev->x1 = afbdev->y1 = INT_MAX;
-- afbdev->x2 = afbdev->y2 = 0;
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-+ fbdev->x1 = fbdev->y1 = INT_MAX;
-+ fbdev->x2 = fbdev->y2 = 0;
-+ spin_unlock_irqrestore(&fbdev->dirty_lock, flags);
-
-- if (!bo->kmap.virtual)
-- {
-+ if (!bo->kmap.virtual) {
- ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
-- if (ret)
-- {
-+ if (ret) {
- DRM_ERROR("failed to kmap fb updates\n");
- vbox_bo_unreserve(bo);
- return;
- }
- unmap = true;
- }
-- for (i = y; i <= y2; i++)
-- {
-+ for (i = y; i <= y2; i++) {
- /* assume equal stride for now */
-- src_offset = dst_offset = i * afbdev->afb.base.pitches[0] + (x * bpp);
-- memcpy_toio(bo->kmap.virtual + src_offset, (char *)afbdev->sysram + src_offset, (x2 - x + 1) * bpp);
-+ src_offset = dst_offset = i * fbdev->afb.base.pitches[0] + (x * bpp);
-+ memcpy_toio(bo->kmap.virtual + src_offset, (char *)fbdev->sysram + src_offset, (x2 - x + 1) * bpp);
- }
- /* Not sure why the original code subtracted 1 here, but I will keep it that
- * way to avoid unnecessary differences. */
-@@ -180,49 +153,49 @@ static void vbox_dirty_update(struct vbo
- rect.x2 = x2 + 1;
- rect.y1 = y;
- rect.y2 = y2 + 1;
-- vbox_framebuffer_dirty_rectangles(&afbdev->afb.base, &rect, 1);
-+ vbox_framebuffer_dirty_rectangles(&fbdev->afb.base, &rect, 1);
-+ LogFunc(("vboxvideo: %d, bo->kmap.virtual=%p, fbdev->sysram=%p, x=%d, y=%d, x2=%d, y2=%d, unmap=%RTbool\n",
-+ __LINE__, bo->kmap.virtual, fbdev->sysram, (int)x, (int)y, (int)x2, (int)y2, unmap));
- if (unmap)
- ttm_bo_kunmap(&bo->kmap);
-
- vbox_bo_unreserve(bo);
-- LogFunc(("vboxvideo: %d\n", __LINE__));
- }
-
- static void vbox_fillrect(struct fb_info *info,
- const struct fb_fillrect *rect)
- {
-- struct vbox_fbdev *afbdev = info->par;
-+ struct vbox_fbdev *fbdev = info->par;
- LogFunc(("vboxvideo: %d\n", __LINE__));
- sys_fillrect(info, rect);
-- vbox_dirty_update(afbdev, rect->dx, rect->dy, rect->width,
-+ vbox_dirty_update(fbdev, rect->dx, rect->dy, rect->width,
- rect->height);
- }
-
- static void vbox_copyarea(struct fb_info *info,
- const struct fb_copyarea *area)
- {
-- struct vbox_fbdev *afbdev = info->par;
-+ struct vbox_fbdev *fbdev = info->par;
- LogFunc(("vboxvideo: %d\n", __LINE__));
- sys_copyarea(info, area);
-- vbox_dirty_update(afbdev, area->dx, area->dy, area->width,
-+ vbox_dirty_update(fbdev, area->dx, area->dy, area->width,
- area->height);
- }
-
- static void vbox_imageblit(struct fb_info *info,
- const struct fb_image *image)
- {
-- struct vbox_fbdev *afbdev = info->par;
-+ struct vbox_fbdev *fbdev = info->par;
- LogFunc(("vboxvideo: %d\n", __LINE__));
- sys_imageblit(info, image);
-- vbox_dirty_update(afbdev, image->dx, image->dy, image->width,
-+ vbox_dirty_update(fbdev, image->dx, image->dy, image->width,
- image->height);
- }
-
--static struct fb_ops vboxfb_ops =
--{
-+static struct fb_ops vboxfb_ops = {
- .owner = THIS_MODULE,
- .fb_check_var = drm_fb_helper_check_var,
-- .fb_set_par = VBoxSetPar,
-+ .fb_set_par = drm_fb_helper_set_par,
- .fb_fillrect = vbox_fillrect,
- .fb_copyarea = vbox_copyarea,
- .fb_imageblit = vbox_imageblit,
-@@ -233,11 +206,11 @@ static struct fb_ops vboxfb_ops =
- .fb_debug_leave = drm_fb_helper_debug_leave,
- };
-
--static int vboxfb_create_object(struct vbox_fbdev *afbdev,
-+static int vboxfb_create_object(struct vbox_fbdev *fbdev,
- struct DRM_MODE_FB_CMD *mode_cmd,
- struct drm_gem_object **gobj_p)
- {
-- struct drm_device *dev = afbdev->helper.dev;
-+ struct drm_device *dev = fbdev->helper.dev;
- u32 bpp, depth;
- u32 size;
- struct drm_gem_object *gobj;
-@@ -261,15 +234,16 @@ static int vboxfb_create_object(struct v
- return ret;
- }
-
--static int vboxfb_create(struct vbox_fbdev *afbdev,
-+static int vboxfb_create(struct drm_fb_helper *helper,
- struct drm_fb_helper_surface_size *sizes)
- {
-- struct drm_device *dev = afbdev->helper.dev;
-+ struct vbox_fbdev *fbdev =
-+ container_of(helper, struct vbox_fbdev, helper);
-+ struct drm_device *dev = fbdev->helper.dev;
- struct DRM_MODE_FB_CMD mode_cmd;
- struct drm_framebuffer *fb;
- struct fb_info *info;
- __u32 pitch;
-- unsigned int fb_pitch;
- int size, ret;
- struct device *device = &dev->pdev->dev;
- void *sysram;
-@@ -291,9 +265,8 @@ static int vboxfb_create(struct vbox_fbd
-
- size = pitch * mode_cmd.height;
-
-- ret = vboxfb_create_object(afbdev, &mode_cmd, &gobj);
-- if (ret)
-- {
-+ ret = vboxfb_create_object(fbdev, &mode_cmd, &gobj);
-+ if (ret) {
- DRM_ERROR("failed to create fbcon backing object %d\n", ret);
- return ret;
- }
-@@ -304,23 +277,22 @@ static int vboxfb_create(struct vbox_fbd
- return -ENOMEM;
-
- info = framebuffer_alloc(0, device);
-- if (!info)
-- {
-+ if (!info) {
- ret = -ENOMEM;
- goto out;
- }
-- info->par = afbdev;
-+ info->par = fbdev;
-
-- ret = vbox_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj);
-+ ret = vbox_framebuffer_init(dev, &fbdev->afb, &mode_cmd, gobj);
- if (ret)
- goto out;
-
-- afbdev->sysram = sysram;
-- afbdev->size = size;
-+ fbdev->sysram = sysram;
-+ fbdev->size = size;
-
-- fb = &afbdev->afb.base;
-- afbdev->helper.fb = fb;
-- afbdev->helper.fbdev = info;
-+ fb = &fbdev->afb.base;
-+ fbdev->helper.fb = fb;
-+ fbdev->helper.fbdev = info;
-
- strcpy(info->fix.id, "vboxdrmfb");
-
-@@ -331,8 +303,7 @@ static int vboxfb_create(struct vbox_fbd
- info->fbops = &vboxfb_ops;
-
- ret = fb_alloc_cmap(&info->cmap, 256, 0);
-- if (ret)
-- {
-+ if (ret) {
- ret = -ENOMEM;
- goto out;
- }
-@@ -340,8 +311,7 @@ static int vboxfb_create(struct vbox_fbd
- /* This seems to be done for safety checking that the framebuffer is not
- * registered twice by different drivers. */
- info->apertures = alloc_apertures(1);
-- if (!info->apertures)
-- {
-+ if (!info->apertures) {
- ret = -ENOMEM;
- goto out;
- }
-@@ -349,7 +319,7 @@ static int vboxfb_create(struct vbox_fbd
- info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
-
- drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
-- drm_fb_helper_fill_var(info, &afbdev->helper, sizes->fb_width, sizes->fb_height);
-+ drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width, sizes->fb_height);
-
- info->screen_base = sysram;
- info->screen_size = size;
-@@ -380,55 +350,36 @@ static void vbox_fb_gamma_get(struct drm
- *blue = regno;
- }
-
--static int vbox_find_or_create_single(struct drm_fb_helper *helper,
-- struct drm_fb_helper_surface_size *sizes)
--{
-- struct vbox_fbdev *afbdev = (struct vbox_fbdev *)helper;
-- int new_fb = 0;
-- int ret;
--
-- LogFunc(("vboxvideo: %d\n", __LINE__));
-- if (!helper->fb)
-- {
-- ret = vboxfb_create(afbdev, sizes);
-- if (ret)
-- return ret;
-- new_fb = 1;
-- }
-- LogFunc(("vboxvideo: %d\n", __LINE__));
-- return new_fb;
--}
--
--static struct drm_fb_helper_funcs vbox_fb_helper_funcs =
--{
-+static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
- .gamma_set = vbox_fb_gamma_set,
- .gamma_get = vbox_fb_gamma_get,
-- .fb_probe = vbox_find_or_create_single,
-+ .fb_probe = vboxfb_create,
- };
-
- static void vbox_fbdev_destroy(struct drm_device *dev,
-- struct vbox_fbdev *afbdev)
-+ struct vbox_fbdev *fbdev)
- {
- struct fb_info *info;
-- struct vbox_framebuffer *afb = &afbdev->afb;
-+ struct vbox_framebuffer *afb = &fbdev->afb;
- LogFunc(("vboxvideo: %d\n", __LINE__));
-- if (afbdev->helper.fbdev)
-- {
-- info = afbdev->helper.fbdev;
-+ if (fbdev->helper.fbdev) {
-+ info = fbdev->helper.fbdev;
- unregister_framebuffer(info);
- if (info->cmap.len)
- fb_dealloc_cmap(&info->cmap);
- framebuffer_release(info);
- }
-
-- if (afb->obj)
-- {
-+ if (afb->obj) {
- drm_gem_object_unreference_unlocked(afb->obj);
- afb->obj = NULL;
- }
-- drm_fb_helper_fini(&afbdev->helper);
-+ drm_fb_helper_fini(&fbdev->helper);
-
-- vfree(afbdev->sysram);
-+ vfree(fbdev->sysram);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
-+ drm_framebuffer_unregister_private(&afb->base);
-+#endif
- drm_framebuffer_cleanup(&afb->base);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- }
-@@ -436,31 +387,46 @@ static void vbox_fbdev_destroy(struct dr
- int vbox_fbdev_init(struct drm_device *dev)
- {
- struct vbox_private *vbox = dev->dev_private;
-- struct vbox_fbdev *afbdev;
-+ struct vbox_fbdev *fbdev;
- int ret;
-
- LogFunc(("vboxvideo: %d\n", __LINE__));
-- afbdev = kzalloc(sizeof(struct vbox_fbdev), GFP_KERNEL);
-- if (!afbdev)
-+ fbdev = kzalloc(sizeof(struct vbox_fbdev), GFP_KERNEL);
-+ if (!fbdev)
- return -ENOMEM;
-
-- vbox->fbdev = afbdev;
-+ vbox->fbdev = fbdev;
-+ spin_lock_init(&fbdev->dirty_lock);
-+
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
-- afbdev->helper.funcs = &vbox_fb_helper_funcs;
-+ fbdev->helper.funcs = &vbox_fb_helper_funcs;
- #else
-- drm_fb_helper_prepare(dev, &afbdev->helper, &vbox_fb_helper_funcs);
-+ drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
- #endif
-- ret = drm_fb_helper_init(dev, &afbdev->helper, vbox->cCrtcs, vbox->cCrtcs);
-+ ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs, vbox->num_crtcs);
- if (ret)
-- {
-- kfree(afbdev);
-- return ret;
-- }
-+ goto free;
-+
-+ ret = drm_fb_helper_single_add_all_connectors(&fbdev->helper);
-+ if (ret)
-+ goto fini;
-+
-+ /* disable all the possible outputs/crtcs before entering KMS mode */
-+ drm_helper_disable_unused_functions(dev);
-+
-+ ret = drm_fb_helper_initial_config(&fbdev->helper, 32);
-+ if (ret)
-+ goto fini;
-
-- drm_fb_helper_single_add_all_connectors(&afbdev->helper);
-- drm_fb_helper_initial_config(&afbdev->helper, 32);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return 0;
-+fini:
-+ drm_fb_helper_fini(&fbdev->helper);
-+free:
-+ kfree(fbdev);
-+ vbox->fbdev = NULL;
-+ LogFunc(("vboxvideo: %d, ret=%d\n", __LINE__, ret));
-+ return ret;
- }
-
- void vbox_fbdev_fini(struct drm_device *dev)
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_irq.c
-@@ -0,0 +1,187 @@
-+/* $Id: vbox_irq.c $ */
-+/** @file
-+ * VirtualBox Additions Linux kernel video driver
-+ */
-+
-+/*
-+ * Copyright (C) 2016 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ * --------------------------------------------------------------------
-+ *
-+ * This code is based on
-+ * qxl_irq.c
-+ * with the following copyright and permission notice:
-+ *
-+ * Copyright 2013 Red Hat Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Authors: Dave Airlie
-+ * Alon Levy
-+ */
-+
-+#include "vbox_drv.h"
-+
-+#include <VBox/VBoxVideo.h>
-+
-+#include <drm/drm_crtc_helper.h>
-+
-+static void vbox_clear_irq(void)
-+{
-+ outl((uint32_t)~0, VGA_PORT_HGSMI_HOST);
-+}
-+
-+static uint32_t vbox_get_flags(struct vbox_private *vbox)
-+{
-+ return (uint32_t)readl(vbox->vram + vbox->host_flags_offset);
-+}
-+
-+void vbox_report_hotplug(struct vbox_private *vbox)
-+{
-+ schedule_work(&vbox->hotplug_work);
-+}
-+
-+irqreturn_t vbox_irq_handler(int irq, void *arg)
-+{
-+ struct drm_device *dev = (struct drm_device *) arg;
-+ struct vbox_private *vbox = (struct vbox_private *)dev->dev_private;
-+ uint32_t host_flags = vbox_get_flags(vbox);
-+
-+ if (!(host_flags & HGSMIHOSTFLAGS_IRQ))
-+ return IRQ_NONE;
-+
-+ /* Due to a bug in the initial host implementation of hot-plug interrupts,
-+ * the hot-plug and cursor capability flags were never cleared. Fortunately
-+ * we can tell when they would have been set by checking that the VSYNC flag
-+ * is not set. */
-+ if ( host_flags & (HGSMIHOSTFLAGS_HOTPLUG | HGSMIHOSTFLAGS_CURSOR_CAPABILITIES)
-+ && !(host_flags & HGSMIHOSTFLAGS_VSYNC))
-+ vbox_report_hotplug(vbox);
-+ vbox_clear_irq();
-+ return IRQ_HANDLED;
-+}
-+
-+/**
-+ * Query the host for
-+ */
-+static void vbox_update_mode_hints(struct vbox_private *vbox)
-+{
-+ struct drm_device *dev = vbox->dev;
-+ struct drm_connector *connector;
-+ struct vbox_connector *vbox_connector;
-+ struct VBVAMODEHINT *hints;
-+ uint16_t flags;
-+ bool disconnected;
-+ unsigned crtc_id;
-+ int rc;
-+
-+ rc = VBoxHGSMIGetModeHints(&vbox->submit_info, vbox->num_crtcs,
-+ vbox->last_mode_hints);
-+ AssertMsgRCReturnVoid(rc, ("VBoxHGSMIGetModeHints failed, rc=%Rrc.\n", rc));
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
-+ drm_modeset_lock_all(dev);
-+#else
-+ mutex_lock(&dev->mode_config.mutex);
-+#endif
-+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-+ vbox_connector = to_vbox_connector(connector);
-+ hints = &vbox->last_mode_hints[vbox_connector->vbox_crtc->crtc_id];
-+ if (hints->magic == VBVAMODEHINT_MAGIC) {
-+ LogFunc(("vboxvideo: %d: crtc_id=%u, mode %hdx%hd(enabled:%d),%hdx%hd\n",
-+ __LINE__, (unsigned)vbox_connector->vbox_crtc->crtc_id,
-+ (short)hints->cx, (short)hints->cy, (int)hints->fEnabled,
-+ (short)hints->dx, (short)hints->dy));
-+ disconnected = !(hints->fEnabled);
-+ crtc_id = vbox_connector->vbox_crtc->crtc_id;
-+ flags = VBVA_SCREEN_F_ACTIVE
-+ | (disconnected ? VBVA_SCREEN_F_DISABLED : VBVA_SCREEN_F_BLANK);
-+ vbox_connector->mode_hint.width = hints->cx & 0x8fff;
-+ vbox_connector->mode_hint.height = hints->cy & 0x8fff;
-+ vbox_connector->mode_hint.disconnected = disconnected;
-+ if (vbox_connector->vbox_crtc->disconnected != disconnected) {
-+ VBoxHGSMIProcessDisplayInfo(&vbox->submit_info, crtc_id,
-+ 0, 0, 0, hints->cx * 4, hints->cx,
-+ hints->cy, 0, flags);
-+ vbox_connector->vbox_crtc->disconnected = disconnected;
-+ }
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
-+ if ((hints->dx < 0xffff) && (hints->dy < 0xffff)) {
-+ drm_object_property_set_value(&connector->base,
-+ dev->mode_config.suggested_x_property, hints->dx & 0x8fff);
-+ drm_object_property_set_value(&connector->base,
-+ dev->mode_config.suggested_y_property, hints->dy & 0x8fff);
-+ }
-+#endif
-+ }
-+ }
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
-+ drm_modeset_unlock_all(dev);
-+#else
-+ mutex_unlock(&dev->mode_config.mutex);
-+#endif
-+}
-+
-+static void vbox_hotplug_worker(struct work_struct *work)
-+{
-+ struct vbox_private *vbox = container_of(work, struct vbox_private,
-+ hotplug_work);
-+
-+ LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
-+ vbox_update_mode_hints(vbox);
-+ drm_kms_helper_hotplug_event(vbox->dev);
-+}
-+
-+int vbox_irq_init(struct vbox_private *vbox)
-+{
-+ int ret;
-+
-+ LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
-+ vbox_update_mode_hints(vbox);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
-+ ret = drm_irq_install(vbox->dev, vbox->dev->pdev->irq);
-+#else
-+ ret = drm_irq_install(vbox->dev);
-+#endif
-+ if (unlikely(ret != 0)) {
-+ vbox_irq_fini(vbox);
-+ DRM_ERROR("Failed installing irq: %d\n", ret);
-+ return 1;
-+ }
-+ INIT_WORK(&vbox->hotplug_work, vbox_hotplug_worker);
-+ vbox->isr_installed = true;
-+ LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
-+ return 0;
-+}
-+
-+void vbox_irq_fini(struct vbox_private *vbox)
-+{
-+ LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
-+ if (vbox->isr_installed) {
-+ drm_irq_uninstall(vbox->dev);
-+ flush_work(&vbox->hotplug_work);
-+ vbox->isr_installed = false;
-+ }
-+}
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_main.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_main.c
-@@ -65,90 +65,112 @@ static void vbox_user_framebuffer_destro
- kfree(fb);
- }
-
--static int vbox_user_framebuffer_create_handle(struct drm_framebuffer *fb,
-- struct drm_file *file,
-- unsigned int *handle)
-+void vbox_enable_accel(struct vbox_private *vbox)
- {
-- return -EINVAL;
-+ unsigned i;
-+ struct VBVABUFFER *vbva;
-+
-+ AssertLogRelReturnVoid(vbox->vbva_info != NULL);
-+ for (i = 0; i < vbox->num_crtcs; ++i) {
-+ if (vbox->vbva_info[i].pVBVA == NULL) {
-+ LogFunc(("vboxvideo: enabling VBVA.\n"));
-+ vbva = (struct VBVABUFFER *) ( ((uint8_t *)vbox->vram)
-+ + vbox->vram_size
-+ + i * VBVA_MIN_BUFFER_SIZE);
-+ if (!VBoxVBVAEnable(&vbox->vbva_info[i], &vbox->submit_info, vbva, i))
-+ AssertReleaseMsgFailed(("VBoxVBVAEnable failed - heap allocation error, very old host or driver error.\n"));
-+ }
-+ }
-+}
-+
-+void vbox_disable_accel(struct vbox_private *vbox)
-+{
-+ unsigned i;
-+
-+ for (i = 0; i < vbox->num_crtcs; ++i)
-+ VBoxVBVADisable(&vbox->vbva_info[i], &vbox->submit_info, i);
-+}
-+
-+void vbox_enable_caps(struct vbox_private *vbox)
-+{
-+ uint32_t caps = VBVACAPS_DISABLE_CURSOR_INTEGRATION
-+ | VBVACAPS_IRQ
-+ | VBVACAPS_USE_VBVA_ONLY;
-+ if (vbox->initial_mode_queried)
-+ caps |= VBVACAPS_VIDEO_MODE_HINTS;
-+ VBoxHGSMISendCapsInfo(&vbox->submit_info, caps);
- }
-
- /** Send information about dirty rectangles to VBVA. If necessary we enable
-- * VBVA first, as this is normally disabled after a mode set in case a user
-- * takes over the console that is not aware of VBVA (i.e. the VESA BIOS). */
-+ * VBVA first, as this is normally disabled after a change of master in case
-+ * the new master does not send dirty rectangle information (is this even
-+ * allowed?) */
- void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
-- struct drm_clip_rect *pRects,
-- unsigned cRects)
-+ struct drm_clip_rect *rects,
-+ unsigned num_rects)
- {
- struct vbox_private *vbox = fb->dev->dev_private;
- unsigned i;
-- unsigned long flags;
-
-- LogFunc(("vboxvideo: %d: fb=%p, cRects=%u, vbox=%p\n", __LINE__, fb,
-- cRects, vbox));
-- spin_lock_irqsave(&vbox->dev_lock, flags);
-- for (i = 0; i < cRects; ++i)
-+ LogFunc(("vboxvideo: %d: fb=%p, num_rects=%u, vbox=%p\n", __LINE__, fb,
-+ num_rects, vbox));
-+ vbox_enable_accel(vbox);
-+ mutex_lock(&vbox->hw_mutex);
-+ for (i = 0; i < num_rects; ++i)
- {
- struct drm_crtc *crtc;
- list_for_each_entry(crtc, &fb->dev->mode_config.crtc_list, head)
- {
-- unsigned iCrtc = to_vbox_crtc(crtc)->crtc_id;
-- struct VBVABUFFER *pVBVA = vbox->paVBVACtx[iCrtc].pVBVA;
-- VBVACMDHDR cmdHdr;
-+ unsigned crtc_id = to_vbox_crtc(crtc)->crtc_id;
-+ VBVACMDHDR cmd_hdr;
-
-- if (!pVBVA)
-- {
-- pVBVA = (struct VBVABUFFER *) ( ((uint8_t *)vbox->vram)
-- + vbox->vram_size
-- + iCrtc * VBVA_MIN_BUFFER_SIZE);
-- if (!VBoxVBVAEnable(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, pVBVA, iCrtc))
-- AssertReleaseMsgFailed(("VBoxVBVAEnable failed - heap allocation error, very old host or driver error.\n"));
-- }
- if ( CRTC_FB(crtc) != fb
-- || pRects[i].x1 > crtc->x
-+ || rects[i].x1 > crtc->x
- + crtc->hwmode.hdisplay
-- || pRects[i].y1 > crtc->y
-+ || rects[i].y1 > crtc->y
- + crtc->hwmode.vdisplay
-- || pRects[i].x2 < crtc->x
-- || pRects[i].y2 < crtc->y)
-+ || rects[i].x2 < crtc->x
-+ || rects[i].y2 < crtc->y)
- continue;
-- cmdHdr.x = (int16_t)pRects[i].x1;
-- cmdHdr.y = (int16_t)pRects[i].y1;
-- cmdHdr.w = (uint16_t)pRects[i].x2 - pRects[i].x1;
-- cmdHdr.h = (uint16_t)pRects[i].y2 - pRects[i].y1;
-- if (VBoxVBVABufferBeginUpdate(&vbox->paVBVACtx[iCrtc],
-- &vbox->Ctx))
-+ cmd_hdr.x = (int16_t)rects[i].x1;
-+ cmd_hdr.y = (int16_t)rects[i].y1;
-+ cmd_hdr.w = (uint16_t)rects[i].x2 - rects[i].x1;
-+ cmd_hdr.h = (uint16_t)rects[i].y2 - rects[i].y1;
-+ if (VBoxVBVABufferBeginUpdate(&vbox->vbva_info[crtc_id],
-+ &vbox->submit_info))
- {
-- VBoxVBVAWrite(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, &cmdHdr,
-- sizeof(cmdHdr));
-- VBoxVBVABufferEndUpdate(&vbox->paVBVACtx[iCrtc]);
-+ VBoxVBVAWrite(&vbox->vbva_info[crtc_id], &vbox->submit_info, &cmd_hdr,
-+ sizeof(cmd_hdr));
-+ VBoxVBVABufferEndUpdate(&vbox->vbva_info[crtc_id]);
- }
- }
- }
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-+ mutex_unlock(&vbox->hw_mutex);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- }
-
- static int vbox_user_framebuffer_dirty(struct drm_framebuffer *fb,
- struct drm_file *file_priv,
- unsigned flags, unsigned color,
-- struct drm_clip_rect *pRects,
-- unsigned cRects)
-+ struct drm_clip_rect *rects,
-+ unsigned num_rects)
- {
- LogFunc(("vboxvideo: %d, flags=%u\n", __LINE__, flags));
-- vbox_framebuffer_dirty_rectangles(fb, pRects, cRects);
-+ vbox_framebuffer_dirty_rectangles(fb, rects, num_rects);
- return 0;
- }
-
--static const struct drm_framebuffer_funcs vbox_fb_funcs =
--{
-+static const struct drm_framebuffer_funcs vbox_fb_funcs = {
- .destroy = vbox_user_framebuffer_destroy,
-- .create_handle = vbox_user_framebuffer_create_handle,
- .dirty = vbox_user_framebuffer_dirty,
- };
-
-
- int vbox_framebuffer_init(struct drm_device *dev,
- struct vbox_framebuffer *vbox_fb,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+ const
-+#endif
- struct DRM_MODE_FB_CMD *mode_cmd,
- struct drm_gem_object *obj)
- {
-@@ -159,8 +181,7 @@ int vbox_framebuffer_init(struct drm_dev
- drm_helper_mode_fill_fb_struct(&vbox_fb->base, mode_cmd);
- vbox_fb->obj = obj;
- ret = drm_framebuffer_init(dev, &vbox_fb->base, &vbox_fb_funcs);
-- if (ret)
-- {
-+ if (ret) {
- DRM_ERROR("framebuffer init failed %d\n", ret);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return ret;
-@@ -172,6 +193,9 @@ int vbox_framebuffer_init(struct drm_dev
- static struct drm_framebuffer *
- vbox_user_framebuffer_create(struct drm_device *dev,
- struct drm_file *filp,
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+ const
-+#endif
- struct drm_mode_fb_cmd2 *mode_cmd)
- {
- struct drm_gem_object *obj;
-@@ -184,15 +208,13 @@ vbox_user_framebuffer_create(struct drm_
- return ERR_PTR(-ENOENT);
-
- vbox_fb = kzalloc(sizeof(*vbox_fb), GFP_KERNEL);
-- if (!vbox_fb)
-- {
-+ if (!vbox_fb) {
- drm_gem_object_unreference_unlocked(obj);
- return ERR_PTR(-ENOMEM);
- }
-
- ret = vbox_framebuffer_init(dev, vbox_fb, mode_cmd, obj);
-- if (ret)
-- {
-+ if (ret) {
- drm_gem_object_unreference_unlocked(obj);
- kfree(vbox_fb);
- return ERR_PTR(ret);
-@@ -201,105 +223,124 @@ vbox_user_framebuffer_create(struct drm_
- return &vbox_fb->base;
- }
-
--static const struct drm_mode_config_funcs vbox_mode_funcs =
--{
-+static const struct drm_mode_config_funcs vbox_mode_funcs = {
- .fb_create = vbox_user_framebuffer_create,
- };
-
--static void disableVBVA(struct vbox_private *pVBox)
-+static void vbox_accel_fini(struct vbox_private *vbox)
- {
-- unsigned i;
--
-- if (pVBox->paVBVACtx)
-+ if (vbox->vbva_info)
- {
-- for (i = 0; i < pVBox->cCrtcs; ++i)
-- VBoxVBVADisable(&pVBox->paVBVACtx[i], &pVBox->Ctx, i);
-- kfree(pVBox->paVBVACtx);
-- pVBox->paVBVACtx = NULL;
-+ vbox_disable_accel(vbox);
-+ kfree(vbox->vbva_info);
-+ vbox->vbva_info = NULL;
- }
- }
-
--static int vbox_vbva_init(struct vbox_private *vbox)
-+static int vbox_accel_init(struct vbox_private *vbox)
- {
- unsigned i;
-- bool fRC = true;
-- LogFunc(("vboxvideo: %d: vbox=%p, vbox->cCrtcs=%u, vbox->paVBVACtx=%p\n",
-- __LINE__, vbox, (unsigned)vbox->cCrtcs, vbox->paVBVACtx));
-- if (!vbox->paVBVACtx)
-+ LogFunc(("vboxvideo: %d: vbox=%p, vbox->num_crtcs=%u, vbox->vbva_info=%p\n",
-+ __LINE__, vbox, (unsigned)vbox->num_crtcs, vbox->vbva_info));
-+ if (!vbox->vbva_info)
- {
-- vbox->paVBVACtx = kzalloc( sizeof(struct VBVABUFFERCONTEXT)
-- * vbox->cCrtcs,
-+ vbox->vbva_info = kzalloc( sizeof(struct VBVABUFFERCONTEXT)
-+ * vbox->num_crtcs,
- GFP_KERNEL);
-- if (!vbox->paVBVACtx)
-+ if (!vbox->vbva_info)
- return -ENOMEM;
- }
- /* Take a command buffer for each screen from the end of usable VRAM. */
-- vbox->vram_size -= vbox->cCrtcs * VBVA_MIN_BUFFER_SIZE;
-- for (i = 0; i < vbox->cCrtcs; ++i)
-- VBoxVBVASetupBufferContext(&vbox->paVBVACtx[i],
-+ vbox->vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE;
-+ for (i = 0; i < vbox->num_crtcs; ++i)
-+ VBoxVBVASetupBufferContext(&vbox->vbva_info[i],
- vbox->vram_size + i * VBVA_MIN_BUFFER_SIZE,
- VBVA_MIN_BUFFER_SIZE);
-- LogFunc(("vboxvideo: %d: vbox->paVBVACtx=%p, vbox->vram_size=%u\n",
-- __LINE__, vbox->paVBVACtx, (unsigned)vbox->vram_size));
-+ LogFunc(("vboxvideo: %d: vbox->vbva_info=%p, vbox->vram_size=%u\n",
-+ __LINE__, vbox->vbva_info, (unsigned)vbox->vram_size));
- return 0;
- }
-
--
- /** Allocation function for the HGSMI heap and data. */
--static DECLCALLBACK(void *) hgsmiEnvAlloc(void *pvEnv, HGSMISIZE cb)
-+static DECLCALLBACK(void *) alloc_hgsmi_environ(void *environ, HGSMISIZE size)
- {
-- NOREF(pvEnv);
-- return kmalloc(cb, GFP_KERNEL);
-+ NOREF(environ);
-+ return kmalloc(size, GFP_KERNEL);
- }
-
-
- /** Free function for the HGSMI heap and data. */
--static DECLCALLBACK(void) hgsmiEnvFree(void *pvEnv, void *pv)
-+static DECLCALLBACK(void) free_hgsmi_environ(void *environ, void *ptr)
- {
-- NOREF(pvEnv);
-- kfree(pv);
-+ NOREF(environ);
-+ kfree(ptr);
- }
-
-
- /** Pointers to the HGSMI heap and data manipulation functions. */
--static HGSMIENV g_hgsmiEnv =
-+static HGSMIENV hgsmi_environ =
- {
- NULL,
-- hgsmiEnvAlloc,
-- hgsmiEnvFree
-+ alloc_hgsmi_environ,
-+ free_hgsmi_environ
- };
-
-
-+/** Do we support the 4.3 plus mode hint reporting interface? */
-+static bool have_hgsmi_mode_hints(struct vbox_private *vbox)
-+{
-+ uint32_t have_hints, have_cursor;
-+
-+ return RT_SUCCESS(VBoxQueryConfHGSMI(&vbox->submit_info, VBOX_VBVA_CONF32_MODE_HINT_REPORTING, &have_hints))
-+ && RT_SUCCESS(VBoxQueryConfHGSMI(&vbox->submit_info, VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, &have_cursor))
-+ && have_hints == VINF_SUCCESS
-+ && have_cursor == VINF_SUCCESS;
-+}
-+
-+
- /** Set up our heaps and data exchange buffers in VRAM before handing the rest
- * to the memory manager. */
--static int setupAcceleration(struct vbox_private *pVBox, uint32_t *poffBase)
-+static int vbox_hw_init(struct vbox_private *vbox)
- {
-- uint32_t offBase, offGuestHeap, cbGuestHeap;
-- void *pvGuestHeap;
-+ uint32_t base_offset, guest_heap_offset, guest_heap_size, host_flags_offset;
-+ void *guest_heap;
-
-- VBoxHGSMIGetBaseMappingInfo(pVBox->full_vram_size, &offBase, NULL,
-- &offGuestHeap, &cbGuestHeap, NULL);
-- if (poffBase)
-- *poffBase = offBase;
-- pvGuestHeap = ((uint8_t *)pVBox->vram) + offBase + offGuestHeap;
-- if (RT_FAILURE(VBoxHGSMISetupGuestContext(&pVBox->Ctx, pvGuestHeap,
-- cbGuestHeap,
-- offBase + offGuestHeap,
-- &g_hgsmiEnv)))
-+ vbox->full_vram_size = VBoxVideoGetVRAMSize();
-+ vbox->any_pitch = VBoxVideoAnyWidthAllowed();
-+ DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
-+ VBoxHGSMIGetBaseMappingInfo(vbox->full_vram_size, &base_offset, NULL,
-+ &guest_heap_offset, &guest_heap_size, &host_flags_offset);
-+ guest_heap = ((uint8_t *)vbox->vram) + base_offset + guest_heap_offset;
-+ vbox->host_flags_offset = base_offset + host_flags_offset;
-+ if (RT_FAILURE(VBoxHGSMISetupGuestContext(&vbox->submit_info, guest_heap,
-+ guest_heap_size,
-+ base_offset + guest_heap_offset,
-+ &hgsmi_environ)))
- return -ENOMEM;
- /* Reduce available VRAM size to reflect the guest heap. */
-- pVBox->vram_size = offBase;
-+ vbox->vram_size = base_offset;
- /* Linux drm represents monitors as a 32-bit array. */
-- pVBox->cCrtcs = RT_MIN(VBoxHGSMIGetMonitorCount(&pVBox->Ctx), 32);
-- return vbox_vbva_init(pVBox);
-+ vbox->num_crtcs = RT_MIN(VBoxHGSMIGetMonitorCount(&vbox->submit_info), 32);
-+ if (!have_hgsmi_mode_hints(vbox))
-+ return -ENOTSUPP;
-+ vbox->last_mode_hints = kzalloc(sizeof(VBVAMODEHINT) * vbox->num_crtcs, GFP_KERNEL);
-+ if (!vbox->last_mode_hints)
-+ return -ENOMEM;
-+ return vbox_accel_init(vbox);
- }
-
-+static void vbox_hw_fini(struct vbox_private *vbox)
-+{
-+ vbox_accel_fini(vbox);
-+ if (vbox->last_mode_hints)
-+ kfree(vbox->last_mode_hints);
-+ vbox->last_mode_hints = NULL;
-+}
-
- int vbox_driver_load(struct drm_device *dev, unsigned long flags)
- {
- struct vbox_private *vbox;
- int ret = 0;
-- uint32_t offBase;
-
- LogFunc(("vboxvideo: %d: dev=%p\n", __LINE__, dev));
- if (!VBoxHGSMIIsSupported())
-@@ -311,19 +352,15 @@ int vbox_driver_load(struct drm_device *
- dev->dev_private = vbox;
- vbox->dev = dev;
-
-- spin_lock_init(&vbox->dev_lock);
-+ mutex_init(&vbox->hw_mutex);
- /* I hope this won't interfere with the memory manager. */
- vbox->vram = pci_iomap(dev->pdev, 0, 0);
-- if (!vbox->vram)
-- {
-+ if (!vbox->vram) {
- ret = -EIO;
- goto out_free;
- }
-- vbox->full_vram_size = VBoxVideoGetVRAMSize();
-- vbox->fAnyX = VBoxVideoAnyWidthAllowed();
-- DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
-
-- ret = setupAcceleration(vbox, &offBase);
-+ ret = vbox_hw_init(vbox);
- if (ret)
- goto out_free;
-
-@@ -344,6 +381,10 @@ int vbox_driver_load(struct drm_device *
- if (ret)
- goto out_free;
-
-+ ret = vbox_irq_init(vbox);
-+ if (ret)
-+ goto out_free;
-+
- ret = vbox_fbdev_init(dev);
- if (ret)
- goto out_free;
-@@ -351,10 +392,7 @@ int vbox_driver_load(struct drm_device *
- __LINE__, vbox, vbox->vram, (unsigned)vbox->full_vram_size));
- return 0;
- out_free:
-- if (vbox->vram)
-- pci_iounmap(dev->pdev, vbox->vram);
-- kfree(vbox);
-- dev->dev_private = NULL;
-+ vbox_driver_unload(dev);
- LogFunc(("vboxvideo: %d: ret=%d\n", __LINE__, ret));
- return ret;
- }
-@@ -364,42 +402,39 @@ int vbox_driver_unload(struct drm_device
- struct vbox_private *vbox = dev->dev_private;
-
- LogFunc(("vboxvideo: %d\n", __LINE__));
-- vbox_mode_fini(dev);
- vbox_fbdev_fini(dev);
-- drm_mode_config_cleanup(dev);
-+ vbox_irq_fini(vbox);
-+ vbox_mode_fini(dev);
-+ if (dev->mode_config.funcs)
-+ drm_mode_config_cleanup(dev);
-
-- disableVBVA(vbox);
-+ vbox_hw_fini(vbox);
- vbox_mm_fini(vbox);
-- pci_iounmap(dev->pdev, vbox->vram);
-+ if (vbox->vram)
-+ pci_iounmap(dev->pdev, vbox->vram);
- kfree(vbox);
-+ dev->dev_private = NULL;
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return 0;
- }
-
--
--#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
--static bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper
-- *pHelper)
--{
-- bool rc;
--
-- drm_modeset_lock_all(pHelper->dev);
-- rc = drm_fb_helper_restore_fbdev_mode(pHelper);
-- drm_modeset_unlock_all(pHelper->dev);
-- return rc;
--}
--#endif
--
--
--void vbox_driver_lastclose(struct drm_device *pDev)
-+/** @note this is described in the DRM framework documentation. AST does not
-+ * have it, but we get an oops on driver unload if it is not present. */
-+void vbox_driver_lastclose(struct drm_device *dev)
- {
-- struct vbox_private *pVBox = pDev->dev_private;
-+ struct vbox_private *vbox = dev->dev_private;
-
-- if (pVBox->fbdev)
-- drm_fb_helper_restore_fbdev_mode_unlocked(&pVBox->fbdev->helper);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
-+ if (vbox->fbdev)
-+ drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
-+#else
-+ mutex_lock(&dev->mode_config.mutex);
-+ if (vbox->fbdev)
-+ drm_fb_helper_restore_fbdev_mode(&vbox->fbdev->helper);
-+ mutex_unlock(&dev->mode_config.mutex);
-+#endif
- }
-
--
- int vbox_gem_create(struct drm_device *dev,
- u32 size, bool iskernel,
- struct drm_gem_object **obj)
-@@ -416,8 +451,7 @@ int vbox_gem_create(struct drm_device *d
- return -EINVAL;
-
- ret = vbox_bo_create(dev, size, 0, 0, &vboxbo);
-- if (ret)
-- {
-+ if (ret) {
- if (ret != -ERESTARTSYS)
- DRM_ERROR("failed to allocate GEM object\n");
- return ret;
-@@ -457,6 +491,7 @@ int vbox_dumb_create(struct drm_file *fi
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
- int vbox_dumb_destroy(struct drm_file *file,
- struct drm_device *dev,
- uint32_t handle)
-@@ -465,8 +500,9 @@ int vbox_dumb_destroy(struct drm_file *f
- (unsigned)handle));
- return drm_gem_handle_delete(file, handle);
- }
-+#endif
-
--void vbox_bo_unref(struct vbox_bo **bo)
-+static void vbox_bo_unref(struct vbox_bo **bo)
- {
- struct ttm_buffer_object *tbo;
-
-@@ -485,8 +521,6 @@ void vbox_gem_free_object(struct drm_gem
- struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj);
-
- LogFunc(("vboxvideo: %d: vbox_bo=%p\n", __LINE__, vbox_bo));
-- if (!vbox_bo)
-- return;
- vbox_bo_unref(&vbox_bo);
- }
-
-@@ -507,14 +541,13 @@ vbox_dumb_mmap_offset(struct drm_file *f
- {
- struct drm_gem_object *obj;
- int ret;
-- struct vbox_bo *bo = NULL;
-+ struct vbox_bo *bo;
-
- LogFunc(("vboxvideo: %d: dev=%p, handle=%u\n", __LINE__,
- dev, (unsigned)handle));
- mutex_lock(&dev->struct_mutex);
- obj = drm_gem_object_lookup(dev, file, handle);
-- if (obj == NULL)
-- {
-+ if (obj == NULL) {
- ret = -ENOENT;
- goto out_unlock;
- }
-@@ -524,10 +557,10 @@ vbox_dumb_mmap_offset(struct drm_file *f
-
- drm_gem_object_unreference(obj);
- ret = 0;
-+ LogFunc(("vboxvideo: %d: bo=%p, *offset=%llu\n", __LINE__,
-+ bo, (unsigned long long)*offset));
- out_unlock:
- mutex_unlock(&dev->struct_mutex);
-- LogFunc(("vboxvideo: %d: bo=%p, offset=%llu\n", __LINE__,
-- bo, (unsigned long long)*offset));
- return ret;
-
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_mode.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_mode.c
-@@ -20,7 +20,7 @@
- * with the following copyright and permission notice:
- *
- * Copyright 2012 Red Hat Inc.
-- * Parts based on xf86-video-vbox
-+ * Parts based on xf86-video-ast
- * Copyright (c) 2005 ASPEED Technology Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
-@@ -70,33 +70,43 @@ static void vbox_do_modeset(struct drm_c
- {
- struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
- struct vbox_private *vbox;
-- int width, height, cBPP, pitch;
-- unsigned iCrtc;
-- uint16_t fFlags;
-+ int width, height, bpp, pitch;
-+ unsigned crtc_id;
-+ uint16_t flags;
-
- LogFunc(("vboxvideo: %d: vbox_crtc=%p, CRTC_FB(crtc)=%p\n", __LINE__,
- vbox_crtc, CRTC_FB(crtc)));
- vbox = crtc->dev->dev_private;
- width = mode->hdisplay ? mode->hdisplay : 640;
- height = mode->vdisplay ? mode->vdisplay : 480;
-- iCrtc = vbox_crtc->crtc_id;
-- cBPP = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
-+ crtc_id = vbox_crtc->crtc_id;
-+ bpp = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
-- pitch = crtc->enabled ? CRTC_FB(crtc)->pitch : width * cBPP / 8;
-+ pitch = crtc->enabled ? CRTC_FB(crtc)->pitch : width * bpp / 8;
- #else
-- pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * cBPP / 8;
-+ pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
- #endif
-- /* if (vbox_crtc->crtc_id == 0 && crtc->enabled)
-- VBoxVideoSetModeRegisters(width, height, pitch * 8 / cBPP,
-- CRTC_FB(crtc)->bits_per_pixel, 0,
-- crtc->x, crtc->y); */
-- fFlags = VBVA_SCREEN_F_ACTIVE;
-- fFlags |= (crtc->enabled ? 0 : VBVA_SCREEN_F_DISABLED);
-- VBoxHGSMIProcessDisplayInfo(&vbox->Ctx, vbox_crtc->crtc_id,
-+ /* This is the old way of setting graphics modes. It assumed one screen
-+ * and a frame-buffer at the start of video RAM. On older versions of
-+ * VirtualBox, certain parts of the code still assume that the first
-+ * screen is programmed this way, so try to fake it. */
-+ if ( vbox_crtc->crtc_id == 0
-+ && crtc->enabled
-+ && vbox_crtc->fb_offset / pitch < 0xffff - crtc->y
-+ && vbox_crtc->fb_offset % (bpp / 8) == 0)
-+ VBoxVideoSetModeRegisters(width, height, pitch * 8 / bpp,
-+ CRTC_FB(crtc)->bits_per_pixel, 0,
-+ vbox_crtc->fb_offset % pitch / bpp * 8 + crtc->x,
-+ vbox_crtc->fb_offset / pitch + crtc->y);
-+ flags = VBVA_SCREEN_F_ACTIVE;
-+ flags |= (crtc->enabled && !vbox_crtc->blanked ? 0 : VBVA_SCREEN_F_BLANK);
-+ flags |= (vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0);
-+ VBoxHGSMIProcessDisplayInfo(&vbox->submit_info, vbox_crtc->crtc_id,
- crtc->x, crtc->y,
-- crtc->x * cBPP / 8 + crtc->y * pitch,
-+ crtc->x * bpp / 8 + crtc->y * pitch,
- pitch, width, height,
-- vbox_crtc->fBlanked ? 0 : cBPP, fFlags);
-+ vbox_crtc->blanked ? 0 : bpp, flags);
-+ VBoxHGSMIReportFlagsLocation(&vbox->submit_info, vbox->host_flags_offset);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- }
-
-@@ -115,18 +125,18 @@ static int vbox_set_view(struct drm_crtc
- * second and so on. The first match wins. We cheat around this by making
- * the first view be the managed memory plus the first command buffer, the
- * second the same plus the second buffer and so on. */
-- p = VBoxHGSMIBufferAlloc(&vbox->Ctx, sizeof(VBVAINFOVIEW), HGSMI_CH_VBVA,
-+ p = VBoxHGSMIBufferAlloc(&vbox->submit_info, sizeof(VBVAINFOVIEW), HGSMI_CH_VBVA,
- VBVA_INFO_VIEW);
- if (p)
- {
- VBVAINFOVIEW *pInfo = (VBVAINFOVIEW *)p;
- pInfo->u32ViewIndex = vbox_crtc->crtc_id;
-- pInfo->u32ViewOffset = vbox_crtc->offFB;
-- pInfo->u32ViewSize = vbox->vram_size - vbox_crtc->offFB
-+ pInfo->u32ViewOffset = vbox_crtc->fb_offset;
-+ pInfo->u32ViewSize = vbox->vram_size - vbox_crtc->fb_offset
- + vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE;
-- pInfo->u32MaxScreenSize = vbox->vram_size - vbox_crtc->offFB;
-- VBoxHGSMIBufferSubmit(&vbox->Ctx, p);
-- VBoxHGSMIBufferFree(&vbox->Ctx, p);
-+ pInfo->u32MaxScreenSize = vbox->vram_size - vbox_crtc->fb_offset;
-+ VBoxHGSMIBufferSubmit(&vbox->submit_info, p);
-+ VBoxHGSMIBufferFree(&vbox->submit_info, p);
- }
- else
- return -ENOMEM;
-@@ -143,24 +153,22 @@ static void vbox_crtc_dpms(struct drm_cr
- {
- struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
- struct vbox_private *vbox = crtc->dev->dev_private;
-- unsigned long flags;
-
- LogFunc(("vboxvideo: %d: vbox_crtc=%p, mode=%d\n", __LINE__, vbox_crtc,
- mode));
-- switch (mode)
-- {
-+ switch (mode) {
- case DRM_MODE_DPMS_ON:
-- vbox_crtc->fBlanked = false;
-+ vbox_crtc->blanked = false;
- break;
- case DRM_MODE_DPMS_STANDBY:
- case DRM_MODE_DPMS_SUSPEND:
- case DRM_MODE_DPMS_OFF:
-- vbox_crtc->fBlanked = true;
-+ vbox_crtc->blanked = true;
- break;
- }
-- spin_lock_irqsave(&vbox->dev_lock, flags);
-+ mutex_lock(&vbox->hw_mutex);
- vbox_do_modeset(crtc, &crtc->hwmode);
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-+ mutex_unlock(&vbox->hw_mutex);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- }
-
-@@ -171,6 +179,7 @@ static bool vbox_crtc_mode_fixup(struct
- return true;
- }
-
-+/* We move buffers which are not in active use out of VRAM to save memory. */
- static int vbox_crtc_do_set_base(struct drm_crtc *crtc,
- struct drm_framebuffer *fb,
- int x, int y, int atomic)
-@@ -184,6 +193,17 @@ static int vbox_crtc_do_set_base(struct
- u64 gpu_addr;
-
- LogFunc(("vboxvideo: %d: fb=%p, vbox_crtc=%p\n", __LINE__, fb, vbox_crtc));
-+ /* push the previous fb to system ram */
-+ if (!atomic && fb) {
-+ vbox_fb = to_vbox_framebuffer(fb);
-+ obj = vbox_fb->obj;
-+ bo = gem_to_vbox_bo(obj);
-+ ret = vbox_bo_reserve(bo, false);
-+ if (ret)
-+ return ret;
-+ vbox_bo_push_sysram(bo);
-+ vbox_bo_unreserve(bo);
-+ }
-
- vbox_fb = to_vbox_framebuffer(CRTC_FB(crtc));
- obj = vbox_fb->obj;
-@@ -194,14 +214,12 @@ static int vbox_crtc_do_set_base(struct
- return ret;
-
- ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr);
-- if (ret)
-- {
-+ if (ret) {
- vbox_bo_unreserve(bo);
- return ret;
- }
-
-- if (&vbox->fbdev->afb == vbox_fb)
-- {
-+ if (&vbox->fbdev->afb == vbox_fb) {
- /* if pushing console in kmap it */
- ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
- if (ret)
-@@ -210,8 +228,11 @@ static int vbox_crtc_do_set_base(struct
- vbox_bo_unreserve(bo);
-
- /* vbox_set_start_address_crt1(crtc, (u32)gpu_addr); */
-- vbox_crtc->offFB = gpu_addr;
--
-+ vbox_crtc->fb_offset = gpu_addr;
-+ if (vbox_crtc->crtc_id == 0) {
-+ vbox->input_mapping_width = CRTC_FB(crtc)->width;
-+ vbox->input_mapping_height = CRTC_FB(crtc)->height;
-+ }
- LogFunc(("vboxvideo: %d: vbox_fb=%p, obj=%p, bo=%p, gpu_addr=%u\n",
- __LINE__, vbox_fb, obj, bo, (unsigned)gpu_addr));
- return 0;
-@@ -231,16 +252,19 @@ static int vbox_crtc_mode_set(struct drm
- struct drm_framebuffer *old_fb)
- {
- struct vbox_private *vbox = crtc->dev->dev_private;
-- unsigned long flags;
- int rc = 0;
-
- LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox));
- vbox_crtc_mode_set_base(crtc, x, y, old_fb);
-- spin_lock_irqsave(&vbox->dev_lock, flags);
-+ mutex_lock(&vbox->hw_mutex);
- rc = vbox_set_view(crtc);
- if (!rc)
- vbox_do_modeset(crtc, mode);
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-+ /* Note that the input mapping is always relative to the first screen. */
-+ VBoxHGSMIUpdateInputMapping(&vbox->submit_info, 0, 0,
-+ vbox->input_mapping_width,
-+ vbox->input_mapping_height);
-+ mutex_unlock(&vbox->hw_mutex);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return rc;
- }
-@@ -261,8 +285,7 @@ static void vbox_crtc_commit(struct drm_
- }
-
-
--static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs =
--{
-+static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = {
- .dpms = vbox_crtc_dpms,
- .mode_fixup = vbox_crtc_mode_fixup,
- .mode_set = vbox_crtc_mode_set,
-@@ -286,37 +309,33 @@ static void vbox_crtc_destroy(struct drm
- kfree(crtc);
- }
-
--static const struct drm_crtc_funcs vbox_crtc_funcs =
--{
-+static const struct drm_crtc_funcs vbox_crtc_funcs = {
- .cursor_move = vbox_cursor_move,
--#ifdef DRM_IOCTL_MODE_CURSOR2
- .cursor_set2 = vbox_cursor_set2,
--#endif
- .reset = vbox_crtc_reset,
- .set_config = drm_crtc_helper_set_config,
- /* .gamma_set = vbox_crtc_gamma_set, */
- .destroy = vbox_crtc_destroy,
- };
-
--int vbox_crtc_init(struct drm_device *pDev, unsigned i)
-+static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned i)
- {
-- struct vbox_crtc *pCrtc;
-+ struct vbox_crtc *vbox_crtc;
-
- LogFunc(("vboxvideo: %d\n", __LINE__));
-- pCrtc = kzalloc(sizeof(struct vbox_crtc), GFP_KERNEL);
-- if (!pCrtc)
-- return -ENOMEM;
-- pCrtc->crtc_id = i;
-+ vbox_crtc = kzalloc(sizeof(struct vbox_crtc), GFP_KERNEL);
-+ if (!vbox_crtc)
-+ return NULL;
-+ vbox_crtc->crtc_id = i;
-
-- drm_crtc_init(pDev, &pCrtc->base, &vbox_crtc_funcs);
-- drm_mode_crtc_set_gamma_size(&pCrtc->base, 256);
-- drm_crtc_helper_add(&pCrtc->base, &vbox_crtc_helper_funcs);
-- LogFunc(("vboxvideo: %d: pCrtc=%p\n", __LINE__, pCrtc));
-+ drm_crtc_init(dev, &vbox_crtc->base, &vbox_crtc_funcs);
-+ drm_mode_crtc_set_gamma_size(&vbox_crtc->base, 256);
-+ drm_crtc_helper_add(&vbox_crtc->base, &vbox_crtc_helper_funcs);
-+ LogFunc(("vboxvideo: %d: crtc=%p\n", __LINE__, vbox_crtc));
-
-- return 0;
-+ return vbox_crtc;
- }
-
--
- static void vbox_encoder_destroy(struct drm_encoder *encoder)
- {
- LogFunc(("vboxvideo: %d: encoder=%p\n", __LINE__, encoder));
-@@ -324,31 +343,29 @@ static void vbox_encoder_destroy(struct
- kfree(encoder);
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
-+static struct drm_encoder *drm_encoder_find(struct drm_device *dev, uint32_t id)
-+{
-+ struct drm_mode_object *mo;
-+ mo = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER);
-+ return mo ? obj_to_encoder(mo) : NULL;
-+}
-+#endif
-
- static struct drm_encoder *vbox_best_single_encoder(struct drm_connector *connector)
- {
- int enc_id = connector->encoder_ids[0];
-- struct drm_mode_object *obj;
-- struct drm_encoder *encoder;
-
- LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
- /* pick the encoder ids */
- if (enc_id)
-- {
-- obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER);
-- if (!obj)
-- return NULL;
-- encoder = obj_to_encoder(obj);
-- LogFunc(("vboxvideo: %d: encoder=%p\n", __LINE__, encoder));
-- return encoder;
-- }
-+ return drm_encoder_find(connector->dev, enc_id);
- LogFunc(("vboxvideo: %d\n", __LINE__));
- return NULL;
- }
-
-
--static const struct drm_encoder_funcs vbox_enc_funcs =
--{
-+static const struct drm_encoder_funcs vbox_enc_funcs = {
- .destroy = vbox_encoder_destroy,
- };
-
-@@ -381,8 +398,7 @@ static void vbox_encoder_commit(struct d
- }
-
-
--static const struct drm_encoder_helper_funcs vbox_enc_helper_funcs =
--{
-+static const struct drm_encoder_helper_funcs vbox_enc_helper_funcs = {
- .dpms = vbox_encoder_dpms,
- .mode_fixup = vbox_mode_fixup,
- .prepare = vbox_encoder_prepare,
-@@ -390,7 +406,7 @@ static const struct drm_encoder_helper_f
- .mode_set = vbox_encoder_mode_set,
- };
-
--struct drm_encoder *vbox_encoder_init(struct drm_device *dev, unsigned i)
-+static struct drm_encoder *vbox_encoder_init(struct drm_device *dev, unsigned i)
- {
- struct vbox_encoder *vbox_encoder;
-
-@@ -400,7 +416,11 @@ struct drm_encoder *vbox_encoder_init(st
- return NULL;
-
- drm_encoder_init(dev, &vbox_encoder->base, &vbox_enc_funcs,
-- DRM_MODE_ENCODER_DAC);
-+ DRM_MODE_ENCODER_DAC
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
-+ , NULL
-+#endif
-+ );
- drm_encoder_helper_add(&vbox_encoder->base, &vbox_enc_helper_funcs);
-
- vbox_encoder->base.possible_crtcs = 1 << i;
-@@ -408,28 +428,99 @@ struct drm_encoder *vbox_encoder_init(st
- return &vbox_encoder->base;
- }
-
--static int vbox_get_modes(struct drm_connector *pConnector)
--{
-- struct vbox_connector *pVBoxConnector = NULL;
-- struct drm_display_mode *pMode = NULL;
-- unsigned cModes = 0;
--
-- LogFunc(("vboxvideo: %d: pConnector=%p\n", __LINE__, pConnector));
-- pVBoxConnector = to_vbox_connector(pConnector);
-- cModes = drm_add_modes_noedid(pConnector, 1024, 768);
-- if (pVBoxConnector->modeHint.cX && pVBoxConnector->modeHint.cY)
-- {
-- pMode = drm_cvt_mode(pConnector->dev, pVBoxConnector->modeHint.cX,
-- pVBoxConnector->modeHint.cY, 60, false, false,
-- false);
-- if (pMode)
-- {
-- pMode->type |= DRM_MODE_TYPE_PREFERRED;
-- drm_mode_probed_add(pConnector, pMode);
-- ++cModes;
-+/** Generate EDID data with a mode-unique serial number for the virtual
-+ * monitor to try to persuade Unity that different modes correspond to
-+ * different monitors and it should not try to force the same resolution on
-+ * them. */
-+static void vbox_set_edid(struct drm_connector *connector, int width,
-+ int height)
-+{
-+ enum { EDID_SIZE = 128 };
-+ unsigned char edid[EDID_SIZE] = {
-+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, /* header */
-+ 0x58, 0x58, /* manufacturer (VBX) */
-+ 0x00, 0x00, /* product code */
-+ 0x00, 0x00,0x00, 0x00, /* serial number goes here */
-+ 0x01, /* week of manufacture */
-+ 0x00, /* year of manufacture */
-+ 0x01, 0x03, /* EDID version */
-+ 0x80, /* capabilities - digital */
-+ 0x00, /* horiz. res in cm, zero for projectors */
-+ 0x00, /* vert. res in cm */
-+ 0x78, /* display gamma (120 == 2.2). */
-+ 0xEE, /* features (standby, suspend, off, RGB, standard colour space,
-+ * preferred timing mode) */
-+ 0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F, 0x50, 0x54,
-+ /* chromaticity for standard colour space. */
-+ 0x00, 0x00, 0x00, /* no default timings */
-+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-+ 0x01, 0x01, 0x01, 0x01, /* no standard timings */
-+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x02, 0x02, 0x02, 0x02,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* descriptor block 1 goes here */
-+ 0x00, 0x00, 0x00, 0xFD, 0x00, /* descriptor block 2, monitor ranges */
-+ 0x00, 0xC8, 0x00, 0xC8, 0x64, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
-+ 0x20, /* 0-200Hz vertical, 0-200KHz horizontal, 1000MHz pixel clock */
-+ 0x00, 0x00, 0x00, 0xFC, 0x00, /* descriptor block 3, monitor name */
-+ 'V', 'B', 'O', 'X', ' ', 'm', 'o', 'n', 'i', 't', 'o', 'r', '\n',
-+ 0x00, 0x00, 0x00, 0x10, 0x00, /* descriptor block 4: dummy data */
-+ 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-+ 0x20,
-+ 0x00, /* number of extensions */
-+ 0x00 /* checksum goes here */
-+ };
-+ int clock = (width + 6) * (height + 6) * 60 / 10000;
-+ unsigned i;
-+ unsigned sum = 0;
-+
-+ edid[12] = width & 0xff;
-+ edid[13] = width >> 8;
-+ edid[14] = height & 0xff;
-+ edid[15] = height >> 8;
-+ edid[54] = clock & 0xff;
-+ edid[55] = clock >> 8;
-+ edid[56] = width & 0xff;
-+ edid[58] = (width >> 4) & 0xf0;
-+ edid[59] = height & 0xff;
-+ edid[61] = (height >> 4) & 0xf0;
-+ for (i = 0; i < EDID_SIZE - 1; ++i)
-+ sum += edid[i];
-+ edid[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF;
-+ drm_mode_connector_update_edid_property(connector, (struct edid *)edid);
-+}
-+
-+static int vbox_get_modes(struct drm_connector *connector)
-+{
-+ struct vbox_connector *vbox_connector = NULL;
-+ struct drm_display_mode *mode = NULL;
-+ struct vbox_private *vbox = NULL;
-+ unsigned num_modes = 0;
-+ int preferred_width, preferred_height;
-+
-+ LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
-+ vbox_connector = to_vbox_connector(connector);
-+ vbox = connector->dev->dev_private;
-+ if (vbox_connector->vbox_crtc->crtc_id == 0)
-+ vbox_enable_caps(vbox);
-+ if (!vbox->initial_mode_queried) {
-+ if (vbox_connector->vbox_crtc->crtc_id == 0) {
-+ vbox->initial_mode_queried = true;
-+ vbox_report_hotplug(vbox);
- }
-+ return drm_add_modes_noedid(connector, 800, 600);
-+ }
-+ num_modes = drm_add_modes_noedid(connector, 2560, 1600);
-+ preferred_width = vbox_connector->mode_hint.width ? vbox_connector->mode_hint.width : 1024;
-+ preferred_height = vbox_connector->mode_hint.height ? vbox_connector->mode_hint.height : 768;
-+ mode = drm_cvt_mode(connector->dev, preferred_width, preferred_height, 60, false,
-+ false, false);
-+ if (mode)
-+ {
-+ mode->type |= DRM_MODE_TYPE_PREFERRED;
-+ drm_mode_probed_add(connector, mode);
-+ ++num_modes;
- }
-- return cModes;
-+ vbox_set_edid(connector, preferred_width, preferred_height);
-+ return num_modes;
- }
-
- static int vbox_mode_valid(struct drm_connector *connector,
-@@ -438,187 +529,123 @@ static int vbox_mode_valid(struct drm_co
- return MODE_OK;
- }
-
--static void vbox_connector_destroy(struct drm_connector *pConnector)
-+static void vbox_connector_destroy(struct drm_connector *connector)
- {
-- struct vbox_connector *pVBoxConnector = NULL;
-+ struct vbox_connector *vbox_connector = NULL;
-
-- LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, pConnector));
-- pVBoxConnector = to_vbox_connector(pConnector);
-- device_remove_file(pConnector->dev->dev, &pVBoxConnector->deviceAttribute);
-+ LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
-+ vbox_connector = to_vbox_connector(connector);
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
-- drm_sysfs_connector_remove(pConnector);
-+ drm_sysfs_connector_remove(connector);
- #else
-- drm_connector_unregister(pConnector);
-+ drm_connector_unregister(connector);
- #endif
-- drm_connector_cleanup(pConnector);
-- kfree(pConnector);
-+ drm_connector_cleanup(connector);
-+ kfree(connector);
- }
-
- static enum drm_connector_status
- vbox_connector_detect(struct drm_connector *connector, bool force)
- {
-- return connector_status_connected;
-+ struct vbox_connector *vbox_connector = NULL;
-+
-+ (void) force;
-+ LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
-+ vbox_connector = to_vbox_connector(connector);
-+ return vbox_connector->mode_hint.disconnected ?
-+ connector_status_disconnected : connector_status_connected;
-+}
-+
-+static int vbox_fill_modes(struct drm_connector *connector, uint32_t max_x, uint32_t max_y)
-+{
-+ struct vbox_connector *vbox_connector;
-+ struct drm_device *dev;
-+ struct drm_display_mode *mode, *iterator;
-+
-+ LogFunc(("vboxvideo: %d: connector=%p, max_x=%lu, max_y = %lu\n", __LINE__,
-+ connector, (unsigned long)max_x, (unsigned long)max_y));
-+ vbox_connector = to_vbox_connector(connector);
-+ dev = vbox_connector->base.dev;
-+ list_for_each_entry_safe(mode, iterator, &connector->modes, head)
-+ {
-+ list_del(&mode->head);
-+ drm_mode_destroy(dev, mode);
-+ }
-+ return drm_helper_probe_single_connector_modes(connector, max_x, max_y);
- }
-
--static const struct drm_connector_helper_funcs vbox_connector_helper_funcs =
--{
-+static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = {
- .mode_valid = vbox_mode_valid,
- .get_modes = vbox_get_modes,
- .best_encoder = vbox_best_single_encoder,
- };
-
--static const struct drm_connector_funcs vbox_connector_funcs =
--{
-+static const struct drm_connector_funcs vbox_connector_funcs = {
- .dpms = drm_helper_connector_dpms,
- .detect = vbox_connector_detect,
-- .fill_modes = drm_helper_probe_single_connector_modes,
-+ .fill_modes = vbox_fill_modes,
- .destroy = vbox_connector_destroy,
- };
-
--ssize_t vbox_connector_write_sysfs(struct device *pDev,
-- struct device_attribute *pAttr,
-- const char *psz, size_t cch)
--{
-- struct vbox_connector *pVBoxConnector;
-- struct drm_device *pDrmDev;
-- struct vbox_private *pVBox;
-- int cX, cY;
-- char ch;
--
-- LogFunc(("vboxvideo: %d: pDev=%p, pAttr=%p, psz=%s, cch=%llu\n", __LINE__,
-- pDev, pAttr, psz, (unsigned long long)cch));
-- pVBoxConnector = container_of(pAttr, struct vbox_connector,
-- deviceAttribute);
-- pDrmDev = pVBoxConnector->base.dev;
-- pVBox = pDrmDev->dev_private;
-- if (sscanf(psz, "%5dx%5d\n%c", &cX, &cY, &ch) != 2)
-- return -EINVAL;
-- if ( cX < 64 || cX > VBE_DISPI_MAX_XRES
-- || cY < 64 || cY > VBE_DISPI_MAX_YRES)
-- return -EINVAL;
-- pVBoxConnector->modeHint.cX = (uint16_t)cX;
-- pVBoxConnector->modeHint.cY = (uint16_t)cY;
-- drm_helper_hpd_irq_event(pVBoxConnector->base.dev);
-- if (pVBox->fbdev)
-- drm_fb_helper_hotplug_event(&pVBox->fbdev->helper);
-- LogFunc(("vboxvideo: %d\n", __LINE__));
-- return cch;
--}
--
--int vbox_connector_init(struct drm_device *pDev, unsigned cScreen,
-- struct drm_encoder *pEncoder)
--{
-- struct vbox_connector *pVBoxConnector;
-- struct drm_connector *pConnector;
-- int rc;
--
-- LogFunc(("vboxvideo: %d: pDev=%p, pEncoder=%p\n", __LINE__, pDev,
-- pEncoder));
-- pVBoxConnector = kzalloc(sizeof(struct vbox_connector), GFP_KERNEL);
-- if (!pVBoxConnector)
-+static int vbox_connector_init(struct drm_device *dev,
-+ struct vbox_crtc *vbox_crtc,
-+ struct drm_encoder *encoder)
-+{
-+ struct vbox_connector *vbox_connector;
-+ struct drm_connector *connector;
-+
-+ LogFunc(("vboxvideo: %d: dev=%p, encoder=%p\n", __LINE__, dev,
-+ encoder));
-+ vbox_connector = kzalloc(sizeof(struct vbox_connector), GFP_KERNEL);
-+ if (!vbox_connector)
- return -ENOMEM;
-
-- pConnector = &pVBoxConnector->base;
-+ connector = &vbox_connector->base;
-+ vbox_connector->vbox_crtc = vbox_crtc;
-
-- /*
-- * Set up the sysfs file we use for getting video mode hints from user
-- * space.
-- */
-- snprintf(pVBoxConnector->szName, sizeof(pVBoxConnector->szName),
-- "vbox_screen_%u", cScreen);
-- pVBoxConnector->deviceAttribute.attr.name = pVBoxConnector->szName;
-- pVBoxConnector->deviceAttribute.attr.mode = S_IWUSR;
-- pVBoxConnector->deviceAttribute.show = NULL;
-- pVBoxConnector->deviceAttribute.store = vbox_connector_write_sysfs;
-- rc = device_create_file(pDev->dev, &pVBoxConnector->deviceAttribute);
-- if (rc < 0)
-- {
-- kfree(pVBoxConnector);
-- return rc;
-- }
-- drm_connector_init(pDev, pConnector, &vbox_connector_funcs,
-+ drm_connector_init(dev, connector, &vbox_connector_funcs,
- DRM_MODE_CONNECTOR_VGA);
-- drm_connector_helper_add(pConnector, &vbox_connector_helper_funcs);
-+ drm_connector_helper_add(connector, &vbox_connector_helper_funcs);
-
-- pConnector->interlace_allowed = 0;
-- pConnector->doublescan_allowed = 0;
-+ connector->interlace_allowed = 0;
-+ connector->doublescan_allowed = 0;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
-+ drm_mode_create_suggested_offset_properties(dev);
-+ drm_object_attach_property(&connector->base,
-+ dev->mode_config.suggested_x_property, 0);
-+ drm_object_attach_property(&connector->base,
-+ dev->mode_config.suggested_y_property, 0);
-+#endif
- #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
-- drm_sysfs_connector_add(pConnector);
-+ drm_sysfs_connector_add(connector);
- #else
-- drm_connector_register(pConnector);
-+ drm_connector_register(connector);
- #endif
-
-- /* The connector supports hot-plug detection: we promise to call
-- * "drm_helper_hpd_irq_event" when hot-plugging occurs. */
-- pConnector->polled = DRM_CONNECTOR_POLL_HPD;
--
-- drm_mode_connector_attach_encoder(pConnector, pEncoder);
--
-- LogFunc(("vboxvideo: %d: pConnector=%p\n", __LINE__, pConnector));
-- return 0;
--}
--
--#if 0
--/* allocate cursor cache and pin at start of VRAM */
--int vbox_cursor_init(struct drm_device *dev)
--{
-- struct vbox_private *vbox = dev->dev_private;
-- int size;
-- int ret;
-- struct drm_gem_object *obj;
-- struct vbox_bo *bo;
-- uint64_t gpu_addr;
--
-- size = (AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE) * AST_DEFAULT_HWC_NUM;
--
-- ret = vbox_gem_create(dev, size, true, &obj);
-- if (ret)
-- return ret;
-- bo = gem_to_vbox_bo(obj);
-- ret = vbox_bo_reserve(bo, false);
-- if (unlikely(ret != 0))
-- goto fail;
--
-- ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr);
-- vbox_bo_unreserve(bo);
-- if (ret)
-- goto fail;
--
-- /* kmap the object */
-- ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &vbox->cache_kmap);
-- if (ret)
-- goto fail;
-+ drm_mode_connector_attach_encoder(connector, encoder);
-
-- vbox->cursor_cache = obj;
-- vbox->cursor_cache_gpu_addr = gpu_addr;
-- DRM_DEBUG_KMS("pinned cursor cache at %llx\n", vbox->cursor_cache_gpu_addr);
-+ LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
- return 0;
--fail:
-- return ret;
- }
-
--void vbox_cursor_fini(struct drm_device *dev)
-+int vbox_mode_init(struct drm_device *dev)
- {
- struct vbox_private *vbox = dev->dev_private;
-- ttm_bo_kunmap(&vbox->cache_kmap);
-- drm_gem_object_unreference_unlocked(vbox->cursor_cache);
--}
--#endif
--
--int vbox_mode_init(struct drm_device *pDev)
--{
-- struct vbox_private *pVBox = pDev->dev_private;
-- struct drm_encoder *pEncoder;
-+ struct drm_encoder *encoder;
-+ struct vbox_crtc *vbox_crtc;
- unsigned i;
- /* vbox_cursor_init(dev); */
-- LogFunc(("vboxvideo: %d: pDev=%p\n", __LINE__, pDev));
-- for (i = 0; i < pVBox->cCrtcs; ++i)
-+ LogFunc(("vboxvideo: %d: dev=%p\n", __LINE__, dev));
-+ for (i = 0; i < vbox->num_crtcs; ++i)
- {
-- vbox_crtc_init(pDev, i);
-- pEncoder = vbox_encoder_init(pDev, i);
-- if (pEncoder)
-- vbox_connector_init(pDev, i, pEncoder);
-+ vbox_crtc = vbox_crtc_init(dev, i);
-+ if (!vbox_crtc)
-+ return -ENOMEM;
-+ encoder = vbox_encoder_init(dev, i);
-+ if (!encoder)
-+ return -ENOMEM;
-+ vbox_connector_init(dev, vbox_crtc, encoder);
- }
- return 0;
- }
-@@ -629,35 +656,20 @@ void vbox_mode_fini(struct drm_device *d
- }
-
-
--void VBoxRefreshModes(struct drm_device *pDev)
--{
-- struct vbox_private *vbox = pDev->dev_private;
-- struct drm_crtc *crtci;
-- unsigned long flags;
--
-- LogFunc(("vboxvideo: %d\n", __LINE__));
-- spin_lock_irqsave(&vbox->dev_lock, flags);
-- list_for_each_entry(crtci, &pDev->mode_config.crtc_list, head)
-- vbox_do_modeset(crtci, &crtci->hwmode);
-- spin_unlock_irqrestore(&vbox->dev_lock, flags);
-- LogFunc(("vboxvideo: %d\n", __LINE__));
--}
--
--
- /** Copy the ARGB image and generate the mask, which is needed in case the host
- * does not support ARGB cursors. The mask is a 1BPP bitmap with the bit set
- * if the corresponding alpha value in the ARGB image is greater than 0xF0. */
- static void copy_cursor_image(u8 *src, u8 *dst, int width, int height,
-- size_t cbMask)
-+ size_t mask_size)
- {
- unsigned i, j;
-- size_t cbLine = (width + 7) / 8;
-+ size_t line_size = (width + 7) / 8;
-
-- memcpy(dst + cbMask, src, width * height * 4);
-+ memcpy(dst + mask_size, src, width * height * 4);
- for (i = 0; i < height; ++i)
- for (j = 0; j < width; ++j)
- if (((uint32_t *)src)[i * width + j] > 0xf0000000)
-- dst[i * cbLine + j / 8] |= (0x80 >> (j % 8));
-+ dst[i * line_size + j / 8] |= (0x80 >> (j % 8));
- }
-
- static int vbox_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv,
-@@ -672,16 +684,34 @@ static int vbox_cursor_set2(struct drm_c
- struct ttm_bo_kmap_obj uobj_map;
- u8 *src;
- u8 *dst = NULL;
-- size_t cbData, cbMask;
-+ u32 caps = 0;
-+ size_t data_size, mask_size;
- bool src_isiomem;
-
- if (!handle) {
-+ bool cursor_enabled = false;
-+ struct drm_crtc *crtci;
-+
- /* Hide cursor. */
-- VBoxHGSMIUpdatePointerShape(&vbox->Ctx, 0, 0, 0, 0, 0, NULL, 0);
-+ vbox_crtc->cursor_enabled = false;
-+ list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, head)
-+ if (to_vbox_crtc(crtci)->cursor_enabled)
-+ cursor_enabled = true;
-+ if (!cursor_enabled)
-+ VBoxHGSMIUpdatePointerShape(&vbox->submit_info, 0, 0, 0, 0, 0, NULL, 0);
- return 0;
- }
-+ vbox_crtc->cursor_enabled = true;
- if ( width > VBOX_MAX_CURSOR_WIDTH || height > VBOX_MAX_CURSOR_HEIGHT
-- || width == 0 || hot_x > width || height == 0 || hot_y > height)
-+ || width == 0 || height == 0)
-+ return -EINVAL;
-+ rc = VBoxQueryConfHGSMI(&vbox->submit_info,
-+ VBOX_VBVA_CONF32_CURSOR_CAPABILITIES, &caps);
-+ ret = -RTErrConvertToErrno(rc);
-+ if (ret)
-+ return ret;
-+ if ( caps & VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER
-+ || !(caps & VMMDEV_MOUSE_HOST_WANTS_ABSOLUTE))
- return -EINVAL;
-
- obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
-@@ -693,32 +723,37 @@ static int vbox_cursor_set2(struct drm_c
- {
- /* The mask must be calculated based on the alpha channel, one bit
- * per ARGB word, and must be 32-bit padded. */
-- cbMask = ((width + 7) / 8 * height + 3) & ~3;
-- cbData = width * height * 4 + cbMask;
-- dst = kmalloc(cbData, GFP_KERNEL);
-- if (dst)
-+ mask_size = ((width + 7) / 8 * height + 3) & ~3;
-+ data_size = width * height * 4 + mask_size;
-+ vbox->cursor_hot_x = min((uint32_t)max(hot_x, 0), width);
-+ vbox->cursor_hot_y = min((uint32_t)max(hot_y, 0), height);
-+ vbox->cursor_width = width;
-+ vbox->cursor_height = height;
-+ vbox->cursor_data_size = data_size;
-+ dst = vbox->cursor_data;
-+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map);
-+ if (!ret)
- {
-- ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map);
-- if (!ret)
-+ src = ttm_kmap_obj_virtual(&uobj_map, &src_isiomem);
-+ if (!src_isiomem)
- {
-- src = ttm_kmap_obj_virtual(&uobj_map, &src_isiomem);
-- if (!src_isiomem)
-- {
-- uint32_t fFlags = VBOX_MOUSE_POINTER_VISIBLE
-- | VBOX_MOUSE_POINTER_SHAPE
-- | VBOX_MOUSE_POINTER_ALPHA;
-- copy_cursor_image(src, dst, width, height, cbMask);
-- rc = VBoxHGSMIUpdatePointerShape(&vbox->Ctx, fFlags,
-- hot_x, hot_y, width,
-- height, dst, cbData);
-- ret = RTErrConvertToErrno(rc);
-- }
-- else
-- DRM_ERROR("src cursor bo should be in main memory\n");
-- ttm_bo_kunmap(&uobj_map);
-+ uint32_t flags = VBOX_MOUSE_POINTER_VISIBLE
-+ | VBOX_MOUSE_POINTER_SHAPE
-+ | VBOX_MOUSE_POINTER_ALPHA;
-+ copy_cursor_image(src, dst, width, height, mask_size);
-+ rc = VBoxHGSMIUpdatePointerShape(&vbox->submit_info, flags,
-+ vbox->cursor_hot_x,
-+ vbox->cursor_hot_y,
-+ width, height, dst,
-+ data_size);
-+ ret = -RTErrConvertToErrno(rc);
- }
-- kfree(dst);
-+ else
-+ DRM_ERROR("src cursor bo should be in main memory\n");
-+ ttm_bo_kunmap(&uobj_map);
- }
-+ else
-+ vbox->cursor_data_size = 0;
- vbox_bo_unreserve(bo);
- }
- drm_gem_object_unreference_unlocked(obj);
-@@ -734,5 +769,33 @@ static int vbox_cursor_set2(struct drm_c
- static int vbox_cursor_move(struct drm_crtc *crtc,
- int x, int y)
- {
-- return 0;
-+ struct vbox_private *vbox = crtc->dev->dev_private;
-+ uint32_t flags = VBOX_MOUSE_POINTER_VISIBLE
-+ | VBOX_MOUSE_POINTER_SHAPE
-+ | VBOX_MOUSE_POINTER_ALPHA;
-+ uint32_t host_x, host_y;
-+ uint32_t hot_x = 0;
-+ uint32_t hot_y = 0;
-+ int rc;
-+
-+ /* We compare these to unsigned later and don't need to handle negative. */
-+ if (x + crtc->x < 0 || y + crtc->y < 0 || vbox->cursor_data_size == 0)
-+ return 0;
-+ rc = VBoxHGSMICursorPosition(&vbox->submit_info, true, x + crtc->x,
-+ y + crtc->y, &host_x, &host_y);
-+ if (RT_FAILURE(rc))
-+ return -RTErrConvertToErrno(rc);
-+ if (x + crtc->x < host_x)
-+ hot_x = min(host_x - x - crtc->x, vbox->cursor_width);
-+ if (y + crtc->y < host_y)
-+ hot_y = min(host_y - y - crtc->y, vbox->cursor_height);
-+ if (hot_x == vbox->cursor_hot_x && hot_y == vbox->cursor_hot_y)
-+ return 0;
-+ vbox->cursor_hot_x = hot_x;
-+ vbox->cursor_hot_y = hot_y;
-+ rc = VBoxHGSMIUpdatePointerShape(&vbox->submit_info, flags, hot_x, hot_y,
-+ vbox->cursor_width, vbox->cursor_height,
-+ vbox->cursor_data,
-+ vbox->cursor_data_size);
-+ return -RTErrConvertToErrno(rc);
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c
-@@ -86,8 +86,7 @@ static int vbox_ttm_global_init(struct v
- global_ref->init = &vbox_ttm_mem_global_init;
- global_ref->release = &vbox_ttm_mem_global_release;
- r = drm_global_item_ref(global_ref);
-- if (r != 0)
-- {
-+ if (r != 0) {
- DRM_ERROR("Failed setting up TTM memory accounting "
- "subsystem.\n");
- return r;
-@@ -101,8 +100,7 @@ static int vbox_ttm_global_init(struct v
- global_ref->init = &ttm_bo_global_init;
- global_ref->release = &ttm_bo_global_release;
- r = drm_global_item_ref(global_ref);
-- if (r != 0)
-- {
-+ if (r != 0) {
- DRM_ERROR("Failed setting up TTM BO subsystem.\n");
- drm_global_item_unref(&vbox->ttm.mem_global_ref);
- return r;
-@@ -113,7 +111,7 @@ static int vbox_ttm_global_init(struct v
- /**
- * Removes the vbox memory manager object from the global memory manager.
- */
--void
-+static void
- vbox_ttm_global_release(struct vbox_private *vbox)
- {
- if (vbox->ttm.mem_global_ref.release == NULL)
-@@ -135,7 +133,7 @@ static void vbox_bo_ttm_destroy(struct t
- kfree(bo);
- }
-
--bool vbox_ttm_bo_is_vbox_bo(struct ttm_buffer_object *bo)
-+static bool vbox_ttm_bo_is_vbox_bo(struct ttm_buffer_object *bo)
- {
- if (bo->destroy == &vbox_bo_ttm_destroy)
- return true;
-@@ -146,8 +144,7 @@ static int
- vbox_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
- struct ttm_mem_type_manager *man)
- {
-- switch (type)
-- {
-+ switch (type) {
- case TTM_PL_SYSTEM:
- man->flags = TTM_MEMTYPE_FLAG_MAPPABLE;
- man->available_caching = TTM_PL_MASK_CACHING;
-@@ -198,8 +195,7 @@ static int vbox_ttm_io_mem_reserve(struc
- mem->bus.is_iomem = false;
- if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
- return -EINVAL;
-- switch (mem->mem_type)
-- {
-+ switch (mem->mem_type) {
- case TTM_PL_SYSTEM:
- /* system memory */
- return 0;
-@@ -236,13 +232,12 @@ static void vbox_ttm_backend_destroy(str
- kfree(tt);
- }
-
--static struct ttm_backend_func vbox_tt_backend_func =
--{
-+static struct ttm_backend_func vbox_tt_backend_func = {
- .destroy = &vbox_ttm_backend_destroy,
- };
-
-
--struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
-+static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
- unsigned long size, uint32_t page_flags,
- struct page *dummy_read_page)
- {
-@@ -252,8 +247,7 @@ struct ttm_tt *vbox_ttm_tt_create(struct
- if (tt == NULL)
- return NULL;
- tt->func = &vbox_tt_backend_func;
-- if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page))
-- {
-+ if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
- kfree(tt);
- return NULL;
- }
-@@ -270,8 +264,7 @@ static void vbox_ttm_tt_unpopulate(struc
- ttm_pool_unpopulate(ttm);
- }
-
--struct ttm_bo_driver vbox_bo_driver =
--{
-+struct ttm_bo_driver vbox_bo_driver = {
- .ttm_tt_create = vbox_ttm_tt_create,
- .ttm_tt_populate = vbox_ttm_tt_populate,
- .ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
-@@ -301,16 +294,14 @@ int vbox_mm_init(struct vbox_private *vb
- #endif
- DRM_FILE_PAGE_OFFSET,
- true);
-- if (ret)
-- {
-+ if (ret) {
- DRM_ERROR("Error initialising bo driver; %d\n", ret);
- return ret;
- }
-
- ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM,
- vbox->vram_size >> PAGE_SHIFT);
-- if (ret)
-- {
-+ if (ret) {
- DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
- return ret;
- }
-@@ -324,27 +315,28 @@ int vbox_mm_init(struct vbox_private *vb
- pci_resource_len(dev->pdev, 0));
- #endif
-
-+ vbox->ttm.mm_initialised = true;
- return 0;
- }
-
- void vbox_mm_fini(struct vbox_private *vbox)
- {
-+#ifdef DRM_MTRR_WC
- struct drm_device *dev = vbox->dev;
-+#endif
-+ if (!vbox->ttm.mm_initialised)
-+ return;
- ttm_bo_device_release(&vbox->ttm.bdev);
-
- vbox_ttm_global_release(vbox);
-
-- if (vbox->fb_mtrr >= 0)
-- {
- #ifdef DRM_MTRR_WC
-- drm_mtrr_del(vbox->fb_mtrr,
-- pci_resource_start(dev->pdev, 0),
-- pci_resource_len(dev->pdev, 0), DRM_MTRR_WC);
-+ drm_mtrr_del(vbox->fb_mtrr,
-+ pci_resource_start(dev->pdev, 0),
-+ pci_resource_len(dev->pdev, 0), DRM_MTRR_WC);
- #else
-- arch_phys_wc_del(vbox->fb_mtrr);
-+ arch_phys_wc_del(vbox->fb_mtrr);
- #endif
-- vbox->fb_mtrr = -1;
-- }
- }
-
- void vbox_ttm_placement(struct vbox_bo *bo, int domain)
-@@ -368,33 +360,13 @@ void vbox_ttm_placement(struct vbox_bo *
- bo->placement.num_placement = c;
- bo->placement.num_busy_placement = c;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
-- for (i = 0; i < c; ++i)
-- {
-+ for (i = 0; i < c; ++i) {
- bo->placements[i].fpfn = 0;
- bo->placements[i].lpfn = 0;
- }
- #endif
- }
-
--int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
--{
-- int ret;
--
-- ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, 0);
-- if (ret)
-- {
-- if (ret != -ERESTARTSYS && ret != -EBUSY)
-- DRM_ERROR("reserve failed %p\n", bo);
-- return ret;
-- }
-- return 0;
--}
--
--void vbox_bo_unreserve(struct vbox_bo *bo)
--{
-- ttm_bo_unreserve(&bo->bo);
--}
--
- int vbox_bo_create(struct drm_device *dev, int size, int align,
- uint32_t flags, struct vbox_bo **pvboxbo)
- {
-@@ -408,8 +380,7 @@ int vbox_bo_create(struct drm_device *de
- return -ENOMEM;
-
- ret = drm_gem_object_init(dev, &vboxbo->gem, size);
-- if (ret)
-- {
-+ if (ret) {
- kfree(vboxbo);
- return ret;
- }
-@@ -447,8 +418,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
- {
- int i, ret;
-
-- if (bo->pin_count)
-- {
-+ if (bo->pin_count) {
- bo->pin_count++;
- if (gpu_addr)
- *gpu_addr = vbox_bo_gpu_offset(bo);
-@@ -471,8 +441,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
- int vbox_bo_unpin(struct vbox_bo *bo)
- {
- int i, ret;
-- if (!bo->pin_count)
-- {
-+ if (!bo->pin_count) {
- DRM_ERROR("unpin bad %p\n", bo);
- return 0;
- }
-@@ -495,8 +464,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
- int vbox_bo_push_sysram(struct vbox_bo *bo)
- {
- int i, ret;
-- if (!bo->pin_count)
-- {
-+ if (!bo->pin_count) {
- DRM_ERROR("unpin bad %p\n", bo);
- return 0;
- }
-@@ -512,8 +480,7 @@ int vbox_bo_push_sysram(struct vbox_bo *
- PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
-
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
-- if (ret)
-- {
-+ if (ret) {
- DRM_ERROR("pushing to VRAM failed\n");
- return ret;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/export_modules
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/export_modules
-@@ -41,7 +41,7 @@ VBOX_C_YEAR=`date +%Y`
-
- . $PATH_VBOXGUEST/linux/files_vboxguest
- . $PATH_VBOXSF/files_vboxsf
--. $PATH_VBOXVIDEO/files_vboxvideo_drm
-+. $PATH_VBOXVIDEO/files_vboxvideo_drv
-
- # Temporary path for creating the modules, will be removed later
- mkdir $PATH_TMP || exit 1
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/installer/vboxadd-x11.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/installer/vboxadd-x11.sh
-@@ -1,6 +1,6 @@
- #! /bin/sh
- #
--# Linux Additions X11 setup init script ($Revision: 104057 $)
-+# Linux Additions X11 setup init script ($Revision: 106429 $)
- #
-
- #
-@@ -32,6 +32,11 @@ PATH=$PATH:/bin:/sbin:/usr/sbin
- LOG="/var/log/vboxadd-install-x11.log"
- CONFIG_DIR="/var/lib/VBoxGuestAdditions"
- CONFIG="config"
-+MODPROBE=/sbin/modprobe
-+
-+if $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules *0'; then
-+ MODPROBE="$MODPROBE --allow-unsupported-modules"
-+fi
-
- # Check architecture
- cpu=`uname -m`;
-@@ -240,7 +245,6 @@ restart()
- return 0
- }
-
--# setup_script
- setup()
- {
- echo "VirtualBox Guest Additions installation, Window System and desktop setup" > $LOG
-@@ -308,20 +312,6 @@ setup()
- esac
- fi
- case $x_version in
-- 1.17.99.902* )
-- # special case for Fedora 23 :-/
-- x_version_short="1.18"
-- xserver_version="X.Org Server ${x_version_short}"
-- vboxvideo_src=vboxvideo_drv_`echo ${x_version_short} | sed 's/\.//'`.so
-- setupxorgconf=""
-- test -f "${lib_dir}/${vboxvideo_src}" ||
-- {
-- echo "Warning: unknown version of the X Window System installed. Not installing"
-- echo "X Window System drivers."
-- dox11config=""
-- vboxvideo_src=""
-- }
-- ;;
- 1.*.99.* )
- echo "Warning: unsupported pre-release version of X.Org Server installed. Not"
- echo "installing the X.Org drivers."
-@@ -421,8 +411,7 @@ setup()
- ;;
- esac
- ;;
-- * )
-- # Anything else, including all X server versions as of 1.12.
-+ 1.12.* | 1.13.* | 1.14.* | 1.15.* | 1.16.* | 1.17.* | 1.18.* )
- xserver_version="X.Org Server ${x_version_short}"
- vboxvideo_src=vboxvideo_drv_`echo ${x_version_short} | sed 's/\.//'`.so
- setupxorgconf=""
-@@ -434,16 +423,26 @@ setup()
- vboxvideo_src=""
- }
- ;;
-+ * )
-+ # For anything else, assume kernel drivers.
-+ dox11config=""
-+ ;;
- esac
- test -n "${dox11config}" &&
- begin "Installing $xserver_version modules"
-- rm "$modules_dir/drivers/vboxvideo_drv$driver_ext" 2>/dev/null
-- rm "$modules_dir/input/vboxmouse_drv$driver_ext" 2>/dev/null
-- case "$vboxvideo_src" in ?*)
-- ln -s "$lib_dir/$vboxvideo_src" "$modules_dir/drivers/vboxvideo_drv$driver_ext";;
-+ case "$vboxvideo_src" in
-+ ?*)
-+ ln -s "$lib_dir/$vboxvideo_src" "$modules_dir/drivers/vboxvideo_drv$driver_ext.new" &&
-+ mv "$modules_dir/drivers/vboxvideo_drv$driver_ext.new" "$modules_dir/drivers/vboxvideo_drv$driver_ext";;
-+ *)
-+ rm "$modules_dir/drivers/vboxvideo_drv$driver_ext" 2>/dev/null
- esac
-- case "$vboxmouse_src" in ?*)
-- ln -s "$lib_dir/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext";;
-+ case "$vboxmouse_src" in
-+ ?*)
-+ ln -s "$lib_dir/$vboxmouse_src" "$modules_dir/input/vboxmouse_drv$driver_ext.new" &&
-+ mv "$modules_dir/input/vboxmouse_drv$driver_ext.new" "$modules_dir/input/vboxmouse_drv$driver_ext";;
-+ *)
-+ rm "$modules_dir/input/vboxmouse_drv$driver_ext" 2>/dev/null
- esac
- succ_msg
-
-@@ -528,17 +527,6 @@ EOF
- # completely irrelevant on the target system.
- chcon -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
- semanage fcontext -a -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
-- # Install the guest OpenGL drivers. For now we don't support
-- # multi-architecture installations
-- for dir in /usr/lib/dri /usr/lib32/dri /usr/lib64/dri \
-- /usr/lib/xorg/modules/dri /usr/lib32/xorg/modules/dri \
-- /usr/lib64/xorg/modules/dri /usr/lib/i386-linux-gnu/dri \
-- /usr/lib/x86_64-linux-gnu/dri; do
-- if [ -d $dir ]; then
-- rm -f "$dir/vboxvideo_dri.so"
-- ln -s "$LIB/VBoxOGL.so" "$dir/vboxvideo_dri.so"
-- fi
-- done
-
- # And set up VBoxClient to start when the X session does
- install_x11_startup_app "$lib_dir/98vboxadd-xclient" "$share_dir/vboxclient.desktop" VBoxClient VBoxClient-all ||
-@@ -547,7 +535,6 @@ EOF
- succ_msg
- }
-
--# cleanup_script
- cleanup()
- {
- # Restore xorg.conf files as far as possible
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/installer/vboxadd.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/installer/vboxadd.sh
-@@ -1,6 +1,6 @@
- #! /bin/sh
- #
--# Linux Additions kernel module init script ($Revision: 104307 $)
-+# Linux Additions kernel module init script ($Revision: 106390 $)
- #
-
- #
-@@ -16,7 +16,7 @@
- #
-
-
--# chkconfig: 345 30 70
-+# chkconfig: 345 10 90
- # description: VirtualBox Linux Additions kernel modules
- #
- ### BEGIN INIT INFO
-@@ -43,10 +43,12 @@ cpu=`uname -m`;
- case "$cpu" in
- i[3456789]86|x86)
- cpu="x86"
-+ ldconfig_arch="(libc6)"
- lib_candidates="/usr/lib/i386-linux-gnu /usr/lib /lib"
- ;;
- x86_64|amd64)
- cpu="amd64"
-+ ldconfig_arch="(libc6,x86-64)"
- lib_candidates="/usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib /lib64 /lib"
- ;;
- esac
-@@ -294,9 +296,36 @@ start()
- fail "modprobe vboxsf failed"
- }
- }
-+ # Load the kernel video driver if we can.
-+ $MODPROBE vboxvideo > /dev/null 2>&1
-
-- # This is needed as X.Org Server 1.13 does not auto-load the module.
-- running_vboxvideo || $MODPROBE vboxvideo > /dev/null 2>&1
-+ # Put the X.Org driver in place. This is harmless if it is not needed.
-+ /sbin/rcvboxadd-x11 setup
-+ # Install the guest OpenGL drivers. For now we don't support
-+ # multi-architecture installations
-+ rm -rf /etc/ld.so.conf.d/00vboxvideo.conf
-+ ldconfig
-+ if /usr/bin/VBoxClient --check3d; then
-+ rm -r /tmp/VBoxOGL
-+ mkdir -m 0755 /tmp/VBoxOGL
-+ mkdir -m 0755 /tmp/VBoxOGL/system
-+ ldconfig -p | while read -r line; do
-+ case "${line}" in "libGL.so.1 ${ldconfig_arch} => "*)
-+ ln -s "${line#libGL.so.1 ${ldconfig_arch} => }" /tmp/VBoxOGL/system/libGL.so.1
-+ break
-+ esac
-+ done
-+ ldconfig -p | while read -r line; do
-+ case "${line}" in "libEGL.so.1 ${ldconfig_arch} => "*)
-+ ln -s "${line#libEGL.so.1 ${ldconfig_arch} => }" /tmp/VBoxOGL/system/libEGL.so.1
-+ break
-+ esac
-+ done
-+ echo "/tmp/VBoxOGL" > /etc/ld.so.conf.d/00vboxvideo.conf
-+ ln -s "${INSTALL_DIR}/lib/VBoxOGL.so" /tmp/VBoxOGL/libGL.so.1
-+ ln -s "${INSTALL_DIR}/lib/VBoxEGL.so" /tmp/VBoxOGL/libEGL.so.1
-+ ldconfig
-+ fi
-
- # Mount all shared folders from /etc/fstab. Normally this is done by some
- # other startup script but this requires the vboxdrv kernel module loaded.
-@@ -310,6 +339,10 @@ start()
- stop()
- {
- begin "Stopping VirtualBox Additions ";
-+ if test -r /etc/ld.so.conf.d/00vboxvideo.conf; then
-+ rm /etc/ld.so.conf.d/00vboxvideo.conf
-+ ldconfig
-+ fi
- if ! umount -a -t vboxsf 2>/dev/null; then
- fail "Cannot unmount vboxsf folders"
- fi
-@@ -383,20 +416,14 @@ setup_modules()
- return 1
- fi
- succ_msg
-- if expr `uname -r` '<' '2.6.27' > /dev/null; then
-- echo "Not building the VirtualBox advanced graphics driver as this Linux version is"
-- echo "too old to use it."
-- else
-- begin "Building the OpenGL support module"
-- if ! $BUILDINTMP \
-- --use-module-symvers /tmp/vboxguest-Module.symvers \
-- --module-source $MODULE_SRC/vboxvideo \
-- --no-print-directory install >> $LOG 2>&1; then
-- show_error "Look at $LOG to find out what went wrong. The module is not built but the others are."
-- else
-- succ_msg
-- fi
-+ begin "Building the graphics driver module"
-+ if ! $BUILDINTMP \
-+ --use-module-symvers /tmp/vboxguest-Module.symvers \
-+ --module-source $MODULE_SRC/vboxvideo \
-+ --no-print-directory install >> $LOG 2>&1; then
-+ show_error "Look at $LOG to find out what went wrong"
- fi
-+ succ_msg
- depmod
- return 0
- }
-@@ -522,6 +549,9 @@ cleanup()
- rm -rf /usr/src/$i-*
- done
-
-+ # Clean-up X11-related bits
-+ /sbin/rcvboxadd-x11 cleanup
-+
- # Remove other files
- rm /sbin/mount.vboxsf 2>/dev/null
- rm /sbin/rcvboxadd 2>/dev/null
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/linux/sharedfolders/regops.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/linux/sharedfolders/regops.c
-@@ -712,7 +712,11 @@ int sf_write_end(struct file *file, stru
- }
-
- unlock_page(page);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+ put_page(page);
-+#else
- page_cache_release(page);
-+#endif
-
- return nwritten;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/solaris/Installer/postinstall.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/solaris/Installer/postinstall.sh
-@@ -334,21 +334,6 @@ fi
- # be added to this group.
- groupadd vboxsf >/dev/null 2>&1
-
--# install openGL extensions for X.Org
--if test ! -z "$xorgbin"; then
-- # 32-bit crogl opengl library replacement
-- if test -f "/usr/lib/VBoxOGL.so"; then
-- cp -f /usr/X11/lib/mesa/libGL.so.1 /usr/X11/lib/mesa/libGL_original_.so.1
-- ln -sf /usr/lib/VBoxOGL.so /usr/X11/lib/mesa/libGL.so.1
-- fi
--
-- # 64-bit crogl opengl library replacement
-- if test -f "/usr/lib/amd64/VBoxOGL.so"; then
-- cp -f /usr/X11/lib/mesa/amd64/libGL.so.1 /usr/X11/lib/mesa/amd64/libGL_original_.so.1
-- ln -sf /usr/lib/amd64/VBoxOGL.so /usr/X11/lib/mesa/amd64/libGL.so.1
-- fi
--fi
--
- # Move the pointer integration module to kernel/drv & remove the unused module name from pkg and file from disk
-
- # Finalize
-@@ -406,6 +391,9 @@ if test "$currentzone" = "global"; then
- fi
- fi
-
-+# Set up our OpenGL pass-through library.
-+ln -sf $vboxadditions_path/vbox_vendor_select /lib/opengl/ogl_select
-+test "$currentzone" = "global" && /lib/svc/method/ogl-select start
-
- echo "Done."
- if test $retval -eq 0; then
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/solaris/Installer/preremove.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/solaris/Installer/preremove.sh
-@@ -64,16 +64,9 @@ fi
- echo "Restoring X.Org..."
- /opt/VirtualBoxAdditions/x11restore.pl
-
--# Restore crogl symlink mess
--# 32-bit crogl opengl library replacement
--if test -f "/usr/lib/VBoxOGL.so" && test -f "/usr/X11/lib/mesa/libGL_original_.so.1"; then
-- mv -f /usr/X11/lib/mesa/libGL_original_.so.1 /usr/X11/lib/mesa/libGL.so.1
--fi
--
--# 64-bit crogl opengl library replacement
--if test -f "/usr/lib/amd64/VBoxOGL.so" && test -f "/usr/X11/lib/mesa/amd64/libGL_original_.so.1"; then
-- mv -f /usr/X11/lib/mesa/amd64/libGL_original_.so.1 /usr/X11/lib/mesa/amd64/libGL.so.1
--fi
-+# Revert set-up of our OpenGL library.
-+rm -f /lib/opengl/ogl_select/vbox_vendor_select
-+/lib/svc/method/ogl-select start
-
-
- echo "Done."
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/solaris/Installer/vbox_vendor_select
-@@ -0,0 +1,83 @@
-+#!/bin/ksh93
-+#
-+# Based on mesa_vendor_select from Solaris 11.3 with the following copyright:
-+#
-+# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a
-+# copy of this software and associated documentation files (the "Software"),
-+# to deal in the Software without restriction, including without limitation
-+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+# and/or sell copies of the Software, and to permit persons to whom the
-+# Software is furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice (including the next
-+# paragraph) shall be included in all copies or substantial portions of the
-+# Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+# DEALINGS IN THE SOFTWARE.
-+#
-+#
-+
-+LINKDIR=/system/volatile/opengl
-+MESA_SELECT=/lib/opengl/ogl_select/mesa_vendor_select
-+
-+PATH=/usr/bin:/usr/sbin
-+
-+ARCH="$(uname -p)"
-+
-+case "${ARCH}" in
-+ i386) ;;
-+ *) exit 1 ;; # Unsupported architecture
-+esac
-+
-+# We need Mesa for the parts we do not supply.
-+if [[ ! -x "${MESA_SELECT}" ]]; then
-+ exit 0
-+fi
-+
-+if [[ $# -eq 1 ]] && [[ $1 == "identify" ]] ; then
-+ # Probe time. Check whether this system supports pass-through.
-+ # If so, emit an identity string attaching us to the current
-+ # console identifier.
-+ if /usr/bin/VBoxClient --check3d ; then
-+ print "$(constype) vbox"
-+ fi
-+ return 0
-+fi
-+
-+# Make a file link. $1 is the source path, $2 is the target path
-+function make_link {
-+ if [[ $# != 2 ]]; then
-+ return
-+ fi
-+ if [[ -h $2 ]]; then
-+ rm -f $2
-+ fi
-+ ln -sf $1 $2
-+}
-+
-+# Start by setting up Mesa, as we use that for everything except the user
-+# libraries.
-+${MESA_SELECT}
-+
-+# User libraries
-+if [[ -f ${LINKDIR}/lib/libGL.so.1 ]] && [[ -f /usr/lib/VBoxOGL.so ]] ; then
-+ make_link /usr/lib/VBoxOGL.so ${LINKDIR}/lib/libGL.so.1
-+fi
-+if [[ -f ${LINKDIR}/lib/i386/libGL.so.1 ]] && \
-+ [[ -f /usr/lib/i386/VBoxOGL.so ]] ; then
-+ make_link /usr/lib/i386/VBoxOGL.so ${LINKDIR}/lib/i386/libGL.so.1
-+fi
-+if [[ -f ${LINKDIR}/lib/amd64/libGL.so.1 ]] && \
-+ [[ -f /usr/lib/amd64/VBoxOGL.so ]] ; then
-+ make_link /usr/lib/amd64/VBoxOGL.so ${LINKDIR}/lib/amd64/libGL.so.1
-+fi
-+
-+return 0
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/solaris/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/solaris/Makefile.kmk
-@@ -120,6 +120,7 @@ solaris-addcommonbins_SOURCES = \
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient=>1099.vboxclient \
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg_modeless.conf \
-+ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vbox_vendor_select \
- $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh
-
- solaris-addcommon_INST = bin/additions/
-@@ -207,6 +208,7 @@ SOLARIS_ADD_COMMON_BINS = \
- x11restore.pl \
- VBox.sh \
- 1099.vboxclient \
-+ vbox_vendor_select \
- VBoxISAExec
-
- SOLARIS_ADD_USRBIN_LINKS = \
-@@ -286,6 +288,7 @@ $(PATH_STAGE_BIN)/additions/$(PKGFILENAM
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \
- $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg_modeless.conf \
-+ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vbox_vendor_select \
- $(VBOX_BRAND_LICENSE_TXT) \
- $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \
- $(PATH_SUB_CURRENT)/solaris/Makefile.kmk \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
-@@ -66,7 +66,8 @@ ifdef VBOX_X11_SEAMLESS_GUEST
- seamless.cpp \
- seamless-x11.cpp \
- display.cpp \
-- hostversion.cpp
-+ hostversion.cpp \
-+ check3d.cpp
- VBoxClient_LIBS += \
- Xext Xmu
- endif
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
-@@ -77,5 +77,6 @@ extern struct VBCLSERVICE **VBClGetHostV
- #ifdef VBOX_WITH_DRAG_AND_DROP
- extern struct VBCLSERVICE **VBClGetDragAndDropService();
- #endif /* VBOX_WITH_DRAG_AND_DROP */
-+extern struct VBCLSERVICE **VBClCheck3DService();
-
- #endif /* !___vboxclient_vboxclient_h */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/check3d.cpp
-@@ -0,0 +1,59 @@
-+/* $Id: check3d.cpp $ */
-+/** @file
-+ * X11 guest client - 3D pass-through check.
-+ */
-+
-+/*
-+ * Copyright (C) 2011-2012 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ */
-+
-+#include "VBoxClient.h"
-+
-+#include <VBox/VBoxGuestLib.h>
-+
-+#include <stdlib.h>
-+
-+static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
-+{
-+ int rc;
-+ HGCMCLIENTID cClientID;
-+ LogFlowFunc(("\n"));
-+
-+ NOREF(ppInterface);
-+ NOREF(fDaemonised);
-+ /* Initialise the guest library. */
-+ rc = VbglR3InitUser();
-+ if (RT_FAILURE(rc))
-+ exit(1);
-+ rc = VbglR3HGCMConnect("VBoxSharedCrOpenGL", &cClientID);
-+ if (RT_FAILURE(rc))
-+ exit(1);
-+ VbglR3HGCMDisconnect(cClientID);
-+ VbglR3Term();
-+ LogFlowFunc(("returning %Rrc\n", rc));
-+ return rc;
-+}
-+
-+static struct VBCLSERVICE g_vbclCheck3DInterface =
-+{
-+ NULL,
-+ VBClServiceDefaultHandler, /* init */
-+ run,
-+ VBClServiceDefaultCleanup
-+};
-+static struct VBCLSERVICE *g_pvbclCheck3DInterface = &g_vbclCheck3DInterface;
-+
-+/* Static factory */
-+struct VBCLSERVICE **VBClCheck3DService()
-+{
-+ return &g_pvbclCheck3DInterface;
-+}
-+
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/VBoxClient/display.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/display.cpp
-@@ -15,28 +15,26 @@
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
--/** @todo this should probably be replaced by something IPRT */
--/* For system() and WEXITSTATUS() */
--#include <stdlib.h>
--#include <sys/types.h>
--#include <sys/wait.h>
--#include <errno.h>
--
--#include <X11/Xlib.h>
--#include <X11/Xatom.h>
-+#include "VBoxClient.h"
-
--#include <iprt/asm.h>
--#include <iprt/assert.h>
- #include <iprt/err.h>
- #include <iprt/file.h>
- #include <iprt/mem.h>
- #include <iprt/string.h>
--#include <iprt/thread.h>
--#include <VBox/log.h>
--#include <VBox/VMMDev.h>
--#include <VBox/VBoxGuestLib.h>
-
--#include "VBoxClient.h"
-+#include <X11/Xlib.h>
-+#include <X11/Xatom.h>
-+#include <X11/extensions/Xrandr.h>
-+
-+/** @todo this should probably be replaced by something IPRT */
-+/* For system() and WEXITSTATUS() */
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+#include <errno.h>
-+#include <limits.h>
-+#include <poll.h>
-+#include <time.h>
-
- /* TESTING: Dynamic resizing and mouse integration toggling should work
- * correctly with a range of X servers (pre-1.3, 1.3 and later under Linux, 1.3
-@@ -44,19 +42,6 @@
- * virtual terminal while a user session is in place should disable dynamic
- * resizing and cursor integration, switching back should re-enable them. */
-
--/** Most recent information received for a particular screen. */
--struct screenInformation
--{
-- unsigned cx;
-- unsigned cy;
-- unsigned cBPP;
-- unsigned x;
-- unsigned y;
-- bool fEnabled;
-- bool fUpdateSize;
-- volatile bool fUpdatePosition;
--};
--
- /** Display magic number, start of a UUID. */
- #define DISPLAYSTATE_MAGIC UINT32_C(0xf0029993)
-
-@@ -72,59 +57,144 @@ struct DISPLAYSTATE
- bool mfInit;
- /** The connection to the server. */
- Display *pDisplay;
-+ /** The RandR extension base event number. */
-+ int cRREventBase;
- /** Can we use version 1.2 or later of the RandR protocol here? */
- bool fHaveRandR12;
- /** The command argument to use for the xrandr binary. Currently only
- * used to support the non-standard location on some Solaris systems -
- * would it make sense to use absolute paths on all systems? */
- const char *pcszXrandr;
-- /** The number of screens we are currently aware of. */
-- unsigned cScreensTracked;
-- /** Array of information about different screens. */
-- struct screenInformation *paScreenInformation;
-+ /** Was there a recent mode hint with no following root window resize, and
-+ * if so, have we waited for a reasonable time? */
-+ time_t timeLastModeHint;
- };
-
--/** Thread to monitor and react to X server VT switches and exits. */
--static DECLCALLBACK(int) vboxClientMonitorThread(RTTHREAD self, void *pvUser)
-+static unsigned char *getRootProperty(struct DISPLAYSTATE *pState, const char *pszName,
-+ long cItems, Atom type)
- {
-- struct DISPLAYSTATE *pState = (struct DISPLAYSTATE *)pvUser;
-- Display *pDisplay;
-- bool fHasVT = true;
-+ Atom actualType = None;
-+ int iFormat = 0;
-+ ulong cReturned = 0;
-+ ulong cAfter = 0;
-+ unsigned char *pData = 0;
-+
-+ if (XGetWindowProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay),
-+ XInternAtom(pState->pDisplay, pszName, 0), 0, cItems,
-+ False /* delete */, type, &actualType, &iFormat,
-+ &cReturned, &cAfter, &pData))
-+ return NULL;
-+ return pData;
-+}
-
-- pDisplay = XOpenDisplay(NULL);
-- if (!pDisplay)
-- VBClFatalError(("Failed to open the X11 display\n"));
-- XSelectInput(pDisplay, DefaultRootWindow(pDisplay), PropertyChangeMask);
-- while (true)
-+static void doResize(struct DISPLAYSTATE *pState)
-+{
-+ /** @note The xrandr command can fail if something else accesses RandR at
-+ * the same time. We just ignore failure for now as we do not know what
-+ * someone else is doing. */
-+ if (!pState->fHaveRandR12)
- {
-- XEvent event;
-+ char szCommand[256];
-+ unsigned char *pData;
-
-- XNextEvent(pDisplay, &event);
-- /* This property is deleted when the server regains the virtual
-- * terminal. Force the main thread to call xrandr again, as old X
-- * servers could not handle it while switched out. */
-- if (pState->fHaveRandR12)
-- continue;
-- if ( event.type != PropertyNotify
-- || event.xproperty.state != PropertyDelete
-- || event.xproperty.window != DefaultRootWindow(pDisplay)
-- || event.xproperty.atom != XInternAtom(pDisplay, "VBOXVIDEO_NO_VT", False))
-- continue;
-- LogRel(("VBoxClient/Display: entered virtual terminal.\n"));
-- ASMAtomicWriteBool(&pState->paScreenInformation[0].fUpdateSize, true);
-- VbglR3InterruptEventWaits();
-+ pData = getRootProperty(pState, "VBOXVIDEO_PREFERRED_MODE", 1, XA_INTEGER);
-+ if (pData != NULL)
-+ {
-+ RTStrPrintf(szCommand, sizeof(szCommand), "%s -s %ux%u",
-+ pState->pcszXrandr, ((unsigned long *)pData)[0] >> 16, ((unsigned long *)pData)[0] & 0xFFFF);
-+ system(szCommand);
-+ XFree(pData);
-+ }
-+ }
-+ else
-+ {
-+ const char szCommandBase[] =
-+ "%s --output VGA-0 --auto --output VGA-1 --auto --right-of VGA-0 "
-+ "--output VGA-2 --auto --right-of VGA-1 --output VGA-3 --auto --right-of VGA-2 "
-+ "--output VGA-4 --auto --right-of VGA-3 --output VGA-5 --auto --right-of VGA-4 "
-+ "--output VGA-6 --auto --right-of VGA-5 --output VGA-7 --auto --right-of VGA-6 "
-+ "--output VGA-8 --auto --right-of VGA-7 --output VGA-9 --auto --right-of VGA-8 "
-+ "--output VGA-10 --auto --right-of VGA-9 --output VGA-11 --auto --right-of VGA-10 "
-+ "--output VGA-12 --auto --right-of VGA-11 --output VGA-13 --auto --right-of VGA-12 "
-+ "--output VGA-14 --auto --right-of VGA-13 --output VGA-15 --auto --right-of VGA-14 "
-+ "--output VGA-16 --auto --right-of VGA-15 --output VGA-17 --auto --right-of VGA-16 "
-+ "--output VGA-18 --auto --right-of VGA-17 --output VGA-19 --auto --right-of VGA-18 "
-+ "--output VGA-20 --auto --right-of VGA-19 --output VGA-21 --auto --right-of VGA-20 "
-+ "--output VGA-22 --auto --right-of VGA-21 --output VGA-23 --auto --right-of VGA-22 "
-+ "--output VGA-24 --auto --right-of VGA-23 --output VGA-25 --auto --right-of VGA-24 "
-+ "--output VGA-26 --auto --right-of VGA-25 --output VGA-27 --auto --right-of VGA-26 "
-+ "--output VGA-28 --auto --right-of VGA-27 --output VGA-29 --auto --right-of VGA-28 "
-+ "--output VGA-30 --auto --right-of VGA-29 --output VGA-31 --auto --right-of VGA-30";
-+ char szCommand[sizeof(szCommandBase) + 256];
-+ RTStrPrintf(szCommand, sizeof(szCommand), szCommandBase, pState->pcszXrandr);
-+ system(szCommand);
- }
-- return VINF_SUCCESS; /* Should never be reached. */
- }
-
--static int startMonitorThread(struct DISPLAYSTATE *pState)
-+/** Main loop: handle display hot-plug events, property updates (which can
-+ * signal VT switches hot-plug in old X servers). */
-+static void runDisplay(struct DISPLAYSTATE *pState)
- {
-- int rc;
-+ Display *pDisplay = pState->pDisplay;
-+ long cValue = 1;
-
-- rc = RTThreadCreate(NULL, vboxClientMonitorThread, (void *)pState, 0, RTTHREADTYPE_INFREQUENT_POLLER, 0, "VT_MONITOR");
-- if (rc != VINF_SUCCESS)
-- VBClFatalError(("Failed to start the VT monitor thread, rc=%Rrc\n", rc));
-- return VINF_SUCCESS;
-+ /* One way or another we want the preferred mode at server start-up. */
-+ doResize(pState);
-+ XSelectInput(pDisplay, DefaultRootWindow(pDisplay), PropertyChangeMask | StructureNotifyMask);
-+ if (pState->fHaveRandR12)
-+ XRRSelectInput(pDisplay, DefaultRootWindow(pDisplay), RRScreenChangeNotifyMask);
-+ /* Semantics: when VBOXCLIENT_STARTED is set, pre-1.3 X.Org Server driver
-+ * assumes that a client capable of handling mode hints will be present for the
-+ * rest of the X session. If we crash things will not work as they should.
-+ * I thought that preferable to implementing complex crash-handling logic.
-+ */
-+ XChangeProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay), XInternAtom(pState->pDisplay, "VBOXCLIENT_STARTED", 0),
-+ XA_INTEGER, 32, PropModeReplace, (unsigned char *)&cValue, 1);
-+ /* Interrupting this cleanly will be more work than making it robust
-+ * against spontaneous termination, especially as it will never get
-+ * properly tested, so I will go for the second. */
-+ while (true)
-+ {
-+ XEvent event;
-+ struct pollfd PollFd;
-+ int pollTimeOut = -1;
-+ int cFds;
-+
-+ /* Do not handle overflow. */
-+ if (pState->timeLastModeHint > 0 && pState->timeLastModeHint < INT_MAX - 2)
-+ pollTimeOut = 2 - (time(0) - pState->timeLastModeHint);
-+ PollFd.fd = ConnectionNumber(pDisplay);
-+ PollFd.events = POLLIN; /* Hang-up is always reported. */
-+ XFlush(pDisplay);
-+ cFds = poll(&PollFd, 1, pollTimeOut >= 0 ? pollTimeOut * 1000 : -1);
-+ while (XPending(pDisplay))
-+ {
-+ XNextEvent(pDisplay, &event);
-+ /* This property is deleted when the server regains the virtual
-+ * terminal. Force the main thread to call xrandr again, as old X
-+ * servers could not handle it while switched out. */
-+ if ( !pState->fHaveRandR12
-+ && event.type == PropertyNotify
-+ && event.xproperty.state == PropertyDelete
-+ && event.xproperty.window == DefaultRootWindow(pDisplay)
-+ && event.xproperty.atom == XInternAtom(pDisplay, "VBOXVIDEO_NO_VT", False))
-+ doResize(pState);
-+ if ( !pState->fHaveRandR12
-+ && event.type == PropertyNotify
-+ && event.xproperty.state == PropertyNewValue
-+ && event.xproperty.window == DefaultRootWindow(pDisplay)
-+ && event.xproperty.atom == XInternAtom(pDisplay, "VBOXVIDEO_PREFERRED_MODE", False))
-+ doResize(pState);
-+ if ( pState->fHaveRandR12
-+ && event.type == pState->cRREventBase + RRScreenChangeNotify)
-+ pState->timeLastModeHint = time(0);
-+ if ( event.type == ConfigureNotify
-+ && event.xproperty.window == DefaultRootWindow(pDisplay))
-+ pState->timeLastModeHint = 0;
-+ }
-+ if (cFds == 0 && pState->timeLastModeHint > 0)
-+ doResize(pState);
-+ }
- }
-
- static int initDisplay(struct DISPLAYSTATE *pState)
-@@ -132,13 +202,11 @@ static int initDisplay(struct DISPLAYSTA
- char szCommand[256];
- int status;
-
-- /* Initialise the guest library. */
-- int rc = VbglR3InitUser();
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
- pState->pDisplay = XOpenDisplay(NULL);
- if (!pState->pDisplay)
- return VERR_NOT_FOUND;
-+ if (!XRRQueryExtension(pState->pDisplay, &pState->cRREventBase, &status))
-+ return VERR_NOT_FOUND;
- pState->fHaveRandR12 = false;
- pState->pcszXrandr = "xrandr";
- if (RTFileExists("/usr/X11/bin/xrandr"))
-@@ -150,186 +218,9 @@ static int initDisplay(struct DISPLAYSTA
- status = system(szCommand);
- if (WEXITSTATUS(status) == 0)
- pState->fHaveRandR12 = true;
-- pState->cScreensTracked = 0;
-- pState->paScreenInformation = NULL;
- return VINF_SUCCESS;
- }
-
--static void updateScreenInformation(struct DISPLAYSTATE *pState, unsigned cx, unsigned cy, unsigned cBPP, unsigned iDisplay,
-- unsigned x, unsigned y, bool fEnabled, bool fUpdatePosition)
--{
-- uint32_t i;
--
-- if (iDisplay >= pState->cScreensTracked)
-- {
-- pState->paScreenInformation =
-- (struct screenInformation *)RTMemRealloc(pState->paScreenInformation,
-- (iDisplay + 1) * sizeof(*pState->paScreenInformation));
-- if (!pState->paScreenInformation)
-- VBClFatalError(("Failed to re-allocate screen information.\n"));
-- for (i = pState->cScreensTracked; i < iDisplay + 1; ++i)
-- RT_ZERO(pState->paScreenInformation[i]);
-- pState->cScreensTracked = iDisplay + 1;
-- }
-- pState->paScreenInformation[iDisplay].cx = cx;
-- pState->paScreenInformation[iDisplay].cy = cy;
-- pState->paScreenInformation[iDisplay].cBPP = cBPP;
-- pState->paScreenInformation[iDisplay].x = x;
-- pState->paScreenInformation[iDisplay].y = y;
-- pState->paScreenInformation[iDisplay].fEnabled = fEnabled;
-- pState->paScreenInformation[iDisplay].fUpdateSize = true;
-- pState->paScreenInformation[iDisplay].fUpdatePosition = fUpdatePosition;
--}
--
--static void updateSizeHintsProperty(struct DISPLAYSTATE *pState)
--{
-- long *paSizeHints = (long *)RTMemTmpAllocZ(pState->cScreensTracked * sizeof(long) * 2);
-- unsigned i;
--
-- if (paSizeHints == NULL)
-- VBClFatalError(("Failed to allocate size hint property memory.\n"));
-- for (i = 0; i < pState->cScreensTracked; ++i)
-- {
-- if (pState->paScreenInformation[i].fEnabled)
-- paSizeHints[2 * i] = (pState->paScreenInformation[i].cx & 0x8fff) << 16
-- | (pState->paScreenInformation[i].cy & 0x8fff);
-- else if (pState->paScreenInformation[i].cx != 0 && pState->paScreenInformation[i].cy != 0)
-- paSizeHints[2 * i] = -1;
-- if ( pState->paScreenInformation[i].fEnabled
-- && pState->paScreenInformation[i].fUpdatePosition)
-- paSizeHints[2 * i + 1] = (pState->paScreenInformation[i].x & 0x8fff) << 16
-- | (pState->paScreenInformation[i].y & 0x8fff);
-- else
-- paSizeHints[2 * i + 1] = -1;
-- }
-- XChangeProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay), XInternAtom(pState->pDisplay, "VBOX_SIZE_HINTS", 0),
-- XA_INTEGER, 32, PropModeReplace, (unsigned char *)paSizeHints, pState->cScreensTracked * 2);
-- XFlush(pState->pDisplay);
-- RTMemTmpFree(paSizeHints);
--}
--
--static void notifyXServerRandR11(struct DISPLAYSTATE *pState)
--{
-- char szCommand[256];
--
-- /** @note The xrandr command can fail if something else accesses RandR at
-- * the same time. We just ignore failure for now and let the user try
-- * again as we do not know what someone else is doing. */
-- if ( pState->paScreenInformation[0].fUpdateSize
-- && pState->paScreenInformation[0].cx > 0 && pState->paScreenInformation[0].cy > 0)
-- {
-- int ret;
--
-- RTStrPrintf(szCommand, sizeof(szCommand), "%s -s %ux%u",
-- pState->pcszXrandr, pState->paScreenInformation[0].cx, pState->paScreenInformation[0].cy);
-- ret = system(szCommand);
-- LogRel(("VBoxClient/Display: executed \"%s\", returned %d.\n", szCommand, ret));
-- pState->paScreenInformation[0].fUpdateSize = false;
-- }
--}
--
--static void updateMouseCapabilities(struct DISPLAYSTATE *pState)
--{
-- uint32_t fFeatures = 0;
-- int rc;
--
-- rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);
--
-- if (rc != VINF_SUCCESS)
-- VBClFatalError(("Failed to get mouse status, rc=%Rrc\n", rc));
-- XChangeProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay),
-- XInternAtom(pState->pDisplay, "VBOX_MOUSE_CAPABILITIES", 0), XA_INTEGER, 32, PropModeReplace,
-- (unsigned char *)&fFeatures, 1);
-- XFlush(pState->pDisplay);
--}
--
--/**
-- * Display change request monitor thread function.
-- */
--static void runDisplay(struct DISPLAYSTATE *pState)
--{
-- int rc;
-- unsigned i, cScreensTracked;
-- uint32_t fModeSet = false;
--
-- LogRelFlowFunc(("\n"));
-- rc = VbglR3VideoModeGetHighestSavedScreen(&cScreensTracked);
-- if (rc != VINF_SUCCESS && rc != VERR_NOT_SUPPORTED)
-- VBClFatalError(("Failed to get the number of saved screen modes, rc=%Rrc\n", rc));
-- /* Make sure that we have an entry for screen 1 at least. */
-- updateScreenInformation(pState, 1024, 768, 0, 1, 0, 0, true, false);
-- if (rc == VINF_SUCCESS)
-- {
-- /* The "8" is for the sanity test below. */
-- for (i = 0; i < RT_MAX(cScreensTracked + 1, 8); ++i)
-- {
-- unsigned cx = 0, cy = 0, cBPP = 0, x = 0, y = 0;
-- bool fEnabled = true;
--
-- rc = VbglR3RetrieveVideoMode(i, &cx, &cy, &cBPP, &x, &y,
-- &fEnabled);
-- /* Sanity test for VbglR3VideoModeGetHighestSavedScreen(). */
-- if (i > cScreensTracked && rc != VERR_NOT_FOUND)
-- VBClFatalError(("Internal error retrieving the number of saved screen modes.\n"));
-- if (rc == VINF_SUCCESS)
-- updateScreenInformation(pState, cx, cy, cBPP, i, x, y, fEnabled, true);
-- }
-- }
-- /* Semantics: when VBOX_HAS_GRAPHICS is set, the X server driver assumes
-- * that a client capable of forwarding mode hints will be present for the
-- * rest of the X session. If we crash things will not work as they should.
-- * I thought that preferable to implementing complex crash-handling logic.
-- */
-- XChangeProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay), XInternAtom(pState->pDisplay, "VBOX_HAS_GRAPHICS", 0),
-- XA_INTEGER, 32, PropModeReplace, (unsigned char *)&fModeSet, 1);
-- while (true)
-- {
-- uint32_t fEvents;
-- updateMouseCapabilities(pState);
-- updateSizeHintsProperty(pState);
-- if (!pState->fHaveRandR12)
-- notifyXServerRandR11(pState);
-- rc = VbglR3WaitEvent(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST | VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED, RT_INDEFINITE_WAIT,
-- &fEvents);
-- /* Interrupted is used to re-set the mode without changing it. */
-- if (rc == VERR_INTERRUPTED)
-- rc = VINF_SUCCESS;
-- if (RT_FAILURE(rc)) /* VERR_NO_MEMORY? */
-- VBClFatalError(("event wait failed, rc=%Rrc\n", rc));
-- /* If it is a size hint, set the new size. */
-- if (fEvents & VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
-- {
-- uint32_t cx = 0, cy = 0, cBPP = 0, iDisplay = 0, x = 0, y = 0;
-- bool fEnabled = true, fUpdatePosition = true;
-- VMMDevSeamlessMode Mode;
--
-- rc = VbglR3GetDisplayChangeRequest(&cx, &cy, &cBPP, &iDisplay,
-- &x, &y, &fEnabled,
-- &fUpdatePosition, true);
-- if (rc != VINF_SUCCESS)
-- VBClFatalError(("Failed to get display change request, rc=%Rrc\n",
-- rc));
-- else
-- LogRelFlowFunc(("Got size hint from host cx=%d, cy=%d, bpp=%d, iDisplay=%d, x=%d, y=%d fEnabled=%d\n",
-- cx, cy, cBPP, iDisplay, x, y, fEnabled));
-- if (iDisplay > INT32_MAX)
-- VBClFatalError(("Received a size hint for too high display number %u\n",
-- (unsigned) iDisplay));
-- updateScreenInformation(pState, cx, cy, cBPP, iDisplay, x, y, fEnabled, fUpdatePosition);
-- rc = VbglR3SeamlessGetLastEvent(&Mode);
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Failed to check seamless mode, rc=%Rrc\n", rc));
-- if (Mode == VMMDev_Seamless_Disabled)
-- {
-- rc = VbglR3SaveVideoMode(iDisplay, cx, cy, cBPP, x, y,
-- fEnabled);
-- if (RT_FAILURE(rc) && rc != VERR_NOT_SUPPORTED)
-- VBClFatalError(("Failed to save size hint, rc=%Rrc\n", rc));
-- }
-- }
-- }
--}
--
- static const char *getPidFilePath()
- {
- return ".vboxclient-display.pid";
-@@ -353,9 +244,6 @@ static int init(struct VBCLSERVICE **ppI
- rc = initDisplay(pSelf);
- if (RT_FAILURE(rc))
- return rc;
-- rc = VbglR3CtlFilterMask(VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Failed to set filter mask, rc=%Rrc.\n", rc));
- if (RT_SUCCESS(rc))
- pSelf->mfInit = true;
- return rc;
-@@ -368,26 +256,16 @@ static int run(struct VBCLSERVICE **ppIn
-
- if (!pSelf->mfInit)
- return VERR_WRONG_ORDER;
-- rc = startMonitorThread(pSelf);
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Failed to start the VT monitor thread: %Rrc\n", rc));
- runDisplay(pSelf);
- return VERR_INTERNAL_ERROR; /* "Should never reach here." */
- }
-
--static void cleanup(struct VBCLSERVICE **ppInterface)
--{
-- NOREF(ppInterface);
-- VbglR3CtlFilterMask(0, VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED | VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST);
-- VbglR3Term();
--}
--
- struct VBCLSERVICE vbclDisplayInterface =
- {
- getPidFilePath,
- init,
- run,
-- cleanup
-+ VBClServiceDefaultCleanup
- };
-
- struct VBCLSERVICE **VBClGetDisplayService()
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
-@@ -938,7 +938,7 @@ int DragInstance::onX11ClientMessage(con
- if (fAcceptDrop)
- uAction = toHGCMAction(static_cast<Atom>(e.xclient.data.l[XdndStatusAction]));
-
-- rc = VbglR3DnDHGAcknowledgeOperation(&m_dndCtx, uAction);
-+ rc = VbglR3DnDHGSendAckOp(&m_dndCtx, uAction);
- }
- else if (e.xclient.message_type == xAtom(XA_XdndFinished))
- {
-@@ -1820,7 +1820,7 @@ int DragInstance::hgMove(uint32_t u32xPo
- if (newVer == -1)
- {
- /* No window to process, so send a ignore ack event to the host. */
-- rc = VbglR3DnDHGAcknowledgeOperation(&m_dndCtx, DND_IGNORE_ACTION);
-+ rc = VbglR3DnDHGSendAckOp(&m_dndCtx, DND_IGNORE_ACTION);
- }
- else
- {
-@@ -1865,7 +1865,7 @@ int DragInstance::hgDrop(uint32_t u32xPo
- */
- char szFormat[] = { "text/uri-list" };
-
-- int rc = VbglR3DnDHGRequestData(&m_dndCtx, szFormat);
-+ int rc = VbglR3DnDHGSendReqData(&m_dndCtx, szFormat);
- logInfo("Drop event from host resuled in: %Rrc\n", rc);
-
- LogFlowFuncLeaveRC(rc);
-@@ -2073,7 +2073,8 @@ int DragInstance::ghIsDnDPending(void)
- RTCritSectLeave(&m_dataCS);
- }
-
-- rc2 = VbglR3DnDGHAcknowledgePending(&m_dndCtx, uDefAction, uAllActions, strFormats.c_str());
-+ rc2 = VbglR3DnDGHSendAckPending(&m_dndCtx, uDefAction, uAllActions,
-+ strFormats.c_str(), strFormats.length() + 1 /* Include termination */);
- LogFlowThisFunc(("uClientID=%RU32, uDefAction=0x%x, allActions=0x%x, strFormats=%s, rc=%Rrc\n",
- m_dndCtx.uClientID, uDefAction, uAllActions, strFormats.c_str(), rc2));
- if (RT_FAILURE(rc2))
-@@ -3195,7 +3196,7 @@ DECLCALLBACK(int) DragAndDropService::hg
- e.type = DnDEvent::HGCM_Type;
-
- /* Wait for new events. */
-- rc = VbglR3DnDProcessNextMessage(&dndCtx, &e.hgcm);
-+ rc = VbglR3DnDRecvNextMsg(&dndCtx, &e.hgcm);
- if ( RT_SUCCESS(rc)
- || rc == VERR_CANCELLED)
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/VBoxClient/main.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/VBoxClient/main.cpp
-@@ -52,7 +52,7 @@ static int (*gpfnOldIOErrorHandler)(Disp
- struct VBCLSERVICE **g_pService;
- /** The name of our pidfile. It is global for the benefit of the cleanup
- * routine. */
--static char g_szPidFile[RTPATH_MAX];
-+static char g_szPidFile[RTPATH_MAX] = "";
- /** The file handle of our pidfile. It is global for the benefit of the
- * cleanup routine. */
- static RTFILE g_hPidFile;
-@@ -164,7 +164,7 @@ void vboxClientUsage(const char *pcszFil
- # ifdef VBOX_WITH_GUEST_PROPS
- "--checkhostversion|"
- #endif
-- "--seamless [-d|--nodaemon]\n", pcszFileName);
-+ "--seamless|check3d [-d|--nodaemon]\n", pcszFileName);
- RTPrintf("Starts the VirtualBox X Window System guest services.\n\n");
- RTPrintf("Options:\n");
- RTPrintf(" --clipboard starts the shared clipboard service\n");
-@@ -175,6 +175,7 @@ void vboxClientUsage(const char *pcszFil
- #ifdef VBOX_WITH_GUEST_PROPS
- RTPrintf(" --checkhostversion starts the host version notifier service\n");
- #endif
-+ RTPrintf(" --check3d tests whether 3D pass-through is enabled\n");
- RTPrintf(" --seamless starts the seamless windows service\n");
- RTPrintf(" -d, --nodaemon continues running as a system service\n");
- RTPrintf(" -h, --help shows this help text\n");
-@@ -259,6 +260,12 @@ int main(int argc, char *argv[])
- g_pService = VBClGetDragAndDropService();
- }
- #endif /* VBOX_WITH_DRAG_AND_DROP */
-+ else if (!strcmp(argv[i], "--check3d"))
-+ {
-+ if (g_pService)
-+ break;
-+ g_pService = VBClCheck3DService();
-+ }
- else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
- {
- vboxClientUsage(pcszFileName);
-@@ -286,23 +293,26 @@ int main(int argc, char *argv[])
- rc = RTCritSectInit(&g_critSect);
- if (RT_FAILURE(rc))
- VBClFatalError(("Initialising critical section: %Rrc\n", rc));
-- rc = RTPathUserHome(g_szPidFile, sizeof(g_szPidFile));
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Getting home directory for pid-file: %Rrc\n", rc));
-- rc = RTPathAppend(g_szPidFile, sizeof(g_szPidFile),
-- (*g_pService)->getPidFilePath());
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Creating pid-file path: %Rrc\n", rc));
-- if (fDaemonise)
-- rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn);
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Daemonizing: %Rrc\n", rc));
-- if (g_szPidFile[0])
-- rc = VbglR3PidFile(g_szPidFile, &g_hPidFile);
-- if (rc == VERR_FILE_LOCK_VIOLATION) /* Already running. */
-- return 0;
-- if (RT_FAILURE(rc))
-- VBClFatalError(("Creating pid-file: %Rrc\n", rc));
-+ if ((*g_pService)->getPidFilePath)
-+ {
-+ rc = RTPathUserHome(g_szPidFile, sizeof(g_szPidFile));
-+ if (RT_FAILURE(rc))
-+ VBClFatalError(("Getting home directory for pid-file: %Rrc\n", rc));
-+ rc = RTPathAppend(g_szPidFile, sizeof(g_szPidFile),
-+ (*g_pService)->getPidFilePath());
-+ if (RT_FAILURE(rc))
-+ VBClFatalError(("Creating pid-file path: %Rrc\n", rc));
-+ if (fDaemonise)
-+ rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn);
-+ if (RT_FAILURE(rc))
-+ VBClFatalError(("Daemonizing: %Rrc\n", rc));
-+ if (g_szPidFile[0])
-+ rc = VbglR3PidFile(g_szPidFile, &g_hPidFile);
-+ if (rc == VERR_FILE_LOCK_VIOLATION) /* Already running. */
-+ return 0;
-+ if (RT_FAILURE(rc))
-+ VBClFatalError(("Creating pid-file: %Rrc\n", rc));
-+ }
- /* Set signal handlers to clean up on exit. */
- vboxClientSetSignalHandlers();
- #ifndef VBOXCLIENT_WITHOUT_X11
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
-@@ -26,25 +26,18 @@ endif
- vboxvideo_13_DEFS := $(vboxvideo_70_DEFS) VBOXVIDEO_13
- vboxvideo_15_DEFS := \
- $(vboxvideo_13_DEFS) NO_ANSIC PCIACCESS XSERVER_LIBPCIACCESS _XORG_SERVER_H_ _DIX_CONFIG_H_
--if1of ($(KBUILD_TARGET), linux solaris)
-- vboxvideo_15_DEFS += \
-- VBOX_DRI
--endif
- vboxvideo_xorg_INCS = \
-- $(VBOX_PATH_X11_ROOT)/dri2proto-2.8 \
- $(VBOX_PATH_X11_ROOT)/fontsproto-2.1.0 \
- $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \
- $(VBOX_PATH_X11_ROOT)/MesaLib-8.0.4-GL \
- $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \
- $(VBOX_PATH_X11_ROOT)/kbproto-1.0.6 \
-- $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \
- $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \
- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
- $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \
- $(VBOX_PATH_X11_ROOT)/randrproto-1.3.0 \
- $(VBOX_PATH_X11_ROOT)/renderproto-0.11 \
- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
-- $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \
- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18
-
- vboxvideo.c_DEPS = $(VBOX_SVN_REV_HEADER)
-@@ -169,7 +162,7 @@ vboxvideo_drv_13_INCS = \
- $(vboxvideo_xorg_INCS) \
- $(VBOX_PATH_X11_ROOT)/xorg-server-1.3.0.0
- vboxvideo_drv_13_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
--vboxvideo_drv_13_SOURCES = $(vboxvideo_drv_SOURCES)
-+vboxvideo_drv_13_SOURCES = $(vboxvideo_drv_SOURCES) edid.c
-
-
- #
-@@ -193,19 +186,11 @@ DLLS += vboxvideo_drv_15
- vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
- vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
- vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=10503000
--if1of ($(KBUILD_TARGET), linux solaris)
-- vboxvideo_drv_15_DEFS += \
-- VBOX_DRI_OLD
--endif
- vboxvideo_drv_15_INCS = \
- $(vboxvideo_xorg_INCS) \
- $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3
- vboxvideo_drv_15_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
- vboxvideo_drv_15_SOURCES = $(vboxvideo_drv_13_SOURCES)
--if1of ($(KBUILD_TARGET), linux solaris)
-- vboxvideo_drv_15_SOURCES += \
-- vboxvideo_dri.c
--endif
-
-
- #
-@@ -215,10 +200,6 @@ DLLS += vboxvideo_drv_16
- vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
- vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
- vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=10600000
--if1of ($(KBUILD_TARGET), linux solaris)
-- vboxvideo_drv_16_DEFS += \
-- VBOX_DRI_OLD
--endif
- vboxvideo_drv_16_INCS = \
- $(vboxvideo_xorg_INCS) \
- $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.5 \
-@@ -238,10 +219,6 @@ vboxvideo_drv_17_INCS = \
- $(VBOX_PATH_X11_ROOT)/xorg-server-1.7.7
- vboxvideo_drv_17_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
- vboxvideo_drv_17_SOURCES := $(vboxvideo_drv_13_SOURCES)
--if1of ($(KBUILD_TARGET), linux solaris)
-- vboxvideo_drv_17_SOURCES += \
-- vboxvideo_dri2.c
--endif
-
-
- #
-@@ -408,8 +385,6 @@ ifdef VBOX_USE_SYSTEM_XORG_HEADERS
- vboxvideo_drv_system_INCS += \
- $(PATH_ROOT)/src/VBox/Runtime/include \
- /usr/include/x11 \
-- /usr/include/X11/dri \
-- /usr/include/libdrm \
- /usr/include/xorg \
- /usr/include/pixman-1
- vboxvideo_drv_system_SOURCES := $(vboxvideo_drv_17_SOURCES)
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/edid.c
-@@ -0,0 +1,175 @@
-+/* $Id: edid.c $ */
-+/** @file
-+ *
-+ * Linux Additions X11 graphics driver, EDID construction
-+ */
-+
-+/*
-+ * Copyright (C) 2006-2012 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ * --------------------------------------------------------------------
-+ *
-+ * This code is based on drmmode_display.c from the X.Org xf86-video-intel
-+ * driver with the following copyright notice:
-+ *
-+ * Copyright © 2007 Red Hat, Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ *
-+ * Authors:
-+ * Dave Airlie <airlied at redhat.com>
-+ */
-+
-+#include <misc.h>
-+#include <xf86DDC.h>
-+#include <xf86Crtc.h>
-+#include "vboxvideo.h"
-+
-+enum { EDID_SIZE = 128 };
-+
-+const unsigned char g_acszEDIDBase[EDID_SIZE] =
-+{
-+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, /* header */
-+ 0x58, 0x58, /* manufacturer (VBX) */
-+ 0x00, 0x00, /* product code */
-+ 0x00, 0x00,0x00, 0x00, /* serial number goes here */
-+ 0x01, /* week of manufacture */
-+ 0x00, /* year of manufacture */
-+ 0x01, 0x03, /* EDID version */
-+ 0x80, /* capabilities - digital */
-+ 0x00, /* horiz. res in cm, zero for projectors */
-+ 0x00, /* vert. res in cm */
-+ 0x78, /* display gamma (120 == 2.2). Should we ask the host for this? */
-+ 0xEE, /* features (standby, suspend, off, RGB, standard colour space,
-+ * preferred timing mode) */
-+ 0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F, 0x50, 0x54,
-+ /* chromaticity for standard colour space - should we ask the host? */
-+ 0x00, 0x00, 0x00, /* no default timings */
-+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-+ 0x01, 0x01, 0x01, 0x01, /* no standard timings */
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* descriptor block 1 goes here */
-+ 0x00, 0x00, 0x00, 0xFD, 0x00, /* descriptor block 2, monitor ranges */
-+ 0x00, 0xC8, 0x00, 0xC8, 0x64, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
-+ 0x20, /* 0-200Hz vertical, 0-200KHz horizontal, 1000MHz pixel clock */
-+ 0x00, 0x00, 0x00, 0xFC, 0x00, /* descriptor block 3, monitor name */
-+ 'V', 'B', 'O', 'X', ' ', 'm', 'o', 'n', 'i', 't', 'o', 'r', '\n',
-+ 0x00, 0x00, 0x00, 0x10, 0x00, /* descriptor block 4: dummy data */
-+ 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-+ 0x20,
-+ 0x00, /* number of extensions */
-+ 0x00 /* checksum goes here */
-+};
-+
-+static void fillDescBlockTimings(unsigned char *pchDescBlock,
-+ DisplayModePtr mode)
-+{
-+ struct detailed_timings timing;
-+
-+ timing.clock = mode->Clock * 1000;
-+ timing.h_active = mode->HDisplay;
-+ timing.h_blanking = mode->HTotal - mode->HDisplay;
-+ timing.v_active = mode->VDisplay;
-+ timing.v_blanking = mode->VTotal - mode->VDisplay;
-+ timing.h_sync_off = mode->HSyncStart - mode->HDisplay;
-+ timing.h_sync_width = mode->HSyncEnd - mode->HSyncStart;
-+ timing.v_sync_off = mode->VSyncStart - mode->VDisplay;
-+ timing.v_sync_width = mode->VSyncEnd - mode->VSyncStart;
-+ pchDescBlock[0] = (timing.clock / 10000) & 0xff;
-+ pchDescBlock[1] = (timing.clock / 10000) >> 8;
-+ pchDescBlock[2] = timing.h_active & 0xff;
-+ pchDescBlock[3] = timing.h_blanking & 0xff;
-+ pchDescBlock[4] = (timing.h_active >> 4) & 0xf0;
-+ pchDescBlock[4] |= (timing.h_blanking >> 8) & 0xf;
-+ pchDescBlock[5] = timing.v_active & 0xff;
-+ pchDescBlock[6] = timing.v_blanking & 0xff;
-+ pchDescBlock[7] = (timing.v_active >> 4) & 0xf0;
-+ pchDescBlock[7] |= (timing.v_blanking >> 8) & 0xf;
-+ pchDescBlock[8] = timing.h_sync_off & 0xff;
-+ pchDescBlock[9] = timing.h_sync_width & 0xff;
-+ pchDescBlock[10] = (timing.v_sync_off << 4) & 0xf0;
-+ pchDescBlock[10] |= timing.v_sync_width & 0xf;
-+ pchDescBlock[11] = (timing.h_sync_off >> 2) & 0xC0;
-+ pchDescBlock[11] |= (timing.h_sync_width >> 4) & 0x30;
-+ pchDescBlock[11] |= (timing.v_sync_off >> 2) & 0xC;
-+ pchDescBlock[11] |= (timing.v_sync_width >> 4) & 0x3;
-+ pchDescBlock[12] = pchDescBlock[13] = pchDescBlock[14]
-+ = pchDescBlock[15] = pchDescBlock[16]
-+ = pchDescBlock[17] = 0;
-+}
-+
-+
-+static void setEDIDChecksum(unsigned char *pch)
-+{
-+ unsigned i, sum = 0;
-+ for (i = 0; i < EDID_SIZE - 1; ++i)
-+ sum += pch[i];
-+ pch[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF;
-+}
-+
-+
-+/**
-+ * Construct an EDID for an output given a preferred mode. The main reason for
-+ * doing this is to confound gnome-settings-deamon which tries to reset the
-+ * last mode configuration if the same monitors are plugged in again, which is
-+ * a reasonable thing to do but not what we want in a VM. We evily store
-+ * the (empty) raw EDID data at the end of the structure so that it gets
-+ * freed automatically along with the structure.
-+ */
-+Bool VBOXEDIDSet(xf86OutputPtr output, DisplayModePtr pmode)
-+{
-+ int i, j;
-+ unsigned char *pch, *pchEDID;
-+ xf86MonPtr pEDIDMon;
-+
-+ pch = calloc(1, sizeof(xf86Monitor) + EDID_SIZE);
-+ if (!pch)
-+ {
-+ xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
-+ "Can't allocate memory for EDID structure.\n");
-+ return FALSE;
-+ }
-+ pchEDID = pch + sizeof(xf86Monitor);
-+ memcpy(pchEDID, g_acszEDIDBase, EDID_SIZE);
-+ pchEDID[12] = pmode->HDisplay & 0xff;
-+ pchEDID[13] = pmode->HDisplay >> 8;
-+ pchEDID[14] = pmode->VDisplay & 0xff;
-+ pchEDID[15] = pmode->VDisplay >> 8;
-+ fillDescBlockTimings(pchEDID + 54, pmode);
-+ setEDIDChecksum(pchEDID);
-+ pEDIDMon = xf86InterpretEDID(output->scrn->scrnIndex, pchEDID);
-+ if (!pEDIDMon)
-+ {
-+ free(pch);
-+ return FALSE;
-+ }
-+ memcpy(pch, pEDIDMon, sizeof(xf86Monitor));
-+ free(pEDIDMon);
-+ pEDIDMon = (xf86MonPtr)pch;
-+ xf86OutputSetEDID(output, pEDIDMon);
-+ return TRUE;
-+}
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/vboxvideo/getmode.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/getmode.c
-@@ -180,10 +180,6 @@ static void compareAndMaybeSetUseHardwar
- pVBox->fUseHardwareCursor = useHardwareCursor(fCursorCapabilities);
- }
-
--#define SIZE_HINTS_PROPERTY "VBOX_SIZE_HINTS"
--#define SIZE_HINTS_MISMATCH_PROPERTY "VBOX_SIZE_HINTS_MISMATCH"
--#define MOUSE_CAPABILITIES_PROPERTY "VBOX_MOUSE_CAPABILITIES"
--
- #define COMPARE_AND_MAYBE_SET(pDest, src, pfChanged, fSet) \
- do { \
- if (*(pDest) != (src)) \
-@@ -195,68 +191,6 @@ do { \
- } while(0)
-
- /** Read in information about the most recent size hints and cursor
-- * capabilities requested for the guest screens from a root window property set
-- * by an X11 client. Information obtained via HGSMI takes priority. */
--void vbvxReadSizesAndCursorIntegrationFromProperties(ScrnInfoPtr pScrn, bool *pfNeedUpdate)
--{
-- VBOXPtr pVBox = VBOXGetRec(pScrn);
-- size_t cPropertyElements, cDummy;
-- int32_t *paModeHints, *pfCursorCapabilities;
-- unsigned i;
-- bool fChanged;
-- bool fNeedUpdate = false;
-- int32_t fSizeMismatch = false;
--
-- if (vbvxGetIntegerPropery(pScrn, SIZE_HINTS_PROPERTY, &cPropertyElements, &paModeHints) != VINF_SUCCESS)
-- paModeHints = NULL;
-- if (paModeHints != NULL)
-- for (i = 0; i < cPropertyElements / 2 && i < pVBox->cScreens; ++i)
-- {
-- VBVAMODEHINT *pVBVAModeHint = &pVBox->paVBVAModeHints[i];
-- int32_t iSizeHint = paModeHints[i * 2];
-- int32_t iLocation = paModeHints[i * 2 + 1];
-- bool fNoHGSMI = !pVBox->fHaveHGSMIModeHints || pVBVAModeHint->magic != VBVAMODEHINT_MAGIC;
--
-- fChanged = false;
-- if (iSizeHint != 0)
-- {
-- if (iSizeHint == -1)
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].afConnected, false, &fChanged, fNoHGSMI);
-- else
-- {
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].aPreferredSize.cx, (iSizeHint >> 16) & 0x8fff, &fChanged, fNoHGSMI);
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].aPreferredSize.cy, iSizeHint & 0x8fff, &fChanged, fNoHGSMI);
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].afConnected, true, &fChanged, fNoHGSMI);
-- }
-- if (iLocation == -1)
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].afHaveLocation, false, &fChanged, fNoHGSMI);
-- else
-- {
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].aPreferredLocation.x, (iLocation >> 16) & 0x8fff, &fChanged,
-- fNoHGSMI);
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].aPreferredLocation.y, iLocation & 0x8fff, &fChanged, fNoHGSMI);
-- COMPARE_AND_MAYBE_SET(&pVBox->pScreens[i].afHaveLocation, true, &fChanged, fNoHGSMI);
-- }
-- if (fChanged && fNoHGSMI)
-- fNeedUpdate = true;
-- if (fChanged && !fNoHGSMI)
-- fSizeMismatch = true;
-- }
-- }
-- fChanged = false;
-- if ( vbvxGetIntegerPropery(pScrn, MOUSE_CAPABILITIES_PROPERTY, &cDummy, &pfCursorCapabilities) == VINF_SUCCESS
-- && cDummy == 1)
-- compareAndMaybeSetUseHardwareCursor(pVBox, *pfCursorCapabilities, &fChanged, !pVBox->fHaveHGSMIModeHints);
-- if (fChanged && !pVBox->fHaveHGSMIModeHints)
-- fNeedUpdate = true;
-- if (fChanged && pVBox->fHaveHGSMIModeHints)
-- fSizeMismatch = true;
-- vbvxSetIntegerPropery(pScrn, SIZE_HINTS_MISMATCH_PROPERTY, 1, &fSizeMismatch, false);
-- if (pfNeedUpdate != NULL && fNeedUpdate)
-- *pfNeedUpdate = true;
--}
--
--/** Read in information about the most recent size hints and cursor
- * capabilities requested for the guest screens from HGSMI. */
- void vbvxReadSizesAndCursorIntegrationFromHGSMI(ScrnInfoPtr pScrn, bool *pfNeedUpdate)
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
-@@ -78,10 +78,6 @@
- #include "shadowfb.h"
- /* VGA hardware functions for setting and restoring text mode */
- #include "vgaHW.h"
--#ifdef VBOX_DRI
--# include "xf86drm.h"
--# include "xf86drmMode.h"
--#endif
- #ifdef VBOXVIDEO_13
- /* X.org 1.3+ mode setting */
- # define _HAVE_STRING_ARCH_strsep /* bits/string2.h, __strsep_1c. */
-@@ -97,6 +93,11 @@
- #ifdef XORG_7X
- # include <stdlib.h>
- # include <string.h>
-+# include <sys/stat.h>
-+# define xf86stat stat
-+# define xf86stat_s stat
-+#else
-+# include <xf86_ansic.h>
- #endif
-
- /* Mandatory functions */
-@@ -285,10 +286,6 @@ static Bool adjustScreenPixmap(ScrnInfoP
- }
- pScrn->displayWidth = pScrn->virtualX = adjustedWidth;
- pScrn->virtualY = height;
--#ifdef VBOX_DRI_OLD
-- if (pVBox->useDRI)
-- VBOXDRIUpdateStride(pScrn, pVBox);
--#endif
- return TRUE;
- }
-
-@@ -556,12 +553,13 @@ vbox_output_get_modes (xf86OutputPtr out
- {
- unsigned cIndex = 0;
- DisplayModePtr pModes = NULL;
-+ DisplayModePtr pPreferred = NULL;
- ScrnInfoPtr pScrn = output->scrn;
- VBOXPtr pVBox = VBOXGetRec(pScrn);
-
- TRACE_ENTRY();
- uint32_t iScreen = (uintptr_t)output->driver_private;
-- vbox_output_add_mode(pVBox, &pModes, NULL,
-+ pPreferred = vbox_output_add_mode(pVBox, &pModes, NULL,
- RT_CLAMP(pVBox->pScreens[iScreen].aPreferredSize.cx, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL),
- RT_CLAMP(pVBox->pScreens[iScreen].aPreferredSize.cy, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL),
- TRUE, FALSE);
-@@ -577,6 +575,7 @@ vbox_output_get_modes (xf86OutputPtr out
- vbox_output_add_mode(pVBox, &pModes, NULL, 1024, 768, FALSE, FALSE);
- vbox_output_add_mode(pVBox, &pModes, NULL, 800, 600, FALSE, FALSE);
- vbox_output_add_mode(pVBox, &pModes, NULL, 640, 480, FALSE, FALSE);
-+ VBOXEDIDSet(output, pPreferred);
- TRACE_EXIT();
- return pModes;
- }
-@@ -728,8 +727,15 @@ VBOXPciProbe(DriverPtr drv, int entity_n
- intptr_t match_data)
- {
- ScrnInfoPtr pScrn;
-+ struct xf86stat_s sstat;
-
- TRACE_ENTRY();
-+
-+ if (xf86stat("/dev/dri/card0", &sstat) == 0)
-+ {
-+ xf86Msg(X_INFO, "vboxvideo: kernel driver found, not loading.\n");
-+ return FALSE;
-+ }
- pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, VBOXPCIchipsets,
- NULL, NULL, NULL, NULL, NULL);
- if (pScrn != NULL) {
-@@ -839,15 +845,6 @@ VBOXPreInit(ScrnInfoPtr pScrn, int flags
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VirtualBox guest additions video driver version " VBOX_VERSION_STRING "r%d\n",
- VBOX_SVN_REV);
-
-- /* Get our private data from the ScrnInfoRec structure. */
-- VBOXSetRec(pScrn);
-- pVBox = VBOXGetRec(pScrn);
-- if (!pVBox)
-- return FALSE;
--
-- /* Entity information seems to mean bus information. */
-- pVBox->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
--
- /* The ramdac module is needed for the hardware cursor. */
- if (!xf86LoadSubModule(pScrn, "ramdac"))
- return FALSE;
-@@ -862,17 +859,14 @@ VBOXPreInit(ScrnInfoPtr pScrn, int flags
- if (!xf86LoadSubModule(pScrn, "vgahw"))
- return FALSE;
-
--#ifdef VBOX_DRI_OLD
-- /* Load the dri module. */
-- if (!xf86LoadSubModule(pScrn, "dri"))
-- return FALSE;
--#else
--# ifdef VBOX_DRI
-- /* Load the dri module. */
-- if (!xf86LoadSubModule(pScrn, "dri2"))
-+ /* Get our private data from the ScrnInfoRec structure. */
-+ VBOXSetRec(pScrn);
-+ pVBox = VBOXGetRec(pScrn);
-+ if (!pVBox)
- return FALSE;
--# endif
--#endif
-+
-+ /* Entity information seems to mean bus information. */
-+ pVBox->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
-
- #ifndef PCIACCESS
- if (pVBox->pEnt->location.type != BUS_PCI)
-@@ -946,7 +940,6 @@ VBOXPreInit(ScrnInfoPtr pScrn, int flags
-
- #endif /* !VBOXVIDEO_13 */
-
-- /* Needed before we initialise DRI. */
- pScrn->displayWidth = pScrn->virtualX;
-
- xf86PrintModes(pScrn);
-@@ -1006,127 +999,30 @@ static void updateGraphicsCapability(Scr
- int32_t *paData;
- int rc;
-
-- if (pVBox->fHaveHGSMIModeHints)
-+ if (!pVBox->fHaveHGSMIModeHints)
- return;
-- rc = vbvxGetIntegerPropery(pScrn, "VBOX_HAS_GRAPHICS", &cData, &paData);
-- if (rc != VINF_SUCCESS || cData != 1)
-- return;
-- if (RT_BOOL(*paData) != hasVT)
-- {
-- uint32_t fFeatures;
-- VbglR3SetGuestCaps(hasVT ? VMMDEV_GUEST_SUPPORTS_GRAPHICS : 0, hasVT ? 0 : VMMDEV_GUEST_SUPPORTS_GRAPHICS);
-- rc = VbglR3GetMouseStatus(&fFeatures, NULL, NULL);
-- fFeatures &= VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE | VMMDEV_MOUSE_NEW_PROTOCOL;
-- if (RT_SUCCESS(rc))
-- VbglR3SetMouseStatus(hasVT ? fFeatures : fFeatures | VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR);
-- }
-- *paData = hasVT;
-+ VBoxHGSMISendCapsInfo(&pVBox->guestCtx, hasVT
-+ ? VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION
-+ : VBVACAPS_DISABLE_CURSOR_INTEGRATION);
- }
-
--#ifdef VBOXVIDEO_13
--
--static void setVirtualSizeRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime)
--{
-- VBOXPtr pVBox = VBOXGetRec(pScrn);
-- unsigned i;
-- unsigned cx = 0;
-- unsigned cy = 0;
--
-- for (i = 0; i < pVBox->cScreens; ++i)
-- {
-- if ( pVBox->fHaveHGSMIModeHints && pVBox->pScreens[i].afHaveLocation)
-- {
-- pVBox->pScreens[i].paCrtcs->x = pVBox->pScreens[i].aPreferredLocation.x;
-- pVBox->pScreens[i].paCrtcs->y = pVBox->pScreens[i].aPreferredLocation.y;
-- }
-- if ( pVBox->pScreens[i].paOutputs->status == XF86OutputStatusConnected
-- && pVBox->pScreens[i].paCrtcs->x + pVBox->pScreens[i].aPreferredSize.cx < VBOX_VIDEO_MAX_VIRTUAL
-- && pVBox->pScreens[i].paCrtcs->y + pVBox->pScreens[i].aPreferredSize.cy < VBOX_VIDEO_MAX_VIRTUAL)
-- {
-- cx = max(cx, pVBox->pScreens[i].paCrtcs->x + pVBox->pScreens[i].aPreferredSize.cx);
-- cy = max(cy, pVBox->pScreens[i].paCrtcs->y + pVBox->pScreens[i].aPreferredSize.cy);
-- }
-- }
-- if (cx != 0 && cy != 0)
-- {
-- /* Do not set the virtual resolution in limited context as that can
-- * cause problems setting up RandR 1.2 which needs it set to the
-- * maximum size at this point. */
-- if (!fScreenInitTime)
-- {
-- TRACE_LOG("cx=%u, cy=%u\n", cx, cy);
-- xf86ScrnToScreen(pScrn)->width = cx;
-- xf86ScrnToScreen(pScrn)->height = cy;
-- xf86ScrnToScreen(pScrn)->mmWidth = cx * 254 / 960;
-- xf86ScrnToScreen(pScrn)->mmHeight = cy * 254 / 960;
-- adjustScreenPixmap(pScrn, cx, cy);
-- vbvxSetSolarisMouseRange(cx, cy);
-- }
-- }
--}
--
--static void setScreenSizesRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime)
--{
-- VBOXPtr pVBox = VBOXGetRec(pScrn);
-- unsigned i;
--
-- for (i = 0; i < pVBox->cScreens; ++i)
-- {
-- if (!pVBox->pScreens[i].afConnected)
-- continue;
-- /* The Crtc can get "unset" if the screen was disconnected previously.
-- * I couldn't find an API to re-set it which did not have side-effects.
-- */
-- pVBox->pScreens[i].paOutputs->crtc = pVBox->pScreens[i].paCrtcs;
-- xf86CrtcSetMode(pVBox->pScreens[i].paCrtcs, pVBox->pScreens[i].paOutputs->probed_modes, RR_Rotate_0,
-- pVBox->pScreens[i].paCrtcs->x, pVBox->pScreens[i].paCrtcs->y);
-- if (!fScreenInitTime)
-- RRCrtcNotify(pVBox->pScreens[i].paCrtcs->randr_crtc, pVBox->pScreens[i].paOutputs->randr_output->modes[0],
-- pVBox->pScreens[i].paCrtcs->x, pVBox->pScreens[i].paCrtcs->y, RR_Rotate_0,
--#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5
-- NULL,
--#endif
-- 1, &pVBox->pScreens[i].paOutputs->randr_output);
-- }
--}
--
--static void setSizesRandR12(ScrnInfoPtr pScrn, bool fScreenInitTime)
--{
-- VBOXPtr pVBox = VBOXGetRec(pScrn);
--
-- if (!fScreenInitTime)
-- {
--# if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5
-- RRGetInfo(xf86ScrnToScreen(pScrn), TRUE);
--# else
-- RRGetInfo(xf86ScrnToScreen(pScrn));
--# endif
-- }
-- setVirtualSizeRandR12(pScrn, fScreenInitTime);
-- setScreenSizesRandR12(pScrn, fScreenInitTime);
-- if (!fScreenInitTime)
-- {
-- /* We use RRScreenSizeSet() here and not RRScreenSizeNotify() because
-- * the first also pushes the virtual screen size to the input driver.
-- * We were doing this manually by setting screenInfo.width and height
-- * and calling xf86UpdateDesktopDimensions() where appropriate, but this
-- * failed on Ubuntu 12.04.0 due to a problematic X server back-port. */
-- RRScreenSizeSet(xf86ScrnToScreen(pScrn), xf86ScrnToScreen(pScrn)->width, xf86ScrnToScreen(pScrn)->height,
-- xf86ScrnToScreen(pScrn)->mmWidth, xf86ScrnToScreen(pScrn)->mmHeight);
-- RRTellChanged(xf86ScrnToScreen(pScrn));
-- }
--}
-+#ifndef VBOXVIDEO_13
-
--#else
-+#define PREFERRED_MODE_ATOM_NAME "VBOXVIDEO_PREFERRED_MODE"
-
- static void setSizesRandR11(ScrnInfoPtr pScrn)
- {
- VBOXPtr pVBox = VBOXGetRec(pScrn);
- DisplayModePtr pNewMode;
-+ int32_t propertyValue;
-
- pNewMode = pScrn->modes != pScrn->currentMode ? pScrn->modes : pScrn->modes->next;
- pNewMode->HDisplay = RT_CLAMP(pVBox->pScreens[0].aPreferredSize.cx, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL);
- pNewMode->VDisplay = RT_CLAMP(pVBox->pScreens[0].aPreferredSize.cy, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL);
-+ propertyValue = (pNewMode->HDisplay << 16) + pNewMode->VDisplay;
-+ ChangeWindowProperty(ROOT_WINDOW(pScrn), MakeAtom(PREFERRED_MODE_ATOM_NAME,
-+ sizeof(PREFERRED_MODE_ATOM_NAME) - 1, TRUE), XA_INTEGER, 32,
-+ PropModeReplace, 1, &propertyValue, TRUE);
- }
-
- #endif
-@@ -1137,7 +1033,11 @@ static void setSizesAndCursorIntegration
-
- TRACE_LOG("fScreenInitTime=%d\n", (int)fScreenInitTime);
- #ifdef VBOXVIDEO_13
-- setSizesRandR12(pScrn, fScreenInitTime);
-+# if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5
-+ RRGetInfo(xf86ScrnToScreen(pScrn), TRUE);
-+# else
-+ RRGetInfo(xf86ScrnToScreen(pScrn));
-+# endif
- #else
- setSizesRandR11(pScrn);
- #endif
-@@ -1158,14 +1058,8 @@ static void vboxBlockHandler(pointer pDa
-
- (void)pTimeout;
- (void)pReadmask;
-- updateGraphicsCapability(pScrn, pScrn->vtSema);
- if (pScrn->vtSema)
- vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, &fNeedUpdate);
-- /* This has to be done even when we are switched out so that VBoxClient can
-- * set a mode using RandR without having to know the virtual terminal state.
-- */
-- if (ROOT_WINDOW(pScrn) != NULL)
-- vbvxReadSizesAndCursorIntegrationFromProperties(pScrn, &fNeedUpdate);
- if (fNeedUpdate)
- setSizesAndCursorIntegration(pScrn, false);
- }
-@@ -1208,15 +1102,6 @@ static Bool VBOXScreenInit(ScreenPtr pSc
- if (!miSetPixmapDepths())
- return (FALSE);
-
--#ifdef VBOX_DRI
-- pVBox->useDRI = VBOXDRIScreenInit(pScrn, pScreen, pVBox);
--# ifndef VBOX_DRI_OLD /* DRI2 */
-- if (pVBox->drmFD >= 0)
-- /* Tell the kernel driver, if present, that we are taking over. */
-- drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_DISABLE_HGSMI, NULL);
--# endif
--#endif
--
- if (!fbScreenInit(pScreen, pVBox->base,
- pScrn->virtualX, pScrn->virtualY,
- pScrn->xDpi, pScrn->yDpi,
-@@ -1263,10 +1148,6 @@ static Bool VBOXScreenInit(ScreenPtr pSc
- if (ShadowFBInit2(pScreen, NULL, vbvxHandleDirtyRect) != TRUE)
- return FALSE;
- VBoxInitialiseSizeHints(pScrn);
-- /* Get any screen size hints from HGSMI. Do not yet try to access X11
-- * properties, as they are not yet set up, and nor are the clients that
-- * might have set them. */
-- vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, NULL);
-
- #ifdef VBOXVIDEO_13
- /* Initialise CRTC and output configuration for use with randr1.2. */
-@@ -1323,12 +1204,17 @@ static Bool VBOXScreenInit(ScreenPtr pSc
- }
-
- /* set first video mode */
-- setSizesAndCursorIntegration(pScrn, true);
-+ if (!xf86SetDesiredModes(pScrn)) {
-+ return FALSE;
-+ }
- #else
- /* set first video mode */
- setModeRandR11(pScrn, pScrn->currentMode, true, false, 0, 0);
- #endif
-
-+ /* Say that we support graphics. */
-+ updateGraphicsCapability(pScrn, TRUE);
-+
- /* Register block and wake-up handlers for getting new screen size hints. */
- RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
-
-@@ -1366,11 +1252,6 @@ static Bool VBOXScreenInit(ScreenPtr pSc
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Unable to start the VirtualBox mouse pointer integration with the host system.\n");
-
--#ifdef VBOX_DRI_OLD
-- if (pVBox->useDRI)
-- pVBox->useDRI = VBOXDRIFinishScreenInit(pScreen);
--#endif
--
- return (TRUE);
- }
-
-@@ -1388,27 +1269,18 @@ static Bool VBOXEnterVT(ScrnInfoPtr pScr
- #endif
-
- TRACE_ENTRY();
-- updateGraphicsCapability(pScrn, TRUE);
--#ifdef VBOX_DRI_OLD
-- if (pVBox->useDRI)
-- DRIUnlock(xf86ScrnToScreen(pScrn));
--#elif defined(VBOX_DRI) /* DRI2 */
-- if (pVBox->drmFD >= 0)
-- {
-- /* Tell the kernel driver, if present, that we are taking over. */
-- drmSetMaster(pVBox->drmFD);
-- }
--#endif
- vbvxSetUpHGSMIHeapInGuest(pVBox, pScrn->videoRam * 1024);
- vboxEnableVbva(pScrn);
- /* Re-set video mode */
- #ifdef VBOXVIDEO_13
-- vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, NULL);
-- setSizesAndCursorIntegration(pScrn, false);
-+ if (!xf86SetDesiredModes(pScrn)) {
-+ return FALSE;
-+ }
- #else
- setModeRandR11(pScrn, pScrn->currentMode, false, true, cXOverRide, cYOverRide);
- DeleteProperty(ROOT_WINDOW(pScrn), MakeAtom(NO_VT_ATOM_NAME, sizeof(NO_VT_ATOM_NAME) - 1, TRUE));
- #endif
-+ updateGraphicsCapability(pScrn, TRUE);
- return TRUE;
- }
-
-@@ -1422,7 +1294,6 @@ static void VBOXLeaveVT(ScrnInfoPtr pScr
- #endif
-
- TRACE_ENTRY();
-- updateGraphicsCapability(pScrn, FALSE);
- #ifdef VBOXVIDEO_13
- for (i = 0; i < pVBox->cScreens; ++i)
- vbox_crtc_dpms(pVBox->pScreens[i].paCrtcs, DPMSModeOff);
-@@ -1430,15 +1301,9 @@ static void VBOXLeaveVT(ScrnInfoPtr pScr
- ChangeWindowProperty(ROOT_WINDOW(pScrn), MakeAtom(NO_VT_ATOM_NAME, sizeof(NO_VT_ATOM_NAME) - 1, FALSE), XA_INTEGER, 32,
- PropModeReplace, 1, &propertyValue, TRUE);
- #endif
-+ updateGraphicsCapability(pScrn, FALSE);
- vboxDisableVbva(pScrn);
- vbvxClearVRAM(pScrn, ((size_t)pScrn->virtualX) * pScrn->virtualY * (pScrn->bitsPerPixel / 8), 0);
--#ifdef VBOX_DRI_OLD
-- if (pVBox->useDRI)
-- DRILock(xf86ScrnToScreen(pScrn), 0);
--#elif defined(VBOX_DRI) /* DRI2 */
-- if (pVBox->drmFD >= 0)
-- drmDropMaster(pVBox->drmFD);
--#endif
- VBOXRestoreMode(pScrn);
- TRACE_EXIT();
- }
-@@ -1447,9 +1312,6 @@ static Bool VBOXCloseScreen(ScreenPtr pS
- {
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- VBOXPtr pVBox = VBOXGetRec(pScrn);
--#if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD) /* DRI2 */
-- BOOL fRestore = TRUE;
--#endif
- BOOL ret;
-
- if (pScrn->vtSema)
-@@ -1463,22 +1325,8 @@ static Bool VBOXCloseScreen(ScreenPtr pS
- vboxDisableVbva(pScrn);
- vbvxClearVRAM(pScrn, ((size_t)pScrn->virtualX) * pScrn->virtualY * (pScrn->bitsPerPixel / 8), 0);
- }
--#ifdef VBOX_DRI
--# ifndef VBOX_DRI_OLD /* DRI2 */
-- if ( pVBox->drmFD >= 0
-- /* Tell the kernel driver, if present, that we are going away. */
-- && drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) >= 0)
-- fRestore = false;
--# endif
-- if (pVBox->useDRI)
-- VBOXDRICloseScreen(pScreen, pVBox);
-- pVBox->useDRI = false;
--#endif
--#if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD) /* DRI2 */
-- if (fRestore)
--#endif
-- if (pScrn->vtSema)
-- VBOXRestoreMode(pScrn);
-+ if (pScrn->vtSema)
-+ VBOXRestoreMode(pScrn);
- if (pScrn->vtSema)
- VBOXUnmapVidMem(pScrn);
- pScrn->vtSema = FALSE;
-@@ -1601,21 +1449,8 @@ VBOXRestoreMode(ScrnInfoPtr pScrn)
- {
- VBOXPtr pVBox = VBOXGetRec(pScrn);
- vgaRegPtr vgaReg;
--#ifdef VBOX_DRI
-- drmModeResPtr pRes;
--#endif
-
- TRACE_ENTRY();
--#ifdef VBOX_DRI
-- /* Do not try to re-set the VGA state if a mode-setting driver is loaded. */
-- if ( pVBox->drmFD >= 0
-- && LoaderSymbol("drmModeGetResources") != NULL
-- && (pRes = drmModeGetResources(pVBox->drmFD)) != NULL)
-- {
-- drmModeFreeResources(pRes);
-- return;
-- }
--#endif
- vgaReg = &VGAHWPTR(pScrn)->SavedReg;
- vgaHWRestore(pScrn, vgaReg, VGA_SR_ALL);
- if (pVBox->fSavedVBEMode)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
-@@ -111,28 +111,8 @@ if (!(expr)) \
- #define VBOX_NAME "VBoxVideo"
- #define VBOX_DRIVER_NAME "vboxvideo"
-
--#ifdef VBOX_DRI_OLD
--/* DRI support */
--#define _XF86DRI_SERVER_
--/* Hack to work around a libdrm header which is broken on Solaris */
--#define u_int64_t uint64_t
--/* Get rid of a warning due to a broken header file */
--enum drm_bo_type { DRM_BO_TYPE };
--#include "dri.h"
--#undef u_int64_t
--#include "sarea.h"
--#include "GL/glxint.h"
--
--/* For some reason this is not in the header files. */
--extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
-- void **configprivs);
--#endif
--
- #define VBOX_VIDEO_MAJOR VBOX_VERSION_MAJOR
- #define VBOX_VIDEO_MINOR VBOX_VERSION_MINOR
--#define VBOX_DRM_DRIVER_NAME "vboxvideo" /* For now, as this driver is basically a stub. */
--#define VBOX_DRI_DRIVER_NAME "vboxvideo" /* For starters. */
--#define VBOX_MAX_DRAWABLES 256 /* At random. */
-
- #define VBOX_VIDEO_MIN_SIZE 64
- #define VBOX_VIDEO_MAX_VIRTUAL (INT16_MAX - 1)
-@@ -225,15 +205,6 @@ typedef struct VBOXRec
- HGSMIGUESTCOMMANDCONTEXT guestCtx;
- /** Unrestricted horizontal resolution flag. */
- Bool fAnyX;
--#ifdef VBOX_DRI
-- Bool useDRI;
--#ifdef VBOX_DRI_OLD
-- int cVisualConfigs;
-- __GLXvisualConfig *pVisualConfigs;
-- DRIInfoRec *pDRIInfo;
--# endif
-- int drmFD;
--#endif
- } VBOXRec, *VBOXPtr;
-
- /* helpers.c */
-@@ -286,12 +257,10 @@ extern void vbvxReadSizesAndCursorIntegr
- extern void vbvxSetUpLinuxACPI(ScreenPtr pScreen);
- extern void vbvxCleanUpLinuxACPI(ScreenPtr pScreen);
-
--/* DRI stuff */
--extern Bool VBOXDRIScreenInit(ScrnInfoPtr pScrn, ScreenPtr pScreen,
-- VBOXPtr pVBox);
--extern Bool VBOXDRIFinishScreenInit(ScreenPtr pScreen);
--extern void VBOXDRIUpdateStride(ScrnInfoPtr pScrn, VBOXPtr pVBox);
--extern void VBOXDRICloseScreen(ScreenPtr pScreen, VBOXPtr pVBox);
-+/* EDID generation */
-+#ifdef VBOXVIDEO_13
-+extern Bool VBOXEDIDSet(struct _xf86Output *output, DisplayModePtr pmode);
-+#endif
-
- #endif /* _VBOXVIDEO_H_ */
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Additions/x11/vboxvideo/vbva.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/vboxvideo/vbva.c
-@@ -219,11 +219,8 @@ vboxEnableVbva(ScrnInfoPtr pScrn)
- rc = FALSE;
- }
- VBVXASSERT(rc, ("Failed to enable screen update reporting for at least one virtual monitor.\n"));
--#ifdef VBOXVIDEO_13
-- VBoxHGSMISendCapsInfo(&pVBox->guestCtx, VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION);
- pVBox->fHaveHGSMIModeHints = haveHGSMIModeHintAndCursorReportingInterface(pVBox);
- pVBox->fHostHasScreenBlankingFlag = hostHasScreenBlankingFlag(pVBox);
--#endif
- return rc;
- }
-
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/EGL/egl.h
-@@ -0,0 +1,303 @@
-+#ifndef __egl_h_
-+#define __egl_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: 31039 $ on $Date: 2015-05-04 17:01:57 -0700 (Mon, 04 May 2015) $
-+*/
-+
-+#include <EGL/eglplatform.h>
-+
-+/* Generated on date 20150504 */
-+
-+/* Generated C header for:
-+ * API: egl
-+ * Versions considered: .*
-+ * Versions emitted: .*
-+ * Default extensions included: None
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef EGL_VERSION_1_0
-+#define EGL_VERSION_1_0 1
-+typedef unsigned int EGLBoolean;
-+typedef void *EGLDisplay;
-+#include <KHR/khrplatform.h>
-+#include <EGL/eglplatform.h>
-+typedef void *EGLConfig;
-+typedef void *EGLSurface;
-+typedef void *EGLContext;
-+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
-+#define EGL_ALPHA_SIZE 0x3021
-+#define EGL_BAD_ACCESS 0x3002
-+#define EGL_BAD_ALLOC 0x3003
-+#define EGL_BAD_ATTRIBUTE 0x3004
-+#define EGL_BAD_CONFIG 0x3005
-+#define EGL_BAD_CONTEXT 0x3006
-+#define EGL_BAD_CURRENT_SURFACE 0x3007
-+#define EGL_BAD_DISPLAY 0x3008
-+#define EGL_BAD_MATCH 0x3009
-+#define EGL_BAD_NATIVE_PIXMAP 0x300A
-+#define EGL_BAD_NATIVE_WINDOW 0x300B
-+#define EGL_BAD_PARAMETER 0x300C
-+#define EGL_BAD_SURFACE 0x300D
-+#define EGL_BLUE_SIZE 0x3022
-+#define EGL_BUFFER_SIZE 0x3020
-+#define EGL_CONFIG_CAVEAT 0x3027
-+#define EGL_CONFIG_ID 0x3028
-+#define EGL_CORE_NATIVE_ENGINE 0x305B
-+#define EGL_DEPTH_SIZE 0x3025
-+#define EGL_DONT_CARE ((EGLint)-1)
-+#define EGL_DRAW 0x3059
-+#define EGL_EXTENSIONS 0x3055
-+#define EGL_FALSE 0
-+#define EGL_GREEN_SIZE 0x3023
-+#define EGL_HEIGHT 0x3056
-+#define EGL_LARGEST_PBUFFER 0x3058
-+#define EGL_LEVEL 0x3029
-+#define EGL_MAX_PBUFFER_HEIGHT 0x302A
-+#define EGL_MAX_PBUFFER_PIXELS 0x302B
-+#define EGL_MAX_PBUFFER_WIDTH 0x302C
-+#define EGL_NATIVE_RENDERABLE 0x302D
-+#define EGL_NATIVE_VISUAL_ID 0x302E
-+#define EGL_NATIVE_VISUAL_TYPE 0x302F
-+#define EGL_NONE 0x3038
-+#define EGL_NON_CONFORMANT_CONFIG 0x3051
-+#define EGL_NOT_INITIALIZED 0x3001
-+#define EGL_NO_CONTEXT ((EGLContext)0)
-+#define EGL_NO_DISPLAY ((EGLDisplay)0)
-+#define EGL_NO_SURFACE ((EGLSurface)0)
-+#define EGL_PBUFFER_BIT 0x0001
-+#define EGL_PIXMAP_BIT 0x0002
-+#define EGL_READ 0x305A
-+#define EGL_RED_SIZE 0x3024
-+#define EGL_SAMPLES 0x3031
-+#define EGL_SAMPLE_BUFFERS 0x3032
-+#define EGL_SLOW_CONFIG 0x3050
-+#define EGL_STENCIL_SIZE 0x3026
-+#define EGL_SUCCESS 0x3000
-+#define EGL_SURFACE_TYPE 0x3033
-+#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
-+#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
-+#define EGL_TRANSPARENT_RED_VALUE 0x3037
-+#define EGL_TRANSPARENT_RGB 0x3052
-+#define EGL_TRANSPARENT_TYPE 0x3034
-+#define EGL_TRUE 1
-+#define EGL_VENDOR 0x3053
-+#define EGL_VERSION 0x3054
-+#define EGL_WIDTH 0x3057
-+#define EGL_WINDOW_BIT 0x0004
-+EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-+EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
-+EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-+EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
-+EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
-+EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
-+EGLAPI EGLint EGLAPIENTRY eglGetError (void);
-+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
-+EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
-+EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-+EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
-+EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
-+EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
-+EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
-+#endif /* EGL_VERSION_1_0 */
-+
-+#ifndef EGL_VERSION_1_1
-+#define EGL_VERSION_1_1 1
-+#define EGL_BACK_BUFFER 0x3084
-+#define EGL_BIND_TO_TEXTURE_RGB 0x3039
-+#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
-+#define EGL_CONTEXT_LOST 0x300E
-+#define EGL_MIN_SWAP_INTERVAL 0x303B
-+#define EGL_MAX_SWAP_INTERVAL 0x303C
-+#define EGL_MIPMAP_TEXTURE 0x3082
-+#define EGL_MIPMAP_LEVEL 0x3083
-+#define EGL_NO_TEXTURE 0x305C
-+#define EGL_TEXTURE_2D 0x305F
-+#define EGL_TEXTURE_FORMAT 0x3080
-+#define EGL_TEXTURE_RGB 0x305D
-+#define EGL_TEXTURE_RGBA 0x305E
-+#define EGL_TEXTURE_TARGET 0x3081
-+EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-+EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
-+#endif /* EGL_VERSION_1_1 */
-+
-+#ifndef EGL_VERSION_1_2
-+#define EGL_VERSION_1_2 1
-+typedef unsigned int EGLenum;
-+typedef void *EGLClientBuffer;
-+#define EGL_ALPHA_FORMAT 0x3088
-+#define EGL_ALPHA_FORMAT_NONPRE 0x308B
-+#define EGL_ALPHA_FORMAT_PRE 0x308C
-+#define EGL_ALPHA_MASK_SIZE 0x303E
-+#define EGL_BUFFER_PRESERVED 0x3094
-+#define EGL_BUFFER_DESTROYED 0x3095
-+#define EGL_CLIENT_APIS 0x308D
-+#define EGL_COLORSPACE 0x3087
-+#define EGL_COLORSPACE_sRGB 0x3089
-+#define EGL_COLORSPACE_LINEAR 0x308A
-+#define EGL_COLOR_BUFFER_TYPE 0x303F
-+#define EGL_CONTEXT_CLIENT_TYPE 0x3097
-+#define EGL_DISPLAY_SCALING 10000
-+#define EGL_HORIZONTAL_RESOLUTION 0x3090
-+#define EGL_LUMINANCE_BUFFER 0x308F
-+#define EGL_LUMINANCE_SIZE 0x303D
-+#define EGL_OPENGL_ES_BIT 0x0001
-+#define EGL_OPENVG_BIT 0x0002
-+#define EGL_OPENGL_ES_API 0x30A0
-+#define EGL_OPENVG_API 0x30A1
-+#define EGL_OPENVG_IMAGE 0x3096
-+#define EGL_PIXEL_ASPECT_RATIO 0x3092
-+#define EGL_RENDERABLE_TYPE 0x3040
-+#define EGL_RENDER_BUFFER 0x3086
-+#define EGL_RGB_BUFFER 0x308E
-+#define EGL_SINGLE_BUFFER 0x3085
-+#define EGL_SWAP_BEHAVIOR 0x3093
-+#define EGL_UNKNOWN ((EGLint)-1)
-+#define EGL_VERTICAL_RESOLUTION 0x3091
-+EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
-+EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
-+EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
-+#endif /* EGL_VERSION_1_2 */
-+
-+#ifndef EGL_VERSION_1_3
-+#define EGL_VERSION_1_3 1
-+#define EGL_CONFORMANT 0x3042
-+#define EGL_CONTEXT_CLIENT_VERSION 0x3098
-+#define EGL_MATCH_NATIVE_PIXMAP 0x3041
-+#define EGL_OPENGL_ES2_BIT 0x0004
-+#define EGL_VG_ALPHA_FORMAT 0x3088
-+#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
-+#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
-+#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
-+#define EGL_VG_COLORSPACE 0x3087
-+#define EGL_VG_COLORSPACE_sRGB 0x3089
-+#define EGL_VG_COLORSPACE_LINEAR 0x308A
-+#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
-+#endif /* EGL_VERSION_1_3 */
-+
-+#ifndef EGL_VERSION_1_4
-+#define EGL_VERSION_1_4 1
-+#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
-+#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
-+#define EGL_MULTISAMPLE_RESOLVE 0x3099
-+#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
-+#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
-+#define EGL_OPENGL_API 0x30A2
-+#define EGL_OPENGL_BIT 0x0008
-+#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
-+EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
-+#endif /* EGL_VERSION_1_4 */
-+
-+#ifndef EGL_VERSION_1_5
-+#define EGL_VERSION_1_5 1
-+typedef void *EGLSync;
-+typedef intptr_t EGLAttrib;
-+typedef khronos_utime_nanoseconds_t EGLTime;
-+typedef void *EGLImage;
-+#define EGL_CONTEXT_MAJOR_VERSION 0x3098
-+#define EGL_CONTEXT_MINOR_VERSION 0x30FB
-+#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
-+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
-+#define EGL_NO_RESET_NOTIFICATION 0x31BE
-+#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
-+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
-+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
-+#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
-+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
-+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
-+#define EGL_OPENGL_ES3_BIT 0x00000040
-+#define EGL_CL_EVENT_HANDLE 0x309C
-+#define EGL_SYNC_CL_EVENT 0x30FE
-+#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
-+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
-+#define EGL_SYNC_TYPE 0x30F7
-+#define EGL_SYNC_STATUS 0x30F1
-+#define EGL_SYNC_CONDITION 0x30F8
-+#define EGL_SIGNALED 0x30F2
-+#define EGL_UNSIGNALED 0x30F3
-+#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
-+#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
-+#define EGL_TIMEOUT_EXPIRED 0x30F5
-+#define EGL_CONDITION_SATISFIED 0x30F6
-+#define EGL_NO_SYNC ((EGLSync)0)
-+#define EGL_SYNC_FENCE 0x30F9
-+#define EGL_GL_COLORSPACE 0x309D
-+#define EGL_GL_COLORSPACE_SRGB 0x3089
-+#define EGL_GL_COLORSPACE_LINEAR 0x308A
-+#define EGL_GL_RENDERBUFFER 0x30B9
-+#define EGL_GL_TEXTURE_2D 0x30B1
-+#define EGL_GL_TEXTURE_LEVEL 0x30BC
-+#define EGL_GL_TEXTURE_3D 0x30B2
-+#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
-+#define EGL_IMAGE_PRESERVED 0x30D2
-+#define EGL_NO_IMAGE ((EGLImage)0)
-+EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
-+EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
-+EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
-+EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
-+#endif /* EGL_VERSION_1_5 */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/EGL/eglext.h
-@@ -0,0 +1,889 @@
-+#ifndef __eglext_h_
-+#define __eglext_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 <EGL/eglplatform.h>
-+
-+#define EGL_EGLEXT_VERSION 20150508
-+
-+/* Generated C header for:
-+ * API: egl
-+ * Versions considered: .*
-+ * Versions emitted: _nomatch_^
-+ * Default extensions included: egl
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef EGL_KHR_cl_event
-+#define EGL_KHR_cl_event 1
-+#define EGL_CL_EVENT_HANDLE_KHR 0x309C
-+#define EGL_SYNC_CL_EVENT_KHR 0x30FE
-+#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF
-+#endif /* EGL_KHR_cl_event */
-+
-+#ifndef EGL_KHR_cl_event2
-+#define EGL_KHR_cl_event2 1
-+typedef void *EGLSyncKHR;
-+typedef intptr_t EGLAttribKHR;
-+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
-+#endif
-+#endif /* EGL_KHR_cl_event2 */
-+
-+#ifndef EGL_KHR_client_get_all_proc_addresses
-+#define EGL_KHR_client_get_all_proc_addresses 1
-+#endif /* EGL_KHR_client_get_all_proc_addresses */
-+
-+#ifndef EGL_KHR_config_attribs
-+#define EGL_KHR_config_attribs 1
-+#define EGL_CONFORMANT_KHR 0x3042
-+#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020
-+#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040
-+#endif /* EGL_KHR_config_attribs */
-+
-+#ifndef EGL_KHR_create_context
-+#define EGL_KHR_create_context 1
-+#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
-+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
-+#define EGL_CONTEXT_FLAGS_KHR 0x30FC
-+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
-+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
-+#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
-+#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
-+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
-+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
-+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
-+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
-+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
-+#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
-+#endif /* EGL_KHR_create_context */
-+
-+#ifndef EGL_KHR_create_context_no_error
-+#define EGL_KHR_create_context_no_error 1
-+#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3
-+#endif /* EGL_KHR_create_context_no_error */
-+
-+#ifndef EGL_KHR_fence_sync
-+#define EGL_KHR_fence_sync 1
-+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
-+#ifdef KHRONOS_SUPPORT_INT64
-+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
-+#define EGL_SYNC_CONDITION_KHR 0x30F8
-+#define EGL_SYNC_FENCE_KHR 0x30F9
-+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);
-+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-+#endif
-+#endif /* KHRONOS_SUPPORT_INT64 */
-+#endif /* EGL_KHR_fence_sync */
-+
-+#ifndef EGL_KHR_get_all_proc_addresses
-+#define EGL_KHR_get_all_proc_addresses 1
-+#endif /* EGL_KHR_get_all_proc_addresses */
-+
-+#ifndef EGL_KHR_gl_colorspace
-+#define EGL_KHR_gl_colorspace 1
-+#define EGL_GL_COLORSPACE_KHR 0x309D
-+#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089
-+#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A
-+#endif /* EGL_KHR_gl_colorspace */
-+
-+#ifndef EGL_KHR_gl_renderbuffer_image
-+#define EGL_KHR_gl_renderbuffer_image 1
-+#define EGL_GL_RENDERBUFFER_KHR 0x30B9
-+#endif /* EGL_KHR_gl_renderbuffer_image */
-+
-+#ifndef EGL_KHR_gl_texture_2D_image
-+#define EGL_KHR_gl_texture_2D_image 1
-+#define EGL_GL_TEXTURE_2D_KHR 0x30B1
-+#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
-+#endif /* EGL_KHR_gl_texture_2D_image */
-+
-+#ifndef EGL_KHR_gl_texture_3D_image
-+#define EGL_KHR_gl_texture_3D_image 1
-+#define EGL_GL_TEXTURE_3D_KHR 0x30B2
-+#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD
-+#endif /* EGL_KHR_gl_texture_3D_image */
-+
-+#ifndef EGL_KHR_gl_texture_cubemap_image
-+#define EGL_KHR_gl_texture_cubemap_image 1
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
-+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
-+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
-+#endif /* EGL_KHR_gl_texture_cubemap_image */
-+
-+#ifndef EGL_KHR_image
-+#define EGL_KHR_image 1
-+typedef void *EGLImageKHR;
-+#define EGL_NATIVE_PIXMAP_KHR 0x30B0
-+#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
-+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
-+#endif
-+#endif /* EGL_KHR_image */
-+
-+#ifndef EGL_KHR_image_base
-+#define EGL_KHR_image_base 1
-+#define EGL_IMAGE_PRESERVED_KHR 0x30D2
-+#endif /* EGL_KHR_image_base */
-+
-+#ifndef EGL_KHR_image_pixmap
-+#define EGL_KHR_image_pixmap 1
-+#endif /* EGL_KHR_image_pixmap */
-+
-+#ifndef EGL_KHR_lock_surface
-+#define EGL_KHR_lock_surface 1
-+#define EGL_READ_SURFACE_BIT_KHR 0x0001
-+#define EGL_WRITE_SURFACE_BIT_KHR 0x0002
-+#define EGL_LOCK_SURFACE_BIT_KHR 0x0080
-+#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
-+#define EGL_MATCH_FORMAT_KHR 0x3043
-+#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0
-+#define EGL_FORMAT_RGB_565_KHR 0x30C1
-+#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2
-+#define EGL_FORMAT_RGBA_8888_KHR 0x30C3
-+#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4
-+#define EGL_LOCK_USAGE_HINT_KHR 0x30C5
-+#define EGL_BITMAP_POINTER_KHR 0x30C6
-+#define EGL_BITMAP_PITCH_KHR 0x30C7
-+#define EGL_BITMAP_ORIGIN_KHR 0x30C8
-+#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9
-+#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
-+#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB
-+#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
-+#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
-+#define EGL_LOWER_LEFT_KHR 0x30CE
-+#define EGL_UPPER_LEFT_KHR 0x30CF
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);
-+#endif
-+#endif /* EGL_KHR_lock_surface */
-+
-+#ifndef EGL_KHR_lock_surface2
-+#define EGL_KHR_lock_surface2 1
-+#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
-+#endif /* EGL_KHR_lock_surface2 */
-+
-+#ifndef EGL_KHR_lock_surface3
-+#define EGL_KHR_lock_surface3 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
-+#endif
-+#endif /* EGL_KHR_lock_surface3 */
-+
-+#ifndef EGL_KHR_partial_update
-+#define EGL_KHR_partial_update 1
-+#define EGL_BUFFER_AGE_KHR 0x313D
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#endif
-+#endif /* EGL_KHR_partial_update */
-+
-+#ifndef EGL_KHR_platform_android
-+#define EGL_KHR_platform_android 1
-+#define EGL_PLATFORM_ANDROID_KHR 0x3141
-+#endif /* EGL_KHR_platform_android */
-+
-+#ifndef EGL_KHR_platform_gbm
-+#define EGL_KHR_platform_gbm 1
-+#define EGL_PLATFORM_GBM_KHR 0x31D7
-+#endif /* EGL_KHR_platform_gbm */
-+
-+#ifndef EGL_KHR_platform_wayland
-+#define EGL_KHR_platform_wayland 1
-+#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
-+#endif /* EGL_KHR_platform_wayland */
-+
-+#ifndef EGL_KHR_platform_x11
-+#define EGL_KHR_platform_x11 1
-+#define EGL_PLATFORM_X11_KHR 0x31D5
-+#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6
-+#endif /* EGL_KHR_platform_x11 */
-+
-+#ifndef EGL_KHR_reusable_sync
-+#define EGL_KHR_reusable_sync 1
-+#ifdef KHRONOS_SUPPORT_INT64
-+#define EGL_SYNC_STATUS_KHR 0x30F1
-+#define EGL_SIGNALED_KHR 0x30F2
-+#define EGL_UNSIGNALED_KHR 0x30F3
-+#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
-+#define EGL_CONDITION_SATISFIED_KHR 0x30F6
-+#define EGL_SYNC_TYPE_KHR 0x30F7
-+#define EGL_SYNC_REUSABLE_KHR 0x30FA
-+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001
-+#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
-+#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-+#endif
-+#endif /* KHRONOS_SUPPORT_INT64 */
-+#endif /* EGL_KHR_reusable_sync */
-+
-+#ifndef EGL_KHR_stream
-+#define EGL_KHR_stream 1
-+typedef void *EGLStreamKHR;
-+typedef khronos_uint64_t EGLuint64KHR;
-+#ifdef KHRONOS_SUPPORT_INT64
-+#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
-+#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
-+#define EGL_PRODUCER_FRAME_KHR 0x3212
-+#define EGL_CONSUMER_FRAME_KHR 0x3213
-+#define EGL_STREAM_STATE_KHR 0x3214
-+#define EGL_STREAM_STATE_CREATED_KHR 0x3215
-+#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
-+#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
-+#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
-+#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
-+#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
-+#define EGL_BAD_STREAM_KHR 0x321B
-+#define EGL_BAD_STATE_KHR 0x321C
-+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);
-+EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
-+#endif
-+#endif /* KHRONOS_SUPPORT_INT64 */
-+#endif /* EGL_KHR_stream */
-+
-+#ifndef EGL_KHR_stream_consumer_gltexture
-+#define EGL_KHR_stream_consumer_gltexture 1
-+#ifdef EGL_KHR_stream
-+#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);
-+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);
-+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);
-+#endif
-+#endif /* EGL_KHR_stream */
-+#endif /* EGL_KHR_stream_consumer_gltexture */
-+
-+#ifndef EGL_KHR_stream_cross_process_fd
-+#define EGL_KHR_stream_cross_process_fd 1
-+typedef int EGLNativeFileDescriptorKHR;
-+#ifdef EGL_KHR_stream
-+#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
-+typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
-+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);
-+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
-+#endif
-+#endif /* EGL_KHR_stream */
-+#endif /* EGL_KHR_stream_cross_process_fd */
-+
-+#ifndef EGL_KHR_stream_fifo
-+#define EGL_KHR_stream_fifo 1
-+#ifdef EGL_KHR_stream
-+#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
-+#define EGL_STREAM_TIME_NOW_KHR 0x31FD
-+#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
-+#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
-+#endif
-+#endif /* EGL_KHR_stream */
-+#endif /* EGL_KHR_stream_fifo */
-+
-+#ifndef EGL_KHR_stream_producer_aldatalocator
-+#define EGL_KHR_stream_producer_aldatalocator 1
-+#ifdef EGL_KHR_stream
-+#endif /* EGL_KHR_stream */
-+#endif /* EGL_KHR_stream_producer_aldatalocator */
-+
-+#ifndef EGL_KHR_stream_producer_eglsurface
-+#define EGL_KHR_stream_producer_eglsurface 1
-+#ifdef EGL_KHR_stream
-+#define EGL_STREAM_BIT_KHR 0x0800
-+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
-+#endif
-+#endif /* EGL_KHR_stream */
-+#endif /* EGL_KHR_stream_producer_eglsurface */
-+
-+#ifndef EGL_KHR_surfaceless_context
-+#define EGL_KHR_surfaceless_context 1
-+#endif /* EGL_KHR_surfaceless_context */
-+
-+#ifndef EGL_KHR_swap_buffers_with_damage
-+#define EGL_KHR_swap_buffers_with_damage 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#endif
-+#endif /* EGL_KHR_swap_buffers_with_damage */
-+
-+#ifndef EGL_KHR_vg_parent_image
-+#define EGL_KHR_vg_parent_image 1
-+#define EGL_VG_PARENT_IMAGE_KHR 0x30BA
-+#endif /* EGL_KHR_vg_parent_image */
-+
-+#ifndef EGL_KHR_wait_sync
-+#define EGL_KHR_wait_sync 1
-+typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
-+#endif
-+#endif /* EGL_KHR_wait_sync */
-+
-+#ifndef EGL_ANDROID_blob_cache
-+#define EGL_ANDROID_blob_cache 1
-+typedef khronos_ssize_t EGLsizeiANDROID;
-+typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
-+typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
-+typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-+#endif
-+#endif /* EGL_ANDROID_blob_cache */
-+
-+#ifndef EGL_ANDROID_framebuffer_target
-+#define EGL_ANDROID_framebuffer_target 1
-+#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
-+#endif /* EGL_ANDROID_framebuffer_target */
-+
-+#ifndef EGL_ANDROID_image_native_buffer
-+#define EGL_ANDROID_image_native_buffer 1
-+#define EGL_NATIVE_BUFFER_ANDROID 0x3140
-+#endif /* EGL_ANDROID_image_native_buffer */
-+
-+#ifndef EGL_ANDROID_native_fence_sync
-+#define EGL_ANDROID_native_fence_sync 1
-+#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
-+#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
-+#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
-+#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
-+typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
-+#endif
-+#endif /* EGL_ANDROID_native_fence_sync */
-+
-+#ifndef EGL_ANDROID_recordable
-+#define EGL_ANDROID_recordable 1
-+#define EGL_RECORDABLE_ANDROID 0x3142
-+#endif /* EGL_ANDROID_recordable */
-+
-+#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
-+#define EGL_ANGLE_d3d_share_handle_client_buffer 1
-+#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
-+#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */
-+
-+#ifndef EGL_ANGLE_device_d3d
-+#define EGL_ANGLE_device_d3d 1
-+#define EGL_D3D9_DEVICE_ANGLE 0x33A0
-+#define EGL_D3D11_DEVICE_ANGLE 0x33A1
-+#endif /* EGL_ANGLE_device_d3d */
-+
-+#ifndef EGL_ANGLE_query_surface_pointer
-+#define EGL_ANGLE_query_surface_pointer 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
-+#endif
-+#endif /* EGL_ANGLE_query_surface_pointer */
-+
-+#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
-+#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
-+#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
-+
-+#ifndef EGL_ANGLE_window_fixed_size
-+#define EGL_ANGLE_window_fixed_size 1
-+#define EGL_FIXED_SIZE_ANGLE 0x3201
-+#endif /* EGL_ANGLE_window_fixed_size */
-+
-+#ifndef EGL_ARM_pixmap_multisample_discard
-+#define EGL_ARM_pixmap_multisample_discard 1
-+#define EGL_DISCARD_SAMPLES_ARM 0x3286
-+#endif /* EGL_ARM_pixmap_multisample_discard */
-+
-+#ifndef EGL_EXT_buffer_age
-+#define EGL_EXT_buffer_age 1
-+#define EGL_BUFFER_AGE_EXT 0x313D
-+#endif /* EGL_EXT_buffer_age */
-+
-+#ifndef EGL_EXT_client_extensions
-+#define EGL_EXT_client_extensions 1
-+#endif /* EGL_EXT_client_extensions */
-+
-+#ifndef EGL_EXT_create_context_robustness
-+#define EGL_EXT_create_context_robustness 1
-+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
-+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
-+#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
-+#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
-+#endif /* EGL_EXT_create_context_robustness */
-+
-+#ifndef EGL_EXT_device_base
-+#define EGL_EXT_device_base 1
-+typedef void *EGLDeviceEXT;
-+#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0))
-+#define EGL_BAD_DEVICE_EXT 0x322B
-+#define EGL_DEVICE_EXT 0x322C
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-+typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
-+EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
-+#endif
-+#endif /* EGL_EXT_device_base */
-+
-+#ifndef EGL_EXT_device_drm
-+#define EGL_EXT_device_drm 1
-+#define EGL_DRM_DEVICE_FILE_EXT 0x3233
-+#endif /* EGL_EXT_device_drm */
-+
-+#ifndef EGL_EXT_device_enumeration
-+#define EGL_EXT_device_enumeration 1
-+#endif /* EGL_EXT_device_enumeration */
-+
-+#ifndef EGL_EXT_device_openwf
-+#define EGL_EXT_device_openwf 1
-+#define EGL_OPENWF_DEVICE_ID_EXT 0x3237
-+#endif /* EGL_EXT_device_openwf */
-+
-+#ifndef EGL_EXT_device_query
-+#define EGL_EXT_device_query 1
-+#endif /* EGL_EXT_device_query */
-+
-+#ifndef EGL_EXT_image_dma_buf_import
-+#define EGL_EXT_image_dma_buf_import 1
-+#define EGL_LINUX_DMA_BUF_EXT 0x3270
-+#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
-+#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
-+#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
-+#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
-+#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
-+#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
-+#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
-+#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
-+#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
-+#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
-+#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
-+#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
-+#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
-+#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
-+#define EGL_ITU_REC601_EXT 0x327F
-+#define EGL_ITU_REC709_EXT 0x3280
-+#define EGL_ITU_REC2020_EXT 0x3281
-+#define EGL_YUV_FULL_RANGE_EXT 0x3282
-+#define EGL_YUV_NARROW_RANGE_EXT 0x3283
-+#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
-+#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
-+#endif /* EGL_EXT_image_dma_buf_import */
-+
-+#ifndef EGL_EXT_multiview_window
-+#define EGL_EXT_multiview_window 1
-+#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
-+#endif /* EGL_EXT_multiview_window */
-+
-+#ifndef EGL_EXT_output_base
-+#define EGL_EXT_output_base 1
-+typedef void *EGLOutputLayerEXT;
-+typedef void *EGLOutputPortEXT;
-+#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0)
-+#define EGL_NO_OUTPUT_PORT_EXT ((EGLOutputPortEXT)0)
-+#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D
-+#define EGL_BAD_OUTPUT_PORT_EXT 0x322E
-+#define EGL_SWAP_INTERVAL_EXT 0x322F
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-+typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-+typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
-+EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
-+EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
-+EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
-+EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
-+#endif
-+#endif /* EGL_EXT_output_base */
-+
-+#ifndef EGL_EXT_output_drm
-+#define EGL_EXT_output_drm 1
-+#define EGL_DRM_CRTC_EXT 0x3234
-+#define EGL_DRM_PLANE_EXT 0x3235
-+#define EGL_DRM_CONNECTOR_EXT 0x3236
-+#endif /* EGL_EXT_output_drm */
-+
-+#ifndef EGL_EXT_output_openwf
-+#define EGL_EXT_output_openwf 1
-+#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238
-+#define EGL_OPENWF_PORT_ID_EXT 0x3239
-+#endif /* EGL_EXT_output_openwf */
-+
-+#ifndef EGL_EXT_platform_base
-+#define EGL_EXT_platform_base 1
-+typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
-+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
-+#endif
-+#endif /* EGL_EXT_platform_base */
-+
-+#ifndef EGL_EXT_platform_device
-+#define EGL_EXT_platform_device 1
-+#define EGL_PLATFORM_DEVICE_EXT 0x313F
-+#endif /* EGL_EXT_platform_device */
-+
-+#ifndef EGL_EXT_platform_wayland
-+#define EGL_EXT_platform_wayland 1
-+#define EGL_PLATFORM_WAYLAND_EXT 0x31D8
-+#endif /* EGL_EXT_platform_wayland */
-+
-+#ifndef EGL_EXT_platform_x11
-+#define EGL_EXT_platform_x11 1
-+#define EGL_PLATFORM_X11_EXT 0x31D5
-+#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6
-+#endif /* EGL_EXT_platform_x11 */
-+
-+#ifndef EGL_EXT_protected_surface
-+#define EGL_EXT_protected_surface 1
-+#define EGL_PROTECTED_CONTENT_EXT 0x32C0
-+#endif /* EGL_EXT_protected_surface */
-+
-+#ifndef EGL_EXT_stream_consumer_egloutput
-+#define EGL_EXT_stream_consumer_egloutput 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
-+#endif
-+#endif /* EGL_EXT_stream_consumer_egloutput */
-+
-+#ifndef EGL_EXT_swap_buffers_with_damage
-+#define EGL_EXT_swap_buffers_with_damage 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
-+#endif
-+#endif /* EGL_EXT_swap_buffers_with_damage */
-+
-+#ifndef EGL_EXT_yuv_surface
-+#define EGL_EXT_yuv_surface 1
-+#define EGL_YUV_ORDER_EXT 0x3301
-+#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311
-+#define EGL_YUV_SUBSAMPLE_EXT 0x3312
-+#define EGL_YUV_DEPTH_RANGE_EXT 0x3317
-+#define EGL_YUV_CSC_STANDARD_EXT 0x330A
-+#define EGL_YUV_PLANE_BPP_EXT 0x331A
-+#define EGL_YUV_BUFFER_EXT 0x3300
-+#define EGL_YUV_ORDER_YUV_EXT 0x3302
-+#define EGL_YUV_ORDER_YVU_EXT 0x3303
-+#define EGL_YUV_ORDER_YUYV_EXT 0x3304
-+#define EGL_YUV_ORDER_UYVY_EXT 0x3305
-+#define EGL_YUV_ORDER_YVYU_EXT 0x3306
-+#define EGL_YUV_ORDER_VYUY_EXT 0x3307
-+#define EGL_YUV_ORDER_AYUV_EXT 0x3308
-+#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313
-+#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314
-+#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315
-+#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318
-+#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319
-+#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B
-+#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C
-+#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D
-+#define EGL_YUV_PLANE_BPP_0_EXT 0x331B
-+#define EGL_YUV_PLANE_BPP_8_EXT 0x331C
-+#define EGL_YUV_PLANE_BPP_10_EXT 0x331D
-+#endif /* EGL_EXT_yuv_surface */
-+
-+#ifndef EGL_HI_clientpixmap
-+#define EGL_HI_clientpixmap 1
-+struct EGLClientPixmapHI {
-+ void *pData;
-+ EGLint iWidth;
-+ EGLint iHeight;
-+ EGLint iStride;
-+};
-+#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
-+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
-+#endif
-+#endif /* EGL_HI_clientpixmap */
-+
-+#ifndef EGL_HI_colorformats
-+#define EGL_HI_colorformats 1
-+#define EGL_COLOR_FORMAT_HI 0x8F70
-+#define EGL_COLOR_RGB_HI 0x8F71
-+#define EGL_COLOR_RGBA_HI 0x8F72
-+#define EGL_COLOR_ARGB_HI 0x8F73
-+#endif /* EGL_HI_colorformats */
-+
-+#ifndef EGL_IMG_context_priority
-+#define EGL_IMG_context_priority 1
-+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
-+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
-+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
-+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
-+#endif /* EGL_IMG_context_priority */
-+
-+#ifndef EGL_MESA_drm_image
-+#define EGL_MESA_drm_image 1
-+#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
-+#define EGL_DRM_BUFFER_USE_MESA 0x31D1
-+#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
-+#define EGL_DRM_BUFFER_MESA 0x31D3
-+#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
-+#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001
-+#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002
-+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
-+#endif
-+#endif /* EGL_MESA_drm_image */
-+
-+#ifndef EGL_MESA_image_dma_buf_export
-+#define EGL_MESA_image_dma_buf_export 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
-+EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
-+#endif
-+#endif /* EGL_MESA_image_dma_buf_export */
-+
-+#ifndef EGL_MESA_platform_gbm
-+#define EGL_MESA_platform_gbm 1
-+#define EGL_PLATFORM_GBM_MESA 0x31D7
-+#endif /* EGL_MESA_platform_gbm */
-+
-+#ifndef EGL_NOK_swap_region
-+#define EGL_NOK_swap_region 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-+#endif
-+#endif /* EGL_NOK_swap_region */
-+
-+#ifndef EGL_NOK_swap_region2
-+#define EGL_NOK_swap_region2 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
-+#endif
-+#endif /* EGL_NOK_swap_region2 */
-+
-+#ifndef EGL_NOK_texture_from_pixmap
-+#define EGL_NOK_texture_from_pixmap 1
-+#define EGL_Y_INVERTED_NOK 0x307F
-+#endif /* EGL_NOK_texture_from_pixmap */
-+
-+#ifndef EGL_NV_3dvision_surface
-+#define EGL_NV_3dvision_surface 1
-+#define EGL_AUTO_STEREO_NV 0x3136
-+#endif /* EGL_NV_3dvision_surface */
-+
-+#ifndef EGL_NV_coverage_sample
-+#define EGL_NV_coverage_sample 1
-+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
-+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
-+#endif /* EGL_NV_coverage_sample */
-+
-+#ifndef EGL_NV_coverage_sample_resolve
-+#define EGL_NV_coverage_sample_resolve 1
-+#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
-+#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
-+#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
-+#endif /* EGL_NV_coverage_sample_resolve */
-+
-+#ifndef EGL_NV_cuda_event
-+#define EGL_NV_cuda_event 1
-+#define EGL_CUDA_EVENT_HANDLE_NV 0x323B
-+#define EGL_SYNC_CUDA_EVENT_NV 0x323C
-+#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D
-+#endif /* EGL_NV_cuda_event */
-+
-+#ifndef EGL_NV_depth_nonlinear
-+#define EGL_NV_depth_nonlinear 1
-+#define EGL_DEPTH_ENCODING_NV 0x30E2
-+#define EGL_DEPTH_ENCODING_NONE_NV 0
-+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
-+#endif /* EGL_NV_depth_nonlinear */
-+
-+#ifndef EGL_NV_device_cuda
-+#define EGL_NV_device_cuda 1
-+#define EGL_CUDA_DEVICE_NV 0x323A
-+#endif /* EGL_NV_device_cuda */
-+
-+#ifndef EGL_NV_native_query
-+#define EGL_NV_native_query 1
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
-+#endif
-+#endif /* EGL_NV_native_query */
-+
-+#ifndef EGL_NV_post_convert_rounding
-+#define EGL_NV_post_convert_rounding 1
-+#endif /* EGL_NV_post_convert_rounding */
-+
-+#ifndef EGL_NV_post_sub_buffer
-+#define EGL_NV_post_sub_buffer 1
-+#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
-+#endif
-+#endif /* EGL_NV_post_sub_buffer */
-+
-+#ifndef EGL_NV_stream_sync
-+#define EGL_NV_stream_sync 1
-+#define EGL_SYNC_NEW_FRAME_NV 0x321F
-+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
-+#endif
-+#endif /* EGL_NV_stream_sync */
-+
-+#ifndef EGL_NV_sync
-+#define EGL_NV_sync 1
-+typedef void *EGLSyncNV;
-+typedef khronos_utime_nanoseconds_t EGLTimeNV;
-+#ifdef KHRONOS_SUPPORT_INT64
-+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
-+#define EGL_SYNC_STATUS_NV 0x30E7
-+#define EGL_SIGNALED_NV 0x30E8
-+#define EGL_UNSIGNALED_NV 0x30E9
-+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
-+#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
-+#define EGL_ALREADY_SIGNALED_NV 0x30EA
-+#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
-+#define EGL_CONDITION_SATISFIED_NV 0x30EC
-+#define EGL_SYNC_TYPE_NV 0x30ED
-+#define EGL_SYNC_CONDITION_NV 0x30EE
-+#define EGL_SYNC_FENCE_NV 0x30EF
-+#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
-+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
-+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
-+EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
-+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
-+#endif
-+#endif /* KHRONOS_SUPPORT_INT64 */
-+#endif /* EGL_NV_sync */
-+
-+#ifndef EGL_NV_system_time
-+#define EGL_NV_system_time 1
-+typedef khronos_utime_nanoseconds_t EGLuint64NV;
-+#ifdef KHRONOS_SUPPORT_INT64
-+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
-+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);
-+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
-+#endif
-+#endif /* KHRONOS_SUPPORT_INT64 */
-+#endif /* EGL_NV_system_time */
-+
-+#ifndef EGL_TIZEN_image_native_buffer
-+#define EGL_TIZEN_image_native_buffer 1
-+#define EGL_NATIVE_BUFFER_TIZEN 0x32A0
-+#endif /* EGL_TIZEN_image_native_buffer */
-+
-+#ifndef EGL_TIZEN_image_native_surface
-+#define EGL_TIZEN_image_native_surface 1
-+#define EGL_NATIVE_SURFACE_TIZEN 0x32A1
-+#endif /* EGL_TIZEN_image_native_surface */
-+
-+#include <EGL/eglmesaext.h>
-+#include <EGL/eglextchromium.h>
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/EGL/eglextchromium.h
-@@ -0,0 +1,60 @@
-+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-+//
-+// Redistribution and use in source and binary forms, with or without
-+// modification, are permitted provided that the following conditions are
-+// met:
-+//
-+// * Redistributions of source code must retain the above copyright
-+// notice, this list of conditions and the following disclaimer.
-+// * Redistributions in binary form must reproduce the above
-+// copyright notice, this list of conditions and the following disclaimer
-+// in the documentation and/or other materials provided with the
-+// distribution.
-+// * Neither the name of Google Inc. nor the names of its
-+// contributors may be used to endorse or promote products derived from
-+// this software without specific prior written permission.
-+//
-+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+// This file contains Chromium-specific EGL extensions declarations.
-+
-+#ifndef GPU_EGL_EGLEXTCHROMIUM_H_
-+#define GPU_EGL_EGLEXTCHROMIUM_H_
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <EGL/eglplatform.h>
-+
-+/* EGLSyncControlCHROMIUM requires 64-bit uint support */
-+#if KHRONOS_SUPPORT_INT64
-+#ifndef EGL_CHROMIUM_sync_control
-+#define EGL_CHROMIUM_sync_control 1
-+typedef khronos_uint64_t EGLuint64CHROMIUM;
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(
-+ EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,
-+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);
-+#endif /* EGL_EGLEXT_PROTOTYPES */
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC)
-+ (EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust,
-+ EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc);
-+#endif
-+#endif
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif // GPU_EGL_EGLEXTCHROMIUM_H_
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/EGL/eglmesaext.h
-@@ -0,0 +1,102 @@
-+/**************************************************************************
-+ *
-+ * Copyright 2008 VMware, Inc.
-+ * All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ * DEALINGS IN THE SOFTWARE.
-+ *
-+ **************************************************************************/
-+
-+#ifndef __eglmesaext_h_
-+#define __eglmesaext_h_
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <EGL/eglplatform.h>
-+
-+#ifndef EGL_MESA_drm_display
-+#define EGL_MESA_drm_display 1
-+
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd);
-+#endif /* EGL_EGLEXT_PROTOTYPES */
-+
-+typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
-+
-+#endif /* EGL_MESA_drm_display */
-+
-+#ifdef EGL_MESA_drm_image
-+/* Mesa's extension to EGL_MESA_drm_image... */
-+#ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
-+#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004
-+#endif
-+#endif
-+
-+#ifndef EGL_WL_bind_wayland_display
-+#define EGL_WL_bind_wayland_display 1
-+
-+#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
-+#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */
-+
-+#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */
-+
-+#define EGL_TEXTURE_Y_U_V_WL 0x31D7
-+#define EGL_TEXTURE_Y_UV_WL 0x31D8
-+#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
-+
-+struct wl_display;
-+struct wl_resource;
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
-+EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
-+EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-+#endif
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-+
-+#endif
-+
-+#ifndef EGL_WL_create_wayland_buffer_from_image
-+#define EGL_WL_create_wayland_buffer_from_image 1
-+
-+#ifdef EGL_EGLEXT_PROTOTYPES
-+EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);
-+#endif
-+typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image);
-+
-+#endif
-+
-+/* remnant of EGL_NOK_swap_region kept for compatibility because of a non-standard type name */
-+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
-+
-+#ifndef EGL_MESA_configless_context
-+#define EGL_MESA_configless_context 1
-+#define EGL_NO_CONFIG_MESA ((EGLConfig)0)
-+#endif
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/EGL/eglplatform.h
-@@ -0,0 +1,153 @@
-+#ifndef __eglplatform_h_
-+#define __eglplatform_h_
-+
-+/*
-+** Copyright (c) 2007-2013 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.
-+*/
-+
-+/* Platform-specific types and definitions for egl.h
-+ * $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $
-+ *
-+ * Adopters may modify khrplatform.h and this file to suit their platform.
-+ * You are encouraged to submit all modifications to the Khronos group so that
-+ * they can be included in future versions of this file. Please submit changes
-+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
-+ * by filing a bug against product "EGL" component "Registry".
-+ */
-+
-+#include <KHR/khrplatform.h>
-+
-+/* Macros used in EGL function prototype declarations.
-+ *
-+ * EGL functions should be prototyped as:
-+ *
-+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
-+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
-+ *
-+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
-+ */
-+
-+#ifndef EGLAPI
-+#define EGLAPI KHRONOS_APICALL
-+#endif
-+
-+#ifndef EGLAPIENTRY
-+#define EGLAPIENTRY KHRONOS_APIENTRY
-+#endif
-+#define EGLAPIENTRYP EGLAPIENTRY*
-+
-+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
-+ * are aliases of window-system-dependent types, such as X Display * or
-+ * Windows Device Context. They must be defined in platform-specific
-+ * code below. The EGL-prefixed versions of Native*Type are the same
-+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
-+ *
-+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
-+ * provided below, since these changes affect both binary and source
-+ * portability of applications using EGL running on different EGL
-+ * implementations.
-+ */
-+
-+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-+#ifndef WIN32_LEAN_AND_MEAN
-+#define WIN32_LEAN_AND_MEAN 1
-+#endif
-+#include <windows.h>
-+
-+typedef HDC EGLNativeDisplayType;
-+typedef HBITMAP EGLNativePixmapType;
-+typedef HWND EGLNativeWindowType;
-+
-+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-+
-+typedef int EGLNativeDisplayType;
-+typedef void *EGLNativeWindowType;
-+typedef void *EGLNativePixmapType;
-+
-+#elif defined(WL_EGL_PLATFORM)
-+
-+typedef struct wl_display *EGLNativeDisplayType;
-+typedef struct wl_egl_pixmap *EGLNativePixmapType;
-+typedef struct wl_egl_window *EGLNativeWindowType;
-+
-+#elif defined(__GBM__)
-+
-+typedef struct gbm_device *EGLNativeDisplayType;
-+typedef struct gbm_bo *EGLNativePixmapType;
-+typedef void *EGLNativeWindowType;
-+
-+#elif defined(__ANDROID__) || defined(ANDROID)
-+
-+#include <android/native_window.h>
-+
-+struct egl_native_pixmap_t;
-+
-+typedef struct ANativeWindow* EGLNativeWindowType;
-+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
-+typedef void* EGLNativeDisplayType;
-+
-+#elif defined(__unix__) || defined(__APPLE__)
-+
-+#if defined(MESA_EGL_NO_X11_HEADERS)
-+
-+typedef void *EGLNativeDisplayType;
-+typedef khronos_uintptr_t EGLNativePixmapType;
-+typedef khronos_uintptr_t EGLNativeWindowType;
-+
-+#else
-+
-+/* X11 (tentative) */
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+
-+typedef Display *EGLNativeDisplayType;
-+typedef Pixmap EGLNativePixmapType;
-+typedef Window EGLNativeWindowType;
-+
-+#endif /* MESA_EGL_NO_X11_HEADERS */
-+
-+#elif __HAIKU__
-+#include <kernel/image.h>
-+typedef void *EGLNativeDisplayType;
-+typedef khronos_uintptr_t EGLNativePixmapType;
-+typedef khronos_uintptr_t EGLNativeWindowType;
-+
-+#else
-+#error "Platform not recognized"
-+#endif
-+
-+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-+typedef EGLNativeDisplayType NativeDisplayType;
-+typedef EGLNativePixmapType NativePixmapType;
-+typedef EGLNativeWindowType NativeWindowType;
-+
-+
-+/* Define EGLint. This must be a signed integral type large enough to contain
-+ * all legal attribute names and values passed into and out of EGL, whether
-+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
-+ * handle, or other. While in general a 32-bit integer will suffice, if
-+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
-+ * integer type.
-+ */
-+typedef khronos_int32_t EGLint;
-+
-+#endif /* __eglplatform_h */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/gl.h
-@@ -0,0 +1,2115 @@
-+/*
-+ * Mesa 3-D graphics library
-+ *
-+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
-+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included
-+ * in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+
-+#ifndef __gl_h_
-+#define __gl_h_
-+
-+#if defined(USE_MGL_NAMESPACE)
-+#include "gl_mangle.h"
-+#endif
-+
-+
-+/**********************************************************************
-+ * Begin system-specific stuff.
-+ */
-+
-+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
-+#define __WIN32__
-+#endif
-+
-+#if defined(__WIN32__) && !defined(__CYGWIN__)
-+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
-+# define GLAPI __declspec(dllexport)
-+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-+# define GLAPI __declspec(dllimport)
-+# else /* for use with static link lib build of Win32 edition only */
-+# define GLAPI extern
-+# endif /* _STATIC_MESA support */
-+# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
-+# define GLAPIENTRY
-+# else
-+# define GLAPIENTRY __stdcall
-+# endif
-+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
-+# define GLAPI extern
-+# define GLAPIENTRY __stdcall
-+#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-+# define GLAPI __attribute__((visibility("default")))
-+# define GLAPIENTRY
-+#endif /* WIN32 && !CYGWIN */
-+
-+/*
-+ * WINDOWS: Include windows.h here to define APIENTRY.
-+ * It is also useful when applications include this file by
-+ * including only glut.h, since glut.h depends on windows.h.
-+ * Applications needing to include windows.h with parms other
-+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
-+ * glut.h or gl.h.
-+ */
-+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
-+#ifndef WIN32_LEAN_AND_MEAN
-+#define WIN32_LEAN_AND_MEAN 1
-+#endif
-+#include <windows.h>
-+#endif
-+
-+#ifndef GLAPI
-+#define GLAPI extern
-+#endif
-+
-+#ifndef GLAPIENTRY
-+#define GLAPIENTRY
-+#endif
-+
-+#ifndef APIENTRY
-+#define APIENTRY GLAPIENTRY
-+#endif
-+
-+/* "P" suffix to be used for a pointer to a function */
-+#ifndef APIENTRYP
-+#define APIENTRYP APIENTRY *
-+#endif
-+
-+#ifndef GLAPIENTRYP
-+#define GLAPIENTRYP GLAPIENTRY *
-+#endif
-+
-+/*
-+ * End system-specific stuff.
-+ **********************************************************************/
-+
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+
-+#define GL_VERSION_1_1 1
-+#define GL_VERSION_1_2 1
-+#define GL_VERSION_1_3 1
-+#define GL_ARB_imaging 1
-+
-+
-+/*
-+ * Datatypes
-+ */
-+typedef unsigned int GLenum;
-+typedef unsigned char GLboolean;
-+typedef unsigned int GLbitfield;
-+typedef void GLvoid;
-+typedef signed char GLbyte; /* 1-byte signed */
-+typedef short GLshort; /* 2-byte signed */
-+typedef int GLint; /* 4-byte signed */
-+typedef unsigned char GLubyte; /* 1-byte unsigned */
-+typedef unsigned short GLushort; /* 2-byte unsigned */
-+typedef unsigned int GLuint; /* 4-byte unsigned */
-+typedef int GLsizei; /* 4-byte signed */
-+typedef float GLfloat; /* single precision float */
-+typedef float GLclampf; /* single precision float in [0,1] */
-+typedef double GLdouble; /* double precision float */
-+typedef double GLclampd; /* double precision float in [0,1] */
-+
-+
-+
-+/*
-+ * Constants
-+ */
-+
-+/* Boolean values */
-+#define GL_FALSE 0
-+#define GL_TRUE 1
-+
-+/* Data types */
-+#define GL_BYTE 0x1400
-+#define GL_UNSIGNED_BYTE 0x1401
-+#define GL_SHORT 0x1402
-+#define GL_UNSIGNED_SHORT 0x1403
-+#define GL_INT 0x1404
-+#define GL_UNSIGNED_INT 0x1405
-+#define GL_FLOAT 0x1406
-+#define GL_2_BYTES 0x1407
-+#define GL_3_BYTES 0x1408
-+#define GL_4_BYTES 0x1409
-+#define GL_DOUBLE 0x140A
-+
-+/* Primitives */
-+#define GL_POINTS 0x0000
-+#define GL_LINES 0x0001
-+#define GL_LINE_LOOP 0x0002
-+#define GL_LINE_STRIP 0x0003
-+#define GL_TRIANGLES 0x0004
-+#define GL_TRIANGLE_STRIP 0x0005
-+#define GL_TRIANGLE_FAN 0x0006
-+#define GL_QUADS 0x0007
-+#define GL_QUAD_STRIP 0x0008
-+#define GL_POLYGON 0x0009
-+
-+/* Vertex Arrays */
-+#define GL_VERTEX_ARRAY 0x8074
-+#define GL_NORMAL_ARRAY 0x8075
-+#define GL_COLOR_ARRAY 0x8076
-+#define GL_INDEX_ARRAY 0x8077
-+#define GL_TEXTURE_COORD_ARRAY 0x8078
-+#define GL_EDGE_FLAG_ARRAY 0x8079
-+#define GL_VERTEX_ARRAY_SIZE 0x807A
-+#define GL_VERTEX_ARRAY_TYPE 0x807B
-+#define GL_VERTEX_ARRAY_STRIDE 0x807C
-+#define GL_NORMAL_ARRAY_TYPE 0x807E
-+#define GL_NORMAL_ARRAY_STRIDE 0x807F
-+#define GL_COLOR_ARRAY_SIZE 0x8081
-+#define GL_COLOR_ARRAY_TYPE 0x8082
-+#define GL_COLOR_ARRAY_STRIDE 0x8083
-+#define GL_INDEX_ARRAY_TYPE 0x8085
-+#define GL_INDEX_ARRAY_STRIDE 0x8086
-+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
-+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
-+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
-+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
-+#define GL_VERTEX_ARRAY_POINTER 0x808E
-+#define GL_NORMAL_ARRAY_POINTER 0x808F
-+#define GL_COLOR_ARRAY_POINTER 0x8090
-+#define GL_INDEX_ARRAY_POINTER 0x8091
-+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
-+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
-+#define GL_V2F 0x2A20
-+#define GL_V3F 0x2A21
-+#define GL_C4UB_V2F 0x2A22
-+#define GL_C4UB_V3F 0x2A23
-+#define GL_C3F_V3F 0x2A24
-+#define GL_N3F_V3F 0x2A25
-+#define GL_C4F_N3F_V3F 0x2A26
-+#define GL_T2F_V3F 0x2A27
-+#define GL_T4F_V4F 0x2A28
-+#define GL_T2F_C4UB_V3F 0x2A29
-+#define GL_T2F_C3F_V3F 0x2A2A
-+#define GL_T2F_N3F_V3F 0x2A2B
-+#define GL_T2F_C4F_N3F_V3F 0x2A2C
-+#define GL_T4F_C4F_N3F_V4F 0x2A2D
-+
-+/* Matrix Mode */
-+#define GL_MATRIX_MODE 0x0BA0
-+#define GL_MODELVIEW 0x1700
-+#define GL_PROJECTION 0x1701
-+#define GL_TEXTURE 0x1702
-+
-+/* Points */
-+#define GL_POINT_SMOOTH 0x0B10
-+#define GL_POINT_SIZE 0x0B11
-+#define GL_POINT_SIZE_GRANULARITY 0x0B13
-+#define GL_POINT_SIZE_RANGE 0x0B12
-+
-+/* Lines */
-+#define GL_LINE_SMOOTH 0x0B20
-+#define GL_LINE_STIPPLE 0x0B24
-+#define GL_LINE_STIPPLE_PATTERN 0x0B25
-+#define GL_LINE_STIPPLE_REPEAT 0x0B26
-+#define GL_LINE_WIDTH 0x0B21
-+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
-+#define GL_LINE_WIDTH_RANGE 0x0B22
-+
-+/* Polygons */
-+#define GL_POINT 0x1B00
-+#define GL_LINE 0x1B01
-+#define GL_FILL 0x1B02
-+#define GL_CW 0x0900
-+#define GL_CCW 0x0901
-+#define GL_FRONT 0x0404
-+#define GL_BACK 0x0405
-+#define GL_POLYGON_MODE 0x0B40
-+#define GL_POLYGON_SMOOTH 0x0B41
-+#define GL_POLYGON_STIPPLE 0x0B42
-+#define GL_EDGE_FLAG 0x0B43
-+#define GL_CULL_FACE 0x0B44
-+#define GL_CULL_FACE_MODE 0x0B45
-+#define GL_FRONT_FACE 0x0B46
-+#define GL_POLYGON_OFFSET_FACTOR 0x8038
-+#define GL_POLYGON_OFFSET_UNITS 0x2A00
-+#define GL_POLYGON_OFFSET_POINT 0x2A01
-+#define GL_POLYGON_OFFSET_LINE 0x2A02
-+#define GL_POLYGON_OFFSET_FILL 0x8037
-+
-+/* Display Lists */
-+#define GL_COMPILE 0x1300
-+#define GL_COMPILE_AND_EXECUTE 0x1301
-+#define GL_LIST_BASE 0x0B32
-+#define GL_LIST_INDEX 0x0B33
-+#define GL_LIST_MODE 0x0B30
-+
-+/* Depth buffer */
-+#define GL_NEVER 0x0200
-+#define GL_LESS 0x0201
-+#define GL_EQUAL 0x0202
-+#define GL_LEQUAL 0x0203
-+#define GL_GREATER 0x0204
-+#define GL_NOTEQUAL 0x0205
-+#define GL_GEQUAL 0x0206
-+#define GL_ALWAYS 0x0207
-+#define GL_DEPTH_TEST 0x0B71
-+#define GL_DEPTH_BITS 0x0D56
-+#define GL_DEPTH_CLEAR_VALUE 0x0B73
-+#define GL_DEPTH_FUNC 0x0B74
-+#define GL_DEPTH_RANGE 0x0B70
-+#define GL_DEPTH_WRITEMASK 0x0B72
-+#define GL_DEPTH_COMPONENT 0x1902
-+
-+/* Lighting */
-+#define GL_LIGHTING 0x0B50
-+#define GL_LIGHT0 0x4000
-+#define GL_LIGHT1 0x4001
-+#define GL_LIGHT2 0x4002
-+#define GL_LIGHT3 0x4003
-+#define GL_LIGHT4 0x4004
-+#define GL_LIGHT5 0x4005
-+#define GL_LIGHT6 0x4006
-+#define GL_LIGHT7 0x4007
-+#define GL_SPOT_EXPONENT 0x1205
-+#define GL_SPOT_CUTOFF 0x1206
-+#define GL_CONSTANT_ATTENUATION 0x1207
-+#define GL_LINEAR_ATTENUATION 0x1208
-+#define GL_QUADRATIC_ATTENUATION 0x1209
-+#define GL_AMBIENT 0x1200
-+#define GL_DIFFUSE 0x1201
-+#define GL_SPECULAR 0x1202
-+#define GL_SHININESS 0x1601
-+#define GL_EMISSION 0x1600
-+#define GL_POSITION 0x1203
-+#define GL_SPOT_DIRECTION 0x1204
-+#define GL_AMBIENT_AND_DIFFUSE 0x1602
-+#define GL_COLOR_INDEXES 0x1603
-+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
-+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-+#define GL_FRONT_AND_BACK 0x0408
-+#define GL_SHADE_MODEL 0x0B54
-+#define GL_FLAT 0x1D00
-+#define GL_SMOOTH 0x1D01
-+#define GL_COLOR_MATERIAL 0x0B57
-+#define GL_COLOR_MATERIAL_FACE 0x0B55
-+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
-+#define GL_NORMALIZE 0x0BA1
-+
-+/* User clipping planes */
-+#define GL_CLIP_PLANE0 0x3000
-+#define GL_CLIP_PLANE1 0x3001
-+#define GL_CLIP_PLANE2 0x3002
-+#define GL_CLIP_PLANE3 0x3003
-+#define GL_CLIP_PLANE4 0x3004
-+#define GL_CLIP_PLANE5 0x3005
-+
-+/* Accumulation buffer */
-+#define GL_ACCUM_RED_BITS 0x0D58
-+#define GL_ACCUM_GREEN_BITS 0x0D59
-+#define GL_ACCUM_BLUE_BITS 0x0D5A
-+#define GL_ACCUM_ALPHA_BITS 0x0D5B
-+#define GL_ACCUM_CLEAR_VALUE 0x0B80
-+#define GL_ACCUM 0x0100
-+#define GL_ADD 0x0104
-+#define GL_LOAD 0x0101
-+#define GL_MULT 0x0103
-+#define GL_RETURN 0x0102
-+
-+/* Alpha testing */
-+#define GL_ALPHA_TEST 0x0BC0
-+#define GL_ALPHA_TEST_REF 0x0BC2
-+#define GL_ALPHA_TEST_FUNC 0x0BC1
-+
-+/* Blending */
-+#define GL_BLEND 0x0BE2
-+#define GL_BLEND_SRC 0x0BE1
-+#define GL_BLEND_DST 0x0BE0
-+#define GL_ZERO 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
-+
-+/* Render Mode */
-+#define GL_FEEDBACK 0x1C01
-+#define GL_RENDER 0x1C00
-+#define GL_SELECT 0x1C02
-+
-+/* Feedback */
-+#define GL_2D 0x0600
-+#define GL_3D 0x0601
-+#define GL_3D_COLOR 0x0602
-+#define GL_3D_COLOR_TEXTURE 0x0603
-+#define GL_4D_COLOR_TEXTURE 0x0604
-+#define GL_POINT_TOKEN 0x0701
-+#define GL_LINE_TOKEN 0x0702
-+#define GL_LINE_RESET_TOKEN 0x0707
-+#define GL_POLYGON_TOKEN 0x0703
-+#define GL_BITMAP_TOKEN 0x0704
-+#define GL_DRAW_PIXEL_TOKEN 0x0705
-+#define GL_COPY_PIXEL_TOKEN 0x0706
-+#define GL_PASS_THROUGH_TOKEN 0x0700
-+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
-+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
-+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
-+
-+/* Selection */
-+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
-+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
-+
-+/* Fog */
-+#define GL_FOG 0x0B60
-+#define GL_FOG_MODE 0x0B65
-+#define GL_FOG_DENSITY 0x0B62
-+#define GL_FOG_COLOR 0x0B66
-+#define GL_FOG_INDEX 0x0B61
-+#define GL_FOG_START 0x0B63
-+#define GL_FOG_END 0x0B64
-+#define GL_LINEAR 0x2601
-+#define GL_EXP 0x0800
-+#define GL_EXP2 0x0801
-+
-+/* Logic Ops */
-+#define GL_LOGIC_OP 0x0BF1
-+#define GL_INDEX_LOGIC_OP 0x0BF1
-+#define GL_COLOR_LOGIC_OP 0x0BF2
-+#define GL_LOGIC_OP_MODE 0x0BF0
-+#define GL_CLEAR 0x1500
-+#define GL_SET 0x150F
-+#define GL_COPY 0x1503
-+#define GL_COPY_INVERTED 0x150C
-+#define GL_NOOP 0x1505
-+#define GL_INVERT 0x150A
-+#define GL_AND 0x1501
-+#define GL_NAND 0x150E
-+#define GL_OR 0x1507
-+#define GL_NOR 0x1508
-+#define GL_XOR 0x1506
-+#define GL_EQUIV 0x1509
-+#define GL_AND_REVERSE 0x1502
-+#define GL_AND_INVERTED 0x1504
-+#define GL_OR_REVERSE 0x150B
-+#define GL_OR_INVERTED 0x150D
-+
-+/* Stencil */
-+#define GL_STENCIL_BITS 0x0D57
-+#define GL_STENCIL_TEST 0x0B90
-+#define GL_STENCIL_CLEAR_VALUE 0x0B91
-+#define GL_STENCIL_FUNC 0x0B92
-+#define GL_STENCIL_VALUE_MASK 0x0B93
-+#define GL_STENCIL_FAIL 0x0B94
-+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-+#define GL_STENCIL_REF 0x0B97
-+#define GL_STENCIL_WRITEMASK 0x0B98
-+#define GL_STENCIL_INDEX 0x1901
-+#define GL_KEEP 0x1E00
-+#define GL_REPLACE 0x1E01
-+#define GL_INCR 0x1E02
-+#define GL_DECR 0x1E03
-+
-+/* Buffers, Pixel Drawing/Reading */
-+#define GL_NONE 0
-+#define GL_LEFT 0x0406
-+#define GL_RIGHT 0x0407
-+/*GL_FRONT 0x0404 */
-+/*GL_BACK 0x0405 */
-+/*GL_FRONT_AND_BACK 0x0408 */
-+#define GL_FRONT_LEFT 0x0400
-+#define GL_FRONT_RIGHT 0x0401
-+#define GL_BACK_LEFT 0x0402
-+#define GL_BACK_RIGHT 0x0403
-+#define GL_AUX0 0x0409
-+#define GL_AUX1 0x040A
-+#define GL_AUX2 0x040B
-+#define GL_AUX3 0x040C
-+#define GL_COLOR_INDEX 0x1900
-+#define GL_RED 0x1903
-+#define GL_GREEN 0x1904
-+#define GL_BLUE 0x1905
-+#define GL_ALPHA 0x1906
-+#define GL_LUMINANCE 0x1909
-+#define GL_LUMINANCE_ALPHA 0x190A
-+#define GL_ALPHA_BITS 0x0D55
-+#define GL_RED_BITS 0x0D52
-+#define GL_GREEN_BITS 0x0D53
-+#define GL_BLUE_BITS 0x0D54
-+#define GL_INDEX_BITS 0x0D51
-+#define GL_SUBPIXEL_BITS 0x0D50
-+#define GL_AUX_BUFFERS 0x0C00
-+#define GL_READ_BUFFER 0x0C02
-+#define GL_DRAW_BUFFER 0x0C01
-+#define GL_DOUBLEBUFFER 0x0C32
-+#define GL_STEREO 0x0C33
-+#define GL_BITMAP 0x1A00
-+#define GL_COLOR 0x1800
-+#define GL_DEPTH 0x1801
-+#define GL_STENCIL 0x1802
-+#define GL_DITHER 0x0BD0
-+#define GL_RGB 0x1907
-+#define GL_RGBA 0x1908
-+
-+/* Implementation limits */
-+#define GL_MAX_LIST_NESTING 0x0B31
-+#define GL_MAX_EVAL_ORDER 0x0D30
-+#define GL_MAX_LIGHTS 0x0D31
-+#define GL_MAX_CLIP_PLANES 0x0D32
-+#define GL_MAX_TEXTURE_SIZE 0x0D33
-+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
-+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
-+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
-+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
-+
-+/* Gets */
-+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
-+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
-+#define GL_COLOR_CLEAR_VALUE 0x0C22
-+#define GL_COLOR_WRITEMASK 0x0C23
-+#define GL_CURRENT_INDEX 0x0B01
-+#define GL_CURRENT_COLOR 0x0B00
-+#define GL_CURRENT_NORMAL 0x0B02
-+#define GL_CURRENT_RASTER_COLOR 0x0B04
-+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
-+#define GL_CURRENT_RASTER_INDEX 0x0B05
-+#define GL_CURRENT_RASTER_POSITION 0x0B07
-+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
-+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
-+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
-+#define GL_INDEX_CLEAR_VALUE 0x0C20
-+#define GL_INDEX_MODE 0x0C30
-+#define GL_INDEX_WRITEMASK 0x0C21
-+#define GL_MODELVIEW_MATRIX 0x0BA6
-+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
-+#define GL_NAME_STACK_DEPTH 0x0D70
-+#define GL_PROJECTION_MATRIX 0x0BA7
-+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
-+#define GL_RENDER_MODE 0x0C40
-+#define GL_RGBA_MODE 0x0C31
-+#define GL_TEXTURE_MATRIX 0x0BA8
-+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
-+#define GL_VIEWPORT 0x0BA2
-+
-+/* Evaluators */
-+#define GL_AUTO_NORMAL 0x0D80
-+#define GL_MAP1_COLOR_4 0x0D90
-+#define GL_MAP1_INDEX 0x0D91
-+#define GL_MAP1_NORMAL 0x0D92
-+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
-+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
-+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
-+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
-+#define GL_MAP1_VERTEX_3 0x0D97
-+#define GL_MAP1_VERTEX_4 0x0D98
-+#define GL_MAP2_COLOR_4 0x0DB0
-+#define GL_MAP2_INDEX 0x0DB1
-+#define GL_MAP2_NORMAL 0x0DB2
-+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
-+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
-+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
-+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
-+#define GL_MAP2_VERTEX_3 0x0DB7
-+#define GL_MAP2_VERTEX_4 0x0DB8
-+#define GL_MAP1_GRID_DOMAIN 0x0DD0
-+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
-+#define GL_MAP2_GRID_DOMAIN 0x0DD2
-+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
-+#define GL_COEFF 0x0A00
-+#define GL_ORDER 0x0A01
-+#define GL_DOMAIN 0x0A02
-+
-+/* Hints */
-+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-+#define GL_POINT_SMOOTH_HINT 0x0C51
-+#define GL_LINE_SMOOTH_HINT 0x0C52
-+#define GL_POLYGON_SMOOTH_HINT 0x0C53
-+#define GL_FOG_HINT 0x0C54
-+#define GL_DONT_CARE 0x1100
-+#define GL_FASTEST 0x1101
-+#define GL_NICEST 0x1102
-+
-+/* Scissor box */
-+#define GL_SCISSOR_BOX 0x0C10
-+#define GL_SCISSOR_TEST 0x0C11
-+
-+/* Pixel Mode / Transfer */
-+#define GL_MAP_COLOR 0x0D10
-+#define GL_MAP_STENCIL 0x0D11
-+#define GL_INDEX_SHIFT 0x0D12
-+#define GL_INDEX_OFFSET 0x0D13
-+#define GL_RED_SCALE 0x0D14
-+#define GL_RED_BIAS 0x0D15
-+#define GL_GREEN_SCALE 0x0D18
-+#define GL_GREEN_BIAS 0x0D19
-+#define GL_BLUE_SCALE 0x0D1A
-+#define GL_BLUE_BIAS 0x0D1B
-+#define GL_ALPHA_SCALE 0x0D1C
-+#define GL_ALPHA_BIAS 0x0D1D
-+#define GL_DEPTH_SCALE 0x0D1E
-+#define GL_DEPTH_BIAS 0x0D1F
-+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
-+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
-+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
-+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
-+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
-+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
-+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
-+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
-+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
-+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
-+#define GL_PIXEL_MAP_S_TO_S 0x0C71
-+#define GL_PIXEL_MAP_I_TO_I 0x0C70
-+#define GL_PIXEL_MAP_I_TO_R 0x0C72
-+#define GL_PIXEL_MAP_I_TO_G 0x0C73
-+#define GL_PIXEL_MAP_I_TO_B 0x0C74
-+#define GL_PIXEL_MAP_I_TO_A 0x0C75
-+#define GL_PIXEL_MAP_R_TO_R 0x0C76
-+#define GL_PIXEL_MAP_G_TO_G 0x0C77
-+#define GL_PIXEL_MAP_B_TO_B 0x0C78
-+#define GL_PIXEL_MAP_A_TO_A 0x0C79
-+#define GL_PACK_ALIGNMENT 0x0D05
-+#define GL_PACK_LSB_FIRST 0x0D01
-+#define GL_PACK_ROW_LENGTH 0x0D02
-+#define GL_PACK_SKIP_PIXELS 0x0D04
-+#define GL_PACK_SKIP_ROWS 0x0D03
-+#define GL_PACK_SWAP_BYTES 0x0D00
-+#define GL_UNPACK_ALIGNMENT 0x0CF5
-+#define GL_UNPACK_LSB_FIRST 0x0CF1
-+#define GL_UNPACK_ROW_LENGTH 0x0CF2
-+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-+#define GL_UNPACK_SKIP_ROWS 0x0CF3
-+#define GL_UNPACK_SWAP_BYTES 0x0CF0
-+#define GL_ZOOM_X 0x0D16
-+#define GL_ZOOM_Y 0x0D17
-+
-+/* Texture mapping */
-+#define GL_TEXTURE_ENV 0x2300
-+#define GL_TEXTURE_ENV_MODE 0x2200
-+#define GL_TEXTURE_1D 0x0DE0
-+#define GL_TEXTURE_2D 0x0DE1
-+#define GL_TEXTURE_WRAP_S 0x2802
-+#define GL_TEXTURE_WRAP_T 0x2803
-+#define GL_TEXTURE_MAG_FILTER 0x2800
-+#define GL_TEXTURE_MIN_FILTER 0x2801
-+#define GL_TEXTURE_ENV_COLOR 0x2201
-+#define GL_TEXTURE_GEN_S 0x0C60
-+#define GL_TEXTURE_GEN_T 0x0C61
-+#define GL_TEXTURE_GEN_R 0x0C62
-+#define GL_TEXTURE_GEN_Q 0x0C63
-+#define GL_TEXTURE_GEN_MODE 0x2500
-+#define GL_TEXTURE_BORDER_COLOR 0x1004
-+#define GL_TEXTURE_WIDTH 0x1000
-+#define GL_TEXTURE_HEIGHT 0x1001
-+#define GL_TEXTURE_BORDER 0x1005
-+#define GL_TEXTURE_COMPONENTS 0x1003
-+#define GL_TEXTURE_RED_SIZE 0x805C
-+#define GL_TEXTURE_GREEN_SIZE 0x805D
-+#define GL_TEXTURE_BLUE_SIZE 0x805E
-+#define GL_TEXTURE_ALPHA_SIZE 0x805F
-+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
-+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
-+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-+#define GL_OBJECT_LINEAR 0x2401
-+#define GL_OBJECT_PLANE 0x2501
-+#define GL_EYE_LINEAR 0x2400
-+#define GL_EYE_PLANE 0x2502
-+#define GL_SPHERE_MAP 0x2402
-+#define GL_DECAL 0x2101
-+#define GL_MODULATE 0x2100
-+#define GL_NEAREST 0x2600
-+#define GL_REPEAT 0x2901
-+#define GL_CLAMP 0x2900
-+#define GL_S 0x2000
-+#define GL_T 0x2001
-+#define GL_R 0x2002
-+#define GL_Q 0x2003
-+
-+/* Utility */
-+#define GL_VENDOR 0x1F00
-+#define GL_RENDERER 0x1F01
-+#define GL_VERSION 0x1F02
-+#define GL_EXTENSIONS 0x1F03
-+
-+/* Errors */
-+#define GL_NO_ERROR 0
-+#define GL_INVALID_ENUM 0x0500
-+#define GL_INVALID_VALUE 0x0501
-+#define GL_INVALID_OPERATION 0x0502
-+#define GL_STACK_OVERFLOW 0x0503
-+#define GL_STACK_UNDERFLOW 0x0504
-+#define GL_OUT_OF_MEMORY 0x0505
-+
-+/* glPush/PopAttrib bits */
-+#define GL_CURRENT_BIT 0x00000001
-+#define GL_POINT_BIT 0x00000002
-+#define GL_LINE_BIT 0x00000004
-+#define GL_POLYGON_BIT 0x00000008
-+#define GL_POLYGON_STIPPLE_BIT 0x00000010
-+#define GL_PIXEL_MODE_BIT 0x00000020
-+#define GL_LIGHTING_BIT 0x00000040
-+#define GL_FOG_BIT 0x00000080
-+#define GL_DEPTH_BUFFER_BIT 0x00000100
-+#define GL_ACCUM_BUFFER_BIT 0x00000200
-+#define GL_STENCIL_BUFFER_BIT 0x00000400
-+#define GL_VIEWPORT_BIT 0x00000800
-+#define GL_TRANSFORM_BIT 0x00001000
-+#define GL_ENABLE_BIT 0x00002000
-+#define GL_COLOR_BUFFER_BIT 0x00004000
-+#define GL_HINT_BIT 0x00008000
-+#define GL_EVAL_BIT 0x00010000
-+#define GL_LIST_BIT 0x00020000
-+#define GL_TEXTURE_BIT 0x00040000
-+#define GL_SCISSOR_BIT 0x00080000
-+#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF
-+
-+
-+/* OpenGL 1.1 */
-+#define GL_PROXY_TEXTURE_1D 0x8063
-+#define GL_PROXY_TEXTURE_2D 0x8064
-+#define GL_TEXTURE_PRIORITY 0x8066
-+#define GL_TEXTURE_RESIDENT 0x8067
-+#define GL_TEXTURE_BINDING_1D 0x8068
-+#define GL_TEXTURE_BINDING_2D 0x8069
-+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-+#define GL_ALPHA4 0x803B
-+#define GL_ALPHA8 0x803C
-+#define GL_ALPHA12 0x803D
-+#define GL_ALPHA16 0x803E
-+#define GL_LUMINANCE4 0x803F
-+#define GL_LUMINANCE8 0x8040
-+#define GL_LUMINANCE12 0x8041
-+#define GL_LUMINANCE16 0x8042
-+#define GL_LUMINANCE4_ALPHA4 0x8043
-+#define GL_LUMINANCE6_ALPHA2 0x8044
-+#define GL_LUMINANCE8_ALPHA8 0x8045
-+#define GL_LUMINANCE12_ALPHA4 0x8046
-+#define GL_LUMINANCE12_ALPHA12 0x8047
-+#define GL_LUMINANCE16_ALPHA16 0x8048
-+#define GL_INTENSITY 0x8049
-+#define GL_INTENSITY4 0x804A
-+#define GL_INTENSITY8 0x804B
-+#define GL_INTENSITY12 0x804C
-+#define GL_INTENSITY16 0x804D
-+#define GL_R3_G3_B2 0x2A10
-+#define GL_RGB4 0x804F
-+#define GL_RGB5 0x8050
-+#define GL_RGB8 0x8051
-+#define GL_RGB10 0x8052
-+#define GL_RGB12 0x8053
-+#define GL_RGB16 0x8054
-+#define GL_RGBA2 0x8055
-+#define GL_RGBA4 0x8056
-+#define GL_RGB5_A1 0x8057
-+#define GL_RGBA8 0x8058
-+#define GL_RGB10_A2 0x8059
-+#define GL_RGBA12 0x805A
-+#define GL_RGBA16 0x805B
-+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
-+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
-+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
-+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
-+
-+
-+
-+/*
-+ * Miscellaneous
-+ */
-+
-+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
-+
-+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
-+
-+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
-+
-+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
-+
-+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
-+
-+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
-+
-+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
-+
-+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
-+
-+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
-+
-+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
-+
-+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
-+
-+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
-+
-+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
-+
-+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
-+
-+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
-+
-+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
-+
-+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
-+
-+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
-+
-+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
-+
-+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
-+
-+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glEnable( GLenum cap );
-+
-+GLAPI void GLAPIENTRY glDisable( GLenum cap );
-+
-+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
-+
-+
-+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
-+
-+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
-+
-+
-+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
-+
-+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
-+
-+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
-+
-+
-+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
-+
-+GLAPI void GLAPIENTRY glPopAttrib( void );
-+
-+
-+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
-+
-+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
-+
-+
-+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
-+
-+GLAPI GLenum GLAPIENTRY glGetError( void );
-+
-+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
-+
-+GLAPI void GLAPIENTRY glFinish( void );
-+
-+GLAPI void GLAPIENTRY glFlush( void );
-+
-+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
-+
-+
-+/*
-+ * Depth Buffer
-+ */
-+
-+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
-+
-+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
-+
-+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
-+
-+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
-+
-+
-+/*
-+ * Accumulation Buffer
-+ */
-+
-+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
-+
-+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
-+
-+
-+/*
-+ * Transformation
-+ */
-+
-+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
-+ GLdouble bottom, GLdouble top,
-+ GLdouble near_val, GLdouble far_val );
-+
-+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
-+ GLdouble bottom, GLdouble top,
-+ GLdouble near_val, GLdouble far_val );
-+
-+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
-+ GLsizei width, GLsizei height );
-+
-+GLAPI void GLAPIENTRY glPushMatrix( void );
-+
-+GLAPI void GLAPIENTRY glPopMatrix( void );
-+
-+GLAPI void GLAPIENTRY glLoadIdentity( void );
-+
-+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
-+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
-+
-+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
-+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
-+
-+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
-+ GLdouble x, GLdouble y, GLdouble z );
-+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
-+ GLfloat x, GLfloat y, GLfloat z );
-+
-+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
-+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
-+
-+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
-+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
-+
-+
-+/*
-+ * Display Lists
-+ */
-+
-+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
-+
-+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
-+
-+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
-+
-+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
-+
-+GLAPI void GLAPIENTRY glEndList( void );
-+
-+GLAPI void GLAPIENTRY glCallList( GLuint list );
-+
-+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
-+ const GLvoid *lists );
-+
-+GLAPI void GLAPIENTRY glListBase( GLuint base );
-+
-+
-+/*
-+ * Drawing Functions
-+ */
-+
-+GLAPI void GLAPIENTRY glBegin( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glEnd( void );
-+
-+
-+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
-+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
-+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
-+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
-+
-+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
-+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
-+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
-+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
-+
-+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
-+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
-+
-+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
-+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
-+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
-+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
-+
-+
-+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
-+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
-+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
-+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
-+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
-+
-+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
-+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
-+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
-+
-+
-+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
-+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
-+GLAPI void GLAPIENTRY glIndexi( GLint c );
-+GLAPI void GLAPIENTRY glIndexs( GLshort c );
-+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
-+
-+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
-+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
-+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
-+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
-+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
-+
-+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
-+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
-+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
-+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
-+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
-+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
-+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
-+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
-+
-+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
-+ GLbyte blue, GLbyte alpha );
-+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
-+ GLdouble blue, GLdouble alpha );
-+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
-+ GLfloat blue, GLfloat alpha );
-+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
-+ GLint blue, GLint alpha );
-+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
-+ GLshort blue, GLshort alpha );
-+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
-+ GLubyte blue, GLubyte alpha );
-+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
-+ GLuint blue, GLuint alpha );
-+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
-+ GLushort blue, GLushort alpha );
-+
-+
-+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
-+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
-+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
-+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
-+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
-+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
-+
-+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
-+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
-+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
-+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
-+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
-+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
-+
-+
-+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
-+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
-+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
-+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
-+
-+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
-+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
-+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
-+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
-+
-+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
-+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
-+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
-+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
-+
-+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
-+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
-+
-+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
-+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
-+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
-+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
-+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
-+
-+
-+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
-+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
-+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
-+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
-+
-+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
-+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
-+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
-+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
-+
-+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
-+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
-+
-+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
-+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
-+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
-+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
-+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
-+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
-+
-+
-+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
-+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
-+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
-+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
-+
-+
-+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
-+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
-+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
-+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
-+
-+
-+/*
-+ * Vertex Arrays (1.1)
-+ */
-+
-+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
-+ GLsizei stride, const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
-+ const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
-+ GLsizei stride, const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
-+ const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
-+ GLsizei stride, const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
-+
-+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
-+
-+GLAPI void GLAPIENTRY glArrayElement( GLint i );
-+
-+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
-+
-+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
-+ GLenum type, const GLvoid *indices );
-+
-+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
-+ const GLvoid *pointer );
-+
-+/*
-+ * Lighting
-+ */
-+
-+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
-+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
-+ const GLfloat *params );
-+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
-+ const GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
-+ GLfloat *params );
-+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
-+ GLint *params );
-+
-+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
-+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
-+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
-+
-+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
-+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
-+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
-+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
-+
-+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
-+
-+
-+/*
-+ * Raster functions
-+ */
-+
-+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
-+
-+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
-+ const GLfloat *values );
-+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
-+ const GLuint *values );
-+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
-+ const GLushort *values );
-+
-+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
-+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
-+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
-+
-+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
-+ GLfloat xorig, GLfloat yorig,
-+ GLfloat xmove, GLfloat ymove,
-+ const GLubyte *bitmap );
-+
-+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
-+ GLsizei width, GLsizei height,
-+ GLenum format, GLenum type,
-+ GLvoid *pixels );
-+
-+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
-+ GLenum format, GLenum type,
-+ const GLvoid *pixels );
-+
-+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
-+ GLsizei width, GLsizei height,
-+ GLenum type );
-+
-+/*
-+ * Stenciling
-+ */
-+
-+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
-+
-+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
-+
-+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
-+
-+GLAPI void GLAPIENTRY glClearStencil( GLint s );
-+
-+
-+
-+/*
-+ * Texture mapping
-+ */
-+
-+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
-+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
-+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
-+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
-+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
-+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
-+
-+
-+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
-+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
-+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
-+
-+
-+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
-+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
-+ const GLfloat *params );
-+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
-+ const GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
-+ GLenum pname, GLfloat *params);
-+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
-+ GLenum pname, GLint *params );
-+
-+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
-+ GLenum pname, GLfloat *params );
-+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
-+ GLenum pname, GLint *params );
-+
-+
-+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
-+ GLint internalFormat,
-+ GLsizei width, GLint border,
-+ GLenum format, GLenum type,
-+ const GLvoid *pixels );
-+
-+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
-+ GLint internalFormat,
-+ GLsizei width, GLsizei height,
-+ GLint border, GLenum format, GLenum type,
-+ const GLvoid *pixels );
-+
-+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
-+ GLenum format, GLenum type,
-+ GLvoid *pixels );
-+
-+
-+/* 1.1 functions */
-+
-+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
-+
-+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
-+
-+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
-+
-+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
-+ const GLuint *textures,
-+ const GLclampf *priorities );
-+
-+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
-+ const GLuint *textures,
-+ GLboolean *residences );
-+
-+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
-+
-+
-+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
-+ GLint xoffset,
-+ GLsizei width, GLenum format,
-+ GLenum type, const GLvoid *pixels );
-+
-+
-+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
-+ GLint xoffset, GLint yoffset,
-+ GLsizei width, GLsizei height,
-+ GLenum format, GLenum type,
-+ const GLvoid *pixels );
-+
-+
-+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
-+ GLenum internalformat,
-+ GLint x, GLint y,
-+ GLsizei width, GLint border );
-+
-+
-+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
-+ GLenum internalformat,
-+ GLint x, GLint y,
-+ GLsizei width, GLsizei height,
-+ GLint border );
-+
-+
-+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
-+ GLint xoffset, GLint x, GLint y,
-+ GLsizei width );
-+
-+
-+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
-+ GLint xoffset, GLint yoffset,
-+ GLint x, GLint y,
-+ GLsizei width, GLsizei height );
-+
-+
-+/*
-+ * Evaluators
-+ */
-+
-+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
-+ GLint stride,
-+ GLint order, const GLdouble *points );
-+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
-+ GLint stride,
-+ GLint order, const GLfloat *points );
-+
-+GLAPI void GLAPIENTRY glMap2d( GLenum target,
-+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
-+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
-+ const GLdouble *points );
-+GLAPI void GLAPIENTRY glMap2f( GLenum target,
-+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
-+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
-+ const GLfloat *points );
-+
-+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
-+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
-+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
-+
-+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
-+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
-+
-+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
-+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
-+
-+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
-+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
-+
-+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
-+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
-+
-+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
-+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
-+
-+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
-+ GLint vn, GLdouble v1, GLdouble v2 );
-+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
-+ GLint vn, GLfloat v1, GLfloat v2 );
-+
-+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
-+
-+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
-+
-+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
-+
-+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
-+
-+
-+/*
-+ * Fog
-+ */
-+
-+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
-+
-+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
-+
-+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
-+
-+
-+/*
-+ * Selection and Feedback
-+ */
-+
-+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
-+
-+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
-+
-+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
-+
-+GLAPI void GLAPIENTRY glInitNames( void );
-+
-+GLAPI void GLAPIENTRY glLoadName( GLuint name );
-+
-+GLAPI void GLAPIENTRY glPushName( GLuint name );
-+
-+GLAPI void GLAPIENTRY glPopName( void );
-+
-+
-+
-+/*
-+ * OpenGL 1.2
-+ */
-+
-+#define GL_RESCALE_NORMAL 0x803A
-+#define GL_CLAMP_TO_EDGE 0x812F
-+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-+#define GL_MAX_ELEMENTS_INDICES 0x80E9
-+#define GL_BGR 0x80E0
-+#define GL_BGRA 0x80E1
-+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-+#define GL_SINGLE_COLOR 0x81F9
-+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-+#define GL_TEXTURE_MIN_LOD 0x813A
-+#define GL_TEXTURE_MAX_LOD 0x813B
-+#define GL_TEXTURE_BASE_LEVEL 0x813C
-+#define GL_TEXTURE_MAX_LEVEL 0x813D
-+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-+#define GL_PACK_SKIP_IMAGES 0x806B
-+#define GL_PACK_IMAGE_HEIGHT 0x806C
-+#define GL_UNPACK_SKIP_IMAGES 0x806D
-+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-+#define GL_TEXTURE_3D 0x806F
-+#define GL_PROXY_TEXTURE_3D 0x8070
-+#define GL_TEXTURE_DEPTH 0x8071
-+#define GL_TEXTURE_WRAP_R 0x8072
-+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-+#define GL_TEXTURE_BINDING_3D 0x806A
-+
-+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
-+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
-+
-+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
-+ GLint internalFormat,
-+ GLsizei width, GLsizei height,
-+ GLsizei depth, GLint border,
-+ GLenum format, GLenum type,
-+ const GLvoid *pixels );
-+
-+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
-+ GLint xoffset, GLint yoffset,
-+ GLint zoffset, GLsizei width,
-+ GLsizei height, GLsizei depth,
-+ GLenum format,
-+ GLenum type, const GLvoid *pixels);
-+
-+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
-+ GLint xoffset, GLint yoffset,
-+ GLint zoffset, GLint x,
-+ GLint y, GLsizei width,
-+ GLsizei height );
-+
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+
-+
-+/*
-+ * GL_ARB_imaging
-+ */
-+
-+#define GL_CONSTANT_COLOR 0x8001
-+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-+#define GL_CONSTANT_ALPHA 0x8003
-+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-+#define GL_COLOR_TABLE 0x80D0
-+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-+#define GL_PROXY_COLOR_TABLE 0x80D3
-+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-+#define GL_COLOR_TABLE_SCALE 0x80D6
-+#define GL_COLOR_TABLE_BIAS 0x80D7
-+#define GL_COLOR_TABLE_FORMAT 0x80D8
-+#define GL_COLOR_TABLE_WIDTH 0x80D9
-+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-+#define GL_CONVOLUTION_1D 0x8010
-+#define GL_CONVOLUTION_2D 0x8011
-+#define GL_SEPARABLE_2D 0x8012
-+#define GL_CONVOLUTION_BORDER_MODE 0x8013
-+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-+#define GL_REDUCE 0x8016
-+#define GL_CONVOLUTION_FORMAT 0x8017
-+#define GL_CONVOLUTION_WIDTH 0x8018
-+#define GL_CONVOLUTION_HEIGHT 0x8019
-+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-+#define GL_CONSTANT_BORDER 0x8151
-+#define GL_REPLICATE_BORDER 0x8153
-+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-+#define GL_COLOR_MATRIX 0x80B1
-+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
-+#define GL_HISTOGRAM 0x8024
-+#define GL_PROXY_HISTOGRAM 0x8025
-+#define GL_HISTOGRAM_WIDTH 0x8026
-+#define GL_HISTOGRAM_FORMAT 0x8027
-+#define GL_HISTOGRAM_RED_SIZE 0x8028
-+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-+#define GL_HISTOGRAM_SINK 0x802D
-+#define GL_MINMAX 0x802E
-+#define GL_MINMAX_FORMAT 0x802F
-+#define GL_MINMAX_SINK 0x8030
-+#define GL_TABLE_TOO_LARGE 0x8031
-+#define GL_BLEND_EQUATION 0x8009
-+#define GL_MIN 0x8007
-+#define GL_MAX 0x8008
-+#define GL_FUNC_ADD 0x8006
-+#define GL_FUNC_SUBTRACT 0x800A
-+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-+#define GL_BLEND_COLOR 0x8005
-+
-+
-+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
-+ GLsizei width, GLenum format,
-+ GLenum type, const GLvoid *table );
-+
-+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
-+ GLsizei start, GLsizei count,
-+ GLenum format, GLenum type,
-+ const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
-+ const GLint *params);
-+
-+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
-+ const GLfloat *params);
-+
-+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
-+ GLint x, GLint y, GLsizei width );
-+
-+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
-+ GLint x, GLint y, GLsizei width );
-+
-+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
-+ GLenum type, GLvoid *table );
-+
-+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
-+ GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
-+ GLint *params );
-+
-+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
-+
-+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
-+ GLclampf blue, GLclampf alpha );
-+
-+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
-+ GLenum internalformat, GLboolean sink );
-+
-+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
-+
-+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
-+ GLenum format, GLenum type,
-+ GLvoid *values );
-+
-+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
-+ GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
-+ GLint *params );
-+
-+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
-+ GLboolean sink );
-+
-+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
-+
-+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
-+ GLenum format, GLenum types,
-+ GLvoid *values );
-+
-+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
-+ GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
-+ GLint *params );
-+
-+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
-+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
-+ const GLvoid *image );
-+
-+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
-+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
-+ GLenum type, const GLvoid *image );
-+
-+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
-+ GLfloat params );
-+
-+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
-+ const GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
-+ GLint params );
-+
-+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
-+ const GLint *params );
-+
-+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
-+ GLenum internalformat, GLint x, GLint y, GLsizei width );
-+
-+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
-+ GLenum internalformat, GLint x, GLint y, GLsizei width,
-+ GLsizei height);
-+
-+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
-+ GLenum type, GLvoid *image );
-+
-+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
-+ GLfloat *params );
-+
-+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
-+ GLint *params );
-+
-+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
-+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
-+ GLenum type, const GLvoid *row, const GLvoid *column );
-+
-+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
-+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
-+
-+
-+
-+
-+/*
-+ * OpenGL 1.3
-+ */
-+
-+/* multitexture */
-+#define GL_TEXTURE0 0x84C0
-+#define GL_TEXTURE1 0x84C1
-+#define GL_TEXTURE2 0x84C2
-+#define GL_TEXTURE3 0x84C3
-+#define GL_TEXTURE4 0x84C4
-+#define GL_TEXTURE5 0x84C5
-+#define GL_TEXTURE6 0x84C6
-+#define GL_TEXTURE7 0x84C7
-+#define GL_TEXTURE8 0x84C8
-+#define GL_TEXTURE9 0x84C9
-+#define GL_TEXTURE10 0x84CA
-+#define GL_TEXTURE11 0x84CB
-+#define GL_TEXTURE12 0x84CC
-+#define GL_TEXTURE13 0x84CD
-+#define GL_TEXTURE14 0x84CE
-+#define GL_TEXTURE15 0x84CF
-+#define GL_TEXTURE16 0x84D0
-+#define GL_TEXTURE17 0x84D1
-+#define GL_TEXTURE18 0x84D2
-+#define GL_TEXTURE19 0x84D3
-+#define GL_TEXTURE20 0x84D4
-+#define GL_TEXTURE21 0x84D5
-+#define GL_TEXTURE22 0x84D6
-+#define GL_TEXTURE23 0x84D7
-+#define GL_TEXTURE24 0x84D8
-+#define GL_TEXTURE25 0x84D9
-+#define GL_TEXTURE26 0x84DA
-+#define GL_TEXTURE27 0x84DB
-+#define GL_TEXTURE28 0x84DC
-+#define GL_TEXTURE29 0x84DD
-+#define GL_TEXTURE30 0x84DE
-+#define GL_TEXTURE31 0x84DF
-+#define GL_ACTIVE_TEXTURE 0x84E0
-+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-+#define GL_MAX_TEXTURE_UNITS 0x84E2
-+/* texture_cube_map */
-+#define GL_NORMAL_MAP 0x8511
-+#define GL_REFLECTION_MAP 0x8512
-+#define GL_TEXTURE_CUBE_MAP 0x8513
-+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-+/* texture_compression */
-+#define GL_COMPRESSED_ALPHA 0x84E9
-+#define GL_COMPRESSED_LUMINANCE 0x84EA
-+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-+#define GL_COMPRESSED_INTENSITY 0x84EC
-+#define GL_COMPRESSED_RGB 0x84ED
-+#define GL_COMPRESSED_RGBA 0x84EE
-+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-+#define GL_TEXTURE_COMPRESSED 0x86A1
-+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-+/* multisample */
-+#define GL_MULTISAMPLE 0x809D
-+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-+#define GL_SAMPLE_COVERAGE 0x80A0
-+#define GL_SAMPLE_BUFFERS 0x80A8
-+#define GL_SAMPLES 0x80A9
-+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-+#define GL_MULTISAMPLE_BIT 0x20000000
-+/* transpose_matrix */
-+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-+/* texture_env_combine */
-+#define GL_COMBINE 0x8570
-+#define GL_COMBINE_RGB 0x8571
-+#define GL_COMBINE_ALPHA 0x8572
-+#define GL_SOURCE0_RGB 0x8580
-+#define GL_SOURCE1_RGB 0x8581
-+#define GL_SOURCE2_RGB 0x8582
-+#define GL_SOURCE0_ALPHA 0x8588
-+#define GL_SOURCE1_ALPHA 0x8589
-+#define GL_SOURCE2_ALPHA 0x858A
-+#define GL_OPERAND0_RGB 0x8590
-+#define GL_OPERAND1_RGB 0x8591
-+#define GL_OPERAND2_RGB 0x8592
-+#define GL_OPERAND0_ALPHA 0x8598
-+#define GL_OPERAND1_ALPHA 0x8599
-+#define GL_OPERAND2_ALPHA 0x859A
-+#define GL_RGB_SCALE 0x8573
-+#define GL_ADD_SIGNED 0x8574
-+#define GL_INTERPOLATE 0x8575
-+#define GL_SUBTRACT 0x84E7
-+#define GL_CONSTANT 0x8576
-+#define GL_PRIMARY_COLOR 0x8577
-+#define GL_PREVIOUS 0x8578
-+/* texture_env_dot3 */
-+#define GL_DOT3_RGB 0x86AE
-+#define GL_DOT3_RGBA 0x86AF
-+/* texture_border_clamp */
-+#define GL_CLAMP_TO_BORDER 0x812D
-+
-+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
-+
-+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
-+
-+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
-+
-+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
-+
-+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
-+
-+
-+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
-+
-+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
-+
-+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
-+
-+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
-+
-+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
-+
-+
-+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
-+
-+
-+
-+/*
-+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
-+ */
-+#ifndef GL_ARB_multitexture
-+#define GL_ARB_multitexture 1
-+
-+#define GL_TEXTURE0_ARB 0x84C0
-+#define GL_TEXTURE1_ARB 0x84C1
-+#define GL_TEXTURE2_ARB 0x84C2
-+#define GL_TEXTURE3_ARB 0x84C3
-+#define GL_TEXTURE4_ARB 0x84C4
-+#define GL_TEXTURE5_ARB 0x84C5
-+#define GL_TEXTURE6_ARB 0x84C6
-+#define GL_TEXTURE7_ARB 0x84C7
-+#define GL_TEXTURE8_ARB 0x84C8
-+#define GL_TEXTURE9_ARB 0x84C9
-+#define GL_TEXTURE10_ARB 0x84CA
-+#define GL_TEXTURE11_ARB 0x84CB
-+#define GL_TEXTURE12_ARB 0x84CC
-+#define GL_TEXTURE13_ARB 0x84CD
-+#define GL_TEXTURE14_ARB 0x84CE
-+#define GL_TEXTURE15_ARB 0x84CF
-+#define GL_TEXTURE16_ARB 0x84D0
-+#define GL_TEXTURE17_ARB 0x84D1
-+#define GL_TEXTURE18_ARB 0x84D2
-+#define GL_TEXTURE19_ARB 0x84D3
-+#define GL_TEXTURE20_ARB 0x84D4
-+#define GL_TEXTURE21_ARB 0x84D5
-+#define GL_TEXTURE22_ARB 0x84D6
-+#define GL_TEXTURE23_ARB 0x84D7
-+#define GL_TEXTURE24_ARB 0x84D8
-+#define GL_TEXTURE25_ARB 0x84D9
-+#define GL_TEXTURE26_ARB 0x84DA
-+#define GL_TEXTURE27_ARB 0x84DB
-+#define GL_TEXTURE28_ARB 0x84DC
-+#define GL_TEXTURE29_ARB 0x84DD
-+#define GL_TEXTURE30_ARB 0x84DE
-+#define GL_TEXTURE31_ARB 0x84DF
-+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
-+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
-+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
-+
-+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
-+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
-+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
-+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
-+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
-+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
-+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
-+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
-+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
-+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
-+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
-+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
-+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
-+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
-+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
-+
-+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-+
-+#endif /* GL_ARB_multitexture */
-+
-+
-+
-+/*
-+ * Define this token if you want "old-style" header file behaviour (extensions
-+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
-+ */
-+#if defined(GL_GLEXT_LEGACY)
-+
-+/* All extensions that used to be here are now found in glext.h */
-+
-+#else /* GL_GLEXT_LEGACY */
-+
-+#include <GL/glext.h>
-+
-+#endif /* GL_GLEXT_LEGACY */
-+
-+
-+
-+/*
-+ * ???. GL_MESA_packed_depth_stencil
-+ * XXX obsolete
-+ */
-+#ifndef GL_MESA_packed_depth_stencil
-+#define GL_MESA_packed_depth_stencil 1
-+
-+#define GL_DEPTH_STENCIL_MESA 0x8750
-+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
-+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
-+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
-+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
-+
-+#endif /* GL_MESA_packed_depth_stencil */
-+
-+
-+#ifndef GL_ATI_blend_equation_separate
-+#define GL_ATI_blend_equation_separate 1
-+
-+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
-+
-+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
-+
-+#endif /* GL_ATI_blend_equation_separate */
-+
-+
-+/* GL_OES_EGL_image */
-+#ifndef GL_OES_EGL_image
-+typedef void* GLeglImageOES;
-+#endif
-+
-+#ifndef GL_OES_EGL_image
-+#define GL_OES_EGL_image 1
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-+#endif
-+typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-+typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-+#endif
-+
-+
-+/**
-+ ** NOTE!!!!! If you add new functions to this file, or update
-+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
-+ ** in that file for details.
-+ **/
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* __gl_h_ */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/gl_mangle.h
-@@ -0,0 +1,2809 @@
-+#if 0
-+#define GL_MANGLE_C1 "DO NOT EDIT!!! - TO REGENERATE from gl.h, EXECUTE THIS FILE IN SHELL (/bin/sh) and save the output"
-+#define GL_MANGLE_C2 "This file is used to create GL function protypes and aliases for the function names"
-+ files="gl.h glext.h"
-+#define GL_MANGLE_C3 "get regeneration header - copy everything in this file above the 'REGENERATE_TO_END' line"
-+ awk '!done; /^\/\*REGENERATE_TO_END/ {done=1}' $0
-+ echo ""
-+#define GL_MANGLE_C4 get aliases
-+ grep '^GLAPI' $files | sed -e 's/.*ENTRY gl\([^( ]*\).*$/#define gl\1 MANGLE(\1)/' | sort | uniq
-+ echo ""
-+ echo "#endif /* GL_MANGLE_H */"
-+ exit
-+#endif /* REGENERATION */
-+
-+/*
-+ * If you compile Mesa with USE_MGL_NAMESPACE defined then you can link
-+ * your application both with OpenGL and Mesa. The Mesa functions will
-+ * be redefined so they are prefixed with "mgl" instead of "gl".
-+ * Mgl contributed by Randy Frank (rfrank at rsinc.com)
-+ * Regneration code contributed by Ray Tice (rayt at ma.ultra.net)
-+ */
-+
-+#ifndef GL_MANGLE_H
-+#define GL_MANGLE_H
-+
-+#ifndef MANGLE
-+#define MANGLE(x) mgl##x
-+#endif /*MANGLE*/
-+
-+/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
-+
-+#define glAccum MANGLE(Accum)
-+#define glAccumxOES MANGLE(AccumxOES)
-+#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
-+#define glActiveShaderProgram MANGLE(ActiveShaderProgram)
-+#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
-+#define glActiveTextureARB MANGLE(ActiveTextureARB)
-+#define glActiveTexture MANGLE(ActiveTexture)
-+#define glActiveVaryingNV MANGLE(ActiveVaryingNV)
-+#define glAlphaFragmentOp1ATI MANGLE(AlphaFragmentOp1ATI)
-+#define glAlphaFragmentOp2ATI MANGLE(AlphaFragmentOp2ATI)
-+#define glAlphaFragmentOp3ATI MANGLE(AlphaFragmentOp3ATI)
-+#define glAlphaFunc MANGLE(AlphaFunc)
-+#define glAlphaFuncxOES MANGLE(AlphaFuncxOES)
-+#define glApplyTextureEXT MANGLE(ApplyTextureEXT)
-+#define glAreProgramsResidentNV MANGLE(AreProgramsResidentNV)
-+#define glAreTexturesResidentEXT MANGLE(AreTexturesResidentEXT)
-+#define glAreTexturesResident MANGLE(AreTexturesResident)
-+#define glArrayElementEXT MANGLE(ArrayElementEXT)
-+#define glArrayElement MANGLE(ArrayElement)
-+#define glArrayObjectATI MANGLE(ArrayObjectATI)
-+#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
-+#define glAttachObjectARB MANGLE(AttachObjectARB)
-+#define glAttachShader MANGLE(AttachShader)
-+#define glBeginConditionalRender MANGLE(BeginConditionalRender)
-+#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV)
-+#define glBeginConditionalRenderNVX MANGLE(BeginConditionalRenderNVX)
-+#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
-+#define glBegin MANGLE(Begin)
-+#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
-+#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
-+#define glBeginPerfQueryINTEL MANGLE(BeginPerfQueryINTEL)
-+#define glBeginQueryARB MANGLE(BeginQueryARB)
-+#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
-+#define glBeginQuery MANGLE(BeginQuery)
-+#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
-+#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
-+#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
-+#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
-+#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
-+#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
-+#define glBindAttribLocation MANGLE(BindAttribLocation)
-+#define glBindBufferARB MANGLE(BindBufferARB)
-+#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT)
-+#define glBindBufferBase MANGLE(BindBufferBase)
-+#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
-+#define glBindBuffer MANGLE(BindBuffer)
-+#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT)
-+#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
-+#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT)
-+#define glBindBufferRange MANGLE(BindBufferRange)
-+#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
-+#define glBindBuffersBase MANGLE(BindBuffersBase)
-+#define glBindBuffersRange MANGLE(BindBuffersRange)
-+#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
-+#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
-+#define glBindFragDataLocation MANGLE(BindFragDataLocation)
-+#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
-+#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
-+#define glBindFramebuffer MANGLE(BindFramebuffer)
-+#define glBindImageTextureEXT MANGLE(BindImageTextureEXT)
-+#define glBindImageTexture MANGLE(BindImageTexture)
-+#define glBindImageTextures MANGLE(BindImageTextures)
-+#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
-+#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
-+#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
-+#define glBindParameterEXT MANGLE(BindParameterEXT)
-+#define glBindProgramARB MANGLE(BindProgramARB)
-+#define glBindProgramNV MANGLE(BindProgramNV)
-+#define glBindProgramPipeline MANGLE(BindProgramPipeline)
-+#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
-+#define glBindRenderbuffer MANGLE(BindRenderbuffer)
-+#define glBindSampler MANGLE(BindSampler)
-+#define glBindSamplers MANGLE(BindSamplers)
-+#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
-+#define glBindTextureEXT MANGLE(BindTextureEXT)
-+#define glBindTexture MANGLE(BindTexture)
-+#define glBindTextures MANGLE(BindTextures)
-+#define glBindTextureUnit MANGLE(BindTextureUnit)
-+#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
-+#define glBindTransformFeedback MANGLE(BindTransformFeedback)
-+#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
-+#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
-+#define glBindVertexArray MANGLE(BindVertexArray)
-+#define glBindVertexBuffer MANGLE(BindVertexBuffer)
-+#define glBindVertexBuffers MANGLE(BindVertexBuffers)
-+#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
-+#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
-+#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
-+#define glBinormal3bEXT MANGLE(Binormal3bEXT)
-+#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
-+#define glBinormal3dEXT MANGLE(Binormal3dEXT)
-+#define glBinormal3dvEXT MANGLE(Binormal3dvEXT)
-+#define glBinormal3fEXT MANGLE(Binormal3fEXT)
-+#define glBinormal3fvEXT MANGLE(Binormal3fvEXT)
-+#define glBinormal3iEXT MANGLE(Binormal3iEXT)
-+#define glBinormal3ivEXT MANGLE(Binormal3ivEXT)
-+#define glBinormal3sEXT MANGLE(Binormal3sEXT)
-+#define glBinormal3svEXT MANGLE(Binormal3svEXT)
-+#define glBinormalPointerEXT MANGLE(BinormalPointerEXT)
-+#define glBitmap MANGLE(Bitmap)
-+#define glBitmapxOES MANGLE(BitmapxOES)
-+#define glBlendBarrierKHR MANGLE(BlendBarrierKHR)
-+#define glBlendBarrierNV MANGLE(BlendBarrierNV)
-+#define glBlendColorEXT MANGLE(BlendColorEXT)
-+#define glBlendColor MANGLE(BlendColor)
-+#define glBlendColorxOES MANGLE(BlendColorxOES)
-+#define glBlendEquationEXT MANGLE(BlendEquationEXT)
-+#define glBlendEquationiARB MANGLE(BlendEquationiARB)
-+#define glBlendEquationi MANGLE(BlendEquationi)
-+#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
-+#define glBlendEquation MANGLE(BlendEquation)
-+#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
-+#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
-+#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB)
-+#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
-+#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
-+#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
-+#define glBlendFunciARB MANGLE(BlendFunciARB)
-+#define glBlendFunci MANGLE(BlendFunci)
-+#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
-+#define glBlendFunc MANGLE(BlendFunc)
-+#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
-+#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB)
-+#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
-+#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
-+#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
-+#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
-+#define glBlendParameteriNV MANGLE(BlendParameteriNV)
-+#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
-+#define glBlitFramebuffer MANGLE(BlitFramebuffer)
-+#define glBlitNamedFramebuffer MANGLE(BlitNamedFramebuffer)
-+#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
-+#define glBufferDataARB MANGLE(BufferDataARB)
-+#define glBufferData MANGLE(BufferData)
-+#define glBufferPageCommitmentARB MANGLE(BufferPageCommitmentARB)
-+#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
-+#define glBufferStorage MANGLE(BufferStorage)
-+#define glBufferSubDataARB MANGLE(BufferSubDataARB)
-+#define glBufferSubData MANGLE(BufferSubData)
-+#define glCallList MANGLE(CallList)
-+#define glCallLists MANGLE(CallLists)
-+#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
-+#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus)
-+#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT)
-+#define glCheckNamedFramebufferStatus MANGLE(CheckNamedFramebufferStatus)
-+#define glClampColorARB MANGLE(ClampColorARB)
-+#define glClampColor MANGLE(ClampColor)
-+#define glClearAccum MANGLE(ClearAccum)
-+#define glClearAccumxOES MANGLE(ClearAccumxOES)
-+#define glClearBufferData MANGLE(ClearBufferData)
-+#define glClearBufferfi MANGLE(ClearBufferfi)
-+#define glClearBufferfv MANGLE(ClearBufferfv)
-+#define glClearBufferiv MANGLE(ClearBufferiv)
-+#define glClearBufferSubData MANGLE(ClearBufferSubData)
-+#define glClearBufferuiv MANGLE(ClearBufferuiv)
-+#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
-+#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
-+#define glClearColor MANGLE(ClearColor)
-+#define glClearColorxOES MANGLE(ClearColorxOES)
-+#define glClearDepthdNV MANGLE(ClearDepthdNV)
-+#define glClearDepthf MANGLE(ClearDepthf)
-+#define glClearDepthfOES MANGLE(ClearDepthfOES)
-+#define glClearDepth MANGLE(ClearDepth)
-+#define glClearDepthxOES MANGLE(ClearDepthxOES)
-+#define glClearIndex MANGLE(ClearIndex)
-+#define glClear MANGLE(Clear)
-+#define glClearNamedBufferDataEXT MANGLE(ClearNamedBufferDataEXT)
-+#define glClearNamedBufferData MANGLE(ClearNamedBufferData)
-+#define glClearNamedBufferSubDataEXT MANGLE(ClearNamedBufferSubDataEXT)
-+#define glClearNamedBufferSubData MANGLE(ClearNamedBufferSubData)
-+#define glClearNamedFramebufferfi MANGLE(ClearNamedFramebufferfi)
-+#define glClearNamedFramebufferfv MANGLE(ClearNamedFramebufferfv)
-+#define glClearNamedFramebufferiv MANGLE(ClearNamedFramebufferiv)
-+#define glClearNamedFramebufferuiv MANGLE(ClearNamedFramebufferuiv)
-+#define glClearStencil MANGLE(ClearStencil)
-+#define glClearTexImage MANGLE(ClearTexImage)
-+#define glClearTexSubImage MANGLE(ClearTexSubImage)
-+#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB)
-+#define glClientActiveTexture MANGLE(ClientActiveTexture)
-+#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
-+#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
-+#define glClientWaitSync MANGLE(ClientWaitSync)
-+#define glClipControl MANGLE(ClipControl)
-+#define glClipPlanefOES MANGLE(ClipPlanefOES)
-+#define glClipPlane MANGLE(ClipPlane)
-+#define glClipPlanexOES MANGLE(ClipPlanexOES)
-+#define glColor3b MANGLE(Color3b)
-+#define glColor3bv MANGLE(Color3bv)
-+#define glColor3d MANGLE(Color3d)
-+#define glColor3dv MANGLE(Color3dv)
-+#define glColor3f MANGLE(Color3f)
-+#define glColor3fVertex3fSUN MANGLE(Color3fVertex3fSUN)
-+#define glColor3fVertex3fvSUN MANGLE(Color3fVertex3fvSUN)
-+#define glColor3fv MANGLE(Color3fv)
-+#define glColor3hNV MANGLE(Color3hNV)
-+#define glColor3hvNV MANGLE(Color3hvNV)
-+#define glColor3i MANGLE(Color3i)
-+#define glColor3iv MANGLE(Color3iv)
-+#define glColor3s MANGLE(Color3s)
-+#define glColor3sv MANGLE(Color3sv)
-+#define glColor3ub MANGLE(Color3ub)
-+#define glColor3ubv MANGLE(Color3ubv)
-+#define glColor3ui MANGLE(Color3ui)
-+#define glColor3uiv MANGLE(Color3uiv)
-+#define glColor3us MANGLE(Color3us)
-+#define glColor3usv MANGLE(Color3usv)
-+#define glColor3xOES MANGLE(Color3xOES)
-+#define glColor3xvOES MANGLE(Color3xvOES)
-+#define glColor4b MANGLE(Color4b)
-+#define glColor4bv MANGLE(Color4bv)
-+#define glColor4d MANGLE(Color4d)
-+#define glColor4dv MANGLE(Color4dv)
-+#define glColor4f MANGLE(Color4f)
-+#define glColor4fNormal3fVertex3fSUN MANGLE(Color4fNormal3fVertex3fSUN)
-+#define glColor4fNormal3fVertex3fvSUN MANGLE(Color4fNormal3fVertex3fvSUN)
-+#define glColor4fv MANGLE(Color4fv)
-+#define glColor4hNV MANGLE(Color4hNV)
-+#define glColor4hvNV MANGLE(Color4hvNV)
-+#define glColor4i MANGLE(Color4i)
-+#define glColor4iv MANGLE(Color4iv)
-+#define glColor4s MANGLE(Color4s)
-+#define glColor4sv MANGLE(Color4sv)
-+#define glColor4ub MANGLE(Color4ub)
-+#define glColor4ubVertex2fSUN MANGLE(Color4ubVertex2fSUN)
-+#define glColor4ubVertex2fvSUN MANGLE(Color4ubVertex2fvSUN)
-+#define glColor4ubVertex3fSUN MANGLE(Color4ubVertex3fSUN)
-+#define glColor4ubVertex3fvSUN MANGLE(Color4ubVertex3fvSUN)
-+#define glColor4ubv MANGLE(Color4ubv)
-+#define glColor4ui MANGLE(Color4ui)
-+#define glColor4uiv MANGLE(Color4uiv)
-+#define glColor4us MANGLE(Color4us)
-+#define glColor4usv MANGLE(Color4usv)
-+#define glColor4xOES MANGLE(Color4xOES)
-+#define glColor4xvOES MANGLE(Color4xvOES)
-+#define glColorFormatNV MANGLE(ColorFormatNV)
-+#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
-+#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
-+#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
-+#define glColorMaski MANGLE(ColorMaski)
-+#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
-+#define glColorMask MANGLE(ColorMask)
-+#define glColorMaterial MANGLE(ColorMaterial)
-+#define glColorP3ui MANGLE(ColorP3ui)
-+#define glColorP3uiv MANGLE(ColorP3uiv)
-+#define glColorP4ui MANGLE(ColorP4ui)
-+#define glColorP4uiv MANGLE(ColorP4uiv)
-+#define glColorPointerEXT MANGLE(ColorPointerEXT)
-+#define glColorPointerListIBM MANGLE(ColorPointerListIBM)
-+#define glColorPointer MANGLE(ColorPointer)
-+#define glColorPointervINTEL MANGLE(ColorPointervINTEL)
-+#define glColorSubTableEXT MANGLE(ColorSubTableEXT)
-+#define glColorSubTable MANGLE(ColorSubTable)
-+#define glColorTableEXT MANGLE(ColorTableEXT)
-+#define glColorTable MANGLE(ColorTable)
-+#define glColorTableParameterfv MANGLE(ColorTableParameterfv)
-+#define glColorTableParameterfvSGI MANGLE(ColorTableParameterfvSGI)
-+#define glColorTableParameteriv MANGLE(ColorTableParameteriv)
-+#define glColorTableParameterivSGI MANGLE(ColorTableParameterivSGI)
-+#define glColorTableSGI MANGLE(ColorTableSGI)
-+#define glCombinerInputNV MANGLE(CombinerInputNV)
-+#define glCombinerOutputNV MANGLE(CombinerOutputNV)
-+#define glCombinerParameterfNV MANGLE(CombinerParameterfNV)
-+#define glCombinerParameterfvNV MANGLE(CombinerParameterfvNV)
-+#define glCombinerParameteriNV MANGLE(CombinerParameteriNV)
-+#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
-+#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
-+#define glCompileShaderARB MANGLE(CompileShaderARB)
-+#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB)
-+#define glCompileShader MANGLE(CompileShader)
-+#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
-+#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
-+#define glCompressedMultiTexImage3DEXT MANGLE(CompressedMultiTexImage3DEXT)
-+#define glCompressedMultiTexSubImage1DEXT MANGLE(CompressedMultiTexSubImage1DEXT)
-+#define glCompressedMultiTexSubImage2DEXT MANGLE(CompressedMultiTexSubImage2DEXT)
-+#define glCompressedMultiTexSubImage3DEXT MANGLE(CompressedMultiTexSubImage3DEXT)
-+#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB)
-+#define glCompressedTexImage1D MANGLE(CompressedTexImage1D)
-+#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB)
-+#define glCompressedTexImage2D MANGLE(CompressedTexImage2D)
-+#define glCompressedTexImage3DARB MANGLE(CompressedTexImage3DARB)
-+#define glCompressedTexImage3D MANGLE(CompressedTexImage3D)
-+#define glCompressedTexSubImage1DARB MANGLE(CompressedTexSubImage1DARB)
-+#define glCompressedTexSubImage1D MANGLE(CompressedTexSubImage1D)
-+#define glCompressedTexSubImage2DARB MANGLE(CompressedTexSubImage2DARB)
-+#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D)
-+#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB)
-+#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D)
-+#define glCompressedTextureImage1DEXT MANGLE(CompressedTextureImage1DEXT)
-+#define glCompressedTextureImage2DEXT MANGLE(CompressedTextureImage2DEXT)
-+#define glCompressedTextureImage3DEXT MANGLE(CompressedTextureImage3DEXT)
-+#define glCompressedTextureSubImage1DEXT MANGLE(CompressedTextureSubImage1DEXT)
-+#define glCompressedTextureSubImage1D MANGLE(CompressedTextureSubImage1D)
-+#define glCompressedTextureSubImage2DEXT MANGLE(CompressedTextureSubImage2DEXT)
-+#define glCompressedTextureSubImage2D MANGLE(CompressedTextureSubImage2D)
-+#define glCompressedTextureSubImage3DEXT MANGLE(CompressedTextureSubImage3DEXT)
-+#define glCompressedTextureSubImage3D MANGLE(CompressedTextureSubImage3D)
-+#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT)
-+#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D)
-+#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT)
-+#define glConvolutionFilter2D MANGLE(ConvolutionFilter2D)
-+#define glConvolutionParameterfEXT MANGLE(ConvolutionParameterfEXT)
-+#define glConvolutionParameterf MANGLE(ConvolutionParameterf)
-+#define glConvolutionParameterfvEXT MANGLE(ConvolutionParameterfvEXT)
-+#define glConvolutionParameterfv MANGLE(ConvolutionParameterfv)
-+#define glConvolutionParameteriEXT MANGLE(ConvolutionParameteriEXT)
-+#define glConvolutionParameteri MANGLE(ConvolutionParameteri)
-+#define glConvolutionParameterivEXT MANGLE(ConvolutionParameterivEXT)
-+#define glConvolutionParameteriv MANGLE(ConvolutionParameteriv)
-+#define glConvolutionParameterxOES MANGLE(ConvolutionParameterxOES)
-+#define glConvolutionParameterxvOES MANGLE(ConvolutionParameterxvOES)
-+#define glCopyBufferSubData MANGLE(CopyBufferSubData)
-+#define glCopyColorSubTableEXT MANGLE(CopyColorSubTableEXT)
-+#define glCopyColorSubTable MANGLE(CopyColorSubTable)
-+#define glCopyColorTable MANGLE(CopyColorTable)
-+#define glCopyColorTableSGI MANGLE(CopyColorTableSGI)
-+#define glCopyConvolutionFilter1DEXT MANGLE(CopyConvolutionFilter1DEXT)
-+#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
-+#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
-+#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
-+#define glCopyImageSubData MANGLE(CopyImageSubData)
-+#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV)
-+#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
-+#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
-+#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
-+#define glCopyMultiTexSubImage2DEXT MANGLE(CopyMultiTexSubImage2DEXT)
-+#define glCopyMultiTexSubImage3DEXT MANGLE(CopyMultiTexSubImage3DEXT)
-+#define glCopyNamedBufferSubData MANGLE(CopyNamedBufferSubData)
-+#define glCopyPathNV MANGLE(CopyPathNV)
-+#define glCopyPixels MANGLE(CopyPixels)
-+#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT)
-+#define glCopyTexImage1D MANGLE(CopyTexImage1D)
-+#define glCopyTexImage2DEXT MANGLE(CopyTexImage2DEXT)
-+#define glCopyTexImage2D MANGLE(CopyTexImage2D)
-+#define glCopyTexSubImage1DEXT MANGLE(CopyTexSubImage1DEXT)
-+#define glCopyTexSubImage1D MANGLE(CopyTexSubImage1D)
-+#define glCopyTexSubImage2DEXT MANGLE(CopyTexSubImage2DEXT)
-+#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D)
-+#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT)
-+#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D)
-+#define glCopyTextureImage1DEXT MANGLE(CopyTextureImage1DEXT)
-+#define glCopyTextureImage2DEXT MANGLE(CopyTextureImage2DEXT)
-+#define glCopyTextureSubImage1DEXT MANGLE(CopyTextureSubImage1DEXT)
-+#define glCopyTextureSubImage1D MANGLE(CopyTextureSubImage1D)
-+#define glCopyTextureSubImage2DEXT MANGLE(CopyTextureSubImage2DEXT)
-+#define glCopyTextureSubImage2D MANGLE(CopyTextureSubImage2D)
-+#define glCopyTextureSubImage3DEXT MANGLE(CopyTextureSubImage3DEXT)
-+#define glCopyTextureSubImage3D MANGLE(CopyTextureSubImage3D)
-+#define glCoverFillPathInstancedNV MANGLE(CoverFillPathInstancedNV)
-+#define glCoverFillPathNV MANGLE(CoverFillPathNV)
-+#define glCoverStrokePathInstancedNV MANGLE(CoverStrokePathInstancedNV)
-+#define glCoverStrokePathNV MANGLE(CoverStrokePathNV)
-+#define glCreateBuffers MANGLE(CreateBuffers)
-+#define glCreateFramebuffers MANGLE(CreateFramebuffers)
-+#define glCreatePerfQueryINTEL MANGLE(CreatePerfQueryINTEL)
-+#define glCreateProgram MANGLE(CreateProgram)
-+#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
-+#define glCreateProgramPipelines MANGLE(CreateProgramPipelines)
-+#define glCreateQueries MANGLE(CreateQueries)
-+#define glCreateRenderbuffers MANGLE(CreateRenderbuffers)
-+#define glCreateSamplers MANGLE(CreateSamplers)
-+#define glCreateShader MANGLE(CreateShader)
-+#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
-+#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
-+#define glCreateShaderProgramv MANGLE(CreateShaderProgramv)
-+#define glCreateSyncFromCLeventARB MANGLE(CreateSyncFromCLeventARB)
-+#define glCreateTextures MANGLE(CreateTextures)
-+#define glCreateTransformFeedbacks MANGLE(CreateTransformFeedbacks)
-+#define glCreateVertexArrays MANGLE(CreateVertexArrays)
-+#define glCullFace MANGLE(CullFace)
-+#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
-+#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
-+#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB)
-+#define glDebugMessageCallbackAMD MANGLE(DebugMessageCallbackAMD)
-+#define glDebugMessageCallbackARB MANGLE(DebugMessageCallbackARB)
-+#define glDebugMessageCallback MANGLE(DebugMessageCallback)
-+#define glDebugMessageControlARB MANGLE(DebugMessageControlARB)
-+#define glDebugMessageControl MANGLE(DebugMessageControl)
-+#define glDebugMessageEnableAMD MANGLE(DebugMessageEnableAMD)
-+#define glDebugMessageInsertAMD MANGLE(DebugMessageInsertAMD)
-+#define glDebugMessageInsertARB MANGLE(DebugMessageInsertARB)
-+#define glDebugMessageInsert MANGLE(DebugMessageInsert)
-+#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX)
-+#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX)
-+#define glDeformSGIX MANGLE(DeformSGIX)
-+#define glDeleteAsyncMarkersSGIX MANGLE(DeleteAsyncMarkersSGIX)
-+#define glDeleteBuffersARB MANGLE(DeleteBuffersARB)
-+#define glDeleteBuffers MANGLE(DeleteBuffers)
-+#define glDeleteFencesAPPLE MANGLE(DeleteFencesAPPLE)
-+#define glDeleteFencesNV MANGLE(DeleteFencesNV)
-+#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI)
-+#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
-+#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
-+#define glDeleteLists MANGLE(DeleteLists)
-+#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB)
-+#define glDeleteNamesAMD MANGLE(DeleteNamesAMD)
-+#define glDeleteObjectARB MANGLE(DeleteObjectARB)
-+#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
-+#define glDeletePathsNV MANGLE(DeletePathsNV)
-+#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD)
-+#define glDeletePerfQueryINTEL MANGLE(DeletePerfQueryINTEL)
-+#define glDeleteProgram MANGLE(DeleteProgram)
-+#define glDeleteProgramPipelines MANGLE(DeleteProgramPipelines)
-+#define glDeleteProgramsARB MANGLE(DeleteProgramsARB)
-+#define glDeleteProgramsNV MANGLE(DeleteProgramsNV)
-+#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
-+#define glDeleteQueries MANGLE(DeleteQueries)
-+#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
-+#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
-+#define glDeleteSamplers MANGLE(DeleteSamplers)
-+#define glDeleteShader MANGLE(DeleteShader)
-+#define glDeleteSync MANGLE(DeleteSync)
-+#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
-+#define glDeleteTextures MANGLE(DeleteTextures)
-+#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks)
-+#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
-+#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
-+#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
-+#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT)
-+#define glDepthBoundsdNV MANGLE(DepthBoundsdNV)
-+#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
-+#define glDepthFunc MANGLE(DepthFunc)
-+#define glDepthMask MANGLE(DepthMask)
-+#define glDepthRangeArrayv MANGLE(DepthRangeArrayv)
-+#define glDepthRangedNV MANGLE(DepthRangedNV)
-+#define glDepthRangef MANGLE(DepthRangef)
-+#define glDepthRangefOES MANGLE(DepthRangefOES)
-+#define glDepthRangeIndexed MANGLE(DepthRangeIndexed)
-+#define glDepthRange MANGLE(DepthRange)
-+#define glDepthRangexOES MANGLE(DepthRangexOES)
-+#define glDetachObjectARB MANGLE(DetachObjectARB)
-+#define glDetachShader MANGLE(DetachShader)
-+#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
-+#define glDisableClientStateiEXT MANGLE(DisableClientStateiEXT)
-+#define glDisableClientStateIndexedEXT MANGLE(DisableClientStateIndexedEXT)
-+#define glDisableClientState MANGLE(DisableClientState)
-+#define glDisablei MANGLE(Disablei)
-+#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
-+#define glDisable MANGLE(Disable)
-+#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
-+#define glDisableVertexArrayAttribEXT MANGLE(DisableVertexArrayAttribEXT)
-+#define glDisableVertexArrayAttrib MANGLE(DisableVertexArrayAttrib)
-+#define glDisableVertexArrayEXT MANGLE(DisableVertexArrayEXT)
-+#define glDisableVertexAttribAPPLE MANGLE(DisableVertexAttribAPPLE)
-+#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
-+#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
-+#define glDispatchComputeGroupSizeARB MANGLE(DispatchComputeGroupSizeARB)
-+#define glDispatchComputeIndirect MANGLE(DispatchComputeIndirect)
-+#define glDispatchCompute MANGLE(DispatchCompute)
-+#define glDrawArraysEXT MANGLE(DrawArraysEXT)
-+#define glDrawArraysIndirect MANGLE(DrawArraysIndirect)
-+#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
-+#define glDrawArraysInstancedBaseInstance MANGLE(DrawArraysInstancedBaseInstance)
-+#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
-+#define glDrawArraysInstanced MANGLE(DrawArraysInstanced)
-+#define glDrawArrays MANGLE(DrawArrays)
-+#define glDrawBuffer MANGLE(DrawBuffer)
-+#define glDrawBuffersARB MANGLE(DrawBuffersARB)
-+#define glDrawBuffersATI MANGLE(DrawBuffersATI)
-+#define glDrawBuffers MANGLE(DrawBuffers)
-+#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
-+#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
-+#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
-+#define glDrawElementsIndirect MANGLE(DrawElementsIndirect)
-+#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
-+#define glDrawElementsInstancedBaseInstance MANGLE(DrawElementsInstancedBaseInstance)
-+#define glDrawElementsInstancedBaseVertexBaseInstance MANGLE(DrawElementsInstancedBaseVertexBaseInstance)
-+#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
-+#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
-+#define glDrawElementsInstanced MANGLE(DrawElementsInstanced)
-+#define glDrawElements MANGLE(DrawElements)
-+#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN)
-+#define glDrawPixels MANGLE(DrawPixels)
-+#define glDrawRangeElementArrayAPPLE MANGLE(DrawRangeElementArrayAPPLE)
-+#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
-+#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
-+#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
-+#define glDrawRangeElements MANGLE(DrawRangeElements)
-+#define glDrawTextureNV MANGLE(DrawTextureNV)
-+#define glDrawTransformFeedbackInstanced MANGLE(DrawTransformFeedbackInstanced)
-+#define glDrawTransformFeedback MANGLE(DrawTransformFeedback)
-+#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
-+#define glDrawTransformFeedbackStreamInstanced MANGLE(DrawTransformFeedbackStreamInstanced)
-+#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream)
-+#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
-+#define glEdgeFlag MANGLE(EdgeFlag)
-+#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
-+#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
-+#define glEdgeFlagPointer MANGLE(EdgeFlagPointer)
-+#define glEdgeFlagv MANGLE(EdgeFlagv)
-+#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES)
-+#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES)
-+#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
-+#define glElementPointerATI MANGLE(ElementPointerATI)
-+#define glEnableClientStateiEXT MANGLE(EnableClientStateiEXT)
-+#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
-+#define glEnableClientState MANGLE(EnableClientState)
-+#define glEnablei MANGLE(Enablei)
-+#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
-+#define glEnable MANGLE(Enable)
-+#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
-+#define glEnableVertexArrayAttribEXT MANGLE(EnableVertexArrayAttribEXT)
-+#define glEnableVertexArrayAttrib MANGLE(EnableVertexArrayAttrib)
-+#define glEnableVertexArrayEXT MANGLE(EnableVertexArrayEXT)
-+#define glEnableVertexAttribAPPLE MANGLE(EnableVertexAttribAPPLE)
-+#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
-+#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
-+#define glEndConditionalRender MANGLE(EndConditionalRender)
-+#define glEndConditionalRenderNV MANGLE(EndConditionalRenderNV)
-+#define glEndConditionalRenderNVX MANGLE(EndConditionalRenderNVX)
-+#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI)
-+#define glEndList MANGLE(EndList)
-+#define glEnd MANGLE(End)
-+#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
-+#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD)
-+#define glEndPerfQueryINTEL MANGLE(EndPerfQueryINTEL)
-+#define glEndQueryARB MANGLE(EndQueryARB)
-+#define glEndQueryIndexed MANGLE(EndQueryIndexed)
-+#define glEndQuery MANGLE(EndQuery)
-+#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
-+#define glEndTransformFeedback MANGLE(EndTransformFeedback)
-+#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
-+#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
-+#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV)
-+#define glEvalCoord1d MANGLE(EvalCoord1d)
-+#define glEvalCoord1dv MANGLE(EvalCoord1dv)
-+#define glEvalCoord1f MANGLE(EvalCoord1f)
-+#define glEvalCoord1fv MANGLE(EvalCoord1fv)
-+#define glEvalCoord1xOES MANGLE(EvalCoord1xOES)
-+#define glEvalCoord1xvOES MANGLE(EvalCoord1xvOES)
-+#define glEvalCoord2d MANGLE(EvalCoord2d)
-+#define glEvalCoord2dv MANGLE(EvalCoord2dv)
-+#define glEvalCoord2f MANGLE(EvalCoord2f)
-+#define glEvalCoord2fv MANGLE(EvalCoord2fv)
-+#define glEvalCoord2xOES MANGLE(EvalCoord2xOES)
-+#define glEvalCoord2xvOES MANGLE(EvalCoord2xvOES)
-+#define glEvalMapsNV MANGLE(EvalMapsNV)
-+#define glEvalMesh1 MANGLE(EvalMesh1)
-+#define glEvalMesh2 MANGLE(EvalMesh2)
-+#define glEvalPoint1 MANGLE(EvalPoint1)
-+#define glEvalPoint2 MANGLE(EvalPoint2)
-+#define glExecuteProgramNV MANGLE(ExecuteProgramNV)
-+#define glExtractComponentEXT MANGLE(ExtractComponentEXT)
-+#define glFeedbackBuffer MANGLE(FeedbackBuffer)
-+#define glFeedbackBufferxOES MANGLE(FeedbackBufferxOES)
-+#define glFenceSync MANGLE(FenceSync)
-+#define glFinalCombinerInputNV MANGLE(FinalCombinerInputNV)
-+#define glFinishAsyncSGIX MANGLE(FinishAsyncSGIX)
-+#define glFinishFenceAPPLE MANGLE(FinishFenceAPPLE)
-+#define glFinishFenceNV MANGLE(FinishFenceNV)
-+#define glFinish MANGLE(Finish)
-+#define glFinishObjectAPPLE MANGLE(FinishObjectAPPLE)
-+#define glFinishTextureSUNX MANGLE(FinishTextureSUNX)
-+#define glFlush MANGLE(Flush)
-+#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
-+#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
-+#define glFlushMappedNamedBufferRangeEXT MANGLE(FlushMappedNamedBufferRangeEXT)
-+#define glFlushMappedNamedBufferRange MANGLE(FlushMappedNamedBufferRange)
-+#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
-+#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
-+#define glFlushStaticDataIBM MANGLE(FlushStaticDataIBM)
-+#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
-+#define glFlushVertexArrayRangeNV MANGLE(FlushVertexArrayRangeNV)
-+#define glFogCoorddEXT MANGLE(FogCoorddEXT)
-+#define glFogCoordd MANGLE(FogCoordd)
-+#define glFogCoorddvEXT MANGLE(FogCoorddvEXT)
-+#define glFogCoorddv MANGLE(FogCoorddv)
-+#define glFogCoordfEXT MANGLE(FogCoordfEXT)
-+#define glFogCoordf MANGLE(FogCoordf)
-+#define glFogCoordFormatNV MANGLE(FogCoordFormatNV)
-+#define glFogCoordfvEXT MANGLE(FogCoordfvEXT)
-+#define glFogCoordfv MANGLE(FogCoordfv)
-+#define glFogCoordhNV MANGLE(FogCoordhNV)
-+#define glFogCoordhvNV MANGLE(FogCoordhvNV)
-+#define glFogCoordPointerEXT MANGLE(FogCoordPointerEXT)
-+#define glFogCoordPointerListIBM MANGLE(FogCoordPointerListIBM)
-+#define glFogCoordPointer MANGLE(FogCoordPointer)
-+#define glFogf MANGLE(Fogf)
-+#define glFogFuncSGIS MANGLE(FogFuncSGIS)
-+#define glFogfv MANGLE(Fogfv)
-+#define glFogi MANGLE(Fogi)
-+#define glFogiv MANGLE(Fogiv)
-+#define glFogxOES MANGLE(FogxOES)
-+#define glFogxvOES MANGLE(FogxvOES)
-+#define glFragmentColorMaterialSGIX MANGLE(FragmentColorMaterialSGIX)
-+#define glFragmentLightfSGIX MANGLE(FragmentLightfSGIX)
-+#define glFragmentLightfvSGIX MANGLE(FragmentLightfvSGIX)
-+#define glFragmentLightiSGIX MANGLE(FragmentLightiSGIX)
-+#define glFragmentLightivSGIX MANGLE(FragmentLightivSGIX)
-+#define glFragmentLightModelfSGIX MANGLE(FragmentLightModelfSGIX)
-+#define glFragmentLightModelfvSGIX MANGLE(FragmentLightModelfvSGIX)
-+#define glFragmentLightModeliSGIX MANGLE(FragmentLightModeliSGIX)
-+#define glFragmentLightModelivSGIX MANGLE(FragmentLightModelivSGIX)
-+#define glFragmentMaterialfSGIX MANGLE(FragmentMaterialfSGIX)
-+#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX)
-+#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX)
-+#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX)
-+#define glFramebufferDrawBufferEXT MANGLE(FramebufferDrawBufferEXT)
-+#define glFramebufferDrawBuffersEXT MANGLE(FramebufferDrawBuffersEXT)
-+#define glFramebufferParameteri MANGLE(FramebufferParameteri)
-+#define glFramebufferReadBufferEXT MANGLE(FramebufferReadBufferEXT)
-+#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT)
-+#define glFramebufferRenderbuffer MANGLE(FramebufferRenderbuffer)
-+#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT)
-+#define glFramebufferTexture1D MANGLE(FramebufferTexture1D)
-+#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT)
-+#define glFramebufferTexture2D MANGLE(FramebufferTexture2D)
-+#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT)
-+#define glFramebufferTexture3D MANGLE(FramebufferTexture3D)
-+#define glFramebufferTextureARB MANGLE(FramebufferTextureARB)
-+#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
-+#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
-+#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
-+#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
-+#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
-+#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
-+#define glFramebufferTexture MANGLE(FramebufferTexture)
-+#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
-+#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
-+#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
-+#define glFrontFace MANGLE(FrontFace)
-+#define glFrustumfOES MANGLE(FrustumfOES)
-+#define glFrustum MANGLE(Frustum)
-+#define glFrustumxOES MANGLE(FrustumxOES)
-+#define glGenAsyncMarkersSGIX MANGLE(GenAsyncMarkersSGIX)
-+#define glGenBuffersARB MANGLE(GenBuffersARB)
-+#define glGenBuffers MANGLE(GenBuffers)
-+#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT)
-+#define glGenerateMipmap MANGLE(GenerateMipmap)
-+#define glGenerateMultiTexMipmapEXT MANGLE(GenerateMultiTexMipmapEXT)
-+#define glGenerateTextureMipmapEXT MANGLE(GenerateTextureMipmapEXT)
-+#define glGenerateTextureMipmap MANGLE(GenerateTextureMipmap)
-+#define glGenFencesAPPLE MANGLE(GenFencesAPPLE)
-+#define glGenFencesNV MANGLE(GenFencesNV)
-+#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI)
-+#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
-+#define glGenFramebuffers MANGLE(GenFramebuffers)
-+#define glGenLists MANGLE(GenLists)
-+#define glGenNamesAMD MANGLE(GenNamesAMD)
-+#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
-+#define glGenPathsNV MANGLE(GenPathsNV)
-+#define glGenPerfMonitorsAMD MANGLE(GenPerfMonitorsAMD)
-+#define glGenProgramPipelines MANGLE(GenProgramPipelines)
-+#define glGenProgramsARB MANGLE(GenProgramsARB)
-+#define glGenProgramsNV MANGLE(GenProgramsNV)
-+#define glGenQueriesARB MANGLE(GenQueriesARB)
-+#define glGenQueries MANGLE(GenQueries)
-+#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
-+#define glGenRenderbuffers MANGLE(GenRenderbuffers)
-+#define glGenSamplers MANGLE(GenSamplers)
-+#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
-+#define glGenTexturesEXT MANGLE(GenTexturesEXT)
-+#define glGenTextures MANGLE(GenTextures)
-+#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks)
-+#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
-+#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
-+#define glGenVertexArrays MANGLE(GenVertexArrays)
-+#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
-+#define glGetActiveAtomicCounterBufferiv MANGLE(GetActiveAtomicCounterBufferiv)
-+#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
-+#define glGetActiveAttrib MANGLE(GetActiveAttrib)
-+#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName)
-+#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv)
-+#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName)
-+#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
-+#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv)
-+#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName)
-+#define glGetActiveUniform MANGLE(GetActiveUniform)
-+#define glGetActiveUniformName MANGLE(GetActiveUniformName)
-+#define glGetActiveUniformsiv MANGLE(GetActiveUniformsiv)
-+#define glGetActiveVaryingNV MANGLE(GetActiveVaryingNV)
-+#define glGetArrayObjectfvATI MANGLE(GetArrayObjectfvATI)
-+#define glGetArrayObjectivATI MANGLE(GetArrayObjectivATI)
-+#define glGetAttachedObjectsARB MANGLE(GetAttachedObjectsARB)
-+#define glGetAttachedShaders MANGLE(GetAttachedShaders)
-+#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
-+#define glGetAttribLocation MANGLE(GetAttribLocation)
-+#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
-+#define glGetBooleani_v MANGLE(GetBooleani_v)
-+#define glGetBooleanv MANGLE(GetBooleanv)
-+#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
-+#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
-+#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
-+#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV)
-+#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
-+#define glGetBufferPointerv MANGLE(GetBufferPointerv)
-+#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB)
-+#define glGetBufferSubData MANGLE(GetBufferSubData)
-+#define glGetClipPlanefOES MANGLE(GetClipPlanefOES)
-+#define glGetClipPlane MANGLE(GetClipPlane)
-+#define glGetClipPlanexOES MANGLE(GetClipPlanexOES)
-+#define glGetColorTableEXT MANGLE(GetColorTableEXT)
-+#define glGetColorTable MANGLE(GetColorTable)
-+#define glGetColorTableParameterfvEXT MANGLE(GetColorTableParameterfvEXT)
-+#define glGetColorTableParameterfv MANGLE(GetColorTableParameterfv)
-+#define glGetColorTableParameterfvSGI MANGLE(GetColorTableParameterfvSGI)
-+#define glGetColorTableParameterivEXT MANGLE(GetColorTableParameterivEXT)
-+#define glGetColorTableParameteriv MANGLE(GetColorTableParameteriv)
-+#define glGetColorTableParameterivSGI MANGLE(GetColorTableParameterivSGI)
-+#define glGetColorTableSGI MANGLE(GetColorTableSGI)
-+#define glGetCombinerInputParameterfvNV MANGLE(GetCombinerInputParameterfvNV)
-+#define glGetCombinerInputParameterivNV MANGLE(GetCombinerInputParameterivNV)
-+#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV)
-+#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV)
-+#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV)
-+#define glGetCompressedMultiTexImageEXT MANGLE(GetCompressedMultiTexImageEXT)
-+#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB)
-+#define glGetCompressedTexImage MANGLE(GetCompressedTexImage)
-+#define glGetCompressedTextureImageEXT MANGLE(GetCompressedTextureImageEXT)
-+#define glGetCompressedTextureImage MANGLE(GetCompressedTextureImage)
-+#define glGetCompressedTextureSubImage MANGLE(GetCompressedTextureSubImage)
-+#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT)
-+#define glGetConvolutionFilter MANGLE(GetConvolutionFilter)
-+#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT)
-+#define glGetConvolutionParameterfv MANGLE(GetConvolutionParameterfv)
-+#define glGetConvolutionParameterivEXT MANGLE(GetConvolutionParameterivEXT)
-+#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv)
-+#define glGetConvolutionParameterxvOES MANGLE(GetConvolutionParameterxvOES)
-+#define glGetDebugMessageLogAMD MANGLE(GetDebugMessageLogAMD)
-+#define glGetDebugMessageLogARB MANGLE(GetDebugMessageLogARB)
-+#define glGetDebugMessageLog MANGLE(GetDebugMessageLog)
-+#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
-+#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
-+#define glGetDoublei_vEXT MANGLE(GetDoublei_vEXT)
-+#define glGetDoublei_v MANGLE(GetDoublei_v)
-+#define glGetDoublev MANGLE(GetDoublev)
-+#define glGetError MANGLE(GetError)
-+#define glGetFenceivNV MANGLE(GetFenceivNV)
-+#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
-+#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
-+#define glGetFirstPerfQueryIdINTEL MANGLE(GetFirstPerfQueryIdINTEL)
-+#define glGetFixedvOES MANGLE(GetFixedvOES)
-+#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
-+#define glGetFloati_vEXT MANGLE(GetFloati_vEXT)
-+#define glGetFloati_v MANGLE(GetFloati_v)
-+#define glGetFloatv MANGLE(GetFloatv)
-+#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
-+#define glGetFragDataIndex MANGLE(GetFragDataIndex)
-+#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
-+#define glGetFragDataLocation MANGLE(GetFragDataLocation)
-+#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
-+#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX)
-+#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX)
-+#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX)
-+#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
-+#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
-+#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
-+#define glGetFramebufferParameteriv MANGLE(GetFramebufferParameteriv)
-+#define glGetGraphicsResetStatusARB MANGLE(GetGraphicsResetStatusARB)
-+#define glGetGraphicsResetStatus MANGLE(GetGraphicsResetStatus)
-+#define glGetHandleARB MANGLE(GetHandleARB)
-+#define glGetHistogramEXT MANGLE(GetHistogramEXT)
-+#define glGetHistogram MANGLE(GetHistogram)
-+#define glGetHistogramParameterfvEXT MANGLE(GetHistogramParameterfvEXT)
-+#define glGetHistogramParameterfv MANGLE(GetHistogramParameterfv)
-+#define glGetHistogramParameterivEXT MANGLE(GetHistogramParameterivEXT)
-+#define glGetHistogramParameteriv MANGLE(GetHistogramParameteriv)
-+#define glGetHistogramParameterxvOES MANGLE(GetHistogramParameterxvOES)
-+#define glGetImageHandleARB MANGLE(GetImageHandleARB)
-+#define glGetImageHandleNV MANGLE(GetImageHandleNV)
-+#define glGetImageTransformParameterfvHP MANGLE(GetImageTransformParameterfvHP)
-+#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP)
-+#define glGetInfoLogARB MANGLE(GetInfoLogARB)
-+#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
-+#define glGetInteger64i_v MANGLE(GetInteger64i_v)
-+#define glGetInteger64v MANGLE(GetInteger64v)
-+#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
-+#define glGetIntegeri_v MANGLE(GetIntegeri_v)
-+#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV)
-+#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV)
-+#define glGetIntegerv MANGLE(GetIntegerv)
-+#define glGetInternalformati64v MANGLE(GetInternalformati64v)
-+#define glGetInternalformativ MANGLE(GetInternalformativ)
-+#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
-+#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
-+#define glGetInvariantIntegervEXT MANGLE(GetInvariantIntegervEXT)
-+#define glGetLightfv MANGLE(GetLightfv)
-+#define glGetLightiv MANGLE(GetLightiv)
-+#define glGetLightxOES MANGLE(GetLightxOES)
-+#define glGetListParameterfvSGIX MANGLE(GetListParameterfvSGIX)
-+#define glGetListParameterivSGIX MANGLE(GetListParameterivSGIX)
-+#define glGetLocalConstantBooleanvEXT MANGLE(GetLocalConstantBooleanvEXT)
-+#define glGetLocalConstantFloatvEXT MANGLE(GetLocalConstantFloatvEXT)
-+#define glGetLocalConstantIntegervEXT MANGLE(GetLocalConstantIntegervEXT)
-+#define glGetMapAttribParameterfvNV MANGLE(GetMapAttribParameterfvNV)
-+#define glGetMapAttribParameterivNV MANGLE(GetMapAttribParameterivNV)
-+#define glGetMapControlPointsNV MANGLE(GetMapControlPointsNV)
-+#define glGetMapdv MANGLE(GetMapdv)
-+#define glGetMapfv MANGLE(GetMapfv)
-+#define glGetMapiv MANGLE(GetMapiv)
-+#define glGetMapParameterfvNV MANGLE(GetMapParameterfvNV)
-+#define glGetMapParameterivNV MANGLE(GetMapParameterivNV)
-+#define glGetMapxvOES MANGLE(GetMapxvOES)
-+#define glGetMaterialfv MANGLE(GetMaterialfv)
-+#define glGetMaterialiv MANGLE(GetMaterialiv)
-+#define glGetMaterialxOES MANGLE(GetMaterialxOES)
-+#define glGetMinmaxEXT MANGLE(GetMinmaxEXT)
-+#define glGetMinmax MANGLE(GetMinmax)
-+#define glGetMinmaxParameterfvEXT MANGLE(GetMinmaxParameterfvEXT)
-+#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
-+#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
-+#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
-+#define glGetMultisamplefv MANGLE(GetMultisamplefv)
-+#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
-+#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
-+#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
-+#define glGetMultiTexGendvEXT MANGLE(GetMultiTexGendvEXT)
-+#define glGetMultiTexGenfvEXT MANGLE(GetMultiTexGenfvEXT)
-+#define glGetMultiTexGenivEXT MANGLE(GetMultiTexGenivEXT)
-+#define glGetMultiTexImageEXT MANGLE(GetMultiTexImageEXT)
-+#define glGetMultiTexLevelParameterfvEXT MANGLE(GetMultiTexLevelParameterfvEXT)
-+#define glGetMultiTexLevelParameterivEXT MANGLE(GetMultiTexLevelParameterivEXT)
-+#define glGetMultiTexParameterfvEXT MANGLE(GetMultiTexParameterfvEXT)
-+#define glGetMultiTexParameterIivEXT MANGLE(GetMultiTexParameterIivEXT)
-+#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
-+#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
-+#define glGetNamedBufferParameteri64v MANGLE(GetNamedBufferParameteri64v)
-+#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
-+#define glGetNamedBufferParameteriv MANGLE(GetNamedBufferParameteriv)
-+#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV)
-+#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
-+#define glGetNamedBufferPointerv MANGLE(GetNamedBufferPointerv)
-+#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
-+#define glGetNamedBufferSubData MANGLE(GetNamedBufferSubData)
-+#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
-+#define glGetNamedFramebufferAttachmentParameteriv MANGLE(GetNamedFramebufferAttachmentParameteriv)
-+#define glGetNamedFramebufferParameterivEXT MANGLE(GetNamedFramebufferParameterivEXT)
-+#define glGetNamedFramebufferParameteriv MANGLE(GetNamedFramebufferParameteriv)
-+#define glGetNamedProgramivEXT MANGLE(GetNamedProgramivEXT)
-+#define glGetNamedProgramLocalParameterdvEXT MANGLE(GetNamedProgramLocalParameterdvEXT)
-+#define glGetNamedProgramLocalParameterfvEXT MANGLE(GetNamedProgramLocalParameterfvEXT)
-+#define glGetNamedProgramLocalParameterIivEXT MANGLE(GetNamedProgramLocalParameterIivEXT)
-+#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
-+#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
-+#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
-+#define glGetNamedRenderbufferParameteriv MANGLE(GetNamedRenderbufferParameteriv)
-+#define glGetNamedStringARB MANGLE(GetNamedStringARB)
-+#define glGetNamedStringivARB MANGLE(GetNamedStringivARB)
-+#define glGetnColorTableARB MANGLE(GetnColorTableARB)
-+#define glGetnColorTable MANGLE(GetnColorTable)
-+#define glGetnCompressedTexImageARB MANGLE(GetnCompressedTexImageARB)
-+#define glGetnCompressedTexImage MANGLE(GetnCompressedTexImage)
-+#define glGetnConvolutionFilterARB MANGLE(GetnConvolutionFilterARB)
-+#define glGetnConvolutionFilter MANGLE(GetnConvolutionFilter)
-+#define glGetNextPerfQueryIdINTEL MANGLE(GetNextPerfQueryIdINTEL)
-+#define glGetnHistogramARB MANGLE(GetnHistogramARB)
-+#define glGetnHistogram MANGLE(GetnHistogram)
-+#define glGetnMapdvARB MANGLE(GetnMapdvARB)
-+#define glGetnMapdv MANGLE(GetnMapdv)
-+#define glGetnMapfvARB MANGLE(GetnMapfvARB)
-+#define glGetnMapfv MANGLE(GetnMapfv)
-+#define glGetnMapivARB MANGLE(GetnMapivARB)
-+#define glGetnMapiv MANGLE(GetnMapiv)
-+#define glGetnMinmaxARB MANGLE(GetnMinmaxARB)
-+#define glGetnMinmax MANGLE(GetnMinmax)
-+#define glGetnPixelMapfvARB MANGLE(GetnPixelMapfvARB)
-+#define glGetnPixelMapfv MANGLE(GetnPixelMapfv)
-+#define glGetnPixelMapuivARB MANGLE(GetnPixelMapuivARB)
-+#define glGetnPixelMapuiv MANGLE(GetnPixelMapuiv)
-+#define glGetnPixelMapusvARB MANGLE(GetnPixelMapusvARB)
-+#define glGetnPixelMapusv MANGLE(GetnPixelMapusv)
-+#define glGetnPolygonStippleARB MANGLE(GetnPolygonStippleARB)
-+#define glGetnPolygonStipple MANGLE(GetnPolygonStipple)
-+#define glGetnSeparableFilterARB MANGLE(GetnSeparableFilterARB)
-+#define glGetnSeparableFilter MANGLE(GetnSeparableFilter)
-+#define glGetnTexImageARB MANGLE(GetnTexImageARB)
-+#define glGetnTexImage MANGLE(GetnTexImage)
-+#define glGetnUniformdvARB MANGLE(GetnUniformdvARB)
-+#define glGetnUniformdv MANGLE(GetnUniformdv)
-+#define glGetnUniformfvARB MANGLE(GetnUniformfvARB)
-+#define glGetnUniformfv MANGLE(GetnUniformfv)
-+#define glGetnUniformivARB MANGLE(GetnUniformivARB)
-+#define glGetnUniformiv MANGLE(GetnUniformiv)
-+#define glGetnUniformuivARB MANGLE(GetnUniformuivARB)
-+#define glGetnUniformuiv MANGLE(GetnUniformuiv)
-+#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
-+#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
-+#define glGetObjectLabelEXT MANGLE(GetObjectLabelEXT)
-+#define glGetObjectLabel MANGLE(GetObjectLabel)
-+#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
-+#define glGetObjectParameterivAPPLE MANGLE(GetObjectParameterivAPPLE)
-+#define glGetObjectParameterivARB MANGLE(GetObjectParameterivARB)
-+#define glGetObjectPtrLabel MANGLE(GetObjectPtrLabel)
-+#define glGetOcclusionQueryivNV MANGLE(GetOcclusionQueryivNV)
-+#define glGetOcclusionQueryuivNV MANGLE(GetOcclusionQueryuivNV)
-+#define glGetPathColorGenfvNV MANGLE(GetPathColorGenfvNV)
-+#define glGetPathColorGenivNV MANGLE(GetPathColorGenivNV)
-+#define glGetPathCommandsNV MANGLE(GetPathCommandsNV)
-+#define glGetPathCoordsNV MANGLE(GetPathCoordsNV)
-+#define glGetPathDashArrayNV MANGLE(GetPathDashArrayNV)
-+#define glGetPathLengthNV MANGLE(GetPathLengthNV)
-+#define glGetPathMetricRangeNV MANGLE(GetPathMetricRangeNV)
-+#define glGetPathMetricsNV MANGLE(GetPathMetricsNV)
-+#define glGetPathParameterfvNV MANGLE(GetPathParameterfvNV)
-+#define glGetPathParameterivNV MANGLE(GetPathParameterivNV)
-+#define glGetPathSpacingNV MANGLE(GetPathSpacingNV)
-+#define glGetPathTexGenfvNV MANGLE(GetPathTexGenfvNV)
-+#define glGetPathTexGenivNV MANGLE(GetPathTexGenivNV)
-+#define glGetPerfCounterInfoINTEL MANGLE(GetPerfCounterInfoINTEL)
-+#define glGetPerfMonitorCounterDataAMD MANGLE(GetPerfMonitorCounterDataAMD)
-+#define glGetPerfMonitorCounterInfoAMD MANGLE(GetPerfMonitorCounterInfoAMD)
-+#define glGetPerfMonitorCountersAMD MANGLE(GetPerfMonitorCountersAMD)
-+#define glGetPerfMonitorCounterStringAMD MANGLE(GetPerfMonitorCounterStringAMD)
-+#define glGetPerfMonitorGroupsAMD MANGLE(GetPerfMonitorGroupsAMD)
-+#define glGetPerfMonitorGroupStringAMD MANGLE(GetPerfMonitorGroupStringAMD)
-+#define glGetPerfQueryDataINTEL MANGLE(GetPerfQueryDataINTEL)
-+#define glGetPerfQueryIdByNameINTEL MANGLE(GetPerfQueryIdByNameINTEL)
-+#define glGetPerfQueryInfoINTEL MANGLE(GetPerfQueryInfoINTEL)
-+#define glGetPixelMapfv MANGLE(GetPixelMapfv)
-+#define glGetPixelMapuiv MANGLE(GetPixelMapuiv)
-+#define glGetPixelMapusv MANGLE(GetPixelMapusv)
-+#define glGetPixelMapxv MANGLE(GetPixelMapxv)
-+#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS)
-+#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS)
-+#define glGetPixelTransformParameterfvEXT MANGLE(GetPixelTransformParameterfvEXT)
-+#define glGetPixelTransformParameterivEXT MANGLE(GetPixelTransformParameterivEXT)
-+#define glGetPointerIndexedvEXT MANGLE(GetPointerIndexedvEXT)
-+#define glGetPointeri_vEXT MANGLE(GetPointeri_vEXT)
-+#define glGetPointervEXT MANGLE(GetPointervEXT)
-+#define glGetPointerv MANGLE(GetPointerv)
-+#define glGetPolygonStipple MANGLE(GetPolygonStipple)
-+#define glGetProgramBinary MANGLE(GetProgramBinary)
-+#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
-+#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
-+#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV)
-+#define glGetProgramEnvParameterIuivNV MANGLE(GetProgramEnvParameterIuivNV)
-+#define glGetProgramInfoLog MANGLE(GetProgramInfoLog)
-+#define glGetProgramInterfaceiv MANGLE(GetProgramInterfaceiv)
-+#define glGetProgramivARB MANGLE(GetProgramivARB)
-+#define glGetProgramiv MANGLE(GetProgramiv)
-+#define glGetProgramivNV MANGLE(GetProgramivNV)
-+#define glGetProgramLocalParameterdvARB MANGLE(GetProgramLocalParameterdvARB)
-+#define glGetProgramLocalParameterfvARB MANGLE(GetProgramLocalParameterfvARB)
-+#define glGetProgramLocalParameterIivNV MANGLE(GetProgramLocalParameterIivNV)
-+#define glGetProgramLocalParameterIuivNV MANGLE(GetProgramLocalParameterIuivNV)
-+#define glGetProgramNamedParameterdvNV MANGLE(GetProgramNamedParameterdvNV)
-+#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV)
-+#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
-+#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV)
-+#define glGetProgramPipelineInfoLog MANGLE(GetProgramPipelineInfoLog)
-+#define glGetProgramPipelineiv MANGLE(GetProgramPipelineiv)
-+#define glGetProgramResourcefvNV MANGLE(GetProgramResourcefvNV)
-+#define glGetProgramResourceIndex MANGLE(GetProgramResourceIndex)
-+#define glGetProgramResourceiv MANGLE(GetProgramResourceiv)
-+#define glGetProgramResourceLocationIndex MANGLE(GetProgramResourceLocationIndex)
-+#define glGetProgramResourceLocation MANGLE(GetProgramResourceLocation)
-+#define glGetProgramResourceName MANGLE(GetProgramResourceName)
-+#define glGetProgramStageiv MANGLE(GetProgramStageiv)
-+#define glGetProgramStringARB MANGLE(GetProgramStringARB)
-+#define glGetProgramStringNV MANGLE(GetProgramStringNV)
-+#define glGetProgramSubroutineParameteruivNV MANGLE(GetProgramSubroutineParameteruivNV)
-+#define glGetQueryIndexediv MANGLE(GetQueryIndexediv)
-+#define glGetQueryivARB MANGLE(GetQueryivARB)
-+#define glGetQueryiv MANGLE(GetQueryiv)
-+#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT)
-+#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v)
-+#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB)
-+#define glGetQueryObjectiv MANGLE(GetQueryObjectiv)
-+#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT)
-+#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v)
-+#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
-+#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
-+#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
-+#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
-+#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv)
-+#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv)
-+#define glGetSamplerParameterIuiv MANGLE(GetSamplerParameterIuiv)
-+#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv)
-+#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
-+#define glGetSeparableFilter MANGLE(GetSeparableFilter)
-+#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
-+#define glGetShaderiv MANGLE(GetShaderiv)
-+#define glGetShaderPrecisionFormat MANGLE(GetShaderPrecisionFormat)
-+#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
-+#define glGetShaderSource MANGLE(GetShaderSource)
-+#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
-+#define glGetStringi MANGLE(GetStringi)
-+#define glGetString MANGLE(GetString)
-+#define glGetSubroutineIndex MANGLE(GetSubroutineIndex)
-+#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation)
-+#define glGetSynciv MANGLE(GetSynciv)
-+#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
-+#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
-+#define glGetTexEnvfv MANGLE(GetTexEnvfv)
-+#define glGetTexEnviv MANGLE(GetTexEnviv)
-+#define glGetTexEnvxvOES MANGLE(GetTexEnvxvOES)
-+#define glGetTexFilterFuncSGIS MANGLE(GetTexFilterFuncSGIS)
-+#define glGetTexGendv MANGLE(GetTexGendv)
-+#define glGetTexGenfv MANGLE(GetTexGenfv)
-+#define glGetTexGeniv MANGLE(GetTexGeniv)
-+#define glGetTexGenxvOES MANGLE(GetTexGenxvOES)
-+#define glGetTexImage MANGLE(GetTexImage)
-+#define glGetTexLevelParameterfv MANGLE(GetTexLevelParameterfv)
-+#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv)
-+#define glGetTexLevelParameterxvOES MANGLE(GetTexLevelParameterxvOES)
-+#define glGetTexParameterfv MANGLE(GetTexParameterfv)
-+#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT)
-+#define glGetTexParameterIiv MANGLE(GetTexParameterIiv)
-+#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
-+#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
-+#define glGetTexParameteriv MANGLE(GetTexParameteriv)
-+#define glGetTexParameterPointervAPPLE MANGLE(GetTexParameterPointervAPPLE)
-+#define glGetTexParameterxvOES MANGLE(GetTexParameterxvOES)
-+#define glGetTextureHandleARB MANGLE(GetTextureHandleARB)
-+#define glGetTextureHandleNV MANGLE(GetTextureHandleNV)
-+#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
-+#define glGetTextureImage MANGLE(GetTextureImage)
-+#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
-+#define glGetTextureLevelParameterfv MANGLE(GetTextureLevelParameterfv)
-+#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
-+#define glGetTextureLevelParameteriv MANGLE(GetTextureLevelParameteriv)
-+#define glGetTextureParameterfvEXT MANGLE(GetTextureParameterfvEXT)
-+#define glGetTextureParameterfv MANGLE(GetTextureParameterfv)
-+#define glGetTextureParameterIivEXT MANGLE(GetTextureParameterIivEXT)
-+#define glGetTextureParameterIiv MANGLE(GetTextureParameterIiv)
-+#define glGetTextureParameterIuivEXT MANGLE(GetTextureParameterIuivEXT)
-+#define glGetTextureParameterIuiv MANGLE(GetTextureParameterIuiv)
-+#define glGetTextureParameterivEXT MANGLE(GetTextureParameterivEXT)
-+#define glGetTextureParameteriv MANGLE(GetTextureParameteriv)
-+#define glGetTextureSamplerHandleARB MANGLE(GetTextureSamplerHandleARB)
-+#define glGetTextureSamplerHandleNV MANGLE(GetTextureSamplerHandleNV)
-+#define glGetTextureSubImage MANGLE(GetTextureSubImage)
-+#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
-+#define glGetTransformFeedbacki64_v MANGLE(GetTransformFeedbacki64_v)
-+#define glGetTransformFeedbacki_v MANGLE(GetTransformFeedbacki_v)
-+#define glGetTransformFeedbackiv MANGLE(GetTransformFeedbackiv)
-+#define glGetTransformFeedbackVaryingEXT MANGLE(GetTransformFeedbackVaryingEXT)
-+#define glGetTransformFeedbackVarying MANGLE(GetTransformFeedbackVarying)
-+#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
-+#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex)
-+#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
-+#define glGetUniformdv MANGLE(GetUniformdv)
-+#define glGetUniformfvARB MANGLE(GetUniformfvARB)
-+#define glGetUniformfv MANGLE(GetUniformfv)
-+#define glGetUniformi64vNV MANGLE(GetUniformi64vNV)
-+#define glGetUniformIndices MANGLE(GetUniformIndices)
-+#define glGetUniformivARB MANGLE(GetUniformivARB)
-+#define glGetUniformiv MANGLE(GetUniformiv)
-+#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
-+#define glGetUniformLocation MANGLE(GetUniformLocation)
-+#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
-+#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv)
-+#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
-+#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
-+#define glGetUniformuiv MANGLE(GetUniformuiv)
-+#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
-+#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
-+#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
-+#define glGetVariantFloatvEXT MANGLE(GetVariantFloatvEXT)
-+#define glGetVariantIntegervEXT MANGLE(GetVariantIntegervEXT)
-+#define glGetVariantPointervEXT MANGLE(GetVariantPointervEXT)
-+#define glGetVaryingLocationNV MANGLE(GetVaryingLocationNV)
-+#define glGetVertexArrayIndexed64iv MANGLE(GetVertexArrayIndexed64iv)
-+#define glGetVertexArrayIndexediv MANGLE(GetVertexArrayIndexediv)
-+#define glGetVertexArrayIntegeri_vEXT MANGLE(GetVertexArrayIntegeri_vEXT)
-+#define glGetVertexArrayIntegervEXT MANGLE(GetVertexArrayIntegervEXT)
-+#define glGetVertexArrayiv MANGLE(GetVertexArrayiv)
-+#define glGetVertexArrayPointeri_vEXT MANGLE(GetVertexArrayPointeri_vEXT)
-+#define glGetVertexArrayPointervEXT MANGLE(GetVertexArrayPointervEXT)
-+#define glGetVertexAttribArrayObjectfvATI MANGLE(GetVertexAttribArrayObjectfvATI)
-+#define glGetVertexAttribArrayObjectivATI MANGLE(GetVertexAttribArrayObjectivATI)
-+#define glGetVertexAttribdvARB MANGLE(GetVertexAttribdvARB)
-+#define glGetVertexAttribdv MANGLE(GetVertexAttribdv)
-+#define glGetVertexAttribdvNV MANGLE(GetVertexAttribdvNV)
-+#define glGetVertexAttribfvARB MANGLE(GetVertexAttribfvARB)
-+#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
-+#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
-+#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT)
-+#define glGetVertexAttribIiv MANGLE(GetVertexAttribIiv)
-+#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT)
-+#define glGetVertexAttribIuiv MANGLE(GetVertexAttribIuiv)
-+#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
-+#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
-+#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
-+#define glGetVertexAttribLdvEXT MANGLE(GetVertexAttribLdvEXT)
-+#define glGetVertexAttribLdv MANGLE(GetVertexAttribLdv)
-+#define glGetVertexAttribLi64vNV MANGLE(GetVertexAttribLi64vNV)
-+#define glGetVertexAttribLui64vARB MANGLE(GetVertexAttribLui64vARB)
-+#define glGetVertexAttribLui64vNV MANGLE(GetVertexAttribLui64vNV)
-+#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
-+#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
-+#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
-+#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV)
-+#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV)
-+#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV)
-+#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV)
-+#define glGetVideoi64vNV MANGLE(GetVideoi64vNV)
-+#define glGetVideoivNV MANGLE(GetVideoivNV)
-+#define glGetVideoui64vNV MANGLE(GetVideoui64vNV)
-+#define glGetVideouivNV MANGLE(GetVideouivNV)
-+#define glGlobalAlphaFactorbSUN MANGLE(GlobalAlphaFactorbSUN)
-+#define glGlobalAlphaFactordSUN MANGLE(GlobalAlphaFactordSUN)
-+#define glGlobalAlphaFactorfSUN MANGLE(GlobalAlphaFactorfSUN)
-+#define glGlobalAlphaFactoriSUN MANGLE(GlobalAlphaFactoriSUN)
-+#define glGlobalAlphaFactorsSUN MANGLE(GlobalAlphaFactorsSUN)
-+#define glGlobalAlphaFactorubSUN MANGLE(GlobalAlphaFactorubSUN)
-+#define glGlobalAlphaFactoruiSUN MANGLE(GlobalAlphaFactoruiSUN)
-+#define glGlobalAlphaFactorusSUN MANGLE(GlobalAlphaFactorusSUN)
-+#define glHint MANGLE(Hint)
-+#define glHintPGI MANGLE(HintPGI)
-+#define glHistogramEXT MANGLE(HistogramEXT)
-+#define glHistogram MANGLE(Histogram)
-+#define glIglooInterfaceSGIX MANGLE(IglooInterfaceSGIX)
-+#define glImageTransformParameterfHP MANGLE(ImageTransformParameterfHP)
-+#define glImageTransformParameterfvHP MANGLE(ImageTransformParameterfvHP)
-+#define glImageTransformParameteriHP MANGLE(ImageTransformParameteriHP)
-+#define glImageTransformParameterivHP MANGLE(ImageTransformParameterivHP)
-+#define glImportSyncEXT MANGLE(ImportSyncEXT)
-+#define glIndexd MANGLE(Indexd)
-+#define glIndexdv MANGLE(Indexdv)
-+#define glIndexf MANGLE(Indexf)
-+#define glIndexFormatNV MANGLE(IndexFormatNV)
-+#define glIndexFuncEXT MANGLE(IndexFuncEXT)
-+#define glIndexfv MANGLE(Indexfv)
-+#define glIndexi MANGLE(Indexi)
-+#define glIndexiv MANGLE(Indexiv)
-+#define glIndexMask MANGLE(IndexMask)
-+#define glIndexMaterialEXT MANGLE(IndexMaterialEXT)
-+#define glIndexPointerEXT MANGLE(IndexPointerEXT)
-+#define glIndexPointerListIBM MANGLE(IndexPointerListIBM)
-+#define glIndexPointer MANGLE(IndexPointer)
-+#define glIndexs MANGLE(Indexs)
-+#define glIndexsv MANGLE(Indexsv)
-+#define glIndexub MANGLE(Indexub)
-+#define glIndexubv MANGLE(Indexubv)
-+#define glIndexxOES MANGLE(IndexxOES)
-+#define glIndexxvOES MANGLE(IndexxvOES)
-+#define glInitNames MANGLE(InitNames)
-+#define glInsertComponentEXT MANGLE(InsertComponentEXT)
-+#define glInsertEventMarkerEXT MANGLE(InsertEventMarkerEXT)
-+#define glInstrumentsBufferSGIX MANGLE(InstrumentsBufferSGIX)
-+#define glInterleavedArrays MANGLE(InterleavedArrays)
-+#define glInterpolatePathsNV MANGLE(InterpolatePathsNV)
-+#define glInvalidateBufferData MANGLE(InvalidateBufferData)
-+#define glInvalidateBufferSubData MANGLE(InvalidateBufferSubData)
-+#define glInvalidateFramebuffer MANGLE(InvalidateFramebuffer)
-+#define glInvalidateNamedFramebufferData MANGLE(InvalidateNamedFramebufferData)
-+#define glInvalidateNamedFramebufferSubData MANGLE(InvalidateNamedFramebufferSubData)
-+#define glInvalidateSubFramebuffer MANGLE(InvalidateSubFramebuffer)
-+#define glInvalidateTexImage MANGLE(InvalidateTexImage)
-+#define glInvalidateTexSubImage MANGLE(InvalidateTexSubImage)
-+#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
-+#define glIsBufferARB MANGLE(IsBufferARB)
-+#define glIsBuffer MANGLE(IsBuffer)
-+#define glIsBufferResidentNV MANGLE(IsBufferResidentNV)
-+#define glIsEnabledi MANGLE(IsEnabledi)
-+#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
-+#define glIsEnabled MANGLE(IsEnabled)
-+#define glIsFenceAPPLE MANGLE(IsFenceAPPLE)
-+#define glIsFenceNV MANGLE(IsFenceNV)
-+#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
-+#define glIsFramebuffer MANGLE(IsFramebuffer)
-+#define glIsImageHandleResidentARB MANGLE(IsImageHandleResidentARB)
-+#define glIsImageHandleResidentNV MANGLE(IsImageHandleResidentNV)
-+#define glIsList MANGLE(IsList)
-+#define glIsNameAMD MANGLE(IsNameAMD)
-+#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
-+#define glIsNamedStringARB MANGLE(IsNamedStringARB)
-+#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
-+#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
-+#define glIsPathNV MANGLE(IsPathNV)
-+#define glIsPointInFillPathNV MANGLE(IsPointInFillPathNV)
-+#define glIsPointInStrokePathNV MANGLE(IsPointInStrokePathNV)
-+#define glIsProgramARB MANGLE(IsProgramARB)
-+#define glIsProgram MANGLE(IsProgram)
-+#define glIsProgramNV MANGLE(IsProgramNV)
-+#define glIsProgramPipeline MANGLE(IsProgramPipeline)
-+#define glIsQueryARB MANGLE(IsQueryARB)
-+#define glIsQuery MANGLE(IsQuery)
-+#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
-+#define glIsRenderbuffer MANGLE(IsRenderbuffer)
-+#define glIsSampler MANGLE(IsSampler)
-+#define glIsShader MANGLE(IsShader)
-+#define glIsSync MANGLE(IsSync)
-+#define glIsTextureEXT MANGLE(IsTextureEXT)
-+#define glIsTextureHandleResidentARB MANGLE(IsTextureHandleResidentARB)
-+#define glIsTextureHandleResidentNV MANGLE(IsTextureHandleResidentNV)
-+#define glIsTexture MANGLE(IsTexture)
-+#define glIsTransformFeedback MANGLE(IsTransformFeedback)
-+#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
-+#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
-+#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
-+#define glIsVertexArray MANGLE(IsVertexArray)
-+#define glIsVertexAttribEnabledAPPLE MANGLE(IsVertexAttribEnabledAPPLE)
-+#define glLabelObjectEXT MANGLE(LabelObjectEXT)
-+#define glLightEnviSGIX MANGLE(LightEnviSGIX)
-+#define glLightf MANGLE(Lightf)
-+#define glLightfv MANGLE(Lightfv)
-+#define glLighti MANGLE(Lighti)
-+#define glLightiv MANGLE(Lightiv)
-+#define glLightModelf MANGLE(LightModelf)
-+#define glLightModelfv MANGLE(LightModelfv)
-+#define glLightModeli MANGLE(LightModeli)
-+#define glLightModeliv MANGLE(LightModeliv)
-+#define glLightModelxOES MANGLE(LightModelxOES)
-+#define glLightModelxvOES MANGLE(LightModelxvOES)
-+#define glLightxOES MANGLE(LightxOES)
-+#define glLightxvOES MANGLE(LightxvOES)
-+#define glLineStipple MANGLE(LineStipple)
-+#define glLineWidth MANGLE(LineWidth)
-+#define glLineWidthxOES MANGLE(LineWidthxOES)
-+#define glLinkProgramARB MANGLE(LinkProgramARB)
-+#define glLinkProgram MANGLE(LinkProgram)
-+#define glListBase MANGLE(ListBase)
-+#define glListParameterfSGIX MANGLE(ListParameterfSGIX)
-+#define glListParameterfvSGIX MANGLE(ListParameterfvSGIX)
-+#define glListParameteriSGIX MANGLE(ListParameteriSGIX)
-+#define glListParameterivSGIX MANGLE(ListParameterivSGIX)
-+#define glLoadIdentityDeformationMapSGIX MANGLE(LoadIdentityDeformationMapSGIX)
-+#define glLoadIdentity MANGLE(LoadIdentity)
-+#define glLoadMatrixd MANGLE(LoadMatrixd)
-+#define glLoadMatrixf MANGLE(LoadMatrixf)
-+#define glLoadMatrixxOES MANGLE(LoadMatrixxOES)
-+#define glLoadName MANGLE(LoadName)
-+#define glLoadProgramNV MANGLE(LoadProgramNV)
-+#define glLoadTransposeMatrixdARB MANGLE(LoadTransposeMatrixdARB)
-+#define glLoadTransposeMatrixd MANGLE(LoadTransposeMatrixd)
-+#define glLoadTransposeMatrixfARB MANGLE(LoadTransposeMatrixfARB)
-+#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf)
-+#define glLoadTransposeMatrixxOES MANGLE(LoadTransposeMatrixxOES)
-+#define glLockArraysEXT MANGLE(LockArraysEXT)
-+#define glLogicOp MANGLE(LogicOp)
-+#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
-+#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
-+#define glMakeImageHandleNonResidentARB MANGLE(MakeImageHandleNonResidentARB)
-+#define glMakeImageHandleNonResidentNV MANGLE(MakeImageHandleNonResidentNV)
-+#define glMakeImageHandleResidentARB MANGLE(MakeImageHandleResidentARB)
-+#define glMakeImageHandleResidentNV MANGLE(MakeImageHandleResidentNV)
-+#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV)
-+#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV)
-+#define glMakeTextureHandleNonResidentARB MANGLE(MakeTextureHandleNonResidentARB)
-+#define glMakeTextureHandleNonResidentNV MANGLE(MakeTextureHandleNonResidentNV)
-+#define glMakeTextureHandleResidentARB MANGLE(MakeTextureHandleResidentARB)
-+#define glMakeTextureHandleResidentNV MANGLE(MakeTextureHandleResidentNV)
-+#define glMap1d MANGLE(Map1d)
-+#define glMap1f MANGLE(Map1f)
-+#define glMap1xOES MANGLE(Map1xOES)
-+#define glMap2d MANGLE(Map2d)
-+#define glMap2f MANGLE(Map2f)
-+#define glMap2xOES MANGLE(Map2xOES)
-+#define glMapBufferARB MANGLE(MapBufferARB)
-+#define glMapBuffer MANGLE(MapBuffer)
-+#define glMapBufferRange MANGLE(MapBufferRange)
-+#define glMapControlPointsNV MANGLE(MapControlPointsNV)
-+#define glMapGrid1d MANGLE(MapGrid1d)
-+#define glMapGrid1f MANGLE(MapGrid1f)
-+#define glMapGrid1xOES MANGLE(MapGrid1xOES)
-+#define glMapGrid2d MANGLE(MapGrid2d)
-+#define glMapGrid2f MANGLE(MapGrid2f)
-+#define glMapGrid2xOES MANGLE(MapGrid2xOES)
-+#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
-+#define glMapNamedBuffer MANGLE(MapNamedBuffer)
-+#define glMapNamedBufferRangeEXT MANGLE(MapNamedBufferRangeEXT)
-+#define glMapNamedBufferRange MANGLE(MapNamedBufferRange)
-+#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
-+#define glMapParameterfvNV MANGLE(MapParameterfvNV)
-+#define glMapParameterivNV MANGLE(MapParameterivNV)
-+#define glMapTexture2DINTEL MANGLE(MapTexture2DINTEL)
-+#define glMapVertexAttrib1dAPPLE MANGLE(MapVertexAttrib1dAPPLE)
-+#define glMapVertexAttrib1fAPPLE MANGLE(MapVertexAttrib1fAPPLE)
-+#define glMapVertexAttrib2dAPPLE MANGLE(MapVertexAttrib2dAPPLE)
-+#define glMapVertexAttrib2fAPPLE MANGLE(MapVertexAttrib2fAPPLE)
-+#define glMaterialf MANGLE(Materialf)
-+#define glMaterialfv MANGLE(Materialfv)
-+#define glMateriali MANGLE(Materiali)
-+#define glMaterialiv MANGLE(Materialiv)
-+#define glMaterialxOES MANGLE(MaterialxOES)
-+#define glMaterialxvOES MANGLE(MaterialxvOES)
-+#define glMatrixFrustumEXT MANGLE(MatrixFrustumEXT)
-+#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB)
-+#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB)
-+#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB)
-+#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB)
-+#define glMatrixLoad3x2fNV MANGLE(MatrixLoad3x2fNV)
-+#define glMatrixLoad3x3fNV MANGLE(MatrixLoad3x3fNV)
-+#define glMatrixLoaddEXT MANGLE(MatrixLoaddEXT)
-+#define glMatrixLoadfEXT MANGLE(MatrixLoadfEXT)
-+#define glMatrixLoadIdentityEXT MANGLE(MatrixLoadIdentityEXT)
-+#define glMatrixLoadTranspose3x3fNV MANGLE(MatrixLoadTranspose3x3fNV)
-+#define glMatrixLoadTransposedEXT MANGLE(MatrixLoadTransposedEXT)
-+#define glMatrixLoadTransposefEXT MANGLE(MatrixLoadTransposefEXT)
-+#define glMatrixMode MANGLE(MatrixMode)
-+#define glMatrixMult3x2fNV MANGLE(MatrixMult3x2fNV)
-+#define glMatrixMult3x3fNV MANGLE(MatrixMult3x3fNV)
-+#define glMatrixMultdEXT MANGLE(MatrixMultdEXT)
-+#define glMatrixMultfEXT MANGLE(MatrixMultfEXT)
-+#define glMatrixMultTranspose3x3fNV MANGLE(MatrixMultTranspose3x3fNV)
-+#define glMatrixMultTransposedEXT MANGLE(MatrixMultTransposedEXT)
-+#define glMatrixMultTransposefEXT MANGLE(MatrixMultTransposefEXT)
-+#define glMatrixOrthoEXT MANGLE(MatrixOrthoEXT)
-+#define glMatrixPopEXT MANGLE(MatrixPopEXT)
-+#define glMatrixPushEXT MANGLE(MatrixPushEXT)
-+#define glMatrixRotatedEXT MANGLE(MatrixRotatedEXT)
-+#define glMatrixRotatefEXT MANGLE(MatrixRotatefEXT)
-+#define glMatrixScaledEXT MANGLE(MatrixScaledEXT)
-+#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
-+#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
-+#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
-+#define glMemoryBarrierByRegion MANGLE(MemoryBarrierByRegion)
-+#define glMemoryBarrierEXT MANGLE(MemoryBarrierEXT)
-+#define glMemoryBarrier MANGLE(MemoryBarrier)
-+#define glMinmaxEXT MANGLE(MinmaxEXT)
-+#define glMinmax MANGLE(Minmax)
-+#define glMinSampleShadingARB MANGLE(MinSampleShadingARB)
-+#define glMinSampleShading MANGLE(MinSampleShading)
-+#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
-+#define glMultiDrawArraysIndirectAMD MANGLE(MultiDrawArraysIndirectAMD)
-+#define glMultiDrawArraysIndirectBindlessCountNV MANGLE(MultiDrawArraysIndirectBindlessCountNV)
-+#define glMultiDrawArraysIndirectBindlessNV MANGLE(MultiDrawArraysIndirectBindlessNV)
-+#define glMultiDrawArraysIndirectCountARB MANGLE(MultiDrawArraysIndirectCountARB)
-+#define glMultiDrawArraysIndirect MANGLE(MultiDrawArraysIndirect)
-+#define glMultiDrawArrays MANGLE(MultiDrawArrays)
-+#define glMultiDrawElementArrayAPPLE MANGLE(MultiDrawElementArrayAPPLE)
-+#define glMultiDrawElementsBaseVertex MANGLE(MultiDrawElementsBaseVertex)
-+#define glMultiDrawElementsEXT MANGLE(MultiDrawElementsEXT)
-+#define glMultiDrawElementsIndirectAMD MANGLE(MultiDrawElementsIndirectAMD)
-+#define glMultiDrawElementsIndirectBindlessCountNV MANGLE(MultiDrawElementsIndirectBindlessCountNV)
-+#define glMultiDrawElementsIndirectBindlessNV MANGLE(MultiDrawElementsIndirectBindlessNV)
-+#define glMultiDrawElementsIndirectCountARB MANGLE(MultiDrawElementsIndirectCountARB)
-+#define glMultiDrawElementsIndirect MANGLE(MultiDrawElementsIndirect)
-+#define glMultiDrawElements MANGLE(MultiDrawElements)
-+#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
-+#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM)
-+#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM)
-+#define glMultiTexBufferEXT MANGLE(MultiTexBufferEXT)
-+#define glMultiTexCoord1bOES MANGLE(MultiTexCoord1bOES)
-+#define glMultiTexCoord1bvOES MANGLE(MultiTexCoord1bvOES)
-+#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB)
-+#define glMultiTexCoord1d MANGLE(MultiTexCoord1d)
-+#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB)
-+#define glMultiTexCoord1dv MANGLE(MultiTexCoord1dv)
-+#define glMultiTexCoord1fARB MANGLE(MultiTexCoord1fARB)
-+#define glMultiTexCoord1f MANGLE(MultiTexCoord1f)
-+#define glMultiTexCoord1fvARB MANGLE(MultiTexCoord1fvARB)
-+#define glMultiTexCoord1fv MANGLE(MultiTexCoord1fv)
-+#define glMultiTexCoord1hNV MANGLE(MultiTexCoord1hNV)
-+#define glMultiTexCoord1hvNV MANGLE(MultiTexCoord1hvNV)
-+#define glMultiTexCoord1iARB MANGLE(MultiTexCoord1iARB)
-+#define glMultiTexCoord1i MANGLE(MultiTexCoord1i)
-+#define glMultiTexCoord1ivARB MANGLE(MultiTexCoord1ivARB)
-+#define glMultiTexCoord1iv MANGLE(MultiTexCoord1iv)
-+#define glMultiTexCoord1sARB MANGLE(MultiTexCoord1sARB)
-+#define glMultiTexCoord1s MANGLE(MultiTexCoord1s)
-+#define glMultiTexCoord1svARB MANGLE(MultiTexCoord1svARB)
-+#define glMultiTexCoord1sv MANGLE(MultiTexCoord1sv)
-+#define glMultiTexCoord1xOES MANGLE(MultiTexCoord1xOES)
-+#define glMultiTexCoord1xvOES MANGLE(MultiTexCoord1xvOES)
-+#define glMultiTexCoord2bOES MANGLE(MultiTexCoord2bOES)
-+#define glMultiTexCoord2bvOES MANGLE(MultiTexCoord2bvOES)
-+#define glMultiTexCoord2dARB MANGLE(MultiTexCoord2dARB)
-+#define glMultiTexCoord2d MANGLE(MultiTexCoord2d)
-+#define glMultiTexCoord2dvARB MANGLE(MultiTexCoord2dvARB)
-+#define glMultiTexCoord2dv MANGLE(MultiTexCoord2dv)
-+#define glMultiTexCoord2fARB MANGLE(MultiTexCoord2fARB)
-+#define glMultiTexCoord2f MANGLE(MultiTexCoord2f)
-+#define glMultiTexCoord2fvARB MANGLE(MultiTexCoord2fvARB)
-+#define glMultiTexCoord2fv MANGLE(MultiTexCoord2fv)
-+#define glMultiTexCoord2hNV MANGLE(MultiTexCoord2hNV)
-+#define glMultiTexCoord2hvNV MANGLE(MultiTexCoord2hvNV)
-+#define glMultiTexCoord2iARB MANGLE(MultiTexCoord2iARB)
-+#define glMultiTexCoord2i MANGLE(MultiTexCoord2i)
-+#define glMultiTexCoord2ivARB MANGLE(MultiTexCoord2ivARB)
-+#define glMultiTexCoord2iv MANGLE(MultiTexCoord2iv)
-+#define glMultiTexCoord2sARB MANGLE(MultiTexCoord2sARB)
-+#define glMultiTexCoord2s MANGLE(MultiTexCoord2s)
-+#define glMultiTexCoord2svARB MANGLE(MultiTexCoord2svARB)
-+#define glMultiTexCoord2sv MANGLE(MultiTexCoord2sv)
-+#define glMultiTexCoord2xOES MANGLE(MultiTexCoord2xOES)
-+#define glMultiTexCoord2xvOES MANGLE(MultiTexCoord2xvOES)
-+#define glMultiTexCoord3bOES MANGLE(MultiTexCoord3bOES)
-+#define glMultiTexCoord3bvOES MANGLE(MultiTexCoord3bvOES)
-+#define glMultiTexCoord3dARB MANGLE(MultiTexCoord3dARB)
-+#define glMultiTexCoord3d MANGLE(MultiTexCoord3d)
-+#define glMultiTexCoord3dvARB MANGLE(MultiTexCoord3dvARB)
-+#define glMultiTexCoord3dv MANGLE(MultiTexCoord3dv)
-+#define glMultiTexCoord3fARB MANGLE(MultiTexCoord3fARB)
-+#define glMultiTexCoord3f MANGLE(MultiTexCoord3f)
-+#define glMultiTexCoord3fvARB MANGLE(MultiTexCoord3fvARB)
-+#define glMultiTexCoord3fv MANGLE(MultiTexCoord3fv)
-+#define glMultiTexCoord3hNV MANGLE(MultiTexCoord3hNV)
-+#define glMultiTexCoord3hvNV MANGLE(MultiTexCoord3hvNV)
-+#define glMultiTexCoord3iARB MANGLE(MultiTexCoord3iARB)
-+#define glMultiTexCoord3i MANGLE(MultiTexCoord3i)
-+#define glMultiTexCoord3ivARB MANGLE(MultiTexCoord3ivARB)
-+#define glMultiTexCoord3iv MANGLE(MultiTexCoord3iv)
-+#define glMultiTexCoord3sARB MANGLE(MultiTexCoord3sARB)
-+#define glMultiTexCoord3s MANGLE(MultiTexCoord3s)
-+#define glMultiTexCoord3svARB MANGLE(MultiTexCoord3svARB)
-+#define glMultiTexCoord3sv MANGLE(MultiTexCoord3sv)
-+#define glMultiTexCoord3xOES MANGLE(MultiTexCoord3xOES)
-+#define glMultiTexCoord3xvOES MANGLE(MultiTexCoord3xvOES)
-+#define glMultiTexCoord4bOES MANGLE(MultiTexCoord4bOES)
-+#define glMultiTexCoord4bvOES MANGLE(MultiTexCoord4bvOES)
-+#define glMultiTexCoord4dARB MANGLE(MultiTexCoord4dARB)
-+#define glMultiTexCoord4d MANGLE(MultiTexCoord4d)
-+#define glMultiTexCoord4dvARB MANGLE(MultiTexCoord4dvARB)
-+#define glMultiTexCoord4dv MANGLE(MultiTexCoord4dv)
-+#define glMultiTexCoord4fARB MANGLE(MultiTexCoord4fARB)
-+#define glMultiTexCoord4f MANGLE(MultiTexCoord4f)
-+#define glMultiTexCoord4fvARB MANGLE(MultiTexCoord4fvARB)
-+#define glMultiTexCoord4fv MANGLE(MultiTexCoord4fv)
-+#define glMultiTexCoord4hNV MANGLE(MultiTexCoord4hNV)
-+#define glMultiTexCoord4hvNV MANGLE(MultiTexCoord4hvNV)
-+#define glMultiTexCoord4iARB MANGLE(MultiTexCoord4iARB)
-+#define glMultiTexCoord4i MANGLE(MultiTexCoord4i)
-+#define glMultiTexCoord4ivARB MANGLE(MultiTexCoord4ivARB)
-+#define glMultiTexCoord4iv MANGLE(MultiTexCoord4iv)
-+#define glMultiTexCoord4sARB MANGLE(MultiTexCoord4sARB)
-+#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
-+#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
-+#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
-+#define glMultiTexCoord4xOES MANGLE(MultiTexCoord4xOES)
-+#define glMultiTexCoord4xvOES MANGLE(MultiTexCoord4xvOES)
-+#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui)
-+#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv)
-+#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui)
-+#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv)
-+#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui)
-+#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv)
-+#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui)
-+#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv)
-+#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
-+#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
-+#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
-+#define glMultiTexEnviEXT MANGLE(MultiTexEnviEXT)
-+#define glMultiTexEnvivEXT MANGLE(MultiTexEnvivEXT)
-+#define glMultiTexGendEXT MANGLE(MultiTexGendEXT)
-+#define glMultiTexGendvEXT MANGLE(MultiTexGendvEXT)
-+#define glMultiTexGenfEXT MANGLE(MultiTexGenfEXT)
-+#define glMultiTexGenfvEXT MANGLE(MultiTexGenfvEXT)
-+#define glMultiTexGeniEXT MANGLE(MultiTexGeniEXT)
-+#define glMultiTexGenivEXT MANGLE(MultiTexGenivEXT)
-+#define glMultiTexImage1DEXT MANGLE(MultiTexImage1DEXT)
-+#define glMultiTexImage2DEXT MANGLE(MultiTexImage2DEXT)
-+#define glMultiTexImage3DEXT MANGLE(MultiTexImage3DEXT)
-+#define glMultiTexParameterfEXT MANGLE(MultiTexParameterfEXT)
-+#define glMultiTexParameterfvEXT MANGLE(MultiTexParameterfvEXT)
-+#define glMultiTexParameteriEXT MANGLE(MultiTexParameteriEXT)
-+#define glMultiTexParameterIivEXT MANGLE(MultiTexParameterIivEXT)
-+#define glMultiTexParameterIuivEXT MANGLE(MultiTexParameterIuivEXT)
-+#define glMultiTexParameterivEXT MANGLE(MultiTexParameterivEXT)
-+#define glMultiTexRenderbufferEXT MANGLE(MultiTexRenderbufferEXT)
-+#define glMultiTexSubImage1DEXT MANGLE(MultiTexSubImage1DEXT)
-+#define glMultiTexSubImage2DEXT MANGLE(MultiTexSubImage2DEXT)
-+#define glMultiTexSubImage3DEXT MANGLE(MultiTexSubImage3DEXT)
-+#define glMultMatrixd MANGLE(MultMatrixd)
-+#define glMultMatrixf MANGLE(MultMatrixf)
-+#define glMultMatrixxOES MANGLE(MultMatrixxOES)
-+#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB)
-+#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd)
-+#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB)
-+#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
-+#define glMultTransposeMatrixxOES MANGLE(MultTransposeMatrixxOES)
-+#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
-+#define glNamedBufferData MANGLE(NamedBufferData)
-+#define glNamedBufferPageCommitmentARB MANGLE(NamedBufferPageCommitmentARB)
-+#define glNamedBufferPageCommitmentEXT MANGLE(NamedBufferPageCommitmentEXT)
-+#define glNamedBufferStorageEXT MANGLE(NamedBufferStorageEXT)
-+#define glNamedBufferStorage MANGLE(NamedBufferStorage)
-+#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
-+#define glNamedBufferSubData MANGLE(NamedBufferSubData)
-+#define glNamedCopyBufferSubDataEXT MANGLE(NamedCopyBufferSubDataEXT)
-+#define glNamedFramebufferDrawBuffer MANGLE(NamedFramebufferDrawBuffer)
-+#define glNamedFramebufferDrawBuffers MANGLE(NamedFramebufferDrawBuffers)
-+#define glNamedFramebufferParameteriEXT MANGLE(NamedFramebufferParameteriEXT)
-+#define glNamedFramebufferParameteri MANGLE(NamedFramebufferParameteri)
-+#define glNamedFramebufferReadBuffer MANGLE(NamedFramebufferReadBuffer)
-+#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
-+#define glNamedFramebufferRenderbuffer MANGLE(NamedFramebufferRenderbuffer)
-+#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
-+#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
-+#define glNamedFramebufferTexture3DEXT MANGLE(NamedFramebufferTexture3DEXT)
-+#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
-+#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
-+#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
-+#define glNamedFramebufferTextureLayer MANGLE(NamedFramebufferTextureLayer)
-+#define glNamedFramebufferTexture MANGLE(NamedFramebufferTexture)
-+#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
-+#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
-+#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
-+#define glNamedProgramLocalParameter4fvEXT MANGLE(NamedProgramLocalParameter4fvEXT)
-+#define glNamedProgramLocalParameterI4iEXT MANGLE(NamedProgramLocalParameterI4iEXT)
-+#define glNamedProgramLocalParameterI4ivEXT MANGLE(NamedProgramLocalParameterI4ivEXT)
-+#define glNamedProgramLocalParameterI4uiEXT MANGLE(NamedProgramLocalParameterI4uiEXT)
-+#define glNamedProgramLocalParameterI4uivEXT MANGLE(NamedProgramLocalParameterI4uivEXT)
-+#define glNamedProgramLocalParameters4fvEXT MANGLE(NamedProgramLocalParameters4fvEXT)
-+#define glNamedProgramLocalParametersI4ivEXT MANGLE(NamedProgramLocalParametersI4ivEXT)
-+#define glNamedProgramLocalParametersI4uivEXT MANGLE(NamedProgramLocalParametersI4uivEXT)
-+#define glNamedProgramStringEXT MANGLE(NamedProgramStringEXT)
-+#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
-+#define glNamedRenderbufferStorage MANGLE(NamedRenderbufferStorage)
-+#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
-+#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
-+#define glNamedRenderbufferStorageMultisample MANGLE(NamedRenderbufferStorageMultisample)
-+#define glNamedStringARB MANGLE(NamedStringARB)
-+#define glNewList MANGLE(NewList)
-+#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
-+#define glNormal3b MANGLE(Normal3b)
-+#define glNormal3bv MANGLE(Normal3bv)
-+#define glNormal3d MANGLE(Normal3d)
-+#define glNormal3dv MANGLE(Normal3dv)
-+#define glNormal3f MANGLE(Normal3f)
-+#define glNormal3fVertex3fSUN MANGLE(Normal3fVertex3fSUN)
-+#define glNormal3fVertex3fvSUN MANGLE(Normal3fVertex3fvSUN)
-+#define glNormal3fv MANGLE(Normal3fv)
-+#define glNormal3hNV MANGLE(Normal3hNV)
-+#define glNormal3hvNV MANGLE(Normal3hvNV)
-+#define glNormal3i MANGLE(Normal3i)
-+#define glNormal3iv MANGLE(Normal3iv)
-+#define glNormal3s MANGLE(Normal3s)
-+#define glNormal3sv MANGLE(Normal3sv)
-+#define glNormal3xOES MANGLE(Normal3xOES)
-+#define glNormal3xvOES MANGLE(Normal3xvOES)
-+#define glNormalFormatNV MANGLE(NormalFormatNV)
-+#define glNormalP3ui MANGLE(NormalP3ui)
-+#define glNormalP3uiv MANGLE(NormalP3uiv)
-+#define glNormalPointerEXT MANGLE(NormalPointerEXT)
-+#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
-+#define glNormalPointer MANGLE(NormalPointer)
-+#define glNormalPointervINTEL MANGLE(NormalPointervINTEL)
-+#define glNormalStream3bATI MANGLE(NormalStream3bATI)
-+#define glNormalStream3bvATI MANGLE(NormalStream3bvATI)
-+#define glNormalStream3dATI MANGLE(NormalStream3dATI)
-+#define glNormalStream3dvATI MANGLE(NormalStream3dvATI)
-+#define glNormalStream3fATI MANGLE(NormalStream3fATI)
-+#define glNormalStream3fvATI MANGLE(NormalStream3fvATI)
-+#define glNormalStream3iATI MANGLE(NormalStream3iATI)
-+#define glNormalStream3ivATI MANGLE(NormalStream3ivATI)
-+#define glNormalStream3sATI MANGLE(NormalStream3sATI)
-+#define glNormalStream3svATI MANGLE(NormalStream3svATI)
-+#define glObjectLabel MANGLE(ObjectLabel)
-+#define glObjectPtrLabel MANGLE(ObjectPtrLabel)
-+#define glObjectPurgeableAPPLE MANGLE(ObjectPurgeableAPPLE)
-+#define glObjectUnpurgeableAPPLE MANGLE(ObjectUnpurgeableAPPLE)
-+#define glOrthofOES MANGLE(OrthofOES)
-+#define glOrtho MANGLE(Ortho)
-+#define glOrthoxOES MANGLE(OrthoxOES)
-+#define glPassTexCoordATI MANGLE(PassTexCoordATI)
-+#define glPassThrough MANGLE(PassThrough)
-+#define glPassThroughxOES MANGLE(PassThroughxOES)
-+#define glPatchParameterfv MANGLE(PatchParameterfv)
-+#define glPatchParameteri MANGLE(PatchParameteri)
-+#define glPathColorGenNV MANGLE(PathColorGenNV)
-+#define glPathCommandsNV MANGLE(PathCommandsNV)
-+#define glPathCoordsNV MANGLE(PathCoordsNV)
-+#define glPathCoverDepthFuncNV MANGLE(PathCoverDepthFuncNV)
-+#define glPathDashArrayNV MANGLE(PathDashArrayNV)
-+#define glPathFogGenNV MANGLE(PathFogGenNV)
-+#define glPathGlyphIndexArrayNV MANGLE(PathGlyphIndexArrayNV)
-+#define glPathGlyphIndexRangeNV MANGLE(PathGlyphIndexRangeNV)
-+#define glPathGlyphRangeNV MANGLE(PathGlyphRangeNV)
-+#define glPathGlyphsNV MANGLE(PathGlyphsNV)
-+#define glPathMemoryGlyphIndexArrayNV MANGLE(PathMemoryGlyphIndexArrayNV)
-+#define glPathParameterfNV MANGLE(PathParameterfNV)
-+#define glPathParameterfvNV MANGLE(PathParameterfvNV)
-+#define glPathParameteriNV MANGLE(PathParameteriNV)
-+#define glPathParameterivNV MANGLE(PathParameterivNV)
-+#define glPathStencilDepthOffsetNV MANGLE(PathStencilDepthOffsetNV)
-+#define glPathStencilFuncNV MANGLE(PathStencilFuncNV)
-+#define glPathStringNV MANGLE(PathStringNV)
-+#define glPathSubCommandsNV MANGLE(PathSubCommandsNV)
-+#define glPathSubCoordsNV MANGLE(PathSubCoordsNV)
-+#define glPathTexGenNV MANGLE(PathTexGenNV)
-+#define glPauseTransformFeedback MANGLE(PauseTransformFeedback)
-+#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
-+#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
-+#define glPixelMapfv MANGLE(PixelMapfv)
-+#define glPixelMapuiv MANGLE(PixelMapuiv)
-+#define glPixelMapusv MANGLE(PixelMapusv)
-+#define glPixelMapx MANGLE(PixelMapx)
-+#define glPixelStoref MANGLE(PixelStoref)
-+#define glPixelStorei MANGLE(PixelStorei)
-+#define glPixelStorex MANGLE(PixelStorex)
-+#define glPixelTexGenParameterfSGIS MANGLE(PixelTexGenParameterfSGIS)
-+#define glPixelTexGenParameterfvSGIS MANGLE(PixelTexGenParameterfvSGIS)
-+#define glPixelTexGenParameteriSGIS MANGLE(PixelTexGenParameteriSGIS)
-+#define glPixelTexGenParameterivSGIS MANGLE(PixelTexGenParameterivSGIS)
-+#define glPixelTexGenSGIX MANGLE(PixelTexGenSGIX)
-+#define glPixelTransferf MANGLE(PixelTransferf)
-+#define glPixelTransferi MANGLE(PixelTransferi)
-+#define glPixelTransferxOES MANGLE(PixelTransferxOES)
-+#define glPixelTransformParameterfEXT MANGLE(PixelTransformParameterfEXT)
-+#define glPixelTransformParameterfvEXT MANGLE(PixelTransformParameterfvEXT)
-+#define glPixelTransformParameteriEXT MANGLE(PixelTransformParameteriEXT)
-+#define glPixelTransformParameterivEXT MANGLE(PixelTransformParameterivEXT)
-+#define glPixelZoom MANGLE(PixelZoom)
-+#define glPixelZoomxOES MANGLE(PixelZoomxOES)
-+#define glPNTrianglesfATI MANGLE(PNTrianglesfATI)
-+#define glPNTrianglesiATI MANGLE(PNTrianglesiATI)
-+#define glPointAlongPathNV MANGLE(PointAlongPathNV)
-+#define glPointParameterfARB MANGLE(PointParameterfARB)
-+#define glPointParameterfEXT MANGLE(PointParameterfEXT)
-+#define glPointParameterf MANGLE(PointParameterf)
-+#define glPointParameterfSGIS MANGLE(PointParameterfSGIS)
-+#define glPointParameterfvARB MANGLE(PointParameterfvARB)
-+#define glPointParameterfvEXT MANGLE(PointParameterfvEXT)
-+#define glPointParameterfv MANGLE(PointParameterfv)
-+#define glPointParameterfvSGIS MANGLE(PointParameterfvSGIS)
-+#define glPointParameteri MANGLE(PointParameteri)
-+#define glPointParameteriNV MANGLE(PointParameteriNV)
-+#define glPointParameteriv MANGLE(PointParameteriv)
-+#define glPointParameterivNV MANGLE(PointParameterivNV)
-+#define glPointParameterxvOES MANGLE(PointParameterxvOES)
-+#define glPointSize MANGLE(PointSize)
-+#define glPointSizexOES MANGLE(PointSizexOES)
-+#define glPollAsyncSGIX MANGLE(PollAsyncSGIX)
-+#define glPollInstrumentsSGIX MANGLE(PollInstrumentsSGIX)
-+#define glPolygonMode MANGLE(PolygonMode)
-+#define glPolygonOffsetEXT MANGLE(PolygonOffsetEXT)
-+#define glPolygonOffset MANGLE(PolygonOffset)
-+#define glPolygonOffsetxOES MANGLE(PolygonOffsetxOES)
-+#define glPolygonStipple MANGLE(PolygonStipple)
-+#define glPopAttrib MANGLE(PopAttrib)
-+#define glPopClientAttrib MANGLE(PopClientAttrib)
-+#define glPopDebugGroup MANGLE(PopDebugGroup)
-+#define glPopGroupMarkerEXT MANGLE(PopGroupMarkerEXT)
-+#define glPopMatrix MANGLE(PopMatrix)
-+#define glPopName MANGLE(PopName)
-+#define glPresentFrameDualFillNV MANGLE(PresentFrameDualFillNV)
-+#define glPresentFrameKeyedNV MANGLE(PresentFrameKeyedNV)
-+#define glPrimitiveRestartIndex MANGLE(PrimitiveRestartIndex)
-+#define glPrimitiveRestartIndexNV MANGLE(PrimitiveRestartIndexNV)
-+#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV)
-+#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT)
-+#define glPrioritizeTextures MANGLE(PrioritizeTextures)
-+#define glPrioritizeTexturesxOES MANGLE(PrioritizeTexturesxOES)
-+#define glProgramBinary MANGLE(ProgramBinary)
-+#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV)
-+#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV)
-+#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV)
-+#define glProgramEnvParameter4dARB MANGLE(ProgramEnvParameter4dARB)
-+#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB)
-+#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB)
-+#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB)
-+#define glProgramEnvParameterI4iNV MANGLE(ProgramEnvParameterI4iNV)
-+#define glProgramEnvParameterI4ivNV MANGLE(ProgramEnvParameterI4ivNV)
-+#define glProgramEnvParameterI4uiNV MANGLE(ProgramEnvParameterI4uiNV)
-+#define glProgramEnvParameterI4uivNV MANGLE(ProgramEnvParameterI4uivNV)
-+#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT)
-+#define glProgramEnvParametersI4ivNV MANGLE(ProgramEnvParametersI4ivNV)
-+#define glProgramEnvParametersI4uivNV MANGLE(ProgramEnvParametersI4uivNV)
-+#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB)
-+#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB)
-+#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB)
-+#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB)
-+#define glProgramLocalParameterI4iNV MANGLE(ProgramLocalParameterI4iNV)
-+#define glProgramLocalParameterI4ivNV MANGLE(ProgramLocalParameterI4ivNV)
-+#define glProgramLocalParameterI4uiNV MANGLE(ProgramLocalParameterI4uiNV)
-+#define glProgramLocalParameterI4uivNV MANGLE(ProgramLocalParameterI4uivNV)
-+#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT)
-+#define glProgramLocalParametersI4ivNV MANGLE(ProgramLocalParametersI4ivNV)
-+#define glProgramLocalParametersI4uivNV MANGLE(ProgramLocalParametersI4uivNV)
-+#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV)
-+#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV)
-+#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV)
-+#define glProgramNamedParameter4fvNV MANGLE(ProgramNamedParameter4fvNV)
-+#define glProgramParameter4dNV MANGLE(ProgramParameter4dNV)
-+#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV)
-+#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV)
-+#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
-+#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
-+#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
-+#define glProgramParameteri MANGLE(ProgramParameteri)
-+#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
-+#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
-+#define glProgramPathFragmentInputGenNV MANGLE(ProgramPathFragmentInputGenNV)
-+#define glProgramStringARB MANGLE(ProgramStringARB)
-+#define glProgramSubroutineParametersuivNV MANGLE(ProgramSubroutineParametersuivNV)
-+#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT)
-+#define glProgramUniform1d MANGLE(ProgramUniform1d)
-+#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT)
-+#define glProgramUniform1dv MANGLE(ProgramUniform1dv)
-+#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
-+#define glProgramUniform1f MANGLE(ProgramUniform1f)
-+#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
-+#define glProgramUniform1fv MANGLE(ProgramUniform1fv)
-+#define glProgramUniform1i64NV MANGLE(ProgramUniform1i64NV)
-+#define glProgramUniform1i64vNV MANGLE(ProgramUniform1i64vNV)
-+#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
-+#define glProgramUniform1i MANGLE(ProgramUniform1i)
-+#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
-+#define glProgramUniform1iv MANGLE(ProgramUniform1iv)
-+#define glProgramUniform1ui64NV MANGLE(ProgramUniform1ui64NV)
-+#define glProgramUniform1ui64vNV MANGLE(ProgramUniform1ui64vNV)
-+#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
-+#define glProgramUniform1ui MANGLE(ProgramUniform1ui)
-+#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
-+#define glProgramUniform1uiv MANGLE(ProgramUniform1uiv)
-+#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT)
-+#define glProgramUniform2d MANGLE(ProgramUniform2d)
-+#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT)
-+#define glProgramUniform2dv MANGLE(ProgramUniform2dv)
-+#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
-+#define glProgramUniform2f MANGLE(ProgramUniform2f)
-+#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
-+#define glProgramUniform2fv MANGLE(ProgramUniform2fv)
-+#define glProgramUniform2i64NV MANGLE(ProgramUniform2i64NV)
-+#define glProgramUniform2i64vNV MANGLE(ProgramUniform2i64vNV)
-+#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
-+#define glProgramUniform2i MANGLE(ProgramUniform2i)
-+#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
-+#define glProgramUniform2iv MANGLE(ProgramUniform2iv)
-+#define glProgramUniform2ui64NV MANGLE(ProgramUniform2ui64NV)
-+#define glProgramUniform2ui64vNV MANGLE(ProgramUniform2ui64vNV)
-+#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
-+#define glProgramUniform2ui MANGLE(ProgramUniform2ui)
-+#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
-+#define glProgramUniform2uiv MANGLE(ProgramUniform2uiv)
-+#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT)
-+#define glProgramUniform3d MANGLE(ProgramUniform3d)
-+#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT)
-+#define glProgramUniform3dv MANGLE(ProgramUniform3dv)
-+#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
-+#define glProgramUniform3f MANGLE(ProgramUniform3f)
-+#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
-+#define glProgramUniform3fv MANGLE(ProgramUniform3fv)
-+#define glProgramUniform3i64NV MANGLE(ProgramUniform3i64NV)
-+#define glProgramUniform3i64vNV MANGLE(ProgramUniform3i64vNV)
-+#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
-+#define glProgramUniform3i MANGLE(ProgramUniform3i)
-+#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
-+#define glProgramUniform3iv MANGLE(ProgramUniform3iv)
-+#define glProgramUniform3ui64NV MANGLE(ProgramUniform3ui64NV)
-+#define glProgramUniform3ui64vNV MANGLE(ProgramUniform3ui64vNV)
-+#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
-+#define glProgramUniform3ui MANGLE(ProgramUniform3ui)
-+#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
-+#define glProgramUniform3uiv MANGLE(ProgramUniform3uiv)
-+#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT)
-+#define glProgramUniform4d MANGLE(ProgramUniform4d)
-+#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT)
-+#define glProgramUniform4dv MANGLE(ProgramUniform4dv)
-+#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
-+#define glProgramUniform4f MANGLE(ProgramUniform4f)
-+#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
-+#define glProgramUniform4fv MANGLE(ProgramUniform4fv)
-+#define glProgramUniform4i64NV MANGLE(ProgramUniform4i64NV)
-+#define glProgramUniform4i64vNV MANGLE(ProgramUniform4i64vNV)
-+#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
-+#define glProgramUniform4i MANGLE(ProgramUniform4i)
-+#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
-+#define glProgramUniform4iv MANGLE(ProgramUniform4iv)
-+#define glProgramUniform4ui64NV MANGLE(ProgramUniform4ui64NV)
-+#define glProgramUniform4ui64vNV MANGLE(ProgramUniform4ui64vNV)
-+#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
-+#define glProgramUniform4ui MANGLE(ProgramUniform4ui)
-+#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
-+#define glProgramUniform4uiv MANGLE(ProgramUniform4uiv)
-+#define glProgramUniformHandleui64ARB MANGLE(ProgramUniformHandleui64ARB)
-+#define glProgramUniformHandleui64NV MANGLE(ProgramUniformHandleui64NV)
-+#define glProgramUniformHandleui64vARB MANGLE(ProgramUniformHandleui64vARB)
-+#define glProgramUniformHandleui64vNV MANGLE(ProgramUniformHandleui64vNV)
-+#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT)
-+#define glProgramUniformMatrix2dv MANGLE(ProgramUniformMatrix2dv)
-+#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
-+#define glProgramUniformMatrix2fv MANGLE(ProgramUniformMatrix2fv)
-+#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT)
-+#define glProgramUniformMatrix2x3dv MANGLE(ProgramUniformMatrix2x3dv)
-+#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
-+#define glProgramUniformMatrix2x3fv MANGLE(ProgramUniformMatrix2x3fv)
-+#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT)
-+#define glProgramUniformMatrix2x4dv MANGLE(ProgramUniformMatrix2x4dv)
-+#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
-+#define glProgramUniformMatrix2x4fv MANGLE(ProgramUniformMatrix2x4fv)
-+#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT)
-+#define glProgramUniformMatrix3dv MANGLE(ProgramUniformMatrix3dv)
-+#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
-+#define glProgramUniformMatrix3fv MANGLE(ProgramUniformMatrix3fv)
-+#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT)
-+#define glProgramUniformMatrix3x2dv MANGLE(ProgramUniformMatrix3x2dv)
-+#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
-+#define glProgramUniformMatrix3x2fv MANGLE(ProgramUniformMatrix3x2fv)
-+#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT)
-+#define glProgramUniformMatrix3x4dv MANGLE(ProgramUniformMatrix3x4dv)
-+#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
-+#define glProgramUniformMatrix3x4fv MANGLE(ProgramUniformMatrix3x4fv)
-+#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT)
-+#define glProgramUniformMatrix4dv MANGLE(ProgramUniformMatrix4dv)
-+#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
-+#define glProgramUniformMatrix4fv MANGLE(ProgramUniformMatrix4fv)
-+#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT)
-+#define glProgramUniformMatrix4x2dv MANGLE(ProgramUniformMatrix4x2dv)
-+#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
-+#define glProgramUniformMatrix4x2fv MANGLE(ProgramUniformMatrix4x2fv)
-+#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT)
-+#define glProgramUniformMatrix4x3dv MANGLE(ProgramUniformMatrix4x3dv)
-+#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
-+#define glProgramUniformMatrix4x3fv MANGLE(ProgramUniformMatrix4x3fv)
-+#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
-+#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
-+#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
-+#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
-+#define glProvokingVertex MANGLE(ProvokingVertex)
-+#define glPushAttrib MANGLE(PushAttrib)
-+#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
-+#define glPushClientAttrib MANGLE(PushClientAttrib)
-+#define glPushDebugGroup MANGLE(PushDebugGroup)
-+#define glPushGroupMarkerEXT MANGLE(PushGroupMarkerEXT)
-+#define glPushMatrix MANGLE(PushMatrix)
-+#define glPushName MANGLE(PushName)
-+#define glQueryCounter MANGLE(QueryCounter)
-+#define glQueryMatrixxOES MANGLE(QueryMatrixxOES)
-+#define glQueryObjectParameteruiAMD MANGLE(QueryObjectParameteruiAMD)
-+#define glRasterPos2d MANGLE(RasterPos2d)
-+#define glRasterPos2dv MANGLE(RasterPos2dv)
-+#define glRasterPos2f MANGLE(RasterPos2f)
-+#define glRasterPos2fv MANGLE(RasterPos2fv)
-+#define glRasterPos2i MANGLE(RasterPos2i)
-+#define glRasterPos2iv MANGLE(RasterPos2iv)
-+#define glRasterPos2s MANGLE(RasterPos2s)
-+#define glRasterPos2sv MANGLE(RasterPos2sv)
-+#define glRasterPos2xOES MANGLE(RasterPos2xOES)
-+#define glRasterPos2xvOES MANGLE(RasterPos2xvOES)
-+#define glRasterPos3d MANGLE(RasterPos3d)
-+#define glRasterPos3dv MANGLE(RasterPos3dv)
-+#define glRasterPos3f MANGLE(RasterPos3f)
-+#define glRasterPos3fv MANGLE(RasterPos3fv)
-+#define glRasterPos3i MANGLE(RasterPos3i)
-+#define glRasterPos3iv MANGLE(RasterPos3iv)
-+#define glRasterPos3s MANGLE(RasterPos3s)
-+#define glRasterPos3sv MANGLE(RasterPos3sv)
-+#define glRasterPos3xOES MANGLE(RasterPos3xOES)
-+#define glRasterPos3xvOES MANGLE(RasterPos3xvOES)
-+#define glRasterPos4d MANGLE(RasterPos4d)
-+#define glRasterPos4dv MANGLE(RasterPos4dv)
-+#define glRasterPos4f MANGLE(RasterPos4f)
-+#define glRasterPos4fv MANGLE(RasterPos4fv)
-+#define glRasterPos4i MANGLE(RasterPos4i)
-+#define glRasterPos4iv MANGLE(RasterPos4iv)
-+#define glRasterPos4s MANGLE(RasterPos4s)
-+#define glRasterPos4sv MANGLE(RasterPos4sv)
-+#define glRasterPos4xOES MANGLE(RasterPos4xOES)
-+#define glRasterPos4xvOES MANGLE(RasterPos4xvOES)
-+#define glReadBuffer MANGLE(ReadBuffer)
-+#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX)
-+#define glReadnPixelsARB MANGLE(ReadnPixelsARB)
-+#define glReadnPixels MANGLE(ReadnPixels)
-+#define glReadPixels MANGLE(ReadPixels)
-+#define glRectd MANGLE(Rectd)
-+#define glRectdv MANGLE(Rectdv)
-+#define glRectf MANGLE(Rectf)
-+#define glRectfv MANGLE(Rectfv)
-+#define glRecti MANGLE(Recti)
-+#define glRectiv MANGLE(Rectiv)
-+#define glRects MANGLE(Rects)
-+#define glRectsv MANGLE(Rectsv)
-+#define glRectxOES MANGLE(RectxOES)
-+#define glRectxvOES MANGLE(RectxvOES)
-+#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
-+#define glReleaseShaderCompiler MANGLE(ReleaseShaderCompiler)
-+#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
-+#define glRenderbufferStorage MANGLE(RenderbufferStorage)
-+#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
-+#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
-+#define glRenderbufferStorageMultisample MANGLE(RenderbufferStorageMultisample)
-+#define glRenderMode MANGLE(RenderMode)
-+#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
-+#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
-+#define glReplacementCodeubvSUN MANGLE(ReplacementCodeubvSUN)
-+#define glReplacementCodeuiColor3fVertex3fSUN MANGLE(ReplacementCodeuiColor3fVertex3fSUN)
-+#define glReplacementCodeuiColor3fVertex3fvSUN MANGLE(ReplacementCodeuiColor3fVertex3fvSUN)
-+#define glReplacementCodeuiColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fSUN)
-+#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fvSUN)
-+#define glReplacementCodeuiColor4ubVertex3fSUN MANGLE(ReplacementCodeuiColor4ubVertex3fSUN)
-+#define glReplacementCodeuiColor4ubVertex3fvSUN MANGLE(ReplacementCodeuiColor4ubVertex3fvSUN)
-+#define glReplacementCodeuiNormal3fVertex3fSUN MANGLE(ReplacementCodeuiNormal3fVertex3fSUN)
-+#define glReplacementCodeuiNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiNormal3fVertex3fvSUN)
-+#define glReplacementCodeuiSUN MANGLE(ReplacementCodeuiSUN)
-+#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN)
-+#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN)
-+#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN)
-+#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN)
-+#define glReplacementCodeuiTexCoord2fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fSUN)
-+#define glReplacementCodeuiTexCoord2fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fvSUN)
-+#define glReplacementCodeuiVertex3fSUN MANGLE(ReplacementCodeuiVertex3fSUN)
-+#define glReplacementCodeuiVertex3fvSUN MANGLE(ReplacementCodeuiVertex3fvSUN)
-+#define glReplacementCodeuivSUN MANGLE(ReplacementCodeuivSUN)
-+#define glReplacementCodeusSUN MANGLE(ReplacementCodeusSUN)
-+#define glReplacementCodeusvSUN MANGLE(ReplacementCodeusvSUN)
-+#define glRequestResidentProgramsNV MANGLE(RequestResidentProgramsNV)
-+#define glResetHistogramEXT MANGLE(ResetHistogramEXT)
-+#define glResetHistogram MANGLE(ResetHistogram)
-+#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
-+#define glResetMinmax MANGLE(ResetMinmax)
-+#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
-+#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback)
-+#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
-+#define glRotated MANGLE(Rotated)
-+#define glRotatef MANGLE(Rotatef)
-+#define glRotatexOES MANGLE(RotatexOES)
-+#define glSampleCoverageARB MANGLE(SampleCoverageARB)
-+#define glSampleCoverage MANGLE(SampleCoverage)
-+#define glSampleCoverageOES MANGLE(SampleCoverageOES)
-+#define glSampleMapATI MANGLE(SampleMapATI)
-+#define glSampleMaskEXT MANGLE(SampleMaskEXT)
-+#define glSampleMaski MANGLE(SampleMaski)
-+#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
-+#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
-+#define glSamplePatternEXT MANGLE(SamplePatternEXT)
-+#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
-+#define glSamplerParameterf MANGLE(SamplerParameterf)
-+#define glSamplerParameterfv MANGLE(SamplerParameterfv)
-+#define glSamplerParameterIiv MANGLE(SamplerParameterIiv)
-+#define glSamplerParameteri MANGLE(SamplerParameteri)
-+#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv)
-+#define glSamplerParameteriv MANGLE(SamplerParameteriv)
-+#define glScaled MANGLE(Scaled)
-+#define glScalef MANGLE(Scalef)
-+#define glScalexOES MANGLE(ScalexOES)
-+#define glScissorArrayv MANGLE(ScissorArrayv)
-+#define glScissorIndexed MANGLE(ScissorIndexed)
-+#define glScissorIndexedv MANGLE(ScissorIndexedv)
-+#define glScissor MANGLE(Scissor)
-+#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT)
-+#define glSecondaryColor3b MANGLE(SecondaryColor3b)
-+#define glSecondaryColor3bvEXT MANGLE(SecondaryColor3bvEXT)
-+#define glSecondaryColor3bv MANGLE(SecondaryColor3bv)
-+#define glSecondaryColor3dEXT MANGLE(SecondaryColor3dEXT)
-+#define glSecondaryColor3d MANGLE(SecondaryColor3d)
-+#define glSecondaryColor3dvEXT MANGLE(SecondaryColor3dvEXT)
-+#define glSecondaryColor3dv MANGLE(SecondaryColor3dv)
-+#define glSecondaryColor3fEXT MANGLE(SecondaryColor3fEXT)
-+#define glSecondaryColor3f MANGLE(SecondaryColor3f)
-+#define glSecondaryColor3fvEXT MANGLE(SecondaryColor3fvEXT)
-+#define glSecondaryColor3fv MANGLE(SecondaryColor3fv)
-+#define glSecondaryColor3hNV MANGLE(SecondaryColor3hNV)
-+#define glSecondaryColor3hvNV MANGLE(SecondaryColor3hvNV)
-+#define glSecondaryColor3iEXT MANGLE(SecondaryColor3iEXT)
-+#define glSecondaryColor3i MANGLE(SecondaryColor3i)
-+#define glSecondaryColor3ivEXT MANGLE(SecondaryColor3ivEXT)
-+#define glSecondaryColor3iv MANGLE(SecondaryColor3iv)
-+#define glSecondaryColor3sEXT MANGLE(SecondaryColor3sEXT)
-+#define glSecondaryColor3s MANGLE(SecondaryColor3s)
-+#define glSecondaryColor3svEXT MANGLE(SecondaryColor3svEXT)
-+#define glSecondaryColor3sv MANGLE(SecondaryColor3sv)
-+#define glSecondaryColor3ubEXT MANGLE(SecondaryColor3ubEXT)
-+#define glSecondaryColor3ub MANGLE(SecondaryColor3ub)
-+#define glSecondaryColor3ubvEXT MANGLE(SecondaryColor3ubvEXT)
-+#define glSecondaryColor3ubv MANGLE(SecondaryColor3ubv)
-+#define glSecondaryColor3uiEXT MANGLE(SecondaryColor3uiEXT)
-+#define glSecondaryColor3ui MANGLE(SecondaryColor3ui)
-+#define glSecondaryColor3uivEXT MANGLE(SecondaryColor3uivEXT)
-+#define glSecondaryColor3uiv MANGLE(SecondaryColor3uiv)
-+#define glSecondaryColor3usEXT MANGLE(SecondaryColor3usEXT)
-+#define glSecondaryColor3us MANGLE(SecondaryColor3us)
-+#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
-+#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
-+#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
-+#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui)
-+#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv)
-+#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
-+#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
-+#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
-+#define glSelectBuffer MANGLE(SelectBuffer)
-+#define glSelectPerfMonitorCountersAMD MANGLE(SelectPerfMonitorCountersAMD)
-+#define glSeparableFilter2DEXT MANGLE(SeparableFilter2DEXT)
-+#define glSeparableFilter2D MANGLE(SeparableFilter2D)
-+#define glSetFenceAPPLE MANGLE(SetFenceAPPLE)
-+#define glSetFenceNV MANGLE(SetFenceNV)
-+#define glSetFragmentShaderConstantATI MANGLE(SetFragmentShaderConstantATI)
-+#define glSetInvariantEXT MANGLE(SetInvariantEXT)
-+#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT)
-+#define glSetMultisamplefvAMD MANGLE(SetMultisamplefvAMD)
-+#define glShadeModel MANGLE(ShadeModel)
-+#define glShaderBinary MANGLE(ShaderBinary)
-+#define glShaderOp1EXT MANGLE(ShaderOp1EXT)
-+#define glShaderOp2EXT MANGLE(ShaderOp2EXT)
-+#define glShaderOp3EXT MANGLE(ShaderOp3EXT)
-+#define glShaderSourceARB MANGLE(ShaderSourceARB)
-+#define glShaderSource MANGLE(ShaderSource)
-+#define glShaderStorageBlockBinding MANGLE(ShaderStorageBlockBinding)
-+#define glSharpenTexFuncSGIS MANGLE(SharpenTexFuncSGIS)
-+#define glSpriteParameterfSGIX MANGLE(SpriteParameterfSGIX)
-+#define glSpriteParameterfvSGIX MANGLE(SpriteParameterfvSGIX)
-+#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX)
-+#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX)
-+#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX)
-+#define glStencilClearTagEXT MANGLE(StencilClearTagEXT)
-+#define glStencilFillPathInstancedNV MANGLE(StencilFillPathInstancedNV)
-+#define glStencilFillPathNV MANGLE(StencilFillPathNV)
-+#define glStencilFunc MANGLE(StencilFunc)
-+#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI)
-+#define glStencilFuncSeparate MANGLE(StencilFuncSeparate)
-+#define glStencilMask MANGLE(StencilMask)
-+#define glStencilMaskSeparate MANGLE(StencilMaskSeparate)
-+#define glStencilOp MANGLE(StencilOp)
-+#define glStencilOpSeparateATI MANGLE(StencilOpSeparateATI)
-+#define glStencilOpSeparate MANGLE(StencilOpSeparate)
-+#define glStencilOpValueAMD MANGLE(StencilOpValueAMD)
-+#define glStencilStrokePathInstancedNV MANGLE(StencilStrokePathInstancedNV)
-+#define glStencilStrokePathNV MANGLE(StencilStrokePathNV)
-+#define glStencilThenCoverFillPathInstancedNV MANGLE(StencilThenCoverFillPathInstancedNV)
-+#define glStencilThenCoverFillPathNV MANGLE(StencilThenCoverFillPathNV)
-+#define glStencilThenCoverStrokePathInstancedNV MANGLE(StencilThenCoverStrokePathInstancedNV)
-+#define glStencilThenCoverStrokePathNV MANGLE(StencilThenCoverStrokePathNV)
-+#define glStopInstrumentsSGIX MANGLE(StopInstrumentsSGIX)
-+#define glStringMarkerGREMEDY MANGLE(StringMarkerGREMEDY)
-+#define glSwizzleEXT MANGLE(SwizzleEXT)
-+#define glSyncTextureINTEL MANGLE(SyncTextureINTEL)
-+#define glTagSampleBufferSGIX MANGLE(TagSampleBufferSGIX)
-+#define glTangent3bEXT MANGLE(Tangent3bEXT)
-+#define glTangent3bvEXT MANGLE(Tangent3bvEXT)
-+#define glTangent3dEXT MANGLE(Tangent3dEXT)
-+#define glTangent3dvEXT MANGLE(Tangent3dvEXT)
-+#define glTangent3fEXT MANGLE(Tangent3fEXT)
-+#define glTangent3fvEXT MANGLE(Tangent3fvEXT)
-+#define glTangent3iEXT MANGLE(Tangent3iEXT)
-+#define glTangent3ivEXT MANGLE(Tangent3ivEXT)
-+#define glTangent3sEXT MANGLE(Tangent3sEXT)
-+#define glTangent3svEXT MANGLE(Tangent3svEXT)
-+#define glTangentPointerEXT MANGLE(TangentPointerEXT)
-+#define glTbufferMask3DFX MANGLE(TbufferMask3DFX)
-+#define glTessellationFactorAMD MANGLE(TessellationFactorAMD)
-+#define glTessellationModeAMD MANGLE(TessellationModeAMD)
-+#define glTestFenceAPPLE MANGLE(TestFenceAPPLE)
-+#define glTestFenceNV MANGLE(TestFenceNV)
-+#define glTestObjectAPPLE MANGLE(TestObjectAPPLE)
-+#define glTexBufferARB MANGLE(TexBufferARB)
-+#define glTexBufferEXT MANGLE(TexBufferEXT)
-+#define glTexBuffer MANGLE(TexBuffer)
-+#define glTexBufferRange MANGLE(TexBufferRange)
-+#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI)
-+#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI)
-+#define glTexCoord1bOES MANGLE(TexCoord1bOES)
-+#define glTexCoord1bvOES MANGLE(TexCoord1bvOES)
-+#define glTexCoord1d MANGLE(TexCoord1d)
-+#define glTexCoord1dv MANGLE(TexCoord1dv)
-+#define glTexCoord1f MANGLE(TexCoord1f)
-+#define glTexCoord1fv MANGLE(TexCoord1fv)
-+#define glTexCoord1hNV MANGLE(TexCoord1hNV)
-+#define glTexCoord1hvNV MANGLE(TexCoord1hvNV)
-+#define glTexCoord1i MANGLE(TexCoord1i)
-+#define glTexCoord1iv MANGLE(TexCoord1iv)
-+#define glTexCoord1s MANGLE(TexCoord1s)
-+#define glTexCoord1sv MANGLE(TexCoord1sv)
-+#define glTexCoord1xOES MANGLE(TexCoord1xOES)
-+#define glTexCoord1xvOES MANGLE(TexCoord1xvOES)
-+#define glTexCoord2bOES MANGLE(TexCoord2bOES)
-+#define glTexCoord2bvOES MANGLE(TexCoord2bvOES)
-+#define glTexCoord2d MANGLE(TexCoord2d)
-+#define glTexCoord2dv MANGLE(TexCoord2dv)
-+#define glTexCoord2fColor3fVertex3fSUN MANGLE(TexCoord2fColor3fVertex3fSUN)
-+#define glTexCoord2fColor3fVertex3fvSUN MANGLE(TexCoord2fColor3fVertex3fvSUN)
-+#define glTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fSUN)
-+#define glTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fvSUN)
-+#define glTexCoord2fColor4ubVertex3fSUN MANGLE(TexCoord2fColor4ubVertex3fSUN)
-+#define glTexCoord2fColor4ubVertex3fvSUN MANGLE(TexCoord2fColor4ubVertex3fvSUN)
-+#define glTexCoord2f MANGLE(TexCoord2f)
-+#define glTexCoord2fNormal3fVertex3fSUN MANGLE(TexCoord2fNormal3fVertex3fSUN)
-+#define glTexCoord2fNormal3fVertex3fvSUN MANGLE(TexCoord2fNormal3fVertex3fvSUN)
-+#define glTexCoord2fVertex3fSUN MANGLE(TexCoord2fVertex3fSUN)
-+#define glTexCoord2fVertex3fvSUN MANGLE(TexCoord2fVertex3fvSUN)
-+#define glTexCoord2fv MANGLE(TexCoord2fv)
-+#define glTexCoord2hNV MANGLE(TexCoord2hNV)
-+#define glTexCoord2hvNV MANGLE(TexCoord2hvNV)
-+#define glTexCoord2i MANGLE(TexCoord2i)
-+#define glTexCoord2iv MANGLE(TexCoord2iv)
-+#define glTexCoord2s MANGLE(TexCoord2s)
-+#define glTexCoord2sv MANGLE(TexCoord2sv)
-+#define glTexCoord2xOES MANGLE(TexCoord2xOES)
-+#define glTexCoord2xvOES MANGLE(TexCoord2xvOES)
-+#define glTexCoord3bOES MANGLE(TexCoord3bOES)
-+#define glTexCoord3bvOES MANGLE(TexCoord3bvOES)
-+#define glTexCoord3d MANGLE(TexCoord3d)
-+#define glTexCoord3dv MANGLE(TexCoord3dv)
-+#define glTexCoord3f MANGLE(TexCoord3f)
-+#define glTexCoord3fv MANGLE(TexCoord3fv)
-+#define glTexCoord3hNV MANGLE(TexCoord3hNV)
-+#define glTexCoord3hvNV MANGLE(TexCoord3hvNV)
-+#define glTexCoord3i MANGLE(TexCoord3i)
-+#define glTexCoord3iv MANGLE(TexCoord3iv)
-+#define glTexCoord3s MANGLE(TexCoord3s)
-+#define glTexCoord3sv MANGLE(TexCoord3sv)
-+#define glTexCoord3xOES MANGLE(TexCoord3xOES)
-+#define glTexCoord3xvOES MANGLE(TexCoord3xvOES)
-+#define glTexCoord4bOES MANGLE(TexCoord4bOES)
-+#define glTexCoord4bvOES MANGLE(TexCoord4bvOES)
-+#define glTexCoord4d MANGLE(TexCoord4d)
-+#define glTexCoord4dv MANGLE(TexCoord4dv)
-+#define glTexCoord4fColor4fNormal3fVertex4fSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fSUN)
-+#define glTexCoord4fColor4fNormal3fVertex4fvSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fvSUN)
-+#define glTexCoord4f MANGLE(TexCoord4f)
-+#define glTexCoord4fVertex4fSUN MANGLE(TexCoord4fVertex4fSUN)
-+#define glTexCoord4fVertex4fvSUN MANGLE(TexCoord4fVertex4fvSUN)
-+#define glTexCoord4fv MANGLE(TexCoord4fv)
-+#define glTexCoord4hNV MANGLE(TexCoord4hNV)
-+#define glTexCoord4hvNV MANGLE(TexCoord4hvNV)
-+#define glTexCoord4i MANGLE(TexCoord4i)
-+#define glTexCoord4iv MANGLE(TexCoord4iv)
-+#define glTexCoord4s MANGLE(TexCoord4s)
-+#define glTexCoord4sv MANGLE(TexCoord4sv)
-+#define glTexCoord4xOES MANGLE(TexCoord4xOES)
-+#define glTexCoord4xvOES MANGLE(TexCoord4xvOES)
-+#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
-+#define glTexCoordP1ui MANGLE(TexCoordP1ui)
-+#define glTexCoordP1uiv MANGLE(TexCoordP1uiv)
-+#define glTexCoordP2ui MANGLE(TexCoordP2ui)
-+#define glTexCoordP2uiv MANGLE(TexCoordP2uiv)
-+#define glTexCoordP3ui MANGLE(TexCoordP3ui)
-+#define glTexCoordP3uiv MANGLE(TexCoordP3uiv)
-+#define glTexCoordP4ui MANGLE(TexCoordP4ui)
-+#define glTexCoordP4uiv MANGLE(TexCoordP4uiv)
-+#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
-+#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
-+#define glTexCoordPointer MANGLE(TexCoordPointer)
-+#define glTexCoordPointervINTEL MANGLE(TexCoordPointervINTEL)
-+#define glTexEnvf MANGLE(TexEnvf)
-+#define glTexEnvfv MANGLE(TexEnvfv)
-+#define glTexEnvi MANGLE(TexEnvi)
-+#define glTexEnviv MANGLE(TexEnviv)
-+#define glTexEnvxOES MANGLE(TexEnvxOES)
-+#define glTexEnvxvOES MANGLE(TexEnvxvOES)
-+#define glTexFilterFuncSGIS MANGLE(TexFilterFuncSGIS)
-+#define glTexGend MANGLE(TexGend)
-+#define glTexGendv MANGLE(TexGendv)
-+#define glTexGenf MANGLE(TexGenf)
-+#define glTexGenfv MANGLE(TexGenfv)
-+#define glTexGeni MANGLE(TexGeni)
-+#define glTexGeniv MANGLE(TexGeniv)
-+#define glTexGenxOES MANGLE(TexGenxOES)
-+#define glTexGenxvOES MANGLE(TexGenxvOES)
-+#define glTexImage1D MANGLE(TexImage1D)
-+#define glTexImage2D MANGLE(TexImage2D)
-+#define glTexImage2DMultisampleCoverageNV MANGLE(TexImage2DMultisampleCoverageNV)
-+#define glTexImage2DMultisample MANGLE(TexImage2DMultisample)
-+#define glTexImage3DEXT MANGLE(TexImage3DEXT)
-+#define glTexImage3D MANGLE(TexImage3D)
-+#define glTexImage3DMultisampleCoverageNV MANGLE(TexImage3DMultisampleCoverageNV)
-+#define glTexImage3DMultisample MANGLE(TexImage3DMultisample)
-+#define glTexImage4DSGIS MANGLE(TexImage4DSGIS)
-+#define glTexPageCommitmentARB MANGLE(TexPageCommitmentARB)
-+#define glTexParameterf MANGLE(TexParameterf)
-+#define glTexParameterfv MANGLE(TexParameterfv)
-+#define glTexParameterIivEXT MANGLE(TexParameterIivEXT)
-+#define glTexParameterIiv MANGLE(TexParameterIiv)
-+#define glTexParameteri MANGLE(TexParameteri)
-+#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT)
-+#define glTexParameterIuiv MANGLE(TexParameterIuiv)
-+#define glTexParameteriv MANGLE(TexParameteriv)
-+#define glTexParameterxOES MANGLE(TexParameterxOES)
-+#define glTexParameterxvOES MANGLE(TexParameterxvOES)
-+#define glTexRenderbufferNV MANGLE(TexRenderbufferNV)
-+#define glTexStorage1D MANGLE(TexStorage1D)
-+#define glTexStorage2D MANGLE(TexStorage2D)
-+#define glTexStorage2DMultisample MANGLE(TexStorage2DMultisample)
-+#define glTexStorage3D MANGLE(TexStorage3D)
-+#define glTexStorage3DMultisample MANGLE(TexStorage3DMultisample)
-+#define glTexStorageSparseAMD MANGLE(TexStorageSparseAMD)
-+#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT)
-+#define glTexSubImage1D MANGLE(TexSubImage1D)
-+#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT)
-+#define glTexSubImage2D MANGLE(TexSubImage2D)
-+#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
-+#define glTexSubImage3D MANGLE(TexSubImage3D)
-+#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
-+#define glTextureBarrier MANGLE(TextureBarrier)
-+#define glTextureBarrierNV MANGLE(TextureBarrierNV)
-+#define glTextureBufferEXT MANGLE(TextureBufferEXT)
-+#define glTextureBuffer MANGLE(TextureBuffer)
-+#define glTextureBufferRangeEXT MANGLE(TextureBufferRangeEXT)
-+#define glTextureBufferRange MANGLE(TextureBufferRange)
-+#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
-+#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
-+#define glTextureImage2DEXT MANGLE(TextureImage2DEXT)
-+#define glTextureImage2DMultisampleCoverageNV MANGLE(TextureImage2DMultisampleCoverageNV)
-+#define glTextureImage2DMultisampleNV MANGLE(TextureImage2DMultisampleNV)
-+#define glTextureImage3DEXT MANGLE(TextureImage3DEXT)
-+#define glTextureImage3DMultisampleCoverageNV MANGLE(TextureImage3DMultisampleCoverageNV)
-+#define glTextureImage3DMultisampleNV MANGLE(TextureImage3DMultisampleNV)
-+#define glTextureLightEXT MANGLE(TextureLightEXT)
-+#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
-+#define glTextureNormalEXT MANGLE(TextureNormalEXT)
-+#define glTexturePageCommitmentEXT MANGLE(TexturePageCommitmentEXT)
-+#define glTextureParameterfEXT MANGLE(TextureParameterfEXT)
-+#define glTextureParameterf MANGLE(TextureParameterf)
-+#define glTextureParameterfvEXT MANGLE(TextureParameterfvEXT)
-+#define glTextureParameterfv MANGLE(TextureParameterfv)
-+#define glTextureParameteriEXT MANGLE(TextureParameteriEXT)
-+#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
-+#define glTextureParameterIiv MANGLE(TextureParameterIiv)
-+#define glTextureParameteri MANGLE(TextureParameteri)
-+#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
-+#define glTextureParameterIuiv MANGLE(TextureParameterIuiv)
-+#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
-+#define glTextureParameteriv MANGLE(TextureParameteriv)
-+#define glTextureRangeAPPLE MANGLE(TextureRangeAPPLE)
-+#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
-+#define glTextureStorage1DEXT MANGLE(TextureStorage1DEXT)
-+#define glTextureStorage1D MANGLE(TextureStorage1D)
-+#define glTextureStorage2DEXT MANGLE(TextureStorage2DEXT)
-+#define glTextureStorage2D MANGLE(TextureStorage2D)
-+#define glTextureStorage2DMultisampleEXT MANGLE(TextureStorage2DMultisampleEXT)
-+#define glTextureStorage2DMultisample MANGLE(TextureStorage2DMultisample)
-+#define glTextureStorage3DEXT MANGLE(TextureStorage3DEXT)
-+#define glTextureStorage3D MANGLE(TextureStorage3D)
-+#define glTextureStorage3DMultisampleEXT MANGLE(TextureStorage3DMultisampleEXT)
-+#define glTextureStorage3DMultisample MANGLE(TextureStorage3DMultisample)
-+#define glTextureStorageSparseAMD MANGLE(TextureStorageSparseAMD)
-+#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
-+#define glTextureSubImage1D MANGLE(TextureSubImage1D)
-+#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
-+#define glTextureSubImage2D MANGLE(TextureSubImage2D)
-+#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
-+#define glTextureSubImage3D MANGLE(TextureSubImage3D)
-+#define glTextureView MANGLE(TextureView)
-+#define glTrackMatrixNV MANGLE(TrackMatrixNV)
-+#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
-+#define glTransformFeedbackBufferBase MANGLE(TransformFeedbackBufferBase)
-+#define glTransformFeedbackBufferRange MANGLE(TransformFeedbackBufferRange)
-+#define glTransformFeedbackStreamAttribsNV MANGLE(TransformFeedbackStreamAttribsNV)
-+#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
-+#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
-+#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
-+#define glTransformPathNV MANGLE(TransformPathNV)
-+#define glTranslated MANGLE(Translated)
-+#define glTranslatef MANGLE(Translatef)
-+#define glTranslatexOES MANGLE(TranslatexOES)
-+#define glUniform1d MANGLE(Uniform1d)
-+#define glUniform1dv MANGLE(Uniform1dv)
-+#define glUniform1fARB MANGLE(Uniform1fARB)
-+#define glUniform1f MANGLE(Uniform1f)
-+#define glUniform1fvARB MANGLE(Uniform1fvARB)
-+#define glUniform1fv MANGLE(Uniform1fv)
-+#define glUniform1i64NV MANGLE(Uniform1i64NV)
-+#define glUniform1i64vNV MANGLE(Uniform1i64vNV)
-+#define glUniform1iARB MANGLE(Uniform1iARB)
-+#define glUniform1i MANGLE(Uniform1i)
-+#define glUniform1ivARB MANGLE(Uniform1ivARB)
-+#define glUniform1iv MANGLE(Uniform1iv)
-+#define glUniform1ui64NV MANGLE(Uniform1ui64NV)
-+#define glUniform1ui64vNV MANGLE(Uniform1ui64vNV)
-+#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
-+#define glUniform1ui MANGLE(Uniform1ui)
-+#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
-+#define glUniform1uiv MANGLE(Uniform1uiv)
-+#define glUniform2d MANGLE(Uniform2d)
-+#define glUniform2dv MANGLE(Uniform2dv)
-+#define glUniform2fARB MANGLE(Uniform2fARB)
-+#define glUniform2f MANGLE(Uniform2f)
-+#define glUniform2fvARB MANGLE(Uniform2fvARB)
-+#define glUniform2fv MANGLE(Uniform2fv)
-+#define glUniform2i64NV MANGLE(Uniform2i64NV)
-+#define glUniform2i64vNV MANGLE(Uniform2i64vNV)
-+#define glUniform2iARB MANGLE(Uniform2iARB)
-+#define glUniform2i MANGLE(Uniform2i)
-+#define glUniform2ivARB MANGLE(Uniform2ivARB)
-+#define glUniform2iv MANGLE(Uniform2iv)
-+#define glUniform2ui64NV MANGLE(Uniform2ui64NV)
-+#define glUniform2ui64vNV MANGLE(Uniform2ui64vNV)
-+#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
-+#define glUniform2ui MANGLE(Uniform2ui)
-+#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
-+#define glUniform2uiv MANGLE(Uniform2uiv)
-+#define glUniform3d MANGLE(Uniform3d)
-+#define glUniform3dv MANGLE(Uniform3dv)
-+#define glUniform3fARB MANGLE(Uniform3fARB)
-+#define glUniform3f MANGLE(Uniform3f)
-+#define glUniform3fvARB MANGLE(Uniform3fvARB)
-+#define glUniform3fv MANGLE(Uniform3fv)
-+#define glUniform3i64NV MANGLE(Uniform3i64NV)
-+#define glUniform3i64vNV MANGLE(Uniform3i64vNV)
-+#define glUniform3iARB MANGLE(Uniform3iARB)
-+#define glUniform3i MANGLE(Uniform3i)
-+#define glUniform3ivARB MANGLE(Uniform3ivARB)
-+#define glUniform3iv MANGLE(Uniform3iv)
-+#define glUniform3ui64NV MANGLE(Uniform3ui64NV)
-+#define glUniform3ui64vNV MANGLE(Uniform3ui64vNV)
-+#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
-+#define glUniform3ui MANGLE(Uniform3ui)
-+#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
-+#define glUniform3uiv MANGLE(Uniform3uiv)
-+#define glUniform4d MANGLE(Uniform4d)
-+#define glUniform4dv MANGLE(Uniform4dv)
-+#define glUniform4fARB MANGLE(Uniform4fARB)
-+#define glUniform4f MANGLE(Uniform4f)
-+#define glUniform4fvARB MANGLE(Uniform4fvARB)
-+#define glUniform4fv MANGLE(Uniform4fv)
-+#define glUniform4i64NV MANGLE(Uniform4i64NV)
-+#define glUniform4i64vNV MANGLE(Uniform4i64vNV)
-+#define glUniform4iARB MANGLE(Uniform4iARB)
-+#define glUniform4i MANGLE(Uniform4i)
-+#define glUniform4ivARB MANGLE(Uniform4ivARB)
-+#define glUniform4iv MANGLE(Uniform4iv)
-+#define glUniform4ui64NV MANGLE(Uniform4ui64NV)
-+#define glUniform4ui64vNV MANGLE(Uniform4ui64vNV)
-+#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
-+#define glUniform4ui MANGLE(Uniform4ui)
-+#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
-+#define glUniform4uiv MANGLE(Uniform4uiv)
-+#define glUniformBlockBinding MANGLE(UniformBlockBinding)
-+#define glUniformBufferEXT MANGLE(UniformBufferEXT)
-+#define glUniformHandleui64ARB MANGLE(UniformHandleui64ARB)
-+#define glUniformHandleui64NV MANGLE(UniformHandleui64NV)
-+#define glUniformHandleui64vARB MANGLE(UniformHandleui64vARB)
-+#define glUniformHandleui64vNV MANGLE(UniformHandleui64vNV)
-+#define glUniformMatrix2dv MANGLE(UniformMatrix2dv)
-+#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
-+#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
-+#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv)
-+#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
-+#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv)
-+#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
-+#define glUniformMatrix3dv MANGLE(UniformMatrix3dv)
-+#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
-+#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
-+#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv)
-+#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
-+#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv)
-+#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
-+#define glUniformMatrix4dv MANGLE(UniformMatrix4dv)
-+#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
-+#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
-+#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv)
-+#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
-+#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv)
-+#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
-+#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv)
-+#define glUniformui64NV MANGLE(Uniformui64NV)
-+#define glUniformui64vNV MANGLE(Uniformui64vNV)
-+#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
-+#define glUnmapBufferARB MANGLE(UnmapBufferARB)
-+#define glUnmapBuffer MANGLE(UnmapBuffer)
-+#define glUnmapNamedBufferEXT MANGLE(UnmapNamedBufferEXT)
-+#define glUnmapNamedBuffer MANGLE(UnmapNamedBuffer)
-+#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI)
-+#define glUnmapTexture2DINTEL MANGLE(UnmapTexture2DINTEL)
-+#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
-+#define glUseProgram MANGLE(UseProgram)
-+#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
-+#define glUseProgramStages MANGLE(UseProgramStages)
-+#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
-+#define glValidateProgramARB MANGLE(ValidateProgramARB)
-+#define glValidateProgram MANGLE(ValidateProgram)
-+#define glValidateProgramPipeline MANGLE(ValidateProgramPipeline)
-+#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
-+#define glVariantbvEXT MANGLE(VariantbvEXT)
-+#define glVariantdvEXT MANGLE(VariantdvEXT)
-+#define glVariantfvEXT MANGLE(VariantfvEXT)
-+#define glVariantivEXT MANGLE(VariantivEXT)
-+#define glVariantPointerEXT MANGLE(VariantPointerEXT)
-+#define glVariantsvEXT MANGLE(VariantsvEXT)
-+#define glVariantubvEXT MANGLE(VariantubvEXT)
-+#define glVariantuivEXT MANGLE(VariantuivEXT)
-+#define glVariantusvEXT MANGLE(VariantusvEXT)
-+#define glVDPAUFiniNV MANGLE(VDPAUFiniNV)
-+#define glVDPAUGetSurfaceivNV MANGLE(VDPAUGetSurfaceivNV)
-+#define glVDPAUInitNV MANGLE(VDPAUInitNV)
-+#define glVDPAUIsSurfaceNV MANGLE(VDPAUIsSurfaceNV)
-+#define glVDPAUMapSurfacesNV MANGLE(VDPAUMapSurfacesNV)
-+#define glVDPAURegisterOutputSurfaceNV MANGLE(VDPAURegisterOutputSurfaceNV)
-+#define glVDPAURegisterVideoSurfaceNV MANGLE(VDPAURegisterVideoSurfaceNV)
-+#define glVDPAUSurfaceAccessNV MANGLE(VDPAUSurfaceAccessNV)
-+#define glVDPAUUnmapSurfacesNV MANGLE(VDPAUUnmapSurfacesNV)
-+#define glVDPAUUnregisterSurfaceNV MANGLE(VDPAUUnregisterSurfaceNV)
-+#define glVertex2bOES MANGLE(Vertex2bOES)
-+#define glVertex2bvOES MANGLE(Vertex2bvOES)
-+#define glVertex2d MANGLE(Vertex2d)
-+#define glVertex2dv MANGLE(Vertex2dv)
-+#define glVertex2f MANGLE(Vertex2f)
-+#define glVertex2fv MANGLE(Vertex2fv)
-+#define glVertex2hNV MANGLE(Vertex2hNV)
-+#define glVertex2hvNV MANGLE(Vertex2hvNV)
-+#define glVertex2i MANGLE(Vertex2i)
-+#define glVertex2iv MANGLE(Vertex2iv)
-+#define glVertex2s MANGLE(Vertex2s)
-+#define glVertex2sv MANGLE(Vertex2sv)
-+#define glVertex2xOES MANGLE(Vertex2xOES)
-+#define glVertex2xvOES MANGLE(Vertex2xvOES)
-+#define glVertex3bOES MANGLE(Vertex3bOES)
-+#define glVertex3bvOES MANGLE(Vertex3bvOES)
-+#define glVertex3d MANGLE(Vertex3d)
-+#define glVertex3dv MANGLE(Vertex3dv)
-+#define glVertex3f MANGLE(Vertex3f)
-+#define glVertex3fv MANGLE(Vertex3fv)
-+#define glVertex3hNV MANGLE(Vertex3hNV)
-+#define glVertex3hvNV MANGLE(Vertex3hvNV)
-+#define glVertex3i MANGLE(Vertex3i)
-+#define glVertex3iv MANGLE(Vertex3iv)
-+#define glVertex3s MANGLE(Vertex3s)
-+#define glVertex3sv MANGLE(Vertex3sv)
-+#define glVertex3xOES MANGLE(Vertex3xOES)
-+#define glVertex3xvOES MANGLE(Vertex3xvOES)
-+#define glVertex4bOES MANGLE(Vertex4bOES)
-+#define glVertex4bvOES MANGLE(Vertex4bvOES)
-+#define glVertex4d MANGLE(Vertex4d)
-+#define glVertex4dv MANGLE(Vertex4dv)
-+#define glVertex4f MANGLE(Vertex4f)
-+#define glVertex4fv MANGLE(Vertex4fv)
-+#define glVertex4hNV MANGLE(Vertex4hNV)
-+#define glVertex4hvNV MANGLE(Vertex4hvNV)
-+#define glVertex4i MANGLE(Vertex4i)
-+#define glVertex4iv MANGLE(Vertex4iv)
-+#define glVertex4s MANGLE(Vertex4s)
-+#define glVertex4sv MANGLE(Vertex4sv)
-+#define glVertex4xOES MANGLE(Vertex4xOES)
-+#define glVertex4xvOES MANGLE(Vertex4xvOES)
-+#define glVertexArrayAttribBinding MANGLE(VertexArrayAttribBinding)
-+#define glVertexArrayAttribFormat MANGLE(VertexArrayAttribFormat)
-+#define glVertexArrayAttribIFormat MANGLE(VertexArrayAttribIFormat)
-+#define glVertexArrayAttribLFormat MANGLE(VertexArrayAttribLFormat)
-+#define glVertexArrayBindingDivisor MANGLE(VertexArrayBindingDivisor)
-+#define glVertexArrayBindVertexBufferEXT MANGLE(VertexArrayBindVertexBufferEXT)
-+#define glVertexArrayColorOffsetEXT MANGLE(VertexArrayColorOffsetEXT)
-+#define glVertexArrayEdgeFlagOffsetEXT MANGLE(VertexArrayEdgeFlagOffsetEXT)
-+#define glVertexArrayElementBuffer MANGLE(VertexArrayElementBuffer)
-+#define glVertexArrayFogCoordOffsetEXT MANGLE(VertexArrayFogCoordOffsetEXT)
-+#define glVertexArrayIndexOffsetEXT MANGLE(VertexArrayIndexOffsetEXT)
-+#define glVertexArrayMultiTexCoordOffsetEXT MANGLE(VertexArrayMultiTexCoordOffsetEXT)
-+#define glVertexArrayNormalOffsetEXT MANGLE(VertexArrayNormalOffsetEXT)
-+#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE)
-+#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE)
-+#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV)
-+#define glVertexArraySecondaryColorOffsetEXT MANGLE(VertexArraySecondaryColorOffsetEXT)
-+#define glVertexArrayTexCoordOffsetEXT MANGLE(VertexArrayTexCoordOffsetEXT)
-+#define glVertexArrayVertexAttribBindingEXT MANGLE(VertexArrayVertexAttribBindingEXT)
-+#define glVertexArrayVertexAttribDivisorEXT MANGLE(VertexArrayVertexAttribDivisorEXT)
-+#define glVertexArrayVertexAttribFormatEXT MANGLE(VertexArrayVertexAttribFormatEXT)
-+#define glVertexArrayVertexAttribIFormatEXT MANGLE(VertexArrayVertexAttribIFormatEXT)
-+#define glVertexArrayVertexAttribIOffsetEXT MANGLE(VertexArrayVertexAttribIOffsetEXT)
-+#define glVertexArrayVertexAttribLFormatEXT MANGLE(VertexArrayVertexAttribLFormatEXT)
-+#define glVertexArrayVertexAttribLOffsetEXT MANGLE(VertexArrayVertexAttribLOffsetEXT)
-+#define glVertexArrayVertexAttribOffsetEXT MANGLE(VertexArrayVertexAttribOffsetEXT)
-+#define glVertexArrayVertexBindingDivisorEXT MANGLE(VertexArrayVertexBindingDivisorEXT)
-+#define glVertexArrayVertexBuffer MANGLE(VertexArrayVertexBuffer)
-+#define glVertexArrayVertexBuffers MANGLE(VertexArrayVertexBuffers)
-+#define glVertexArrayVertexOffsetEXT MANGLE(VertexArrayVertexOffsetEXT)
-+#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB)
-+#define glVertexAttrib1d MANGLE(VertexAttrib1d)
-+#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV)
-+#define glVertexAttrib1dvARB MANGLE(VertexAttrib1dvARB)
-+#define glVertexAttrib1dv MANGLE(VertexAttrib1dv)
-+#define glVertexAttrib1dvNV MANGLE(VertexAttrib1dvNV)
-+#define glVertexAttrib1fARB MANGLE(VertexAttrib1fARB)
-+#define glVertexAttrib1f MANGLE(VertexAttrib1f)
-+#define glVertexAttrib1fNV MANGLE(VertexAttrib1fNV)
-+#define glVertexAttrib1fvARB MANGLE(VertexAttrib1fvARB)
-+#define glVertexAttrib1fv MANGLE(VertexAttrib1fv)
-+#define glVertexAttrib1fvNV MANGLE(VertexAttrib1fvNV)
-+#define glVertexAttrib1hNV MANGLE(VertexAttrib1hNV)
-+#define glVertexAttrib1hvNV MANGLE(VertexAttrib1hvNV)
-+#define glVertexAttrib1sARB MANGLE(VertexAttrib1sARB)
-+#define glVertexAttrib1s MANGLE(VertexAttrib1s)
-+#define glVertexAttrib1sNV MANGLE(VertexAttrib1sNV)
-+#define glVertexAttrib1svARB MANGLE(VertexAttrib1svARB)
-+#define glVertexAttrib1sv MANGLE(VertexAttrib1sv)
-+#define glVertexAttrib1svNV MANGLE(VertexAttrib1svNV)
-+#define glVertexAttrib2dARB MANGLE(VertexAttrib2dARB)
-+#define glVertexAttrib2d MANGLE(VertexAttrib2d)
-+#define glVertexAttrib2dNV MANGLE(VertexAttrib2dNV)
-+#define glVertexAttrib2dvARB MANGLE(VertexAttrib2dvARB)
-+#define glVertexAttrib2dv MANGLE(VertexAttrib2dv)
-+#define glVertexAttrib2dvNV MANGLE(VertexAttrib2dvNV)
-+#define glVertexAttrib2fARB MANGLE(VertexAttrib2fARB)
-+#define glVertexAttrib2f MANGLE(VertexAttrib2f)
-+#define glVertexAttrib2fNV MANGLE(VertexAttrib2fNV)
-+#define glVertexAttrib2fvARB MANGLE(VertexAttrib2fvARB)
-+#define glVertexAttrib2fv MANGLE(VertexAttrib2fv)
-+#define glVertexAttrib2fvNV MANGLE(VertexAttrib2fvNV)
-+#define glVertexAttrib2hNV MANGLE(VertexAttrib2hNV)
-+#define glVertexAttrib2hvNV MANGLE(VertexAttrib2hvNV)
-+#define glVertexAttrib2sARB MANGLE(VertexAttrib2sARB)
-+#define glVertexAttrib2s MANGLE(VertexAttrib2s)
-+#define glVertexAttrib2sNV MANGLE(VertexAttrib2sNV)
-+#define glVertexAttrib2svARB MANGLE(VertexAttrib2svARB)
-+#define glVertexAttrib2sv MANGLE(VertexAttrib2sv)
-+#define glVertexAttrib2svNV MANGLE(VertexAttrib2svNV)
-+#define glVertexAttrib3dARB MANGLE(VertexAttrib3dARB)
-+#define glVertexAttrib3d MANGLE(VertexAttrib3d)
-+#define glVertexAttrib3dNV MANGLE(VertexAttrib3dNV)
-+#define glVertexAttrib3dvARB MANGLE(VertexAttrib3dvARB)
-+#define glVertexAttrib3dv MANGLE(VertexAttrib3dv)
-+#define glVertexAttrib3dvNV MANGLE(VertexAttrib3dvNV)
-+#define glVertexAttrib3fARB MANGLE(VertexAttrib3fARB)
-+#define glVertexAttrib3f MANGLE(VertexAttrib3f)
-+#define glVertexAttrib3fNV MANGLE(VertexAttrib3fNV)
-+#define glVertexAttrib3fvARB MANGLE(VertexAttrib3fvARB)
-+#define glVertexAttrib3fv MANGLE(VertexAttrib3fv)
-+#define glVertexAttrib3fvNV MANGLE(VertexAttrib3fvNV)
-+#define glVertexAttrib3hNV MANGLE(VertexAttrib3hNV)
-+#define glVertexAttrib3hvNV MANGLE(VertexAttrib3hvNV)
-+#define glVertexAttrib3sARB MANGLE(VertexAttrib3sARB)
-+#define glVertexAttrib3s MANGLE(VertexAttrib3s)
-+#define glVertexAttrib3sNV MANGLE(VertexAttrib3sNV)
-+#define glVertexAttrib3svARB MANGLE(VertexAttrib3svARB)
-+#define glVertexAttrib3sv MANGLE(VertexAttrib3sv)
-+#define glVertexAttrib3svNV MANGLE(VertexAttrib3svNV)
-+#define glVertexAttrib4bvARB MANGLE(VertexAttrib4bvARB)
-+#define glVertexAttrib4bv MANGLE(VertexAttrib4bv)
-+#define glVertexAttrib4dARB MANGLE(VertexAttrib4dARB)
-+#define glVertexAttrib4d MANGLE(VertexAttrib4d)
-+#define glVertexAttrib4dNV MANGLE(VertexAttrib4dNV)
-+#define glVertexAttrib4dvARB MANGLE(VertexAttrib4dvARB)
-+#define glVertexAttrib4dv MANGLE(VertexAttrib4dv)
-+#define glVertexAttrib4dvNV MANGLE(VertexAttrib4dvNV)
-+#define glVertexAttrib4fARB MANGLE(VertexAttrib4fARB)
-+#define glVertexAttrib4f MANGLE(VertexAttrib4f)
-+#define glVertexAttrib4fNV MANGLE(VertexAttrib4fNV)
-+#define glVertexAttrib4fvARB MANGLE(VertexAttrib4fvARB)
-+#define glVertexAttrib4fv MANGLE(VertexAttrib4fv)
-+#define glVertexAttrib4fvNV MANGLE(VertexAttrib4fvNV)
-+#define glVertexAttrib4hNV MANGLE(VertexAttrib4hNV)
-+#define glVertexAttrib4hvNV MANGLE(VertexAttrib4hvNV)
-+#define glVertexAttrib4ivARB MANGLE(VertexAttrib4ivARB)
-+#define glVertexAttrib4iv MANGLE(VertexAttrib4iv)
-+#define glVertexAttrib4NbvARB MANGLE(VertexAttrib4NbvARB)
-+#define glVertexAttrib4Nbv MANGLE(VertexAttrib4Nbv)
-+#define glVertexAttrib4NivARB MANGLE(VertexAttrib4NivARB)
-+#define glVertexAttrib4Niv MANGLE(VertexAttrib4Niv)
-+#define glVertexAttrib4NsvARB MANGLE(VertexAttrib4NsvARB)
-+#define glVertexAttrib4Nsv MANGLE(VertexAttrib4Nsv)
-+#define glVertexAttrib4NubARB MANGLE(VertexAttrib4NubARB)
-+#define glVertexAttrib4Nub MANGLE(VertexAttrib4Nub)
-+#define glVertexAttrib4NubvARB MANGLE(VertexAttrib4NubvARB)
-+#define glVertexAttrib4Nubv MANGLE(VertexAttrib4Nubv)
-+#define glVertexAttrib4NuivARB MANGLE(VertexAttrib4NuivARB)
-+#define glVertexAttrib4Nuiv MANGLE(VertexAttrib4Nuiv)
-+#define glVertexAttrib4NusvARB MANGLE(VertexAttrib4NusvARB)
-+#define glVertexAttrib4Nusv MANGLE(VertexAttrib4Nusv)
-+#define glVertexAttrib4sARB MANGLE(VertexAttrib4sARB)
-+#define glVertexAttrib4s MANGLE(VertexAttrib4s)
-+#define glVertexAttrib4sNV MANGLE(VertexAttrib4sNV)
-+#define glVertexAttrib4svARB MANGLE(VertexAttrib4svARB)
-+#define glVertexAttrib4sv MANGLE(VertexAttrib4sv)
-+#define glVertexAttrib4svNV MANGLE(VertexAttrib4svNV)
-+#define glVertexAttrib4ubNV MANGLE(VertexAttrib4ubNV)
-+#define glVertexAttrib4ubvARB MANGLE(VertexAttrib4ubvARB)
-+#define glVertexAttrib4ubv MANGLE(VertexAttrib4ubv)
-+#define glVertexAttrib4ubvNV MANGLE(VertexAttrib4ubvNV)
-+#define glVertexAttrib4uivARB MANGLE(VertexAttrib4uivARB)
-+#define glVertexAttrib4uiv MANGLE(VertexAttrib4uiv)
-+#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
-+#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
-+#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
-+#define glVertexAttribBinding MANGLE(VertexAttribBinding)
-+#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
-+#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
-+#define glVertexAttribFormat MANGLE(VertexAttribFormat)
-+#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
-+#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
-+#define glVertexAttribI1i MANGLE(VertexAttribI1i)
-+#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
-+#define glVertexAttribI1iv MANGLE(VertexAttribI1iv)
-+#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT)
-+#define glVertexAttribI1ui MANGLE(VertexAttribI1ui)
-+#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT)
-+#define glVertexAttribI1uiv MANGLE(VertexAttribI1uiv)
-+#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT)
-+#define glVertexAttribI2i MANGLE(VertexAttribI2i)
-+#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT)
-+#define glVertexAttribI2iv MANGLE(VertexAttribI2iv)
-+#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT)
-+#define glVertexAttribI2ui MANGLE(VertexAttribI2ui)
-+#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT)
-+#define glVertexAttribI2uiv MANGLE(VertexAttribI2uiv)
-+#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT)
-+#define glVertexAttribI3i MANGLE(VertexAttribI3i)
-+#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT)
-+#define glVertexAttribI3iv MANGLE(VertexAttribI3iv)
-+#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT)
-+#define glVertexAttribI3ui MANGLE(VertexAttribI3ui)
-+#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT)
-+#define glVertexAttribI3uiv MANGLE(VertexAttribI3uiv)
-+#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT)
-+#define glVertexAttribI4bv MANGLE(VertexAttribI4bv)
-+#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT)
-+#define glVertexAttribI4i MANGLE(VertexAttribI4i)
-+#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT)
-+#define glVertexAttribI4iv MANGLE(VertexAttribI4iv)
-+#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT)
-+#define glVertexAttribI4sv MANGLE(VertexAttribI4sv)
-+#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT)
-+#define glVertexAttribI4ubv MANGLE(VertexAttribI4ubv)
-+#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT)
-+#define glVertexAttribI4ui MANGLE(VertexAttribI4ui)
-+#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT)
-+#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
-+#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
-+#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
-+#define glVertexAttribIFormat MANGLE(VertexAttribIFormat)
-+#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
-+#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
-+#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
-+#define glVertexAttribL1dEXT MANGLE(VertexAttribL1dEXT)
-+#define glVertexAttribL1d MANGLE(VertexAttribL1d)
-+#define glVertexAttribL1dvEXT MANGLE(VertexAttribL1dvEXT)
-+#define glVertexAttribL1dv MANGLE(VertexAttribL1dv)
-+#define glVertexAttribL1i64NV MANGLE(VertexAttribL1i64NV)
-+#define glVertexAttribL1i64vNV MANGLE(VertexAttribL1i64vNV)
-+#define glVertexAttribL1ui64ARB MANGLE(VertexAttribL1ui64ARB)
-+#define glVertexAttribL1ui64NV MANGLE(VertexAttribL1ui64NV)
-+#define glVertexAttribL1ui64vARB MANGLE(VertexAttribL1ui64vARB)
-+#define glVertexAttribL1ui64vNV MANGLE(VertexAttribL1ui64vNV)
-+#define glVertexAttribL2dEXT MANGLE(VertexAttribL2dEXT)
-+#define glVertexAttribL2d MANGLE(VertexAttribL2d)
-+#define glVertexAttribL2dvEXT MANGLE(VertexAttribL2dvEXT)
-+#define glVertexAttribL2dv MANGLE(VertexAttribL2dv)
-+#define glVertexAttribL2i64NV MANGLE(VertexAttribL2i64NV)
-+#define glVertexAttribL2i64vNV MANGLE(VertexAttribL2i64vNV)
-+#define glVertexAttribL2ui64NV MANGLE(VertexAttribL2ui64NV)
-+#define glVertexAttribL2ui64vNV MANGLE(VertexAttribL2ui64vNV)
-+#define glVertexAttribL3dEXT MANGLE(VertexAttribL3dEXT)
-+#define glVertexAttribL3d MANGLE(VertexAttribL3d)
-+#define glVertexAttribL3dvEXT MANGLE(VertexAttribL3dvEXT)
-+#define glVertexAttribL3dv MANGLE(VertexAttribL3dv)
-+#define glVertexAttribL3i64NV MANGLE(VertexAttribL3i64NV)
-+#define glVertexAttribL3i64vNV MANGLE(VertexAttribL3i64vNV)
-+#define glVertexAttribL3ui64NV MANGLE(VertexAttribL3ui64NV)
-+#define glVertexAttribL3ui64vNV MANGLE(VertexAttribL3ui64vNV)
-+#define glVertexAttribL4dEXT MANGLE(VertexAttribL4dEXT)
-+#define glVertexAttribL4d MANGLE(VertexAttribL4d)
-+#define glVertexAttribL4dvEXT MANGLE(VertexAttribL4dvEXT)
-+#define glVertexAttribL4dv MANGLE(VertexAttribL4dv)
-+#define glVertexAttribL4i64NV MANGLE(VertexAttribL4i64NV)
-+#define glVertexAttribL4i64vNV MANGLE(VertexAttribL4i64vNV)
-+#define glVertexAttribL4ui64NV MANGLE(VertexAttribL4ui64NV)
-+#define glVertexAttribL4ui64vNV MANGLE(VertexAttribL4ui64vNV)
-+#define glVertexAttribLFormat MANGLE(VertexAttribLFormat)
-+#define glVertexAttribLFormatNV MANGLE(VertexAttribLFormatNV)
-+#define glVertexAttribLPointerEXT MANGLE(VertexAttribLPointerEXT)
-+#define glVertexAttribLPointer MANGLE(VertexAttribLPointer)
-+#define glVertexAttribP1ui MANGLE(VertexAttribP1ui)
-+#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv)
-+#define glVertexAttribP2ui MANGLE(VertexAttribP2ui)
-+#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv)
-+#define glVertexAttribP3ui MANGLE(VertexAttribP3ui)
-+#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv)
-+#define glVertexAttribP4ui MANGLE(VertexAttribP4ui)
-+#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv)
-+#define glVertexAttribParameteriAMD MANGLE(VertexAttribParameteriAMD)
-+#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
-+#define glVertexAttribPointer MANGLE(VertexAttribPointer)
-+#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
-+#define glVertexAttribs1dvNV MANGLE(VertexAttribs1dvNV)
-+#define glVertexAttribs1fvNV MANGLE(VertexAttribs1fvNV)
-+#define glVertexAttribs1hvNV MANGLE(VertexAttribs1hvNV)
-+#define glVertexAttribs1svNV MANGLE(VertexAttribs1svNV)
-+#define glVertexAttribs2dvNV MANGLE(VertexAttribs2dvNV)
-+#define glVertexAttribs2fvNV MANGLE(VertexAttribs2fvNV)
-+#define glVertexAttribs2hvNV MANGLE(VertexAttribs2hvNV)
-+#define glVertexAttribs2svNV MANGLE(VertexAttribs2svNV)
-+#define glVertexAttribs3dvNV MANGLE(VertexAttribs3dvNV)
-+#define glVertexAttribs3fvNV MANGLE(VertexAttribs3fvNV)
-+#define glVertexAttribs3hvNV MANGLE(VertexAttribs3hvNV)
-+#define glVertexAttribs3svNV MANGLE(VertexAttribs3svNV)
-+#define glVertexAttribs4dvNV MANGLE(VertexAttribs4dvNV)
-+#define glVertexAttribs4fvNV MANGLE(VertexAttribs4fvNV)
-+#define glVertexAttribs4hvNV MANGLE(VertexAttribs4hvNV)
-+#define glVertexAttribs4svNV MANGLE(VertexAttribs4svNV)
-+#define glVertexAttribs4ubvNV MANGLE(VertexAttribs4ubvNV)
-+#define glVertexBindingDivisor MANGLE(VertexBindingDivisor)
-+#define glVertexBlendARB MANGLE(VertexBlendARB)
-+#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
-+#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
-+#define glVertexFormatNV MANGLE(VertexFormatNV)
-+#define glVertexP2ui MANGLE(VertexP2ui)
-+#define glVertexP2uiv MANGLE(VertexP2uiv)
-+#define glVertexP3ui MANGLE(VertexP3ui)
-+#define glVertexP3uiv MANGLE(VertexP3uiv)
-+#define glVertexP4ui MANGLE(VertexP4ui)
-+#define glVertexP4uiv MANGLE(VertexP4uiv)
-+#define glVertexPointerEXT MANGLE(VertexPointerEXT)
-+#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
-+#define glVertexPointer MANGLE(VertexPointer)
-+#define glVertexPointervINTEL MANGLE(VertexPointervINTEL)
-+#define glVertexStream1dATI MANGLE(VertexStream1dATI)
-+#define glVertexStream1dvATI MANGLE(VertexStream1dvATI)
-+#define glVertexStream1fATI MANGLE(VertexStream1fATI)
-+#define glVertexStream1fvATI MANGLE(VertexStream1fvATI)
-+#define glVertexStream1iATI MANGLE(VertexStream1iATI)
-+#define glVertexStream1ivATI MANGLE(VertexStream1ivATI)
-+#define glVertexStream1sATI MANGLE(VertexStream1sATI)
-+#define glVertexStream1svATI MANGLE(VertexStream1svATI)
-+#define glVertexStream2dATI MANGLE(VertexStream2dATI)
-+#define glVertexStream2dvATI MANGLE(VertexStream2dvATI)
-+#define glVertexStream2fATI MANGLE(VertexStream2fATI)
-+#define glVertexStream2fvATI MANGLE(VertexStream2fvATI)
-+#define glVertexStream2iATI MANGLE(VertexStream2iATI)
-+#define glVertexStream2ivATI MANGLE(VertexStream2ivATI)
-+#define glVertexStream2sATI MANGLE(VertexStream2sATI)
-+#define glVertexStream2svATI MANGLE(VertexStream2svATI)
-+#define glVertexStream3dATI MANGLE(VertexStream3dATI)
-+#define glVertexStream3dvATI MANGLE(VertexStream3dvATI)
-+#define glVertexStream3fATI MANGLE(VertexStream3fATI)
-+#define glVertexStream3fvATI MANGLE(VertexStream3fvATI)
-+#define glVertexStream3iATI MANGLE(VertexStream3iATI)
-+#define glVertexStream3ivATI MANGLE(VertexStream3ivATI)
-+#define glVertexStream3sATI MANGLE(VertexStream3sATI)
-+#define glVertexStream3svATI MANGLE(VertexStream3svATI)
-+#define glVertexStream4dATI MANGLE(VertexStream4dATI)
-+#define glVertexStream4dvATI MANGLE(VertexStream4dvATI)
-+#define glVertexStream4fATI MANGLE(VertexStream4fATI)
-+#define glVertexStream4fvATI MANGLE(VertexStream4fvATI)
-+#define glVertexStream4iATI MANGLE(VertexStream4iATI)
-+#define glVertexStream4ivATI MANGLE(VertexStream4ivATI)
-+#define glVertexStream4sATI MANGLE(VertexStream4sATI)
-+#define glVertexStream4svATI MANGLE(VertexStream4svATI)
-+#define glVertexWeightfEXT MANGLE(VertexWeightfEXT)
-+#define glVertexWeightfvEXT MANGLE(VertexWeightfvEXT)
-+#define glVertexWeighthNV MANGLE(VertexWeighthNV)
-+#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
-+#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
-+#define glVideoCaptureNV MANGLE(VideoCaptureNV)
-+#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
-+#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
-+#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
-+#define glViewportArrayv MANGLE(ViewportArrayv)
-+#define glViewportIndexedf MANGLE(ViewportIndexedf)
-+#define glViewportIndexedfv MANGLE(ViewportIndexedfv)
-+#define glViewport MANGLE(Viewport)
-+#define glWaitSync MANGLE(WaitSync)
-+#define glWeightbvARB MANGLE(WeightbvARB)
-+#define glWeightdvARB MANGLE(WeightdvARB)
-+#define glWeightfvARB MANGLE(WeightfvARB)
-+#define glWeightivARB MANGLE(WeightivARB)
-+#define glWeightPathsNV MANGLE(WeightPathsNV)
-+#define glWeightPointerARB MANGLE(WeightPointerARB)
-+#define glWeightsvARB MANGLE(WeightsvARB)
-+#define glWeightubvARB MANGLE(WeightubvARB)
-+#define glWeightuivARB MANGLE(WeightuivARB)
-+#define glWeightusvARB MANGLE(WeightusvARB)
-+#define glWindowPos2dARB MANGLE(WindowPos2dARB)
-+#define glWindowPos2d MANGLE(WindowPos2d)
-+#define glWindowPos2dMESA MANGLE(WindowPos2dMESA)
-+#define glWindowPos2dvARB MANGLE(WindowPos2dvARB)
-+#define glWindowPos2dv MANGLE(WindowPos2dv)
-+#define glWindowPos2dvMESA MANGLE(WindowPos2dvMESA)
-+#define glWindowPos2fARB MANGLE(WindowPos2fARB)
-+#define glWindowPos2f MANGLE(WindowPos2f)
-+#define glWindowPos2fMESA MANGLE(WindowPos2fMESA)
-+#define glWindowPos2fvARB MANGLE(WindowPos2fvARB)
-+#define glWindowPos2fv MANGLE(WindowPos2fv)
-+#define glWindowPos2fvMESA MANGLE(WindowPos2fvMESA)
-+#define glWindowPos2iARB MANGLE(WindowPos2iARB)
-+#define glWindowPos2i MANGLE(WindowPos2i)
-+#define glWindowPos2iMESA MANGLE(WindowPos2iMESA)
-+#define glWindowPos2ivARB MANGLE(WindowPos2ivARB)
-+#define glWindowPos2iv MANGLE(WindowPos2iv)
-+#define glWindowPos2ivMESA MANGLE(WindowPos2ivMESA)
-+#define glWindowPos2sARB MANGLE(WindowPos2sARB)
-+#define glWindowPos2s MANGLE(WindowPos2s)
-+#define glWindowPos2sMESA MANGLE(WindowPos2sMESA)
-+#define glWindowPos2svARB MANGLE(WindowPos2svARB)
-+#define glWindowPos2sv MANGLE(WindowPos2sv)
-+#define glWindowPos2svMESA MANGLE(WindowPos2svMESA)
-+#define glWindowPos3dARB MANGLE(WindowPos3dARB)
-+#define glWindowPos3d MANGLE(WindowPos3d)
-+#define glWindowPos3dMESA MANGLE(WindowPos3dMESA)
-+#define glWindowPos3dvARB MANGLE(WindowPos3dvARB)
-+#define glWindowPos3dv MANGLE(WindowPos3dv)
-+#define glWindowPos3dvMESA MANGLE(WindowPos3dvMESA)
-+#define glWindowPos3fARB MANGLE(WindowPos3fARB)
-+#define glWindowPos3f MANGLE(WindowPos3f)
-+#define glWindowPos3fMESA MANGLE(WindowPos3fMESA)
-+#define glWindowPos3fvARB MANGLE(WindowPos3fvARB)
-+#define glWindowPos3fv MANGLE(WindowPos3fv)
-+#define glWindowPos3fvMESA MANGLE(WindowPos3fvMESA)
-+#define glWindowPos3iARB MANGLE(WindowPos3iARB)
-+#define glWindowPos3i MANGLE(WindowPos3i)
-+#define glWindowPos3iMESA MANGLE(WindowPos3iMESA)
-+#define glWindowPos3ivARB MANGLE(WindowPos3ivARB)
-+#define glWindowPos3iv MANGLE(WindowPos3iv)
-+#define glWindowPos3ivMESA MANGLE(WindowPos3ivMESA)
-+#define glWindowPos3sARB MANGLE(WindowPos3sARB)
-+#define glWindowPos3s MANGLE(WindowPos3s)
-+#define glWindowPos3sMESA MANGLE(WindowPos3sMESA)
-+#define glWindowPos3svARB MANGLE(WindowPos3svARB)
-+#define glWindowPos3sv MANGLE(WindowPos3sv)
-+#define glWindowPos3svMESA MANGLE(WindowPos3svMESA)
-+#define glWindowPos4dMESA MANGLE(WindowPos4dMESA)
-+#define glWindowPos4dvMESA MANGLE(WindowPos4dvMESA)
-+#define glWindowPos4fMESA MANGLE(WindowPos4fMESA)
-+#define glWindowPos4fvMESA MANGLE(WindowPos4fvMESA)
-+#define glWindowPos4iMESA MANGLE(WindowPos4iMESA)
-+#define glWindowPos4ivMESA MANGLE(WindowPos4ivMESA)
-+#define glWindowPos4sMESA MANGLE(WindowPos4sMESA)
-+#define glWindowPos4svMESA MANGLE(WindowPos4svMESA)
-+#define glWriteMaskEXT MANGLE(WriteMaskEXT)
-+
-+#endif /* GL_MANGLE_H */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glcorearb.h
-@@ -0,0 +1,3589 @@
-+#ifndef __glcorearb_h_
-+#define __glcorearb_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: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $
-+*/
-+
-+#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
-+
-+/* 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.
-+*/
-+
-+/* Generated C header for:
-+ * API: gl
-+ * Profile: core
-+ * Versions considered: .*
-+ * Versions emitted: .*
-+ * Default extensions included: glcore
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef GL_VERSION_1_0
-+#define GL_VERSION_1_0 1
-+typedef void GLvoid;
-+typedef unsigned int GLenum;
-+typedef float GLfloat;
-+typedef int GLint;
-+typedef int GLsizei;
-+typedef unsigned int GLbitfield;
-+typedef double GLdouble;
-+typedef unsigned int GLuint;
-+typedef unsigned char GLboolean;
-+typedef unsigned char GLubyte;
-+typedef void (APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
-+typedef void (APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
-+typedef void (APIENTRYP PFNGLPOINTSIZEPROC) (GLfloat size);
-+typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
-+typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum buf);
-+typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
-+typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
-+typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) (GLdouble depth);
-+typedef void (APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
-+typedef void (APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-+typedef void (APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
-+typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
-+typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
-+typedef void (APIENTRYP PFNGLFINISHPROC) (void);
-+typedef void (APIENTRYP PFNGLFLUSHPROC) (void);
-+typedef void (APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
-+typedef void (APIENTRYP PFNGLLOGICOPPROC) (GLenum opcode);
-+typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
-+typedef void (APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
-+typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
-+typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum src);
-+typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-+typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) (GLenum pname, GLdouble *data);
-+typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
-+typedef void (APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
-+typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
-+typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params);
-+typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble near, GLdouble far);
-+typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCullFace (GLenum mode);
-+GLAPI void APIENTRY glFrontFace (GLenum mode);
-+GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
-+GLAPI void APIENTRY glLineWidth (GLfloat width);
-+GLAPI void APIENTRY glPointSize (GLfloat size);
-+GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
-+GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glDrawBuffer (GLenum buf);
-+GLAPI void APIENTRY glClear (GLbitfield mask);
-+GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+GLAPI void APIENTRY glClearStencil (GLint s);
-+GLAPI void APIENTRY glClearDepth (GLdouble depth);
-+GLAPI void APIENTRY glStencilMask (GLuint mask);
-+GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-+GLAPI void APIENTRY glDepthMask (GLboolean flag);
-+GLAPI void APIENTRY glDisable (GLenum cap);
-+GLAPI void APIENTRY glEnable (GLenum cap);
-+GLAPI void APIENTRY glFinish (void);
-+GLAPI void APIENTRY glFlush (void);
-+GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-+GLAPI void APIENTRY glLogicOp (GLenum opcode);
-+GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-+GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-+GLAPI void APIENTRY glDepthFunc (GLenum func);
-+GLAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
-+GLAPI void APIENTRY glReadBuffer (GLenum src);
-+GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-+GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-+GLAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *data);
-+GLAPI GLenum APIENTRY glGetError (void);
-+GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-+GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-+GLAPI const GLubyte *APIENTRY glGetString (GLenum name);
-+GLAPI void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+GLAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
-+GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
-+GLAPI void APIENTRY glDepthRange (GLdouble near, GLdouble far);
-+GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_VERSION_1_0 */
-+
-+#ifndef GL_VERSION_1_1
-+#define GL_VERSION_1_1 1
-+typedef float GLclampf;
-+typedef double GLclampd;
-+#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_QUADS 0x0007
-+#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_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_NONE 0
-+#define GL_FRONT_LEFT 0x0400
-+#define GL_FRONT_RIGHT 0x0401
-+#define GL_BACK_LEFT 0x0402
-+#define GL_BACK_RIGHT 0x0403
-+#define GL_FRONT 0x0404
-+#define GL_BACK 0x0405
-+#define GL_LEFT 0x0406
-+#define GL_RIGHT 0x0407
-+#define GL_FRONT_AND_BACK 0x0408
-+#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_POINT_SIZE 0x0B11
-+#define GL_POINT_SIZE_RANGE 0x0B12
-+#define GL_POINT_SIZE_GRANULARITY 0x0B13
-+#define GL_LINE_SMOOTH 0x0B20
-+#define GL_LINE_WIDTH 0x0B21
-+#define GL_LINE_WIDTH_RANGE 0x0B22
-+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
-+#define GL_POLYGON_MODE 0x0B40
-+#define GL_POLYGON_SMOOTH 0x0B41
-+#define GL_CULL_FACE 0x0B44
-+#define GL_CULL_FACE_MODE 0x0B45
-+#define GL_FRONT_FACE 0x0B46
-+#define GL_DEPTH_RANGE 0x0B70
-+#define GL_DEPTH_TEST 0x0B71
-+#define GL_DEPTH_WRITEMASK 0x0B72
-+#define GL_DEPTH_CLEAR_VALUE 0x0B73
-+#define GL_DEPTH_FUNC 0x0B74
-+#define GL_STENCIL_TEST 0x0B90
-+#define GL_STENCIL_CLEAR_VALUE 0x0B91
-+#define GL_STENCIL_FUNC 0x0B92
-+#define GL_STENCIL_VALUE_MASK 0x0B93
-+#define GL_STENCIL_FAIL 0x0B94
-+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-+#define GL_STENCIL_REF 0x0B97
-+#define GL_STENCIL_WRITEMASK 0x0B98
-+#define GL_VIEWPORT 0x0BA2
-+#define GL_DITHER 0x0BD0
-+#define GL_BLEND_DST 0x0BE0
-+#define GL_BLEND_SRC 0x0BE1
-+#define GL_BLEND 0x0BE2
-+#define GL_LOGIC_OP_MODE 0x0BF0
-+#define GL_COLOR_LOGIC_OP 0x0BF2
-+#define GL_DRAW_BUFFER 0x0C01
-+#define GL_READ_BUFFER 0x0C02
-+#define GL_SCISSOR_BOX 0x0C10
-+#define GL_SCISSOR_TEST 0x0C11
-+#define GL_COLOR_CLEAR_VALUE 0x0C22
-+#define GL_COLOR_WRITEMASK 0x0C23
-+#define GL_DOUBLEBUFFER 0x0C32
-+#define GL_STEREO 0x0C33
-+#define GL_LINE_SMOOTH_HINT 0x0C52
-+#define GL_POLYGON_SMOOTH_HINT 0x0C53
-+#define GL_UNPACK_SWAP_BYTES 0x0CF0
-+#define GL_UNPACK_LSB_FIRST 0x0CF1
-+#define GL_UNPACK_ROW_LENGTH 0x0CF2
-+#define GL_UNPACK_SKIP_ROWS 0x0CF3
-+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-+#define GL_UNPACK_ALIGNMENT 0x0CF5
-+#define GL_PACK_SWAP_BYTES 0x0D00
-+#define GL_PACK_LSB_FIRST 0x0D01
-+#define GL_PACK_ROW_LENGTH 0x0D02
-+#define GL_PACK_SKIP_ROWS 0x0D03
-+#define GL_PACK_SKIP_PIXELS 0x0D04
-+#define GL_PACK_ALIGNMENT 0x0D05
-+#define GL_MAX_TEXTURE_SIZE 0x0D33
-+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-+#define GL_SUBPIXEL_BITS 0x0D50
-+#define GL_TEXTURE_1D 0x0DE0
-+#define GL_TEXTURE_2D 0x0DE1
-+#define GL_POLYGON_OFFSET_UNITS 0x2A00
-+#define GL_POLYGON_OFFSET_POINT 0x2A01
-+#define GL_POLYGON_OFFSET_LINE 0x2A02
-+#define GL_POLYGON_OFFSET_FILL 0x8037
-+#define GL_POLYGON_OFFSET_FACTOR 0x8038
-+#define GL_TEXTURE_BINDING_1D 0x8068
-+#define GL_TEXTURE_BINDING_2D 0x8069
-+#define GL_TEXTURE_WIDTH 0x1000
-+#define GL_TEXTURE_HEIGHT 0x1001
-+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-+#define GL_TEXTURE_BORDER_COLOR 0x1004
-+#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_DONT_CARE 0x1100
-+#define GL_FASTEST 0x1101
-+#define GL_NICEST 0x1102
-+#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_DOUBLE 0x140A
-+#define GL_STACK_OVERFLOW 0x0503
-+#define GL_STACK_UNDERFLOW 0x0504
-+#define GL_CLEAR 0x1500
-+#define GL_AND 0x1501
-+#define GL_AND_REVERSE 0x1502
-+#define GL_COPY 0x1503
-+#define GL_AND_INVERTED 0x1504
-+#define GL_NOOP 0x1505
-+#define GL_XOR 0x1506
-+#define GL_OR 0x1507
-+#define GL_NOR 0x1508
-+#define GL_EQUIV 0x1509
-+#define GL_INVERT 0x150A
-+#define GL_OR_REVERSE 0x150B
-+#define GL_COPY_INVERTED 0x150C
-+#define GL_OR_INVERTED 0x150D
-+#define GL_NAND 0x150E
-+#define GL_SET 0x150F
-+#define GL_TEXTURE 0x1702
-+#define GL_COLOR 0x1800
-+#define GL_DEPTH 0x1801
-+#define GL_STENCIL 0x1802
-+#define GL_STENCIL_INDEX 0x1901
-+#define GL_DEPTH_COMPONENT 0x1902
-+#define GL_RED 0x1903
-+#define GL_GREEN 0x1904
-+#define GL_BLUE 0x1905
-+#define GL_ALPHA 0x1906
-+#define GL_RGB 0x1907
-+#define GL_RGBA 0x1908
-+#define GL_POINT 0x1B00
-+#define GL_LINE 0x1B01
-+#define GL_FILL 0x1B02
-+#define GL_KEEP 0x1E00
-+#define GL_REPLACE 0x1E01
-+#define GL_INCR 0x1E02
-+#define GL_DECR 0x1E03
-+#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_PROXY_TEXTURE_1D 0x8063
-+#define GL_PROXY_TEXTURE_2D 0x8064
-+#define GL_REPEAT 0x2901
-+#define GL_R3_G3_B2 0x2A10
-+#define GL_RGB4 0x804F
-+#define GL_RGB5 0x8050
-+#define GL_RGB8 0x8051
-+#define GL_RGB10 0x8052
-+#define GL_RGB12 0x8053
-+#define GL_RGB16 0x8054
-+#define GL_RGBA2 0x8055
-+#define GL_RGBA4 0x8056
-+#define GL_RGB5_A1 0x8057
-+#define GL_RGBA8 0x8058
-+#define GL_RGB10_A2 0x8059
-+#define GL_RGBA12 0x805A
-+#define GL_RGBA16 0x805B
-+#define GL_VERTEX_ARRAY 0x8074
-+typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
-+typedef void (APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
-+typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
-+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
-+typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
-+typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-+GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-+GLAPI void APIENTRY glGetPointerv (GLenum pname, void **params);
-+GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-+GLAPI void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+GLAPI void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
-+GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-+GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-+GLAPI GLboolean APIENTRY glIsTexture (GLuint texture);
-+#endif
-+#endif /* GL_VERSION_1_1 */
-+
-+#ifndef GL_VERSION_1_2
-+#define GL_VERSION_1_2 1
-+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-+#define GL_TEXTURE_BINDING_3D 0x806A
-+#define GL_PACK_SKIP_IMAGES 0x806B
-+#define GL_PACK_IMAGE_HEIGHT 0x806C
-+#define GL_UNPACK_SKIP_IMAGES 0x806D
-+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-+#define GL_TEXTURE_3D 0x806F
-+#define GL_PROXY_TEXTURE_3D 0x8070
-+#define GL_TEXTURE_DEPTH 0x8071
-+#define GL_TEXTURE_WRAP_R 0x8072
-+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-+#define GL_BGR 0x80E0
-+#define GL_BGRA 0x80E1
-+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-+#define GL_MAX_ELEMENTS_INDICES 0x80E9
-+#define GL_CLAMP_TO_EDGE 0x812F
-+#define GL_TEXTURE_MIN_LOD 0x813A
-+#define GL_TEXTURE_MAX_LOD 0x813B
-+#define GL_TEXTURE_BASE_LEVEL 0x813C
-+#define GL_TEXTURE_MAX_LEVEL 0x813D
-+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void 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);
-+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_VERSION_1_2 */
-+
-+#ifndef GL_VERSION_1_3
-+#define GL_VERSION_1_3 1
-+#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_MULTISAMPLE 0x809D
-+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-+#define GL_SAMPLE_COVERAGE 0x80A0
-+#define GL_SAMPLE_BUFFERS 0x80A8
-+#define GL_SAMPLES 0x80A9
-+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-+#define GL_TEXTURE_CUBE_MAP 0x8513
-+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-+#define GL_COMPRESSED_RGB 0x84ED
-+#define GL_COMPRESSED_RGBA 0x84EE
-+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-+#define GL_TEXTURE_COMPRESSED 0x86A1
-+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-+#define GL_CLAMP_TO_BORDER 0x812D
-+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glActiveTexture (GLenum texture);
-+GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-+GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void 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);
-+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
-+#endif
-+#endif /* GL_VERSION_1_3 */
-+
-+#ifndef GL_VERSION_1_4
-+#define GL_VERSION_1_4 1
-+#define GL_BLEND_DST_RGB 0x80C8
-+#define GL_BLEND_SRC_RGB 0x80C9
-+#define GL_BLEND_DST_ALPHA 0x80CA
-+#define GL_BLEND_SRC_ALPHA 0x80CB
-+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-+#define GL_DEPTH_COMPONENT16 0x81A5
-+#define GL_DEPTH_COMPONENT24 0x81A6
-+#define GL_DEPTH_COMPONENT32 0x81A7
-+#define GL_MIRRORED_REPEAT 0x8370
-+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-+#define GL_TEXTURE_LOD_BIAS 0x8501
-+#define GL_INCR_WRAP 0x8507
-+#define GL_DECR_WRAP 0x8508
-+#define GL_TEXTURE_DEPTH_SIZE 0x884A
-+#define GL_TEXTURE_COMPARE_MODE 0x884C
-+#define GL_TEXTURE_COMPARE_FUNC 0x884D
-+#define GL_FUNC_ADD 0x8006
-+#define GL_FUNC_SUBTRACT 0x800A
-+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-+#define GL_MIN 0x8007
-+#define GL_MAX 0x8008
-+#define GL_CONSTANT_COLOR 0x8001
-+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-+#define GL_CONSTANT_ALPHA 0x8003
-+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-+GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-+GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
-+GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+GLAPI void APIENTRY glBlendEquation (GLenum mode);
-+#endif
-+#endif /* GL_VERSION_1_4 */
-+
-+#ifndef GL_VERSION_1_5
-+#define GL_VERSION_1_5 1
-+#include <stddef.h>
-+typedef ptrdiff_t GLsizeiptr;
-+typedef ptrdiff_t GLintptr;
-+#define GL_BUFFER_SIZE 0x8764
-+#define GL_BUFFER_USAGE 0x8765
-+#define GL_QUERY_COUNTER_BITS 0x8864
-+#define GL_CURRENT_QUERY 0x8865
-+#define GL_QUERY_RESULT 0x8866
-+#define GL_QUERY_RESULT_AVAILABLE 0x8867
-+#define GL_ARRAY_BUFFER 0x8892
-+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-+#define GL_ARRAY_BUFFER_BINDING 0x8894
-+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-+#define GL_READ_ONLY 0x88B8
-+#define GL_WRITE_ONLY 0x88B9
-+#define GL_READ_WRITE 0x88BA
-+#define GL_BUFFER_ACCESS 0x88BB
-+#define GL_BUFFER_MAPPED 0x88BC
-+#define GL_BUFFER_MAP_POINTER 0x88BD
-+#define GL_STREAM_DRAW 0x88E0
-+#define GL_STREAM_READ 0x88E1
-+#define GL_STREAM_COPY 0x88E2
-+#define GL_STATIC_DRAW 0x88E4
-+#define GL_STATIC_READ 0x88E5
-+#define GL_STATIC_COPY 0x88E6
-+#define GL_DYNAMIC_DRAW 0x88E8
-+#define GL_DYNAMIC_READ 0x88E9
-+#define GL_DYNAMIC_COPY 0x88EA
-+#define GL_SAMPLES_PASSED 0x8914
-+#define GL_SRC1_ALPHA 0x8589
-+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-+typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
-+GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
-+GLAPI void APIENTRY glEndQuery (GLenum target);
-+GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-+GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-+GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-+GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
-+GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-+GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-+GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
-+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
-+GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-+#endif
-+#endif /* GL_VERSION_1_5 */
-+
-+#ifndef GL_VERSION_2_0
-+#define GL_VERSION_2_0 1
-+typedef char GLchar;
-+typedef short GLshort;
-+typedef signed char GLbyte;
-+typedef unsigned short GLushort;
-+#define GL_BLEND_EQUATION_RGB 0x8009
-+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
-+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-+#define GL_STENCIL_BACK_FUNC 0x8800
-+#define GL_STENCIL_BACK_FAIL 0x8801
-+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-+#define GL_MAX_DRAW_BUFFERS 0x8824
-+#define GL_DRAW_BUFFER0 0x8825
-+#define GL_DRAW_BUFFER1 0x8826
-+#define GL_DRAW_BUFFER2 0x8827
-+#define GL_DRAW_BUFFER3 0x8828
-+#define GL_DRAW_BUFFER4 0x8829
-+#define GL_DRAW_BUFFER5 0x882A
-+#define GL_DRAW_BUFFER6 0x882B
-+#define GL_DRAW_BUFFER7 0x882C
-+#define GL_DRAW_BUFFER8 0x882D
-+#define GL_DRAW_BUFFER9 0x882E
-+#define GL_DRAW_BUFFER10 0x882F
-+#define GL_DRAW_BUFFER11 0x8830
-+#define GL_DRAW_BUFFER12 0x8831
-+#define GL_DRAW_BUFFER13 0x8832
-+#define GL_DRAW_BUFFER14 0x8833
-+#define GL_DRAW_BUFFER15 0x8834
-+#define GL_BLEND_EQUATION_ALPHA 0x883D
-+#define GL_MAX_VERTEX_ATTRIBS 0x8869
-+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-+#define GL_FRAGMENT_SHADER 0x8B30
-+#define GL_VERTEX_SHADER 0x8B31
-+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-+#define GL_MAX_VARYING_FLOATS 0x8B4B
-+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-+#define GL_SHADER_TYPE 0x8B4F
-+#define GL_FLOAT_VEC2 0x8B50
-+#define GL_FLOAT_VEC3 0x8B51
-+#define GL_FLOAT_VEC4 0x8B52
-+#define GL_INT_VEC2 0x8B53
-+#define GL_INT_VEC3 0x8B54
-+#define GL_INT_VEC4 0x8B55
-+#define GL_BOOL 0x8B56
-+#define GL_BOOL_VEC2 0x8B57
-+#define GL_BOOL_VEC3 0x8B58
-+#define GL_BOOL_VEC4 0x8B59
-+#define GL_FLOAT_MAT2 0x8B5A
-+#define GL_FLOAT_MAT3 0x8B5B
-+#define GL_FLOAT_MAT4 0x8B5C
-+#define GL_SAMPLER_1D 0x8B5D
-+#define GL_SAMPLER_2D 0x8B5E
-+#define GL_SAMPLER_3D 0x8B5F
-+#define GL_SAMPLER_CUBE 0x8B60
-+#define GL_SAMPLER_1D_SHADOW 0x8B61
-+#define GL_SAMPLER_2D_SHADOW 0x8B62
-+#define GL_DELETE_STATUS 0x8B80
-+#define GL_COMPILE_STATUS 0x8B81
-+#define GL_LINK_STATUS 0x8B82
-+#define GL_VALIDATE_STATUS 0x8B83
-+#define GL_INFO_LOG_LENGTH 0x8B84
-+#define GL_ATTACHED_SHADERS 0x8B85
-+#define GL_ACTIVE_UNIFORMS 0x8B86
-+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-+#define GL_SHADER_SOURCE_LENGTH 0x8B88
-+#define GL_ACTIVE_ATTRIBUTES 0x8B89
-+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-+#define GL_CURRENT_PROGRAM 0x8B8D
-+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
-+#define GL_LOWER_LEFT 0x8CA1
-+#define GL_UPPER_LEFT 0x8CA2
-+#define GL_STENCIL_BACK_REF 0x8CA3
-+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
-+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
-+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
-+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
-+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
-+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
-+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
-+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
-+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
-+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-+GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-+GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-+GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
-+GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-+GLAPI void APIENTRY glCompileShader (GLuint shader);
-+GLAPI GLuint APIENTRY glCreateProgram (void);
-+GLAPI GLuint APIENTRY glCreateShader (GLenum type);
-+GLAPI void APIENTRY glDeleteProgram (GLuint program);
-+GLAPI void APIENTRY glDeleteShader (GLuint shader);
-+GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
-+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
-+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
-+GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-+GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-+GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-+GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-+GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
-+GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
-+GLAPI void APIENTRY glLinkProgram (GLuint program);
-+GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-+GLAPI void APIENTRY glUseProgram (GLuint program);
-+GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
-+GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
-+GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glValidateProgram (GLuint program);
-+GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-+GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
-+GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
-+GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_VERSION_2_0 */
-+
-+#ifndef GL_VERSION_2_1
-+#define GL_VERSION_2_1 1
-+#define GL_PIXEL_PACK_BUFFER 0x88EB
-+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-+#define GL_FLOAT_MAT2x3 0x8B65
-+#define GL_FLOAT_MAT2x4 0x8B66
-+#define GL_FLOAT_MAT3x2 0x8B67
-+#define GL_FLOAT_MAT3x4 0x8B68
-+#define GL_FLOAT_MAT4x2 0x8B69
-+#define GL_FLOAT_MAT4x3 0x8B6A
-+#define GL_SRGB 0x8C40
-+#define GL_SRGB8 0x8C41
-+#define GL_SRGB_ALPHA 0x8C42
-+#define GL_SRGB8_ALPHA8 0x8C43
-+#define GL_COMPRESSED_SRGB 0x8C48
-+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+#endif
-+#endif /* GL_VERSION_2_1 */
-+
-+#ifndef GL_VERSION_3_0
-+#define GL_VERSION_3_0 1
-+typedef unsigned short GLhalf;
-+#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-+#define GL_CLIP_DISTANCE0 0x3000
-+#define GL_CLIP_DISTANCE1 0x3001
-+#define GL_CLIP_DISTANCE2 0x3002
-+#define GL_CLIP_DISTANCE3 0x3003
-+#define GL_CLIP_DISTANCE4 0x3004
-+#define GL_CLIP_DISTANCE5 0x3005
-+#define GL_CLIP_DISTANCE6 0x3006
-+#define GL_CLIP_DISTANCE7 0x3007
-+#define GL_MAX_CLIP_DISTANCES 0x0D32
-+#define GL_MAJOR_VERSION 0x821B
-+#define GL_MINOR_VERSION 0x821C
-+#define GL_NUM_EXTENSIONS 0x821D
-+#define GL_CONTEXT_FLAGS 0x821E
-+#define GL_COMPRESSED_RED 0x8225
-+#define GL_COMPRESSED_RG 0x8226
-+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
-+#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_CLAMP_READ_COLOR 0x891C
-+#define GL_FIXED_ONLY 0x891D
-+#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-+#define GL_TEXTURE_1D_ARRAY 0x8C18
-+#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
-+#define GL_TEXTURE_2D_ARRAY 0x8C1A
-+#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
-+#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
-+#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_TEXTURE_SHARED_SIZE 0x8C3F
-+#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_PRIMITIVES_GENERATED 0x8C87
-+#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_GREEN_INTEGER 0x8D95
-+#define GL_BLUE_INTEGER 0x8D96
-+#define GL_RGB_INTEGER 0x8D98
-+#define GL_RGBA_INTEGER 0x8D99
-+#define GL_BGR_INTEGER 0x8D9A
-+#define GL_BGRA_INTEGER 0x8D9B
-+#define GL_SAMPLER_1D_ARRAY 0x8DC0
-+#define GL_SAMPLER_2D_ARRAY 0x8DC1
-+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
-+#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_1D 0x8DC9
-+#define GL_INT_SAMPLER_2D 0x8DCA
-+#define GL_INT_SAMPLER_3D 0x8DCB
-+#define GL_INT_SAMPLER_CUBE 0x8DCC
-+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
-+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
-+#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_1D_ARRAY 0x8DD6
-+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-+#define GL_QUERY_WAIT 0x8E13
-+#define GL_QUERY_NO_WAIT 0x8E14
-+#define GL_QUERY_BY_REGION_WAIT 0x8E15
-+#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
-+#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_INVALID_FRAMEBUFFER_OPERATION 0x0506
-+#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_MAX_RENDERBUFFER_SIZE 0x84E8
-+#define GL_DEPTH_STENCIL 0x84F9
-+#define GL_UNSIGNED_INT_24_8 0x84FA
-+#define GL_DEPTH24_STENCIL8 0x88F0
-+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
-+#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_UNSIGNED_NORMALIZED 0x8C17
-+#define GL_FRAMEBUFFER_BINDING 0x8CA6
-+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-+#define GL_RENDERBUFFER_BINDING 0x8CA7
-+#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_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_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
-+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
-+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-+#define GL_COLOR_ATTACHMENT0 0x8CE0
-+#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_DEPTH_ATTACHMENT 0x8D00
-+#define GL_STENCIL_ATTACHMENT 0x8D20
-+#define GL_FRAMEBUFFER 0x8D40
-+#define GL_RENDERBUFFER 0x8D41
-+#define GL_RENDERBUFFER_WIDTH 0x8D42
-+#define GL_RENDERBUFFER_HEIGHT 0x8D43
-+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-+#define GL_STENCIL_INDEX1 0x8D46
-+#define GL_STENCIL_INDEX4 0x8D47
-+#define GL_STENCIL_INDEX8 0x8D48
-+#define GL_STENCIL_INDEX16 0x8D49
-+#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_INCOMPLETE_MULTISAMPLE 0x8D56
-+#define GL_MAX_SAMPLES 0x8D57
-+#define GL_FRAMEBUFFER_SRGB 0x8DB9
-+#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_COMPRESSED_RED_RGTC1 0x8DBB
-+#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-+#define GL_COMPRESSED_RG_RGTC2 0x8DBD
-+#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-+#define GL_RG 0x8227
-+#define GL_RG_INTEGER 0x8228
-+#define GL_R8 0x8229
-+#define GL_R16 0x822A
-+#define GL_RG8 0x822B
-+#define GL_RG16 0x822C
-+#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
-+typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
-+typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
-+typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
-+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
-+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
-+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
-+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-+typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
-+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
-+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
-+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
-+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
-+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
-+GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-+GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
-+GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
-+GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
-+GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-+GLAPI void APIENTRY glEndTransformFeedback (void);
-+GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
-+GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
-+GLAPI void APIENTRY glEndConditionalRender (void);
-+GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
-+GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
-+GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
-+GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
-+GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
-+GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-+GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
-+GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
-+GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-+GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-+GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-+GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
-+GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-+GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-+GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-+GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-+GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
-+GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-+GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-+GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-+GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
-+GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGenerateMipmap (GLenum target);
-+GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glBindVertexArray (GLuint array);
-+GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-+GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-+GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
-+#endif
-+#endif /* GL_VERSION_3_0 */
-+
-+#ifndef GL_VERSION_3_1
-+#define GL_VERSION_3_1 1
-+#define GL_SAMPLER_2D_RECT 0x8B63
-+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
-+#define GL_SAMPLER_BUFFER 0x8DC2
-+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
-+#define GL_INT_SAMPLER_BUFFER 0x8DD0
-+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
-+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
-+#define GL_TEXTURE_BUFFER 0x8C2A
-+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
-+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
-+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
-+#define GL_TEXTURE_RECTANGLE 0x84F5
-+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
-+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
-+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
-+#define GL_R8_SNORM 0x8F94
-+#define GL_RG8_SNORM 0x8F95
-+#define GL_RGB8_SNORM 0x8F96
-+#define GL_RGBA8_SNORM 0x8F97
-+#define GL_R16_SNORM 0x8F98
-+#define GL_RG16_SNORM 0x8F99
-+#define GL_RGB16_SNORM 0x8F9A
-+#define GL_RGBA16_SNORM 0x8F9B
-+#define GL_SIGNED_NORMALIZED 0x8F9C
-+#define GL_PRIMITIVE_RESTART 0x8F9D
-+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
-+#define GL_COPY_READ_BUFFER 0x8F36
-+#define GL_COPY_WRITE_BUFFER 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_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
-+#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_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
-+#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_GEOMETRY_SHADER 0x8A45
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-+#define GL_INVALID_INDEX 0xFFFFFFFFu
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-+typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-+typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-+GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-+GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
-+GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-+GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-+GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-+GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-+GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-+#endif
-+#endif /* GL_VERSION_3_1 */
-+
-+#ifndef GL_VERSION_3_2
-+#define GL_VERSION_3_2 1
-+typedef struct __GLsync *GLsync;
-+#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__) && __STDC_VERSION__ >= 199901L
-+#include <inttypes.h>
-+#elif defined(__sun__) || defined(__digital__)
-+#include <inttypes.h>
-+#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 <inttypes.h>
-+#elif defined(__SCO__) || defined(__USLC__)
-+#include <stdint.h>
-+#elif defined(__UNIXOS2__) || defined(__SOL64__)
-+typedef long int int32_t;
-+typedef long long int int64_t;
-+typedef unsigned long long int uint64_t;
-+#elif defined(_WIN32) && defined(__GNUC__)
-+#include <stdint.h>
-+#elif defined(_WIN32)
-+typedef __int32 int32_t;
-+typedef __int64 int64_t;
-+typedef unsigned __int64 uint64_t;
-+#else
-+/* Fallback if nothing above works */
-+#include <inttypes.h>
-+#endif
-+#endif
-+typedef uint64_t GLuint64;
-+typedef int64_t GLint64;
-+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
-+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
-+#define GL_LINES_ADJACENCY 0x000A
-+#define GL_LINE_STRIP_ADJACENCY 0x000B
-+#define GL_TRIANGLES_ADJACENCY 0x000C
-+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
-+#define GL_PROGRAM_POINT_SIZE 0x8642
-+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
-+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
-+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
-+#define GL_GEOMETRY_SHADER 0x8DD9
-+#define GL_GEOMETRY_VERTICES_OUT 0x8916
-+#define GL_GEOMETRY_INPUT_TYPE 0x8917
-+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
-+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
-+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
-+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
-+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
-+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
-+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-+#define GL_CONTEXT_PROFILE_MASK 0x9126
-+#define GL_DEPTH_CLAMP 0x864F
-+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
-+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
-+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
-+#define GL_PROVOKING_VERTEX 0x8E4F
-+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
-+#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_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-+#define GL_SAMPLE_POSITION 0x8E50
-+#define GL_SAMPLE_MASK 0x8E51
-+#define GL_SAMPLE_MASK_VALUE 0x8E52
-+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
-+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
-+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
-+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
-+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
-+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
-+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
-+#define GL_TEXTURE_SAMPLES 0x9106
-+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
-+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
-+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
-+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
-+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
-+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
-+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
-+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
-+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
-+#define GL_MAX_INTEGER_SAMPLES 0x9110
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
-+typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
-+typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
-+typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
-+typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
-+typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
-+typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-+GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-+GLAPI void APIENTRY glProvokingVertex (GLenum mode);
-+GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-+GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
-+GLAPI void APIENTRY glDeleteSync (GLsync sync);
-+GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-+GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-+GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
-+GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
-+#endif
-+#endif /* GL_VERSION_3_2 */
-+
-+#ifndef GL_VERSION_3_3
-+#define GL_VERSION_3_3 1
-+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-+#define GL_SRC1_COLOR 0x88F9
-+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
-+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
-+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
-+#define GL_ANY_SAMPLES_PASSED 0x8C2F
-+#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_TEXTURE_SWIZZLE_RGBA 0x8E46
-+#define GL_TIME_ELAPSED 0x88BF
-+#define GL_TIMESTAMP 0x8E28
-+#define GL_INT_2_10_10_10_REV 0x8D9F
-+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
-+typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
-+typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
-+typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-+GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-+GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-+GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
-+GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-+GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-+GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-+GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
-+GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
-+GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
-+GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-+GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+#endif
-+#endif /* GL_VERSION_3_3 */
-+
-+#ifndef GL_VERSION_4_0
-+#define GL_VERSION_4_0 1
-+#define GL_SAMPLE_SHADING 0x8C36
-+#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
-+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
-+#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
-+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
-+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
-+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
-+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
-+#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
-+#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
-+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
-+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
-+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
-+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
-+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
-+#define GL_MAX_VERTEX_STREAMS 0x8E71
-+#define GL_DOUBLE_VEC2 0x8FFC
-+#define GL_DOUBLE_VEC3 0x8FFD
-+#define GL_DOUBLE_VEC4 0x8FFE
-+#define GL_DOUBLE_MAT2 0x8F46
-+#define GL_DOUBLE_MAT3 0x8F47
-+#define GL_DOUBLE_MAT4 0x8F48
-+#define GL_DOUBLE_MAT2x3 0x8F49
-+#define GL_DOUBLE_MAT2x4 0x8F4A
-+#define GL_DOUBLE_MAT3x2 0x8F4B
-+#define GL_DOUBLE_MAT3x4 0x8F4C
-+#define GL_DOUBLE_MAT4x2 0x8F4D
-+#define GL_DOUBLE_MAT4x3 0x8F4E
-+#define GL_ACTIVE_SUBROUTINES 0x8DE5
-+#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
-+#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
-+#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
-+#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
-+#define GL_MAX_SUBROUTINES 0x8DE7
-+#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
-+#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
-+#define GL_COMPATIBLE_SUBROUTINES 0x8E4B
-+#define GL_PATCHES 0x000E
-+#define GL_PATCH_VERTICES 0x8E72
-+#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
-+#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
-+#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
-+#define GL_TESS_GEN_MODE 0x8E76
-+#define GL_TESS_GEN_SPACING 0x8E77
-+#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
-+#define GL_TESS_GEN_POINT_MODE 0x8E79
-+#define GL_ISOLINES 0x8E7A
-+#define GL_FRACTIONAL_ODD 0x8E7B
-+#define GL_FRACTIONAL_EVEN 0x8E7C
-+#define GL_MAX_PATCH_VERTICES 0x8E7D
-+#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
-+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
-+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
-+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
-+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
-+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
-+#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
-+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
-+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
-+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
-+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
-+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
-+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
-+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
-+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
-+#define GL_TESS_EVALUATION_SHADER 0x8E87
-+#define GL_TESS_CONTROL_SHADER 0x8E88
-+#define GL_TRANSFORM_FEEDBACK 0x8E22
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
-+#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-+#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
-+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
-+typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
-+typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
-+typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-+typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
-+typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-+typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
-+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
-+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
-+typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
-+typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMinSampleShading (GLfloat value);
-+GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
-+GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
-+GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
-+GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
-+GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
-+GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
-+GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
-+GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
-+GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-+GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
-+GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
-+GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-+GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
-+GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
-+GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-+GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-+GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
-+GLAPI void APIENTRY glPauseTransformFeedback (void);
-+GLAPI void APIENTRY glResumeTransformFeedback (void);
-+GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
-+GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
-+GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
-+GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
-+GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_VERSION_4_0 */
-+
-+#ifndef GL_VERSION_4_1
-+#define GL_VERSION_4_1 1
-+#define GL_FIXED 0x140C
-+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-+#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_SHADER_COMPILER 0x8DFA
-+#define GL_SHADER_BINARY_FORMATS 0x8DF8
-+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-+#define GL_MAX_VARYING_VECTORS 0x8DFC
-+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-+#define GL_RGB565 0x8D62
-+#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_VERTEX_SHADER_BIT 0x00000001
-+#define GL_FRAGMENT_SHADER_BIT 0x00000002
-+#define GL_GEOMETRY_SHADER_BIT 0x00000004
-+#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
-+#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
-+#define GL_ALL_SHADER_BITS 0xFFFFFFFF
-+#define GL_PROGRAM_SEPARABLE 0x8258
-+#define GL_ACTIVE_PROGRAM 0x8259
-+#define GL_PROGRAM_PIPELINE_BINDING 0x825A
-+#define GL_MAX_VIEWPORTS 0x825B
-+#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
-+#define GL_VIEWPORT_BOUNDS_RANGE 0x825D
-+#define GL_LAYER_PROVOKING_VERTEX 0x825E
-+#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
-+#define GL_UNDEFINED_VERTEX 0x8260
-+typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
-+typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-+typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
-+typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
-+typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-+typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-+typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
-+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
-+typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
-+typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
-+typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
-+typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glReleaseShaderCompiler (void);
-+GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-+GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-+GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-+GLAPI void APIENTRY glClearDepthf (GLfloat d);
-+GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-+GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-+GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-+GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
-+GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
-+GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
-+GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
-+GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
-+GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
-+GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
-+GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
-+GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
-+GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-+GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-+GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-+GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-+GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
-+GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
-+GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
-+GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
-+#endif
-+#endif /* GL_VERSION_4_1 */
-+
-+#ifndef GL_VERSION_4_2
-+#define GL_VERSION_4_2 1
-+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
-+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
-+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
-+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
-+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
-+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
-+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
-+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
-+#define GL_NUM_SAMPLE_COUNTS 0x9380
-+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
-+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
-+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
-+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
-+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
-+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
-+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
-+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
-+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
-+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
-+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
-+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
-+#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_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
-+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
-+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
-+#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_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
-+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
-+#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_MAX_IMAGE_UNITS 0x8F38
-+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
-+#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_1D 0x904C
-+#define GL_IMAGE_2D 0x904D
-+#define GL_IMAGE_3D 0x904E
-+#define GL_IMAGE_2D_RECT 0x904F
-+#define GL_IMAGE_CUBE 0x9050
-+#define GL_IMAGE_BUFFER 0x9051
-+#define GL_IMAGE_1D_ARRAY 0x9052
-+#define GL_IMAGE_2D_ARRAY 0x9053
-+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
-+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
-+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
-+#define GL_INT_IMAGE_1D 0x9057
-+#define GL_INT_IMAGE_2D 0x9058
-+#define GL_INT_IMAGE_3D 0x9059
-+#define GL_INT_IMAGE_2D_RECT 0x905A
-+#define GL_INT_IMAGE_CUBE 0x905B
-+#define GL_INT_IMAGE_BUFFER 0x905C
-+#define GL_INT_IMAGE_1D_ARRAY 0x905D
-+#define GL_INT_IMAGE_2D_ARRAY 0x905E
-+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
-+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
-+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
-+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
-+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
-+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
-+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
-+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
-+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
-+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
-+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
-+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
-+#define GL_MAX_IMAGE_SAMPLES 0x906D
-+#define GL_IMAGE_BINDING_FORMAT 0x906E
-+#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_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
-+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
-+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
-+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
-+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
-+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
-+#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
-+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
-+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
-+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
-+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-+typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-+GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-+GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
-+GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
-+GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-+#endif
-+#endif /* GL_VERSION_4_2 */
-+
-+#ifndef GL_VERSION_4_3
-+#define GL_VERSION_4_3 1
-+typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-+#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
-+#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
-+#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_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_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-+#define GL_MAX_ELEMENT_INDEX 0x8D6B
-+#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_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
-+#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
-+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
-+#define GL_COMPUTE_SHADER_BIT 0x00000020
-+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
-+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
-+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
-+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
-+#define GL_DEBUG_SOURCE_API 0x8246
-+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
-+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
-+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
-+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
-+#define GL_DEBUG_SOURCE_OTHER 0x824B
-+#define GL_DEBUG_TYPE_ERROR 0x824C
-+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
-+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
-+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
-+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
-+#define GL_DEBUG_TYPE_OTHER 0x8251
-+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
-+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
-+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
-+#define GL_DEBUG_SEVERITY_HIGH 0x9146
-+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
-+#define GL_DEBUG_SEVERITY_LOW 0x9148
-+#define GL_DEBUG_TYPE_MARKER 0x8268
-+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
-+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
-+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
-+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
-+#define GL_BUFFER 0x82E0
-+#define GL_SHADER 0x82E1
-+#define GL_PROGRAM 0x82E2
-+#define GL_QUERY 0x82E3
-+#define GL_PROGRAM_PIPELINE 0x82E4
-+#define GL_SAMPLER 0x82E6
-+#define GL_MAX_LABEL_LENGTH 0x82E8
-+#define GL_DEBUG_OUTPUT 0x92E0
-+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
-+#define GL_MAX_UNIFORM_LOCATIONS 0x826E
-+#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
-+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
-+#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
-+#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_LAYERS 0x9317
-+#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
-+#define GL_INTERNALFORMAT_SUPPORTED 0x826F
-+#define GL_INTERNALFORMAT_PREFERRED 0x8270
-+#define GL_INTERNALFORMAT_RED_SIZE 0x8271
-+#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
-+#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
-+#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
-+#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
-+#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
-+#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
-+#define GL_INTERNALFORMAT_RED_TYPE 0x8278
-+#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
-+#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
-+#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
-+#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
-+#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
-+#define GL_MAX_WIDTH 0x827E
-+#define GL_MAX_HEIGHT 0x827F
-+#define GL_MAX_DEPTH 0x8280
-+#define GL_MAX_LAYERS 0x8281
-+#define GL_MAX_COMBINED_DIMENSIONS 0x8282
-+#define GL_COLOR_COMPONENTS 0x8283
-+#define GL_DEPTH_COMPONENTS 0x8284
-+#define GL_STENCIL_COMPONENTS 0x8285
-+#define GL_COLOR_RENDERABLE 0x8286
-+#define GL_DEPTH_RENDERABLE 0x8287
-+#define GL_STENCIL_RENDERABLE 0x8288
-+#define GL_FRAMEBUFFER_RENDERABLE 0x8289
-+#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
-+#define GL_FRAMEBUFFER_BLEND 0x828B
-+#define GL_READ_PIXELS 0x828C
-+#define GL_READ_PIXELS_FORMAT 0x828D
-+#define GL_READ_PIXELS_TYPE 0x828E
-+#define GL_TEXTURE_IMAGE_FORMAT 0x828F
-+#define GL_TEXTURE_IMAGE_TYPE 0x8290
-+#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
-+#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
-+#define GL_MIPMAP 0x8293
-+#define GL_MANUAL_GENERATE_MIPMAP 0x8294
-+#define GL_AUTO_GENERATE_MIPMAP 0x8295
-+#define GL_COLOR_ENCODING 0x8296
-+#define GL_SRGB_READ 0x8297
-+#define GL_SRGB_WRITE 0x8298
-+#define GL_FILTER 0x829A
-+#define GL_VERTEX_TEXTURE 0x829B
-+#define GL_TESS_CONTROL_TEXTURE 0x829C
-+#define GL_TESS_EVALUATION_TEXTURE 0x829D
-+#define GL_GEOMETRY_TEXTURE 0x829E
-+#define GL_FRAGMENT_TEXTURE 0x829F
-+#define GL_COMPUTE_TEXTURE 0x82A0
-+#define GL_TEXTURE_SHADOW 0x82A1
-+#define GL_TEXTURE_GATHER 0x82A2
-+#define GL_TEXTURE_GATHER_SHADOW 0x82A3
-+#define GL_SHADER_IMAGE_LOAD 0x82A4
-+#define GL_SHADER_IMAGE_STORE 0x82A5
-+#define GL_SHADER_IMAGE_ATOMIC 0x82A6
-+#define GL_IMAGE_TEXEL_SIZE 0x82A7
-+#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
-+#define GL_IMAGE_PIXEL_FORMAT 0x82A9
-+#define GL_IMAGE_PIXEL_TYPE 0x82AA
-+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
-+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
-+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
-+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
-+#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
-+#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
-+#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
-+#define GL_CLEAR_BUFFER 0x82B4
-+#define GL_TEXTURE_VIEW 0x82B5
-+#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
-+#define GL_FULL_SUPPORT 0x82B7
-+#define GL_CAVEAT_SUPPORT 0x82B8
-+#define GL_IMAGE_CLASS_4_X_32 0x82B9
-+#define GL_IMAGE_CLASS_2_X_32 0x82BA
-+#define GL_IMAGE_CLASS_1_X_32 0x82BB
-+#define GL_IMAGE_CLASS_4_X_16 0x82BC
-+#define GL_IMAGE_CLASS_2_X_16 0x82BD
-+#define GL_IMAGE_CLASS_1_X_16 0x82BE
-+#define GL_IMAGE_CLASS_4_X_8 0x82BF
-+#define GL_IMAGE_CLASS_2_X_8 0x82C0
-+#define GL_IMAGE_CLASS_1_X_8 0x82C1
-+#define GL_IMAGE_CLASS_11_11_10 0x82C2
-+#define GL_IMAGE_CLASS_10_10_10_2 0x82C3
-+#define GL_VIEW_CLASS_128_BITS 0x82C4
-+#define GL_VIEW_CLASS_96_BITS 0x82C5
-+#define GL_VIEW_CLASS_64_BITS 0x82C6
-+#define GL_VIEW_CLASS_48_BITS 0x82C7
-+#define GL_VIEW_CLASS_32_BITS 0x82C8
-+#define GL_VIEW_CLASS_24_BITS 0x82C9
-+#define GL_VIEW_CLASS_16_BITS 0x82CA
-+#define GL_VIEW_CLASS_8_BITS 0x82CB
-+#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
-+#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
-+#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
-+#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
-+#define GL_VIEW_CLASS_RGTC1_RED 0x82D0
-+#define GL_VIEW_CLASS_RGTC2_RG 0x82D1
-+#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
-+#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
-+#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_VERTEX_SUBROUTINE 0x92E8
-+#define GL_TESS_CONTROL_SUBROUTINE 0x92E9
-+#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
-+#define GL_GEOMETRY_SUBROUTINE 0x92EB
-+#define GL_FRAGMENT_SUBROUTINE 0x92EC
-+#define GL_COMPUTE_SUBROUTINE 0x92ED
-+#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
-+#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
-+#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
-+#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
-+#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
-+#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
-+#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_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
-+#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_TESS_CONTROL_SHADER 0x9307
-+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
-+#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
-+#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_LOCATION_INDEX 0x930F
-+#define GL_IS_PER_PATCH 0x92E7
-+#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_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
-+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
-+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
-+#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_TEXTURE_BUFFER_OFFSET 0x919D
-+#define GL_TEXTURE_BUFFER_SIZE 0x919E
-+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
-+#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
-+#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
-+#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
-+#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
-+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-+#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_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
-+#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
-+#define GL_VERTEX_BINDING_BUFFER 0x8F4F
-+typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
-+typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (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);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-+typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-+typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-+typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-+typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-+typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
-+typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
-+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-+typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
-+typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-+typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-+typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
-+typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-+GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
-+GLAPI void APIENTRY glCopyImageSubData (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);
-+GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-+GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
-+GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
-+GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-+GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-+GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-+GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-+GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-+GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-+GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-+GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
-+GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
-+GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
-+GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-+GLAPI void APIENTRY glPopDebugGroup (void);
-+GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-+GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-+GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
-+GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#endif
-+#endif /* GL_VERSION_4_3 */
-+
-+#ifndef GL_VERSION_4_4
-+#define GL_VERSION_4_4 1
-+#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
-+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
-+#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
-+#define GL_MAP_PERSISTENT_BIT 0x0040
-+#define GL_MAP_COHERENT_BIT 0x0080
-+#define GL_DYNAMIC_STORAGE_BIT 0x0100
-+#define GL_CLIENT_STORAGE_BIT 0x0200
-+#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
-+#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
-+#define GL_BUFFER_STORAGE_FLAGS 0x8220
-+#define GL_CLEAR_TEXTURE 0x9365
-+#define GL_LOCATION_COMPONENT 0x934A
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
-+#define GL_QUERY_BUFFER 0x9192
-+#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
-+#define GL_QUERY_BUFFER_BINDING 0x9193
-+#define GL_QUERY_RESULT_NO_WAIT 0x9194
-+#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
-+typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-+typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-+typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
-+typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-+GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-+GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-+GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
-+GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
-+GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
-+GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+#endif
-+#endif /* GL_VERSION_4_4 */
-+
-+#ifndef GL_VERSION_4_5
-+#define GL_VERSION_4_5 1
-+#define GL_CONTEXT_LOST 0x0507
-+#define GL_NEGATIVE_ONE_TO_ONE 0x935E
-+#define GL_ZERO_TO_ONE 0x935F
-+#define GL_CLIP_ORIGIN 0x935C
-+#define GL_CLIP_DEPTH_MODE 0x935D
-+#define GL_QUERY_WAIT_INVERTED 0x8E17
-+#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
-+#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
-+#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
-+#define GL_MAX_CULL_DISTANCES 0x82F9
-+#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
-+#define GL_TEXTURE_TARGET 0x1006
-+#define GL_QUERY_TARGET 0x82EA
-+#define GL_TEXTURE_BINDING 0x82EB
-+#define GL_GUILTY_CONTEXT_RESET 0x8253
-+#define GL_INNOCENT_CONTEXT_RESET 0x8254
-+#define GL_UNKNOWN_CONTEXT_RESET 0x8255
-+#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
-+#define GL_LOSE_CONTEXT_ON_RESET 0x8252
-+#define GL_NO_RESET_NOTIFICATION 0x8261
-+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
-+#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
-+#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
-+typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
-+typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
-+typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizei size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, void *data);
-+typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src);
-+typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
-+typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
-+typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
-+typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
-+typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
-+typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers);
-+typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
-+typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
-+typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
-+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
-+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth);
-+GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
-+GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param);
-+GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
-+GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers);
-+GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
-+GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizei size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
-+GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
-+GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
-+GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access);
-+GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
-+GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
-+GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length);
-+GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params);
-+GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, void *data);
-+GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers);
-+GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param);
-+GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf);
-+GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src);
-+GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
-+GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
-+GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
-+GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
-+GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target);
-+GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers);
-+GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures);
-+GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
-+GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
-+GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param);
-+GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param);
-+GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture);
-+GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture);
-+GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays);
-+GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer);
-+GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
-+GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers);
-+GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines);
-+GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
-+GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
-+GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void);
-+GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+GLAPI void APIENTRY glTextureBarrier (void);
-+#endif
-+#endif /* GL_VERSION_4_5 */
-+
-+#ifndef GL_ARB_ES2_compatibility
-+#define GL_ARB_ES2_compatibility 1
-+#endif /* GL_ARB_ES2_compatibility */
-+
-+#ifndef GL_ARB_ES3_1_compatibility
-+#define GL_ARB_ES3_1_compatibility 1
-+#endif /* GL_ARB_ES3_1_compatibility */
-+
-+#ifndef GL_ARB_ES3_compatibility
-+#define GL_ARB_ES3_compatibility 1
-+#endif /* GL_ARB_ES3_compatibility */
-+
-+#ifndef GL_ARB_arrays_of_arrays
-+#define GL_ARB_arrays_of_arrays 1
-+#endif /* GL_ARB_arrays_of_arrays */
-+
-+#ifndef GL_ARB_base_instance
-+#define GL_ARB_base_instance 1
-+#endif /* GL_ARB_base_instance */
-+
-+#ifndef GL_ARB_bindless_texture
-+#define GL_ARB_bindless_texture 1
-+typedef uint64_t GLuint64EXT;
-+#define GL_UNSIGNED_INT64_ARB 0x140F
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-+typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
-+GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
-+GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
-+GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
-+GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
-+GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
-+GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
-+GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
-+GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
-+#endif
-+#endif /* GL_ARB_bindless_texture */
-+
-+#ifndef GL_ARB_blend_func_extended
-+#define GL_ARB_blend_func_extended 1
-+#endif /* GL_ARB_blend_func_extended */
-+
-+#ifndef GL_ARB_buffer_storage
-+#define GL_ARB_buffer_storage 1
-+#endif /* GL_ARB_buffer_storage */
-+
-+#ifndef GL_ARB_cl_event
-+#define GL_ARB_cl_event 1
-+struct _cl_context;
-+struct _cl_event;
-+#define GL_SYNC_CL_EVENT_ARB 0x8240
-+#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
-+typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-+#endif
-+#endif /* GL_ARB_cl_event */
-+
-+#ifndef GL_ARB_clear_buffer_object
-+#define GL_ARB_clear_buffer_object 1
-+#endif /* GL_ARB_clear_buffer_object */
-+
-+#ifndef GL_ARB_clear_texture
-+#define GL_ARB_clear_texture 1
-+#endif /* GL_ARB_clear_texture */
-+
-+#ifndef GL_ARB_clip_control
-+#define GL_ARB_clip_control 1
-+#endif /* GL_ARB_clip_control */
-+
-+#ifndef GL_ARB_compressed_texture_pixel_storage
-+#define GL_ARB_compressed_texture_pixel_storage 1
-+#endif /* GL_ARB_compressed_texture_pixel_storage */
-+
-+#ifndef GL_ARB_compute_shader
-+#define GL_ARB_compute_shader 1
-+#endif /* GL_ARB_compute_shader */
-+
-+#ifndef GL_ARB_compute_variable_group_size
-+#define GL_ARB_compute_variable_group_size 1
-+#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
-+#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
-+#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
-+#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
-+#endif
-+#endif /* GL_ARB_compute_variable_group_size */
-+
-+#ifndef GL_ARB_conditional_render_inverted
-+#define GL_ARB_conditional_render_inverted 1
-+#endif /* GL_ARB_conditional_render_inverted */
-+
-+#ifndef GL_ARB_conservative_depth
-+#define GL_ARB_conservative_depth 1
-+#endif /* GL_ARB_conservative_depth */
-+
-+#ifndef GL_ARB_copy_buffer
-+#define GL_ARB_copy_buffer 1
-+#define GL_COPY_READ_BUFFER_BINDING 0x8F36
-+#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
-+#endif /* GL_ARB_copy_buffer */
-+
-+#ifndef GL_ARB_copy_image
-+#define GL_ARB_copy_image 1
-+#endif /* GL_ARB_copy_image */
-+
-+#ifndef GL_ARB_cull_distance
-+#define GL_ARB_cull_distance 1
-+#endif /* GL_ARB_cull_distance */
-+
-+#ifndef GL_ARB_debug_output
-+#define GL_ARB_debug_output 1
-+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
-+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
-+#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
-+#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
-+#define GL_DEBUG_SOURCE_API_ARB 0x8246
-+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
-+#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
-+#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
-+#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
-+#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
-+#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
-+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
-+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
-+#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
-+#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
-+#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
-+#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
-+#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
-+#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
-+#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
-+#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
-+#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
-+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
-+GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+#endif
-+#endif /* GL_ARB_debug_output */
-+
-+#ifndef GL_ARB_depth_buffer_float
-+#define GL_ARB_depth_buffer_float 1
-+#endif /* GL_ARB_depth_buffer_float */
-+
-+#ifndef GL_ARB_depth_clamp
-+#define GL_ARB_depth_clamp 1
-+#endif /* GL_ARB_depth_clamp */
-+
-+#ifndef GL_ARB_derivative_control
-+#define GL_ARB_derivative_control 1
-+#endif /* GL_ARB_derivative_control */
-+
-+#ifndef GL_ARB_direct_state_access
-+#define GL_ARB_direct_state_access 1
-+#endif /* GL_ARB_direct_state_access */
-+
-+#ifndef GL_ARB_draw_buffers_blend
-+#define GL_ARB_draw_buffers_blend 1
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
-+GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
-+GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+#endif
-+#endif /* GL_ARB_draw_buffers_blend */
-+
-+#ifndef GL_ARB_draw_elements_base_vertex
-+#define GL_ARB_draw_elements_base_vertex 1
-+#endif /* GL_ARB_draw_elements_base_vertex */
-+
-+#ifndef GL_ARB_draw_indirect
-+#define GL_ARB_draw_indirect 1
-+#endif /* GL_ARB_draw_indirect */
-+
-+#ifndef GL_ARB_enhanced_layouts
-+#define GL_ARB_enhanced_layouts 1
-+#endif /* GL_ARB_enhanced_layouts */
-+
-+#ifndef GL_ARB_explicit_attrib_location
-+#define GL_ARB_explicit_attrib_location 1
-+#endif /* GL_ARB_explicit_attrib_location */
-+
-+#ifndef GL_ARB_explicit_uniform_location
-+#define GL_ARB_explicit_uniform_location 1
-+#endif /* GL_ARB_explicit_uniform_location */
-+
-+#ifndef GL_ARB_fragment_coord_conventions
-+#define GL_ARB_fragment_coord_conventions 1
-+#endif /* GL_ARB_fragment_coord_conventions */
-+
-+#ifndef GL_ARB_fragment_layer_viewport
-+#define GL_ARB_fragment_layer_viewport 1
-+#endif /* GL_ARB_fragment_layer_viewport */
-+
-+#ifndef GL_ARB_framebuffer_no_attachments
-+#define GL_ARB_framebuffer_no_attachments 1
-+#endif /* GL_ARB_framebuffer_no_attachments */
-+
-+#ifndef GL_ARB_framebuffer_object
-+#define GL_ARB_framebuffer_object 1
-+#endif /* GL_ARB_framebuffer_object */
-+
-+#ifndef GL_ARB_framebuffer_sRGB
-+#define GL_ARB_framebuffer_sRGB 1
-+#endif /* GL_ARB_framebuffer_sRGB */
-+
-+#ifndef GL_ARB_get_program_binary
-+#define GL_ARB_get_program_binary 1
-+#endif /* GL_ARB_get_program_binary */
-+
-+#ifndef GL_ARB_get_texture_sub_image
-+#define GL_ARB_get_texture_sub_image 1
-+#endif /* GL_ARB_get_texture_sub_image */
-+
-+#ifndef GL_ARB_gpu_shader5
-+#define GL_ARB_gpu_shader5 1
-+#endif /* GL_ARB_gpu_shader5 */
-+
-+#ifndef GL_ARB_gpu_shader_fp64
-+#define GL_ARB_gpu_shader_fp64 1
-+#endif /* GL_ARB_gpu_shader_fp64 */
-+
-+#ifndef GL_ARB_half_float_vertex
-+#define GL_ARB_half_float_vertex 1
-+#endif /* GL_ARB_half_float_vertex */
-+
-+#ifndef GL_ARB_imaging
-+#define GL_ARB_imaging 1
-+#define GL_BLEND_COLOR 0x8005
-+#define GL_BLEND_EQUATION 0x8009
-+#endif /* GL_ARB_imaging */
-+
-+#ifndef GL_ARB_indirect_parameters
-+#define GL_ARB_indirect_parameters 1
-+#define GL_PARAMETER_BUFFER_ARB 0x80EE
-+#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+#endif
-+#endif /* GL_ARB_indirect_parameters */
-+
-+#ifndef GL_ARB_internalformat_query
-+#define GL_ARB_internalformat_query 1
-+#endif /* GL_ARB_internalformat_query */
-+
-+#ifndef GL_ARB_internalformat_query2
-+#define GL_ARB_internalformat_query2 1
-+#define GL_SRGB_DECODE_ARB 0x8299
-+#endif /* GL_ARB_internalformat_query2 */
-+
-+#ifndef GL_ARB_invalidate_subdata
-+#define GL_ARB_invalidate_subdata 1
-+#endif /* GL_ARB_invalidate_subdata */
-+
-+#ifndef GL_ARB_map_buffer_alignment
-+#define GL_ARB_map_buffer_alignment 1
-+#endif /* GL_ARB_map_buffer_alignment */
-+
-+#ifndef GL_ARB_map_buffer_range
-+#define GL_ARB_map_buffer_range 1
-+#endif /* GL_ARB_map_buffer_range */
-+
-+#ifndef GL_ARB_multi_bind
-+#define GL_ARB_multi_bind 1
-+#endif /* GL_ARB_multi_bind */
-+
-+#ifndef GL_ARB_multi_draw_indirect
-+#define GL_ARB_multi_draw_indirect 1
-+#endif /* GL_ARB_multi_draw_indirect */
-+
-+#ifndef GL_ARB_occlusion_query2
-+#define GL_ARB_occlusion_query2 1
-+#endif /* GL_ARB_occlusion_query2 */
-+
-+#ifndef GL_ARB_pipeline_statistics_query
-+#define GL_ARB_pipeline_statistics_query 1
-+#define GL_VERTICES_SUBMITTED_ARB 0x82EE
-+#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF
-+#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0
-+#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1
-+#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2
-+#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3
-+#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4
-+#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5
-+#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6
-+#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7
-+#endif /* GL_ARB_pipeline_statistics_query */
-+
-+#ifndef GL_ARB_program_interface_query
-+#define GL_ARB_program_interface_query 1
-+#endif /* GL_ARB_program_interface_query */
-+
-+#ifndef GL_ARB_provoking_vertex
-+#define GL_ARB_provoking_vertex 1
-+#endif /* GL_ARB_provoking_vertex */
-+
-+#ifndef GL_ARB_query_buffer_object
-+#define GL_ARB_query_buffer_object 1
-+#endif /* GL_ARB_query_buffer_object */
-+
-+#ifndef GL_ARB_robust_buffer_access_behavior
-+#define GL_ARB_robust_buffer_access_behavior 1
-+#endif /* GL_ARB_robust_buffer_access_behavior */
-+
-+#ifndef GL_ARB_robustness
-+#define GL_ARB_robustness 1
-+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
-+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
-+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
-+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
-+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
-+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
-+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
-+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
-+typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-+typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
-+GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-+GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
-+GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+#endif
-+#endif /* GL_ARB_robustness */
-+
-+#ifndef GL_ARB_robustness_isolation
-+#define GL_ARB_robustness_isolation 1
-+#endif /* GL_ARB_robustness_isolation */
-+
-+#ifndef GL_ARB_sample_shading
-+#define GL_ARB_sample_shading 1
-+#define GL_SAMPLE_SHADING_ARB 0x8C36
-+#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
-+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
-+#endif
-+#endif /* GL_ARB_sample_shading */
-+
-+#ifndef GL_ARB_sampler_objects
-+#define GL_ARB_sampler_objects 1
-+#endif /* GL_ARB_sampler_objects */
-+
-+#ifndef GL_ARB_seamless_cube_map
-+#define GL_ARB_seamless_cube_map 1
-+#endif /* GL_ARB_seamless_cube_map */
-+
-+#ifndef GL_ARB_seamless_cubemap_per_texture
-+#define GL_ARB_seamless_cubemap_per_texture 1
-+#endif /* GL_ARB_seamless_cubemap_per_texture */
-+
-+#ifndef GL_ARB_separate_shader_objects
-+#define GL_ARB_separate_shader_objects 1
-+#endif /* GL_ARB_separate_shader_objects */
-+
-+#ifndef GL_ARB_shader_atomic_counters
-+#define GL_ARB_shader_atomic_counters 1
-+#endif /* GL_ARB_shader_atomic_counters */
-+
-+#ifndef GL_ARB_shader_bit_encoding
-+#define GL_ARB_shader_bit_encoding 1
-+#endif /* GL_ARB_shader_bit_encoding */
-+
-+#ifndef GL_ARB_shader_draw_parameters
-+#define GL_ARB_shader_draw_parameters 1
-+#endif /* GL_ARB_shader_draw_parameters */
-+
-+#ifndef GL_ARB_shader_group_vote
-+#define GL_ARB_shader_group_vote 1
-+#endif /* GL_ARB_shader_group_vote */
-+
-+#ifndef GL_ARB_shader_image_load_store
-+#define GL_ARB_shader_image_load_store 1
-+#endif /* GL_ARB_shader_image_load_store */
-+
-+#ifndef GL_ARB_shader_image_size
-+#define GL_ARB_shader_image_size 1
-+#endif /* GL_ARB_shader_image_size */
-+
-+#ifndef GL_ARB_shader_precision
-+#define GL_ARB_shader_precision 1
-+#endif /* GL_ARB_shader_precision */
-+
-+#ifndef GL_ARB_shader_stencil_export
-+#define GL_ARB_shader_stencil_export 1
-+#endif /* GL_ARB_shader_stencil_export */
-+
-+#ifndef GL_ARB_shader_storage_buffer_object
-+#define GL_ARB_shader_storage_buffer_object 1
-+#endif /* GL_ARB_shader_storage_buffer_object */
-+
-+#ifndef GL_ARB_shader_subroutine
-+#define GL_ARB_shader_subroutine 1
-+#endif /* GL_ARB_shader_subroutine */
-+
-+#ifndef GL_ARB_shader_texture_image_samples
-+#define GL_ARB_shader_texture_image_samples 1
-+#endif /* GL_ARB_shader_texture_image_samples */
-+
-+#ifndef GL_ARB_shading_language_420pack
-+#define GL_ARB_shading_language_420pack 1
-+#endif /* GL_ARB_shading_language_420pack */
-+
-+#ifndef GL_ARB_shading_language_include
-+#define GL_ARB_shading_language_include 1
-+#define GL_SHADER_INCLUDE_ARB 0x8DAE
-+#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
-+#define GL_NAMED_STRING_TYPE_ARB 0x8DEA
-+typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-+typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-+typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-+typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-+GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
-+GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-+GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
-+GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-+GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_ARB_shading_language_include */
-+
-+#ifndef GL_ARB_shading_language_packing
-+#define GL_ARB_shading_language_packing 1
-+#endif /* GL_ARB_shading_language_packing */
-+
-+#ifndef GL_ARB_sparse_buffer
-+#define GL_ARB_sparse_buffer 1
-+#define GL_SPARSE_STORAGE_BIT_ARB 0x0400
-+#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8
-+typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizei size, GLboolean commit);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizei size, GLboolean commit);
-+GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit);
-+GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit);
-+#endif
-+#endif /* GL_ARB_sparse_buffer */
-+
-+#ifndef GL_ARB_sparse_texture
-+#define GL_ARB_sparse_texture 1
-+#define GL_TEXTURE_SPARSE_ARB 0x91A6
-+#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
-+#define GL_MIN_SPARSE_LEVEL_ARB 0x919B
-+#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
-+#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
-+#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
-+#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
-+#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
-+#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
-+#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
-+#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
-+typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
-+#endif
-+#endif /* GL_ARB_sparse_texture */
-+
-+#ifndef GL_ARB_stencil_texturing
-+#define GL_ARB_stencil_texturing 1
-+#endif /* GL_ARB_stencil_texturing */
-+
-+#ifndef GL_ARB_sync
-+#define GL_ARB_sync 1
-+#endif /* GL_ARB_sync */
-+
-+#ifndef GL_ARB_tessellation_shader
-+#define GL_ARB_tessellation_shader 1
-+#endif /* GL_ARB_tessellation_shader */
-+
-+#ifndef GL_ARB_texture_barrier
-+#define GL_ARB_texture_barrier 1
-+#endif /* GL_ARB_texture_barrier */
-+
-+#ifndef GL_ARB_texture_buffer_object_rgb32
-+#define GL_ARB_texture_buffer_object_rgb32 1
-+#endif /* GL_ARB_texture_buffer_object_rgb32 */
-+
-+#ifndef GL_ARB_texture_buffer_range
-+#define GL_ARB_texture_buffer_range 1
-+#endif /* GL_ARB_texture_buffer_range */
-+
-+#ifndef GL_ARB_texture_compression_bptc
-+#define GL_ARB_texture_compression_bptc 1
-+#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
-+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
-+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
-+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
-+#endif /* GL_ARB_texture_compression_bptc */
-+
-+#ifndef GL_ARB_texture_compression_rgtc
-+#define GL_ARB_texture_compression_rgtc 1
-+#endif /* GL_ARB_texture_compression_rgtc */
-+
-+#ifndef GL_ARB_texture_cube_map_array
-+#define GL_ARB_texture_cube_map_array 1
-+#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
-+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
-+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
-+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
-+#endif /* GL_ARB_texture_cube_map_array */
-+
-+#ifndef GL_ARB_texture_gather
-+#define GL_ARB_texture_gather 1
-+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
-+#endif /* GL_ARB_texture_gather */
-+
-+#ifndef GL_ARB_texture_mirror_clamp_to_edge
-+#define GL_ARB_texture_mirror_clamp_to_edge 1
-+#endif /* GL_ARB_texture_mirror_clamp_to_edge */
-+
-+#ifndef GL_ARB_texture_multisample
-+#define GL_ARB_texture_multisample 1
-+#endif /* GL_ARB_texture_multisample */
-+
-+#ifndef GL_ARB_texture_query_levels
-+#define GL_ARB_texture_query_levels 1
-+#endif /* GL_ARB_texture_query_levels */
-+
-+#ifndef GL_ARB_texture_query_lod
-+#define GL_ARB_texture_query_lod 1
-+#endif /* GL_ARB_texture_query_lod */
-+
-+#ifndef GL_ARB_texture_rg
-+#define GL_ARB_texture_rg 1
-+#endif /* GL_ARB_texture_rg */
-+
-+#ifndef GL_ARB_texture_rgb10_a2ui
-+#define GL_ARB_texture_rgb10_a2ui 1
-+#endif /* GL_ARB_texture_rgb10_a2ui */
-+
-+#ifndef GL_ARB_texture_stencil8
-+#define GL_ARB_texture_stencil8 1
-+#endif /* GL_ARB_texture_stencil8 */
-+
-+#ifndef GL_ARB_texture_storage
-+#define GL_ARB_texture_storage 1
-+#endif /* GL_ARB_texture_storage */
-+
-+#ifndef GL_ARB_texture_storage_multisample
-+#define GL_ARB_texture_storage_multisample 1
-+#endif /* GL_ARB_texture_storage_multisample */
-+
-+#ifndef GL_ARB_texture_swizzle
-+#define GL_ARB_texture_swizzle 1
-+#endif /* GL_ARB_texture_swizzle */
-+
-+#ifndef GL_ARB_texture_view
-+#define GL_ARB_texture_view 1
-+#endif /* GL_ARB_texture_view */
-+
-+#ifndef GL_ARB_timer_query
-+#define GL_ARB_timer_query 1
-+#endif /* GL_ARB_timer_query */
-+
-+#ifndef GL_ARB_transform_feedback2
-+#define GL_ARB_transform_feedback2 1
-+#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-+#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-+#endif /* GL_ARB_transform_feedback2 */
-+
-+#ifndef GL_ARB_transform_feedback3
-+#define GL_ARB_transform_feedback3 1
-+#endif /* GL_ARB_transform_feedback3 */
-+
-+#ifndef GL_ARB_transform_feedback_instanced
-+#define GL_ARB_transform_feedback_instanced 1
-+#endif /* GL_ARB_transform_feedback_instanced */
-+
-+#ifndef GL_ARB_transform_feedback_overflow_query
-+#define GL_ARB_transform_feedback_overflow_query 1
-+#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC
-+#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED
-+#endif /* GL_ARB_transform_feedback_overflow_query */
-+
-+#ifndef GL_ARB_uniform_buffer_object
-+#define GL_ARB_uniform_buffer_object 1
-+#endif /* GL_ARB_uniform_buffer_object */
-+
-+#ifndef GL_ARB_vertex_array_bgra
-+#define GL_ARB_vertex_array_bgra 1
-+#endif /* GL_ARB_vertex_array_bgra */
-+
-+#ifndef GL_ARB_vertex_array_object
-+#define GL_ARB_vertex_array_object 1
-+#endif /* GL_ARB_vertex_array_object */
-+
-+#ifndef GL_ARB_vertex_attrib_64bit
-+#define GL_ARB_vertex_attrib_64bit 1
-+#endif /* GL_ARB_vertex_attrib_64bit */
-+
-+#ifndef GL_ARB_vertex_attrib_binding
-+#define GL_ARB_vertex_attrib_binding 1
-+#endif /* GL_ARB_vertex_attrib_binding */
-+
-+#ifndef GL_ARB_vertex_type_10f_11f_11f_rev
-+#define GL_ARB_vertex_type_10f_11f_11f_rev 1
-+#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
-+
-+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
-+#define GL_ARB_vertex_type_2_10_10_10_rev 1
-+#endif /* GL_ARB_vertex_type_2_10_10_10_rev */
-+
-+#ifndef GL_ARB_viewport_array
-+#define GL_ARB_viewport_array 1
-+#endif /* GL_ARB_viewport_array */
-+
-+#ifndef GL_KHR_context_flush_control
-+#define GL_KHR_context_flush_control 1
-+#endif /* GL_KHR_context_flush_control */
-+
-+#ifndef GL_KHR_debug
-+#define GL_KHR_debug 1
-+#endif /* GL_KHR_debug */
-+
-+#ifndef GL_KHR_robust_buffer_access_behavior
-+#define GL_KHR_robust_buffer_access_behavior 1
-+#endif /* GL_KHR_robust_buffer_access_behavior */
-+
-+#ifndef GL_KHR_robustness
-+#define GL_KHR_robustness 1
-+#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
-+#endif /* GL_KHR_robustness */
-+
-+#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 */
-+
-+#ifndef GL_KHR_texture_compression_astc_ldr
-+#define GL_KHR_texture_compression_astc_ldr 1
-+#endif /* GL_KHR_texture_compression_astc_ldr */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glext.h
-@@ -0,0 +1,12051 @@
-+#ifndef __glext_h_
-+#define __glext_h_ 1
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+** Copyright (c) 2013-2015 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: 31811 $ on $Date: 2015-08-10 17:01:11 +1000 (Mon, 10 Aug 2015) $
-+*/
-+
-+#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
-+
-+#define GL_GLEXT_VERSION 20150809
-+
-+/* Generated C header for:
-+ * API: gl
-+ * Profile: compatibility
-+ * Versions considered: .*
-+ * Versions emitted: 1\.[2-9]|[234]\.[0-9]
-+ * Default extensions included: gl
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef GL_VERSION_1_2
-+#define GL_VERSION_1_2 1
-+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-+#define GL_TEXTURE_BINDING_3D 0x806A
-+#define GL_PACK_SKIP_IMAGES 0x806B
-+#define GL_PACK_IMAGE_HEIGHT 0x806C
-+#define GL_UNPACK_SKIP_IMAGES 0x806D
-+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-+#define GL_TEXTURE_3D 0x806F
-+#define GL_PROXY_TEXTURE_3D 0x8070
-+#define GL_TEXTURE_DEPTH 0x8071
-+#define GL_TEXTURE_WRAP_R 0x8072
-+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-+#define GL_BGR 0x80E0
-+#define GL_BGRA 0x80E1
-+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-+#define GL_MAX_ELEMENTS_INDICES 0x80E9
-+#define GL_CLAMP_TO_EDGE 0x812F
-+#define GL_TEXTURE_MIN_LOD 0x813A
-+#define GL_TEXTURE_MAX_LOD 0x813B
-+#define GL_TEXTURE_BASE_LEVEL 0x813C
-+#define GL_TEXTURE_MAX_LEVEL 0x813D
-+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-+#define GL_RESCALE_NORMAL 0x803A
-+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-+#define GL_SINGLE_COLOR 0x81F9
-+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void 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);
-+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_VERSION_1_2 */
-+
-+#ifndef GL_VERSION_1_3
-+#define GL_VERSION_1_3 1
-+#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_MULTISAMPLE 0x809D
-+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-+#define GL_SAMPLE_COVERAGE 0x80A0
-+#define GL_SAMPLE_BUFFERS 0x80A8
-+#define GL_SAMPLES 0x80A9
-+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-+#define GL_TEXTURE_CUBE_MAP 0x8513
-+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-+#define GL_COMPRESSED_RGB 0x84ED
-+#define GL_COMPRESSED_RGBA 0x84EE
-+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-+#define GL_TEXTURE_COMPRESSED 0x86A1
-+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-+#define GL_CLAMP_TO_BORDER 0x812D
-+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-+#define GL_MAX_TEXTURE_UNITS 0x84E2
-+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-+#define GL_MULTISAMPLE_BIT 0x20000000
-+#define GL_NORMAL_MAP 0x8511
-+#define GL_REFLECTION_MAP 0x8512
-+#define GL_COMPRESSED_ALPHA 0x84E9
-+#define GL_COMPRESSED_LUMINANCE 0x84EA
-+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-+#define GL_COMPRESSED_INTENSITY 0x84EC
-+#define GL_COMBINE 0x8570
-+#define GL_COMBINE_RGB 0x8571
-+#define GL_COMBINE_ALPHA 0x8572
-+#define GL_SOURCE0_RGB 0x8580
-+#define GL_SOURCE1_RGB 0x8581
-+#define GL_SOURCE2_RGB 0x8582
-+#define GL_SOURCE0_ALPHA 0x8588
-+#define GL_SOURCE1_ALPHA 0x8589
-+#define GL_SOURCE2_ALPHA 0x858A
-+#define GL_OPERAND0_RGB 0x8590
-+#define GL_OPERAND1_RGB 0x8591
-+#define GL_OPERAND2_RGB 0x8592
-+#define GL_OPERAND0_ALPHA 0x8598
-+#define GL_OPERAND1_ALPHA 0x8599
-+#define GL_OPERAND2_ALPHA 0x859A
-+#define GL_RGB_SCALE 0x8573
-+#define GL_ADD_SIGNED 0x8574
-+#define GL_INTERPOLATE 0x8575
-+#define GL_SUBTRACT 0x84E7
-+#define GL_CONSTANT 0x8576
-+#define GL_PRIMARY_COLOR 0x8577
-+#define GL_PREVIOUS 0x8578
-+#define GL_DOT3_RGB 0x86AE
-+#define GL_DOT3_RGBA 0x86AF
-+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
-+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glActiveTexture (GLenum texture);
-+GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-+GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void 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);
-+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
-+GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
-+GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
-+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
-+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
-+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
-+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
-+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
-+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
-+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
-+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
-+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
-+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
-+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
-+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
-+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
-+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
-+#endif
-+#endif /* GL_VERSION_1_3 */
-+
-+#ifndef GL_VERSION_1_4
-+#define GL_VERSION_1_4 1
-+#define GL_BLEND_DST_RGB 0x80C8
-+#define GL_BLEND_SRC_RGB 0x80C9
-+#define GL_BLEND_DST_ALPHA 0x80CA
-+#define GL_BLEND_SRC_ALPHA 0x80CB
-+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-+#define GL_DEPTH_COMPONENT16 0x81A5
-+#define GL_DEPTH_COMPONENT24 0x81A6
-+#define GL_DEPTH_COMPONENT32 0x81A7
-+#define GL_MIRRORED_REPEAT 0x8370
-+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
-+#define GL_TEXTURE_LOD_BIAS 0x8501
-+#define GL_INCR_WRAP 0x8507
-+#define GL_DECR_WRAP 0x8508
-+#define GL_TEXTURE_DEPTH_SIZE 0x884A
-+#define GL_TEXTURE_COMPARE_MODE 0x884C
-+#define GL_TEXTURE_COMPARE_FUNC 0x884D
-+#define GL_POINT_SIZE_MIN 0x8126
-+#define GL_POINT_SIZE_MAX 0x8127
-+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
-+#define GL_GENERATE_MIPMAP 0x8191
-+#define GL_GENERATE_MIPMAP_HINT 0x8192
-+#define GL_FOG_COORDINATE_SOURCE 0x8450
-+#define GL_FOG_COORDINATE 0x8451
-+#define GL_FRAGMENT_DEPTH 0x8452
-+#define GL_CURRENT_FOG_COORDINATE 0x8453
-+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
-+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
-+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
-+#define GL_FOG_COORDINATE_ARRAY 0x8457
-+#define GL_COLOR_SUM 0x8458
-+#define GL_CURRENT_SECONDARY_COLOR 0x8459
-+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
-+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
-+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
-+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
-+#define GL_SECONDARY_COLOR_ARRAY 0x845E
-+#define GL_TEXTURE_FILTER_CONTROL 0x8500
-+#define GL_DEPTH_TEXTURE_MODE 0x884B
-+#define GL_COMPARE_R_TO_TEXTURE 0x884E
-+#define GL_FUNC_ADD 0x8006
-+#define GL_FUNC_SUBTRACT 0x800A
-+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-+#define GL_MIN 0x8007
-+#define GL_MAX 0x8008
-+#define GL_CONSTANT_COLOR 0x8001
-+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-+#define GL_CONSTANT_ALPHA 0x8003
-+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
-+GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
-+GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
-+GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glFogCoordf (GLfloat coord);
-+GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
-+GLAPI void APIENTRY glFogCoordd (GLdouble coord);
-+GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
-+GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
-+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
-+GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
-+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
-+GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
-+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
-+GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
-+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
-+GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
-+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
-+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
-+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
-+GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
-+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
-+GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
-+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
-+GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
-+GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
-+GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
-+GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
-+GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
-+GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
-+GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+GLAPI void APIENTRY glBlendEquation (GLenum mode);
-+#endif
-+#endif /* GL_VERSION_1_4 */
-+
-+#ifndef GL_VERSION_1_5
-+#define GL_VERSION_1_5 1
-+#include <stddef.h>
-+typedef ptrdiff_t GLsizeiptr;
-+typedef ptrdiff_t GLintptr;
-+#define GL_BUFFER_SIZE 0x8764
-+#define GL_BUFFER_USAGE 0x8765
-+#define GL_QUERY_COUNTER_BITS 0x8864
-+#define GL_CURRENT_QUERY 0x8865
-+#define GL_QUERY_RESULT 0x8866
-+#define GL_QUERY_RESULT_AVAILABLE 0x8867
-+#define GL_ARRAY_BUFFER 0x8892
-+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-+#define GL_ARRAY_BUFFER_BINDING 0x8894
-+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-+#define GL_READ_ONLY 0x88B8
-+#define GL_WRITE_ONLY 0x88B9
-+#define GL_READ_WRITE 0x88BA
-+#define GL_BUFFER_ACCESS 0x88BB
-+#define GL_BUFFER_MAPPED 0x88BC
-+#define GL_BUFFER_MAP_POINTER 0x88BD
-+#define GL_STREAM_DRAW 0x88E0
-+#define GL_STREAM_READ 0x88E1
-+#define GL_STREAM_COPY 0x88E2
-+#define GL_STATIC_DRAW 0x88E4
-+#define GL_STATIC_READ 0x88E5
-+#define GL_STATIC_COPY 0x88E6
-+#define GL_DYNAMIC_DRAW 0x88E8
-+#define GL_DYNAMIC_READ 0x88E9
-+#define GL_DYNAMIC_COPY 0x88EA
-+#define GL_SAMPLES_PASSED 0x8914
-+#define GL_SRC1_ALPHA 0x8589
-+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
-+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
-+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
-+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
-+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
-+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
-+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
-+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
-+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
-+#define GL_FOG_COORD_SRC 0x8450
-+#define GL_FOG_COORD 0x8451
-+#define GL_CURRENT_FOG_COORD 0x8453
-+#define GL_FOG_COORD_ARRAY_TYPE 0x8454
-+#define GL_FOG_COORD_ARRAY_STRIDE 0x8455
-+#define GL_FOG_COORD_ARRAY_POINTER 0x8456
-+#define GL_FOG_COORD_ARRAY 0x8457
-+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
-+#define GL_SRC0_RGB 0x8580
-+#define GL_SRC1_RGB 0x8581
-+#define GL_SRC2_RGB 0x8582
-+#define GL_SRC0_ALPHA 0x8588
-+#define GL_SRC2_ALPHA 0x858A
-+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-+typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
-+GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
-+GLAPI void APIENTRY glEndQuery (GLenum target);
-+GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-+GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-+GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-+GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
-+GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-+GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
-+GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
-+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
-+GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
-+#endif
-+#endif /* GL_VERSION_1_5 */
-+
-+#ifndef GL_VERSION_2_0
-+#define GL_VERSION_2_0 1
-+typedef char GLchar;
-+#define GL_BLEND_EQUATION_RGB 0x8009
-+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
-+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-+#define GL_STENCIL_BACK_FUNC 0x8800
-+#define GL_STENCIL_BACK_FAIL 0x8801
-+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-+#define GL_MAX_DRAW_BUFFERS 0x8824
-+#define GL_DRAW_BUFFER0 0x8825
-+#define GL_DRAW_BUFFER1 0x8826
-+#define GL_DRAW_BUFFER2 0x8827
-+#define GL_DRAW_BUFFER3 0x8828
-+#define GL_DRAW_BUFFER4 0x8829
-+#define GL_DRAW_BUFFER5 0x882A
-+#define GL_DRAW_BUFFER6 0x882B
-+#define GL_DRAW_BUFFER7 0x882C
-+#define GL_DRAW_BUFFER8 0x882D
-+#define GL_DRAW_BUFFER9 0x882E
-+#define GL_DRAW_BUFFER10 0x882F
-+#define GL_DRAW_BUFFER11 0x8830
-+#define GL_DRAW_BUFFER12 0x8831
-+#define GL_DRAW_BUFFER13 0x8832
-+#define GL_DRAW_BUFFER14 0x8833
-+#define GL_DRAW_BUFFER15 0x8834
-+#define GL_BLEND_EQUATION_ALPHA 0x883D
-+#define GL_MAX_VERTEX_ATTRIBS 0x8869
-+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-+#define GL_FRAGMENT_SHADER 0x8B30
-+#define GL_VERTEX_SHADER 0x8B31
-+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
-+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
-+#define GL_MAX_VARYING_FLOATS 0x8B4B
-+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-+#define GL_SHADER_TYPE 0x8B4F
-+#define GL_FLOAT_VEC2 0x8B50
-+#define GL_FLOAT_VEC3 0x8B51
-+#define GL_FLOAT_VEC4 0x8B52
-+#define GL_INT_VEC2 0x8B53
-+#define GL_INT_VEC3 0x8B54
-+#define GL_INT_VEC4 0x8B55
-+#define GL_BOOL 0x8B56
-+#define GL_BOOL_VEC2 0x8B57
-+#define GL_BOOL_VEC3 0x8B58
-+#define GL_BOOL_VEC4 0x8B59
-+#define GL_FLOAT_MAT2 0x8B5A
-+#define GL_FLOAT_MAT3 0x8B5B
-+#define GL_FLOAT_MAT4 0x8B5C
-+#define GL_SAMPLER_1D 0x8B5D
-+#define GL_SAMPLER_2D 0x8B5E
-+#define GL_SAMPLER_3D 0x8B5F
-+#define GL_SAMPLER_CUBE 0x8B60
-+#define GL_SAMPLER_1D_SHADOW 0x8B61
-+#define GL_SAMPLER_2D_SHADOW 0x8B62
-+#define GL_DELETE_STATUS 0x8B80
-+#define GL_COMPILE_STATUS 0x8B81
-+#define GL_LINK_STATUS 0x8B82
-+#define GL_VALIDATE_STATUS 0x8B83
-+#define GL_INFO_LOG_LENGTH 0x8B84
-+#define GL_ATTACHED_SHADERS 0x8B85
-+#define GL_ACTIVE_UNIFORMS 0x8B86
-+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-+#define GL_SHADER_SOURCE_LENGTH 0x8B88
-+#define GL_ACTIVE_ATTRIBUTES 0x8B89
-+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
-+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-+#define GL_CURRENT_PROGRAM 0x8B8D
-+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
-+#define GL_LOWER_LEFT 0x8CA1
-+#define GL_UPPER_LEFT 0x8CA2
-+#define GL_STENCIL_BACK_REF 0x8CA3
-+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
-+#define GL_POINT_SPRITE 0x8861
-+#define GL_COORD_REPLACE 0x8862
-+#define GL_MAX_TEXTURE_COORDS 0x8871
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
-+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
-+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
-+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
-+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
-+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
-+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
-+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
-+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
-+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
-+GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-+GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-+GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
-+GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-+GLAPI void APIENTRY glCompileShader (GLuint shader);
-+GLAPI GLuint APIENTRY glCreateProgram (void);
-+GLAPI GLuint APIENTRY glCreateShader (GLenum type);
-+GLAPI void APIENTRY glDeleteProgram (GLuint program);
-+GLAPI void APIENTRY glDeleteShader (GLuint shader);
-+GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
-+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
-+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
-+GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-+GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-+GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-+GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-+GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
-+GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
-+GLAPI void APIENTRY glLinkProgram (GLuint program);
-+GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-+GLAPI void APIENTRY glUseProgram (GLuint program);
-+GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
-+GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
-+GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glValidateProgram (GLuint program);
-+GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-+GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
-+GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
-+GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_VERSION_2_0 */
-+
-+#ifndef GL_VERSION_2_1
-+#define GL_VERSION_2_1 1
-+#define GL_PIXEL_PACK_BUFFER 0x88EB
-+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
-+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
-+#define GL_FLOAT_MAT2x3 0x8B65
-+#define GL_FLOAT_MAT2x4 0x8B66
-+#define GL_FLOAT_MAT3x2 0x8B67
-+#define GL_FLOAT_MAT3x4 0x8B68
-+#define GL_FLOAT_MAT4x2 0x8B69
-+#define GL_FLOAT_MAT4x3 0x8B6A
-+#define GL_SRGB 0x8C40
-+#define GL_SRGB8 0x8C41
-+#define GL_SRGB_ALPHA 0x8C42
-+#define GL_SRGB8_ALPHA8 0x8C43
-+#define GL_COMPRESSED_SRGB 0x8C48
-+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
-+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
-+#define GL_SLUMINANCE_ALPHA 0x8C44
-+#define GL_SLUMINANCE8_ALPHA8 0x8C45
-+#define GL_SLUMINANCE 0x8C46
-+#define GL_SLUMINANCE8 0x8C47
-+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
-+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+#endif
-+#endif /* GL_VERSION_2_1 */
-+
-+#ifndef GL_VERSION_3_0
-+#define GL_VERSION_3_0 1
-+typedef unsigned short GLhalf;
-+#define GL_COMPARE_REF_TO_TEXTURE 0x884E
-+#define GL_CLIP_DISTANCE0 0x3000
-+#define GL_CLIP_DISTANCE1 0x3001
-+#define GL_CLIP_DISTANCE2 0x3002
-+#define GL_CLIP_DISTANCE3 0x3003
-+#define GL_CLIP_DISTANCE4 0x3004
-+#define GL_CLIP_DISTANCE5 0x3005
-+#define GL_CLIP_DISTANCE6 0x3006
-+#define GL_CLIP_DISTANCE7 0x3007
-+#define GL_MAX_CLIP_DISTANCES 0x0D32
-+#define GL_MAJOR_VERSION 0x821B
-+#define GL_MINOR_VERSION 0x821C
-+#define GL_NUM_EXTENSIONS 0x821D
-+#define GL_CONTEXT_FLAGS 0x821E
-+#define GL_COMPRESSED_RED 0x8225
-+#define GL_COMPRESSED_RG 0x8226
-+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
-+#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_CLAMP_READ_COLOR 0x891C
-+#define GL_FIXED_ONLY 0x891D
-+#define GL_MAX_VARYING_COMPONENTS 0x8B4B
-+#define GL_TEXTURE_1D_ARRAY 0x8C18
-+#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
-+#define GL_TEXTURE_2D_ARRAY 0x8C1A
-+#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
-+#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
-+#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_TEXTURE_SHARED_SIZE 0x8C3F
-+#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_PRIMITIVES_GENERATED 0x8C87
-+#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_GREEN_INTEGER 0x8D95
-+#define GL_BLUE_INTEGER 0x8D96
-+#define GL_RGB_INTEGER 0x8D98
-+#define GL_RGBA_INTEGER 0x8D99
-+#define GL_BGR_INTEGER 0x8D9A
-+#define GL_BGRA_INTEGER 0x8D9B
-+#define GL_SAMPLER_1D_ARRAY 0x8DC0
-+#define GL_SAMPLER_2D_ARRAY 0x8DC1
-+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
-+#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_1D 0x8DC9
-+#define GL_INT_SAMPLER_2D 0x8DCA
-+#define GL_INT_SAMPLER_3D 0x8DCB
-+#define GL_INT_SAMPLER_CUBE 0x8DCC
-+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
-+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
-+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
-+#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_1D_ARRAY 0x8DD6
-+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
-+#define GL_QUERY_WAIT 0x8E13
-+#define GL_QUERY_NO_WAIT 0x8E14
-+#define GL_QUERY_BY_REGION_WAIT 0x8E15
-+#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
-+#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_INVALID_FRAMEBUFFER_OPERATION 0x0506
-+#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_MAX_RENDERBUFFER_SIZE 0x84E8
-+#define GL_DEPTH_STENCIL 0x84F9
-+#define GL_UNSIGNED_INT_24_8 0x84FA
-+#define GL_DEPTH24_STENCIL8 0x88F0
-+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
-+#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_UNSIGNED_NORMALIZED 0x8C17
-+#define GL_FRAMEBUFFER_BINDING 0x8CA6
-+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-+#define GL_RENDERBUFFER_BINDING 0x8CA7
-+#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_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_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
-+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
-+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
-+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
-+#define GL_COLOR_ATTACHMENT0 0x8CE0
-+#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_COLOR_ATTACHMENT16 0x8CF0
-+#define GL_COLOR_ATTACHMENT17 0x8CF1
-+#define GL_COLOR_ATTACHMENT18 0x8CF2
-+#define GL_COLOR_ATTACHMENT19 0x8CF3
-+#define GL_COLOR_ATTACHMENT20 0x8CF4
-+#define GL_COLOR_ATTACHMENT21 0x8CF5
-+#define GL_COLOR_ATTACHMENT22 0x8CF6
-+#define GL_COLOR_ATTACHMENT23 0x8CF7
-+#define GL_COLOR_ATTACHMENT24 0x8CF8
-+#define GL_COLOR_ATTACHMENT25 0x8CF9
-+#define GL_COLOR_ATTACHMENT26 0x8CFA
-+#define GL_COLOR_ATTACHMENT27 0x8CFB
-+#define GL_COLOR_ATTACHMENT28 0x8CFC
-+#define GL_COLOR_ATTACHMENT29 0x8CFD
-+#define GL_COLOR_ATTACHMENT30 0x8CFE
-+#define GL_COLOR_ATTACHMENT31 0x8CFF
-+#define GL_DEPTH_ATTACHMENT 0x8D00
-+#define GL_STENCIL_ATTACHMENT 0x8D20
-+#define GL_FRAMEBUFFER 0x8D40
-+#define GL_RENDERBUFFER 0x8D41
-+#define GL_RENDERBUFFER_WIDTH 0x8D42
-+#define GL_RENDERBUFFER_HEIGHT 0x8D43
-+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-+#define GL_STENCIL_INDEX1 0x8D46
-+#define GL_STENCIL_INDEX4 0x8D47
-+#define GL_STENCIL_INDEX8 0x8D48
-+#define GL_STENCIL_INDEX16 0x8D49
-+#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_INCOMPLETE_MULTISAMPLE 0x8D56
-+#define GL_MAX_SAMPLES 0x8D57
-+#define GL_INDEX 0x8222
-+#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
-+#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
-+#define GL_FRAMEBUFFER_SRGB 0x8DB9
-+#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_COMPRESSED_RED_RGTC1 0x8DBB
-+#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-+#define GL_COMPRESSED_RG_RGTC2 0x8DBD
-+#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-+#define GL_RG 0x8227
-+#define GL_RG_INTEGER 0x8228
-+#define GL_R8 0x8229
-+#define GL_R16 0x822A
-+#define GL_RG8 0x822B
-+#define GL_RG16 0x822C
-+#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_CLAMP_VERTEX_COLOR 0x891A
-+#define GL_CLAMP_FRAGMENT_COLOR 0x891B
-+#define GL_ALPHA_INTEGER 0x8D97
-+typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
-+typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
-+typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
-+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
-+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
-+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
-+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-+typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
-+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
-+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
-+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
-+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
-+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
-+GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
-+GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
-+GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
-+GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
-+GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-+GLAPI void APIENTRY glEndTransformFeedback (void);
-+GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
-+GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
-+GLAPI void APIENTRY glEndConditionalRender (void);
-+GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
-+GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
-+GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
-+GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
-+GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
-+GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
-+GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
-+GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
-+GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
-+GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
-+GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-+GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
-+GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-+GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-+GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-+GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-+GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
-+GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-+GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-+GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-+GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
-+GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGenerateMipmap (GLenum target);
-+GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glBindVertexArray (GLuint array);
-+GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
-+GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
-+GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
-+#endif
-+#endif /* GL_VERSION_3_0 */
-+
-+#ifndef GL_VERSION_3_1
-+#define GL_VERSION_3_1 1
-+#define GL_SAMPLER_2D_RECT 0x8B63
-+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
-+#define GL_SAMPLER_BUFFER 0x8DC2
-+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
-+#define GL_INT_SAMPLER_BUFFER 0x8DD0
-+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
-+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
-+#define GL_TEXTURE_BUFFER 0x8C2A
-+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
-+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
-+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
-+#define GL_TEXTURE_RECTANGLE 0x84F5
-+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
-+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
-+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
-+#define GL_R8_SNORM 0x8F94
-+#define GL_RG8_SNORM 0x8F95
-+#define GL_RGB8_SNORM 0x8F96
-+#define GL_RGBA8_SNORM 0x8F97
-+#define GL_R16_SNORM 0x8F98
-+#define GL_RG16_SNORM 0x8F99
-+#define GL_RGB16_SNORM 0x8F9A
-+#define GL_RGBA16_SNORM 0x8F9B
-+#define GL_SIGNED_NORMALIZED 0x8F9C
-+#define GL_PRIMITIVE_RESTART 0x8F9D
-+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
-+#define GL_COPY_READ_BUFFER 0x8F36
-+#define GL_COPY_WRITE_BUFFER 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_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
-+#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_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
-+#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_GEOMETRY_SHADER 0x8A45
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
-+#define GL_INVALID_INDEX 0xFFFFFFFFu
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-+typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-+typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
-+GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
-+GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
-+GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
-+GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
-+GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
-+GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
-+GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-+#endif
-+#endif /* GL_VERSION_3_1 */
-+
-+#ifndef GL_VERSION_3_2
-+#define GL_VERSION_3_2 1
-+typedef struct __GLsync *GLsync;
-+#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__) && __STDC_VERSION__ >= 199901L
-+#include <inttypes.h>
-+#elif defined(__sun__) || defined(__digital__)
-+#include <inttypes.h>
-+#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 <inttypes.h>
-+#elif defined(__SCO__) || defined(__USLC__)
-+#include <stdint.h>
-+#elif defined(__UNIXOS2__) || defined(__SOL64__)
-+typedef long int int32_t;
-+typedef long long int int64_t;
-+typedef unsigned long long int uint64_t;
-+#elif defined(_WIN32) && defined(__GNUC__)
-+#include <stdint.h>
-+#elif defined(_WIN32)
-+typedef __int32 int32_t;
-+typedef __int64 int64_t;
-+typedef unsigned __int64 uint64_t;
-+#else
-+/* Fallback if nothing above works */
-+#include <inttypes.h>
-+#endif
-+#endif
-+typedef uint64_t GLuint64;
-+typedef int64_t GLint64;
-+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
-+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
-+#define GL_LINES_ADJACENCY 0x000A
-+#define GL_LINE_STRIP_ADJACENCY 0x000B
-+#define GL_TRIANGLES_ADJACENCY 0x000C
-+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
-+#define GL_PROGRAM_POINT_SIZE 0x8642
-+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
-+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
-+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
-+#define GL_GEOMETRY_SHADER 0x8DD9
-+#define GL_GEOMETRY_VERTICES_OUT 0x8916
-+#define GL_GEOMETRY_INPUT_TYPE 0x8917
-+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
-+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
-+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
-+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
-+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
-+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
-+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
-+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
-+#define GL_CONTEXT_PROFILE_MASK 0x9126
-+#define GL_DEPTH_CLAMP 0x864F
-+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
-+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
-+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
-+#define GL_PROVOKING_VERTEX 0x8E4F
-+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
-+#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_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-+#define GL_SAMPLE_POSITION 0x8E50
-+#define GL_SAMPLE_MASK 0x8E51
-+#define GL_SAMPLE_MASK_VALUE 0x8E52
-+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
-+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
-+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
-+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
-+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
-+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
-+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
-+#define GL_TEXTURE_SAMPLES 0x9106
-+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
-+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
-+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
-+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
-+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
-+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
-+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
-+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
-+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
-+#define GL_MAX_INTEGER_SAMPLES 0x9110
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
-+typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
-+typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
-+typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
-+typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
-+typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
-+typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
-+GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
-+GLAPI void APIENTRY glProvokingVertex (GLenum mode);
-+GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-+GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
-+GLAPI void APIENTRY glDeleteSync (GLsync sync);
-+GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-+GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
-+GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
-+GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
-+GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
-+#endif
-+#endif /* GL_VERSION_3_2 */
-+
-+#ifndef GL_VERSION_3_3
-+#define GL_VERSION_3_3 1
-+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
-+#define GL_SRC1_COLOR 0x88F9
-+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
-+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
-+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
-+#define GL_ANY_SAMPLES_PASSED 0x8C2F
-+#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_TEXTURE_SWIZZLE_RGBA 0x8E46
-+#define GL_TIME_ELAPSED 0x88BF
-+#define GL_TIMESTAMP 0x8E28
-+#define GL_INT_2_10_10_10_REV 0x8D9F
-+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
-+typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
-+typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
-+typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
-+typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
-+typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
-+typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
-+typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
-+typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
-+typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
-+typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
-+typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
-+GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
-+GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
-+GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
-+GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-+GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-+GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
-+GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
-+GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
-+GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
-+GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-+GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
-+GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
-+GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
-+GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
-+GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
-+GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
-+GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
-+GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
-+GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
-+GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
-+GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
-+GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
-+GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
-+GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
-+GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
-+GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
-+GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
-+GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
-+GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
-+GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
-+GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
-+GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
-+GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
-+GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
-+#endif
-+#endif /* GL_VERSION_3_3 */
-+
-+#ifndef GL_VERSION_4_0
-+#define GL_VERSION_4_0 1
-+#define GL_SAMPLE_SHADING 0x8C36
-+#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
-+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
-+#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
-+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
-+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
-+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
-+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
-+#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
-+#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
-+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
-+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
-+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
-+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
-+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
-+#define GL_MAX_VERTEX_STREAMS 0x8E71
-+#define GL_DOUBLE_VEC2 0x8FFC
-+#define GL_DOUBLE_VEC3 0x8FFD
-+#define GL_DOUBLE_VEC4 0x8FFE
-+#define GL_DOUBLE_MAT2 0x8F46
-+#define GL_DOUBLE_MAT3 0x8F47
-+#define GL_DOUBLE_MAT4 0x8F48
-+#define GL_DOUBLE_MAT2x3 0x8F49
-+#define GL_DOUBLE_MAT2x4 0x8F4A
-+#define GL_DOUBLE_MAT3x2 0x8F4B
-+#define GL_DOUBLE_MAT3x4 0x8F4C
-+#define GL_DOUBLE_MAT4x2 0x8F4D
-+#define GL_DOUBLE_MAT4x3 0x8F4E
-+#define GL_ACTIVE_SUBROUTINES 0x8DE5
-+#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
-+#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
-+#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
-+#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
-+#define GL_MAX_SUBROUTINES 0x8DE7
-+#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
-+#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
-+#define GL_COMPATIBLE_SUBROUTINES 0x8E4B
-+#define GL_PATCHES 0x000E
-+#define GL_PATCH_VERTICES 0x8E72
-+#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
-+#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
-+#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
-+#define GL_TESS_GEN_MODE 0x8E76
-+#define GL_TESS_GEN_SPACING 0x8E77
-+#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
-+#define GL_TESS_GEN_POINT_MODE 0x8E79
-+#define GL_ISOLINES 0x8E7A
-+#define GL_FRACTIONAL_ODD 0x8E7B
-+#define GL_FRACTIONAL_EVEN 0x8E7C
-+#define GL_MAX_PATCH_VERTICES 0x8E7D
-+#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
-+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
-+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
-+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
-+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
-+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
-+#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
-+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
-+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
-+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
-+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
-+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
-+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
-+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
-+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
-+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
-+#define GL_TESS_EVALUATION_SHADER 0x8E87
-+#define GL_TESS_CONTROL_SHADER 0x8E88
-+#define GL_TRANSFORM_FEEDBACK 0x8E22
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
-+#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
-+#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
-+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
-+typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
-+typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
-+typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-+typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
-+typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-+typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
-+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
-+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
-+typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
-+typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMinSampleShading (GLfloat value);
-+GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
-+GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
-+GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
-+GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
-+GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
-+GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
-+GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
-+GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
-+GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
-+GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
-+GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
-+GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
-+GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
-+GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
-+GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-+GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
-+GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
-+GLAPI void APIENTRY glPauseTransformFeedback (void);
-+GLAPI void APIENTRY glResumeTransformFeedback (void);
-+GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
-+GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
-+GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
-+GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
-+GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_VERSION_4_0 */
-+
-+#ifndef GL_VERSION_4_1
-+#define GL_VERSION_4_1 1
-+#define GL_FIXED 0x140C
-+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-+#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_SHADER_COMPILER 0x8DFA
-+#define GL_SHADER_BINARY_FORMATS 0x8DF8
-+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-+#define GL_MAX_VARYING_VECTORS 0x8DFC
-+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-+#define GL_RGB565 0x8D62
-+#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_VERTEX_SHADER_BIT 0x00000001
-+#define GL_FRAGMENT_SHADER_BIT 0x00000002
-+#define GL_GEOMETRY_SHADER_BIT 0x00000004
-+#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
-+#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
-+#define GL_ALL_SHADER_BITS 0xFFFFFFFF
-+#define GL_PROGRAM_SEPARABLE 0x8258
-+#define GL_ACTIVE_PROGRAM 0x8259
-+#define GL_PROGRAM_PIPELINE_BINDING 0x825A
-+#define GL_MAX_VIEWPORTS 0x825B
-+#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
-+#define GL_VIEWPORT_BOUNDS_RANGE 0x825D
-+#define GL_LAYER_PROVOKING_VERTEX 0x825E
-+#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
-+#define GL_UNDEFINED_VERTEX 0x8260
-+typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
-+typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-+typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
-+typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
-+typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-+typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-+typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
-+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
-+typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
-+typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
-+typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
-+typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glReleaseShaderCompiler (void);
-+GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-+GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-+GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-+GLAPI void APIENTRY glClearDepthf (GLfloat d);
-+GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-+GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
-+GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-+GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
-+GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
-+GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
-+GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
-+GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
-+GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
-+GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
-+GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
-+GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
-+GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
-+GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
-+GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
-+GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
-+GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-+GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
-+GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
-+GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
-+GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
-+GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
-+#endif
-+#endif /* GL_VERSION_4_1 */
-+
-+#ifndef GL_VERSION_4_2
-+#define GL_VERSION_4_2 1
-+#define GL_COPY_READ_BUFFER_BINDING 0x8F36
-+#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
-+#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
-+#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
-+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
-+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
-+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
-+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
-+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
-+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
-+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
-+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
-+#define GL_NUM_SAMPLE_COUNTS 0x9380
-+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
-+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
-+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
-+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
-+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
-+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
-+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
-+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
-+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
-+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
-+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
-+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
-+#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_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
-+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
-+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
-+#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_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
-+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
-+#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_MAX_IMAGE_UNITS 0x8F38
-+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
-+#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_1D 0x904C
-+#define GL_IMAGE_2D 0x904D
-+#define GL_IMAGE_3D 0x904E
-+#define GL_IMAGE_2D_RECT 0x904F
-+#define GL_IMAGE_CUBE 0x9050
-+#define GL_IMAGE_BUFFER 0x9051
-+#define GL_IMAGE_1D_ARRAY 0x9052
-+#define GL_IMAGE_2D_ARRAY 0x9053
-+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
-+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
-+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
-+#define GL_INT_IMAGE_1D 0x9057
-+#define GL_INT_IMAGE_2D 0x9058
-+#define GL_INT_IMAGE_3D 0x9059
-+#define GL_INT_IMAGE_2D_RECT 0x905A
-+#define GL_INT_IMAGE_CUBE 0x905B
-+#define GL_INT_IMAGE_BUFFER 0x905C
-+#define GL_INT_IMAGE_1D_ARRAY 0x905D
-+#define GL_INT_IMAGE_2D_ARRAY 0x905E
-+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
-+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
-+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
-+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
-+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
-+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
-+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
-+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
-+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
-+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
-+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
-+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
-+#define GL_MAX_IMAGE_SAMPLES 0x906D
-+#define GL_IMAGE_BINDING_FORMAT 0x906E
-+#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_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
-+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
-+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
-+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
-+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
-+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
-+#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
-+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
-+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
-+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
-+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-+typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-+typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
-+GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
-+GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
-+GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
-+GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
-+GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
-+#endif
-+#endif /* GL_VERSION_4_2 */
-+
-+#ifndef GL_VERSION_4_3
-+#define GL_VERSION_4_3 1
-+typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-+#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
-+#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
-+#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_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_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
-+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
-+#define GL_MAX_ELEMENT_INDEX 0x8D6B
-+#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_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
-+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
-+#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
-+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
-+#define GL_COMPUTE_SHADER_BIT 0x00000020
-+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
-+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
-+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
-+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
-+#define GL_DEBUG_SOURCE_API 0x8246
-+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
-+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
-+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
-+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
-+#define GL_DEBUG_SOURCE_OTHER 0x824B
-+#define GL_DEBUG_TYPE_ERROR 0x824C
-+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
-+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
-+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
-+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
-+#define GL_DEBUG_TYPE_OTHER 0x8251
-+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
-+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
-+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
-+#define GL_DEBUG_SEVERITY_HIGH 0x9146
-+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
-+#define GL_DEBUG_SEVERITY_LOW 0x9148
-+#define GL_DEBUG_TYPE_MARKER 0x8268
-+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
-+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
-+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
-+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
-+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
-+#define GL_BUFFER 0x82E0
-+#define GL_SHADER 0x82E1
-+#define GL_PROGRAM 0x82E2
-+#define GL_QUERY 0x82E3
-+#define GL_PROGRAM_PIPELINE 0x82E4
-+#define GL_SAMPLER 0x82E6
-+#define GL_MAX_LABEL_LENGTH 0x82E8
-+#define GL_DEBUG_OUTPUT 0x92E0
-+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
-+#define GL_MAX_UNIFORM_LOCATIONS 0x826E
-+#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
-+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
-+#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
-+#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_LAYERS 0x9317
-+#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
-+#define GL_INTERNALFORMAT_SUPPORTED 0x826F
-+#define GL_INTERNALFORMAT_PREFERRED 0x8270
-+#define GL_INTERNALFORMAT_RED_SIZE 0x8271
-+#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
-+#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
-+#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
-+#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
-+#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
-+#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
-+#define GL_INTERNALFORMAT_RED_TYPE 0x8278
-+#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
-+#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
-+#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
-+#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
-+#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
-+#define GL_MAX_WIDTH 0x827E
-+#define GL_MAX_HEIGHT 0x827F
-+#define GL_MAX_DEPTH 0x8280
-+#define GL_MAX_LAYERS 0x8281
-+#define GL_MAX_COMBINED_DIMENSIONS 0x8282
-+#define GL_COLOR_COMPONENTS 0x8283
-+#define GL_DEPTH_COMPONENTS 0x8284
-+#define GL_STENCIL_COMPONENTS 0x8285
-+#define GL_COLOR_RENDERABLE 0x8286
-+#define GL_DEPTH_RENDERABLE 0x8287
-+#define GL_STENCIL_RENDERABLE 0x8288
-+#define GL_FRAMEBUFFER_RENDERABLE 0x8289
-+#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
-+#define GL_FRAMEBUFFER_BLEND 0x828B
-+#define GL_READ_PIXELS 0x828C
-+#define GL_READ_PIXELS_FORMAT 0x828D
-+#define GL_READ_PIXELS_TYPE 0x828E
-+#define GL_TEXTURE_IMAGE_FORMAT 0x828F
-+#define GL_TEXTURE_IMAGE_TYPE 0x8290
-+#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
-+#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
-+#define GL_MIPMAP 0x8293
-+#define GL_MANUAL_GENERATE_MIPMAP 0x8294
-+#define GL_AUTO_GENERATE_MIPMAP 0x8295
-+#define GL_COLOR_ENCODING 0x8296
-+#define GL_SRGB_READ 0x8297
-+#define GL_SRGB_WRITE 0x8298
-+#define GL_FILTER 0x829A
-+#define GL_VERTEX_TEXTURE 0x829B
-+#define GL_TESS_CONTROL_TEXTURE 0x829C
-+#define GL_TESS_EVALUATION_TEXTURE 0x829D
-+#define GL_GEOMETRY_TEXTURE 0x829E
-+#define GL_FRAGMENT_TEXTURE 0x829F
-+#define GL_COMPUTE_TEXTURE 0x82A0
-+#define GL_TEXTURE_SHADOW 0x82A1
-+#define GL_TEXTURE_GATHER 0x82A2
-+#define GL_TEXTURE_GATHER_SHADOW 0x82A3
-+#define GL_SHADER_IMAGE_LOAD 0x82A4
-+#define GL_SHADER_IMAGE_STORE 0x82A5
-+#define GL_SHADER_IMAGE_ATOMIC 0x82A6
-+#define GL_IMAGE_TEXEL_SIZE 0x82A7
-+#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
-+#define GL_IMAGE_PIXEL_FORMAT 0x82A9
-+#define GL_IMAGE_PIXEL_TYPE 0x82AA
-+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
-+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
-+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
-+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
-+#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
-+#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
-+#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
-+#define GL_CLEAR_BUFFER 0x82B4
-+#define GL_TEXTURE_VIEW 0x82B5
-+#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
-+#define GL_FULL_SUPPORT 0x82B7
-+#define GL_CAVEAT_SUPPORT 0x82B8
-+#define GL_IMAGE_CLASS_4_X_32 0x82B9
-+#define GL_IMAGE_CLASS_2_X_32 0x82BA
-+#define GL_IMAGE_CLASS_1_X_32 0x82BB
-+#define GL_IMAGE_CLASS_4_X_16 0x82BC
-+#define GL_IMAGE_CLASS_2_X_16 0x82BD
-+#define GL_IMAGE_CLASS_1_X_16 0x82BE
-+#define GL_IMAGE_CLASS_4_X_8 0x82BF
-+#define GL_IMAGE_CLASS_2_X_8 0x82C0
-+#define GL_IMAGE_CLASS_1_X_8 0x82C1
-+#define GL_IMAGE_CLASS_11_11_10 0x82C2
-+#define GL_IMAGE_CLASS_10_10_10_2 0x82C3
-+#define GL_VIEW_CLASS_128_BITS 0x82C4
-+#define GL_VIEW_CLASS_96_BITS 0x82C5
-+#define GL_VIEW_CLASS_64_BITS 0x82C6
-+#define GL_VIEW_CLASS_48_BITS 0x82C7
-+#define GL_VIEW_CLASS_32_BITS 0x82C8
-+#define GL_VIEW_CLASS_24_BITS 0x82C9
-+#define GL_VIEW_CLASS_16_BITS 0x82CA
-+#define GL_VIEW_CLASS_8_BITS 0x82CB
-+#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
-+#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
-+#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
-+#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
-+#define GL_VIEW_CLASS_RGTC1_RED 0x82D0
-+#define GL_VIEW_CLASS_RGTC2_RG 0x82D1
-+#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
-+#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
-+#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_VERTEX_SUBROUTINE 0x92E8
-+#define GL_TESS_CONTROL_SUBROUTINE 0x92E9
-+#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
-+#define GL_GEOMETRY_SUBROUTINE 0x92EB
-+#define GL_FRAGMENT_SUBROUTINE 0x92EC
-+#define GL_COMPUTE_SUBROUTINE 0x92ED
-+#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
-+#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
-+#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
-+#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
-+#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
-+#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
-+#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_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
-+#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_TESS_CONTROL_SHADER 0x9307
-+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
-+#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
-+#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_LOCATION_INDEX 0x930F
-+#define GL_IS_PER_PATCH 0x92E7
-+#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_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
-+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
-+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
-+#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_TEXTURE_BUFFER_OFFSET 0x919D
-+#define GL_TEXTURE_BUFFER_SIZE 0x919E
-+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
-+#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
-+#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
-+#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
-+#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
-+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-+#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_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
-+#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
-+#define GL_VERTEX_BINDING_BUFFER 0x8F4F
-+#define GL_DISPLAY_LIST 0x82E7
-+typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
-+typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (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);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-+typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-+typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-+typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
-+typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-+typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-+typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
-+typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
-+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-+typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
-+typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-+typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-+typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
-+typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
-+GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
-+GLAPI void APIENTRY glCopyImageSubData (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);
-+GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
-+GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
-+GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
-+GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-+GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
-+GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
-+GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
-+GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
-+GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
-+GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
-+GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
-+GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-+GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
-+GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
-+GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
-+GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-+GLAPI void APIENTRY glPopDebugGroup (void);
-+GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-+GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-+GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
-+GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#endif
-+#endif /* GL_VERSION_4_3 */
-+
-+#ifndef GL_VERSION_4_4
-+#define GL_VERSION_4_4 1
-+#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
-+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
-+#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
-+#define GL_MAP_PERSISTENT_BIT 0x0040
-+#define GL_MAP_COHERENT_BIT 0x0080
-+#define GL_DYNAMIC_STORAGE_BIT 0x0100
-+#define GL_CLIENT_STORAGE_BIT 0x0200
-+#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
-+#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
-+#define GL_BUFFER_STORAGE_FLAGS 0x8220
-+#define GL_CLEAR_TEXTURE 0x9365
-+#define GL_LOCATION_COMPONENT 0x934A
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
-+#define GL_QUERY_BUFFER 0x9192
-+#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
-+#define GL_QUERY_BUFFER_BINDING 0x9193
-+#define GL_QUERY_RESULT_NO_WAIT 0x9194
-+#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
-+typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-+typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-+typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
-+typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
-+GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
-+GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
-+GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
-+GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
-+GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
-+GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+#endif
-+#endif /* GL_VERSION_4_4 */
-+
-+#ifndef GL_VERSION_4_5
-+#define GL_VERSION_4_5 1
-+#define GL_CONTEXT_LOST 0x0507
-+#define GL_NEGATIVE_ONE_TO_ONE 0x935E
-+#define GL_ZERO_TO_ONE 0x935F
-+#define GL_CLIP_ORIGIN 0x935C
-+#define GL_CLIP_DEPTH_MODE 0x935D
-+#define GL_QUERY_WAIT_INVERTED 0x8E17
-+#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
-+#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
-+#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
-+#define GL_MAX_CULL_DISTANCES 0x82F9
-+#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
-+#define GL_TEXTURE_TARGET 0x1006
-+#define GL_QUERY_TARGET 0x82EA
-+#define GL_GUILTY_CONTEXT_RESET 0x8253
-+#define GL_INNOCENT_CONTEXT_RESET 0x8254
-+#define GL_UNKNOWN_CONTEXT_RESET 0x8255
-+#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
-+#define GL_LOSE_CONTEXT_ON_RESET 0x8252
-+#define GL_NO_RESET_NOTIFICATION 0x8261
-+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
-+#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
-+#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
-+typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
-+typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
-+typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-+typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src);
-+typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
-+typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
-+typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
-+typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
-+typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
-+typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers);
-+typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
-+typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
-+typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
-+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
-+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+typedef void (APIENTRYP PFNGLGETNMAPDVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-+typedef void (APIENTRYP PFNGLGETNMAPFVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-+typedef void (APIENTRYP PFNGLGETNMAPIVPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC) (GLenum map, GLsizei bufSize, GLuint *values);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC) (GLenum map, GLsizei bufSize, GLushort *values);
-+typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC) (GLsizei bufSize, GLubyte *pattern);
-+typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-+typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-+typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-+typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+typedef void (APIENTRYP PFNGLGETNMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth);
-+GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param);
-+GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
-+GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers);
-+GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-+GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-+GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access);
-+GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
-+GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params);
-+GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-+GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers);
-+GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param);
-+GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf);
-+GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src);
-+GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
-+GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
-+GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
-+GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
-+GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil);
-+GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target);
-+GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers);
-+GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures);
-+GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
-+GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param);
-+GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param);
-+GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture);
-+GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture);
-+GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays);
-+GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer);
-+GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
-+GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
-+GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers);
-+GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines);
-+GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
-+GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
-+GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
-+GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void);
-+GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
-+GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+GLAPI void APIENTRY glGetnMapdv (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-+GLAPI void APIENTRY glGetnMapfv (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-+GLAPI void APIENTRY glGetnMapiv (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-+GLAPI void APIENTRY glGetnPixelMapfv (GLenum map, GLsizei bufSize, GLfloat *values);
-+GLAPI void APIENTRY glGetnPixelMapuiv (GLenum map, GLsizei bufSize, GLuint *values);
-+GLAPI void APIENTRY glGetnPixelMapusv (GLenum map, GLsizei bufSize, GLushort *values);
-+GLAPI void APIENTRY glGetnPolygonStipple (GLsizei bufSize, GLubyte *pattern);
-+GLAPI void APIENTRY glGetnColorTable (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-+GLAPI void APIENTRY glGetnConvolutionFilter (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-+GLAPI void APIENTRY glGetnSeparableFilter (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-+GLAPI void APIENTRY glGetnHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+GLAPI void APIENTRY glGetnMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+GLAPI void APIENTRY glTextureBarrier (void);
-+#endif
-+#endif /* GL_VERSION_4_5 */
-+
-+#ifndef GL_ARB_ES2_compatibility
-+#define GL_ARB_ES2_compatibility 1
-+#endif /* GL_ARB_ES2_compatibility */
-+
-+#ifndef GL_ARB_ES3_1_compatibility
-+#define GL_ARB_ES3_1_compatibility 1
-+#endif /* GL_ARB_ES3_1_compatibility */
-+
-+#ifndef GL_ARB_ES3_2_compatibility
-+#define GL_ARB_ES3_2_compatibility 1
-+#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE
-+#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381
-+#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382
-+typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-+#endif
-+#endif /* GL_ARB_ES3_2_compatibility */
-+
-+#ifndef GL_ARB_ES3_compatibility
-+#define GL_ARB_ES3_compatibility 1
-+#endif /* GL_ARB_ES3_compatibility */
-+
-+#ifndef GL_ARB_arrays_of_arrays
-+#define GL_ARB_arrays_of_arrays 1
-+#endif /* GL_ARB_arrays_of_arrays */
-+
-+#ifndef GL_ARB_base_instance
-+#define GL_ARB_base_instance 1
-+#endif /* GL_ARB_base_instance */
-+
-+#ifndef GL_ARB_bindless_texture
-+#define GL_ARB_bindless_texture 1
-+typedef uint64_t GLuint64EXT;
-+#define GL_UNSIGNED_INT64_ARB 0x140F
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-+typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
-+GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
-+GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
-+GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
-+GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
-+GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
-+GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
-+GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
-+GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
-+GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
-+#endif
-+#endif /* GL_ARB_bindless_texture */
-+
-+#ifndef GL_ARB_blend_func_extended
-+#define GL_ARB_blend_func_extended 1
-+#endif /* GL_ARB_blend_func_extended */
-+
-+#ifndef GL_ARB_buffer_storage
-+#define GL_ARB_buffer_storage 1
-+#endif /* GL_ARB_buffer_storage */
-+
-+#ifndef GL_ARB_cl_event
-+#define GL_ARB_cl_event 1
-+struct _cl_context;
-+struct _cl_event;
-+#define GL_SYNC_CL_EVENT_ARB 0x8240
-+#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
-+typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
-+#endif
-+#endif /* GL_ARB_cl_event */
-+
-+#ifndef GL_ARB_clear_buffer_object
-+#define GL_ARB_clear_buffer_object 1
-+#endif /* GL_ARB_clear_buffer_object */
-+
-+#ifndef GL_ARB_clear_texture
-+#define GL_ARB_clear_texture 1
-+#endif /* GL_ARB_clear_texture */
-+
-+#ifndef GL_ARB_clip_control
-+#define GL_ARB_clip_control 1
-+#endif /* GL_ARB_clip_control */
-+
-+#ifndef GL_ARB_color_buffer_float
-+#define GL_ARB_color_buffer_float 1
-+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
-+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
-+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
-+#define GL_CLAMP_READ_COLOR_ARB 0x891C
-+#define GL_FIXED_ONLY_ARB 0x891D
-+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
-+#endif
-+#endif /* GL_ARB_color_buffer_float */
-+
-+#ifndef GL_ARB_compatibility
-+#define GL_ARB_compatibility 1
-+#endif /* GL_ARB_compatibility */
-+
-+#ifndef GL_ARB_compressed_texture_pixel_storage
-+#define GL_ARB_compressed_texture_pixel_storage 1
-+#endif /* GL_ARB_compressed_texture_pixel_storage */
-+
-+#ifndef GL_ARB_compute_shader
-+#define GL_ARB_compute_shader 1
-+#endif /* GL_ARB_compute_shader */
-+
-+#ifndef GL_ARB_compute_variable_group_size
-+#define GL_ARB_compute_variable_group_size 1
-+#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
-+#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
-+#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
-+#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
-+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
-+#endif
-+#endif /* GL_ARB_compute_variable_group_size */
-+
-+#ifndef GL_ARB_conditional_render_inverted
-+#define GL_ARB_conditional_render_inverted 1
-+#endif /* GL_ARB_conditional_render_inverted */
-+
-+#ifndef GL_ARB_conservative_depth
-+#define GL_ARB_conservative_depth 1
-+#endif /* GL_ARB_conservative_depth */
-+
-+#ifndef GL_ARB_copy_buffer
-+#define GL_ARB_copy_buffer 1
-+#endif /* GL_ARB_copy_buffer */
-+
-+#ifndef GL_ARB_copy_image
-+#define GL_ARB_copy_image 1
-+#endif /* GL_ARB_copy_image */
-+
-+#ifndef GL_ARB_cull_distance
-+#define GL_ARB_cull_distance 1
-+#endif /* GL_ARB_cull_distance */
-+
-+#ifndef GL_ARB_debug_output
-+#define GL_ARB_debug_output 1
-+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
-+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
-+#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
-+#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
-+#define GL_DEBUG_SOURCE_API_ARB 0x8246
-+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
-+#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
-+#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
-+#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
-+#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
-+#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
-+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
-+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
-+#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
-+#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
-+#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
-+#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
-+#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
-+#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
-+#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
-+#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
-+#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
-+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-+GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
-+GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-+#endif
-+#endif /* GL_ARB_debug_output */
-+
-+#ifndef GL_ARB_depth_buffer_float
-+#define GL_ARB_depth_buffer_float 1
-+#endif /* GL_ARB_depth_buffer_float */
-+
-+#ifndef GL_ARB_depth_clamp
-+#define GL_ARB_depth_clamp 1
-+#endif /* GL_ARB_depth_clamp */
-+
-+#ifndef GL_ARB_depth_texture
-+#define GL_ARB_depth_texture 1
-+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
-+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
-+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
-+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
-+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
-+#endif /* GL_ARB_depth_texture */
-+
-+#ifndef GL_ARB_derivative_control
-+#define GL_ARB_derivative_control 1
-+#endif /* GL_ARB_derivative_control */
-+
-+#ifndef GL_ARB_direct_state_access
-+#define GL_ARB_direct_state_access 1
-+#endif /* GL_ARB_direct_state_access */
-+
-+#ifndef GL_ARB_draw_buffers
-+#define GL_ARB_draw_buffers 1
-+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
-+#define GL_DRAW_BUFFER0_ARB 0x8825
-+#define GL_DRAW_BUFFER1_ARB 0x8826
-+#define GL_DRAW_BUFFER2_ARB 0x8827
-+#define GL_DRAW_BUFFER3_ARB 0x8828
-+#define GL_DRAW_BUFFER4_ARB 0x8829
-+#define GL_DRAW_BUFFER5_ARB 0x882A
-+#define GL_DRAW_BUFFER6_ARB 0x882B
-+#define GL_DRAW_BUFFER7_ARB 0x882C
-+#define GL_DRAW_BUFFER8_ARB 0x882D
-+#define GL_DRAW_BUFFER9_ARB 0x882E
-+#define GL_DRAW_BUFFER10_ARB 0x882F
-+#define GL_DRAW_BUFFER11_ARB 0x8830
-+#define GL_DRAW_BUFFER12_ARB 0x8831
-+#define GL_DRAW_BUFFER13_ARB 0x8832
-+#define GL_DRAW_BUFFER14_ARB 0x8833
-+#define GL_DRAW_BUFFER15_ARB 0x8834
-+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
-+#endif
-+#endif /* GL_ARB_draw_buffers */
-+
-+#ifndef GL_ARB_draw_buffers_blend
-+#define GL_ARB_draw_buffers_blend 1
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
-+GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
-+GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+#endif
-+#endif /* GL_ARB_draw_buffers_blend */
-+
-+#ifndef GL_ARB_draw_elements_base_vertex
-+#define GL_ARB_draw_elements_base_vertex 1
-+#endif /* GL_ARB_draw_elements_base_vertex */
-+
-+#ifndef GL_ARB_draw_indirect
-+#define GL_ARB_draw_indirect 1
-+#endif /* GL_ARB_draw_indirect */
-+
-+#ifndef GL_ARB_draw_instanced
-+#define GL_ARB_draw_instanced 1
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-+GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-+#endif
-+#endif /* GL_ARB_draw_instanced */
-+
-+#ifndef GL_ARB_enhanced_layouts
-+#define GL_ARB_enhanced_layouts 1
-+#endif /* GL_ARB_enhanced_layouts */
-+
-+#ifndef GL_ARB_explicit_attrib_location
-+#define GL_ARB_explicit_attrib_location 1
-+#endif /* GL_ARB_explicit_attrib_location */
-+
-+#ifndef GL_ARB_explicit_uniform_location
-+#define GL_ARB_explicit_uniform_location 1
-+#endif /* GL_ARB_explicit_uniform_location */
-+
-+#ifndef GL_ARB_fragment_coord_conventions
-+#define GL_ARB_fragment_coord_conventions 1
-+#endif /* GL_ARB_fragment_coord_conventions */
-+
-+#ifndef GL_ARB_fragment_layer_viewport
-+#define GL_ARB_fragment_layer_viewport 1
-+#endif /* GL_ARB_fragment_layer_viewport */
-+
-+#ifndef GL_ARB_fragment_program
-+#define GL_ARB_fragment_program 1
-+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
-+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
-+#define GL_PROGRAM_LENGTH_ARB 0x8627
-+#define GL_PROGRAM_FORMAT_ARB 0x8876
-+#define GL_PROGRAM_BINDING_ARB 0x8677
-+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
-+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
-+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
-+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
-+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
-+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
-+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
-+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
-+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
-+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
-+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
-+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
-+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
-+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
-+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
-+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
-+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
-+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
-+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
-+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
-+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
-+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
-+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
-+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
-+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
-+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
-+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
-+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
-+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
-+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
-+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
-+#define GL_PROGRAM_STRING_ARB 0x8628
-+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
-+#define GL_CURRENT_MATRIX_ARB 0x8641
-+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
-+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
-+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
-+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
-+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
-+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
-+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
-+#define GL_MATRIX0_ARB 0x88C0
-+#define GL_MATRIX1_ARB 0x88C1
-+#define GL_MATRIX2_ARB 0x88C2
-+#define GL_MATRIX3_ARB 0x88C3
-+#define GL_MATRIX4_ARB 0x88C4
-+#define GL_MATRIX5_ARB 0x88C5
-+#define GL_MATRIX6_ARB 0x88C6
-+#define GL_MATRIX7_ARB 0x88C7
-+#define GL_MATRIX8_ARB 0x88C8
-+#define GL_MATRIX9_ARB 0x88C9
-+#define GL_MATRIX10_ARB 0x88CA
-+#define GL_MATRIX11_ARB 0x88CB
-+#define GL_MATRIX12_ARB 0x88CC
-+#define GL_MATRIX13_ARB 0x88CD
-+#define GL_MATRIX14_ARB 0x88CE
-+#define GL_MATRIX15_ARB 0x88CF
-+#define GL_MATRIX16_ARB 0x88D0
-+#define GL_MATRIX17_ARB 0x88D1
-+#define GL_MATRIX18_ARB 0x88D2
-+#define GL_MATRIX19_ARB 0x88D3
-+#define GL_MATRIX20_ARB 0x88D4
-+#define GL_MATRIX21_ARB 0x88D5
-+#define GL_MATRIX22_ARB 0x88D6
-+#define GL_MATRIX23_ARB 0x88D7
-+#define GL_MATRIX24_ARB 0x88D8
-+#define GL_MATRIX25_ARB 0x88D9
-+#define GL_MATRIX26_ARB 0x88DA
-+#define GL_MATRIX27_ARB 0x88DB
-+#define GL_MATRIX28_ARB 0x88DC
-+#define GL_MATRIX29_ARB 0x88DD
-+#define GL_MATRIX30_ARB 0x88DE
-+#define GL_MATRIX31_ARB 0x88DF
-+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
-+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
-+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
-+GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
-+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
-+GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
-+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
-+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
-+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
-+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
-+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
-+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
-+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
-+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
-+GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
-+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
-+#endif
-+#endif /* GL_ARB_fragment_program */
-+
-+#ifndef GL_ARB_fragment_program_shadow
-+#define GL_ARB_fragment_program_shadow 1
-+#endif /* GL_ARB_fragment_program_shadow */
-+
-+#ifndef GL_ARB_fragment_shader
-+#define GL_ARB_fragment_shader 1
-+#define GL_FRAGMENT_SHADER_ARB 0x8B30
-+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
-+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
-+#endif /* GL_ARB_fragment_shader */
-+
-+#ifndef GL_ARB_fragment_shader_interlock
-+#define GL_ARB_fragment_shader_interlock 1
-+#endif /* GL_ARB_fragment_shader_interlock */
-+
-+#ifndef GL_ARB_framebuffer_no_attachments
-+#define GL_ARB_framebuffer_no_attachments 1
-+#endif /* GL_ARB_framebuffer_no_attachments */
-+
-+#ifndef GL_ARB_framebuffer_object
-+#define GL_ARB_framebuffer_object 1
-+#endif /* GL_ARB_framebuffer_object */
-+
-+#ifndef GL_ARB_framebuffer_sRGB
-+#define GL_ARB_framebuffer_sRGB 1
-+#endif /* GL_ARB_framebuffer_sRGB */
-+
-+#ifndef GL_ARB_geometry_shader4
-+#define GL_ARB_geometry_shader4 1
-+#define GL_LINES_ADJACENCY_ARB 0x000A
-+#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
-+#define GL_TRIANGLES_ADJACENCY_ARB 0x000C
-+#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
-+#define GL_PROGRAM_POINT_SIZE_ARB 0x8642
-+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
-+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
-+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
-+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
-+#define GL_GEOMETRY_SHADER_ARB 0x8DD9
-+#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
-+#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
-+#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
-+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
-+#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
-+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
-+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
-+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
-+GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+#endif
-+#endif /* GL_ARB_geometry_shader4 */
-+
-+#ifndef GL_ARB_get_program_binary
-+#define GL_ARB_get_program_binary 1
-+#endif /* GL_ARB_get_program_binary */
-+
-+#ifndef GL_ARB_get_texture_sub_image
-+#define GL_ARB_get_texture_sub_image 1
-+#endif /* GL_ARB_get_texture_sub_image */
-+
-+#ifndef GL_ARB_gpu_shader5
-+#define GL_ARB_gpu_shader5 1
-+#endif /* GL_ARB_gpu_shader5 */
-+
-+#ifndef GL_ARB_gpu_shader_fp64
-+#define GL_ARB_gpu_shader_fp64 1
-+#endif /* GL_ARB_gpu_shader_fp64 */
-+
-+#ifndef GL_ARB_gpu_shader_int64
-+#define GL_ARB_gpu_shader_int64 1
-+#define GL_INT64_ARB 0x140E
-+#define GL_INT64_VEC2_ARB 0x8FE9
-+#define GL_INT64_VEC3_ARB 0x8FEA
-+#define GL_INT64_VEC4_ARB 0x8FEB
-+#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5
-+#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6
-+#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7
-+typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x);
-+typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y);
-+typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z);
-+typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
-+typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x);
-+typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y);
-+typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
-+typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
-+typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x);
-+GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y);
-+GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z);
-+GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
-+GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x);
-+GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y);
-+GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
-+GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
-+GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params);
-+GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params);
-+GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params);
-+GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params);
-+GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x);
-+GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y);
-+GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z);
-+GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w);
-+GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value);
-+GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x);
-+GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y);
-+GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z);
-+GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w);
-+GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value);
-+#endif
-+#endif /* GL_ARB_gpu_shader_int64 */
-+
-+#ifndef GL_ARB_half_float_pixel
-+#define GL_ARB_half_float_pixel 1
-+typedef unsigned short GLhalfARB;
-+#define GL_HALF_FLOAT_ARB 0x140B
-+#endif /* GL_ARB_half_float_pixel */
-+
-+#ifndef GL_ARB_half_float_vertex
-+#define GL_ARB_half_float_vertex 1
-+#endif /* GL_ARB_half_float_vertex */
-+
-+#ifndef GL_ARB_imaging
-+#define GL_ARB_imaging 1
-+#define GL_BLEND_COLOR 0x8005
-+#define GL_BLEND_EQUATION 0x8009
-+#define GL_CONVOLUTION_1D 0x8010
-+#define GL_CONVOLUTION_2D 0x8011
-+#define GL_SEPARABLE_2D 0x8012
-+#define GL_CONVOLUTION_BORDER_MODE 0x8013
-+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-+#define GL_REDUCE 0x8016
-+#define GL_CONVOLUTION_FORMAT 0x8017
-+#define GL_CONVOLUTION_WIDTH 0x8018
-+#define GL_CONVOLUTION_HEIGHT 0x8019
-+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-+#define GL_HISTOGRAM 0x8024
-+#define GL_PROXY_HISTOGRAM 0x8025
-+#define GL_HISTOGRAM_WIDTH 0x8026
-+#define GL_HISTOGRAM_FORMAT 0x8027
-+#define GL_HISTOGRAM_RED_SIZE 0x8028
-+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-+#define GL_HISTOGRAM_SINK 0x802D
-+#define GL_MINMAX 0x802E
-+#define GL_MINMAX_FORMAT 0x802F
-+#define GL_MINMAX_SINK 0x8030
-+#define GL_TABLE_TOO_LARGE 0x8031
-+#define GL_COLOR_MATRIX 0x80B1
-+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
-+#define GL_COLOR_TABLE 0x80D0
-+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-+#define GL_PROXY_COLOR_TABLE 0x80D3
-+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-+#define GL_COLOR_TABLE_SCALE 0x80D6
-+#define GL_COLOR_TABLE_BIAS 0x80D7
-+#define GL_COLOR_TABLE_FORMAT 0x80D8
-+#define GL_COLOR_TABLE_WIDTH 0x80D9
-+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-+#define GL_CONSTANT_BORDER 0x8151
-+#define GL_REPLICATE_BORDER 0x8153
-+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-+GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
-+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-+GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-+GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
-+GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
-+GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
-+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-+GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-+GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-+GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
-+GLAPI void APIENTRY glResetHistogram (GLenum target);
-+GLAPI void APIENTRY glResetMinmax (GLenum target);
-+#endif
-+#endif /* GL_ARB_imaging */
-+
-+#ifndef GL_ARB_indirect_parameters
-+#define GL_ARB_indirect_parameters 1
-+#define GL_PARAMETER_BUFFER_ARB 0x80EE
-+#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
-+#endif
-+#endif /* GL_ARB_indirect_parameters */
-+
-+#ifndef GL_ARB_instanced_arrays
-+#define GL_ARB_instanced_arrays 1
-+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
-+#endif
-+#endif /* GL_ARB_instanced_arrays */
-+
-+#ifndef GL_ARB_internalformat_query
-+#define GL_ARB_internalformat_query 1
-+#endif /* GL_ARB_internalformat_query */
-+
-+#ifndef GL_ARB_internalformat_query2
-+#define GL_ARB_internalformat_query2 1
-+#define GL_SRGB_DECODE_ARB 0x8299
-+#endif /* GL_ARB_internalformat_query2 */
-+
-+#ifndef GL_ARB_invalidate_subdata
-+#define GL_ARB_invalidate_subdata 1
-+#endif /* GL_ARB_invalidate_subdata */
-+
-+#ifndef GL_ARB_map_buffer_alignment
-+#define GL_ARB_map_buffer_alignment 1
-+#endif /* GL_ARB_map_buffer_alignment */
-+
-+#ifndef GL_ARB_map_buffer_range
-+#define GL_ARB_map_buffer_range 1
-+#endif /* GL_ARB_map_buffer_range */
-+
-+#ifndef GL_ARB_matrix_palette
-+#define GL_ARB_matrix_palette 1
-+#define GL_MATRIX_PALETTE_ARB 0x8840
-+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
-+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
-+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
-+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
-+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
-+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
-+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
-+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
-+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
-+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
-+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
-+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
-+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
-+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
-+GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
-+GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
-+GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
-+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_ARB_matrix_palette */
-+
-+#ifndef GL_ARB_multi_bind
-+#define GL_ARB_multi_bind 1
-+#endif /* GL_ARB_multi_bind */
-+
-+#ifndef GL_ARB_multi_draw_indirect
-+#define GL_ARB_multi_draw_indirect 1
-+#endif /* GL_ARB_multi_draw_indirect */
-+
-+#ifndef GL_ARB_multisample
-+#define GL_ARB_multisample 1
-+#define GL_MULTISAMPLE_ARB 0x809D
-+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
-+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
-+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
-+#define GL_SAMPLES_ARB 0x80A9
-+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
-+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
-+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
-+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
-+#endif
-+#endif /* GL_ARB_multisample */
-+
-+#ifndef GL_ARB_multitexture
-+#define GL_ARB_multitexture 1
-+#define GL_TEXTURE0_ARB 0x84C0
-+#define GL_TEXTURE1_ARB 0x84C1
-+#define GL_TEXTURE2_ARB 0x84C2
-+#define GL_TEXTURE3_ARB 0x84C3
-+#define GL_TEXTURE4_ARB 0x84C4
-+#define GL_TEXTURE5_ARB 0x84C5
-+#define GL_TEXTURE6_ARB 0x84C6
-+#define GL_TEXTURE7_ARB 0x84C7
-+#define GL_TEXTURE8_ARB 0x84C8
-+#define GL_TEXTURE9_ARB 0x84C9
-+#define GL_TEXTURE10_ARB 0x84CA
-+#define GL_TEXTURE11_ARB 0x84CB
-+#define GL_TEXTURE12_ARB 0x84CC
-+#define GL_TEXTURE13_ARB 0x84CD
-+#define GL_TEXTURE14_ARB 0x84CE
-+#define GL_TEXTURE15_ARB 0x84CF
-+#define GL_TEXTURE16_ARB 0x84D0
-+#define GL_TEXTURE17_ARB 0x84D1
-+#define GL_TEXTURE18_ARB 0x84D2
-+#define GL_TEXTURE19_ARB 0x84D3
-+#define GL_TEXTURE20_ARB 0x84D4
-+#define GL_TEXTURE21_ARB 0x84D5
-+#define GL_TEXTURE22_ARB 0x84D6
-+#define GL_TEXTURE23_ARB 0x84D7
-+#define GL_TEXTURE24_ARB 0x84D8
-+#define GL_TEXTURE25_ARB 0x84D9
-+#define GL_TEXTURE26_ARB 0x84DA
-+#define GL_TEXTURE27_ARB 0x84DB
-+#define GL_TEXTURE28_ARB 0x84DC
-+#define GL_TEXTURE29_ARB 0x84DD
-+#define GL_TEXTURE30_ARB 0x84DE
-+#define GL_TEXTURE31_ARB 0x84DF
-+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
-+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
-+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
-+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
-+GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
-+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
-+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
-+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
-+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
-+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
-+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
-+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
-+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
-+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
-+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
-+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
-+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
-+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
-+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
-+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
-+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
-+#endif
-+#endif /* GL_ARB_multitexture */
-+
-+#ifndef GL_ARB_occlusion_query
-+#define GL_ARB_occlusion_query 1
-+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
-+#define GL_CURRENT_QUERY_ARB 0x8865
-+#define GL_QUERY_RESULT_ARB 0x8866
-+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
-+#define GL_SAMPLES_PASSED_ARB 0x8914
-+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
-+GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
-+GLAPI void APIENTRY glEndQueryARB (GLenum target);
-+GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
-+#endif
-+#endif /* GL_ARB_occlusion_query */
-+
-+#ifndef GL_ARB_occlusion_query2
-+#define GL_ARB_occlusion_query2 1
-+#endif /* GL_ARB_occlusion_query2 */
-+
-+#ifndef GL_ARB_parallel_shader_compile
-+#define GL_ARB_parallel_shader_compile 1
-+#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0
-+#define GL_COMPLETION_STATUS_ARB 0x91B1
-+typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count);
-+#endif
-+#endif /* GL_ARB_parallel_shader_compile */
-+
-+#ifndef GL_ARB_pipeline_statistics_query
-+#define GL_ARB_pipeline_statistics_query 1
-+#define GL_VERTICES_SUBMITTED_ARB 0x82EE
-+#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF
-+#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0
-+#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1
-+#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2
-+#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3
-+#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4
-+#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5
-+#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6
-+#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7
-+#endif /* GL_ARB_pipeline_statistics_query */
-+
-+#ifndef GL_ARB_pixel_buffer_object
-+#define GL_ARB_pixel_buffer_object 1
-+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
-+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
-+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
-+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
-+#endif /* GL_ARB_pixel_buffer_object */
-+
-+#ifndef GL_ARB_point_parameters
-+#define GL_ARB_point_parameters 1
-+#define GL_POINT_SIZE_MIN_ARB 0x8126
-+#define GL_POINT_SIZE_MAX_ARB 0x8127
-+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
-+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
-+#endif
-+#endif /* GL_ARB_point_parameters */
-+
-+#ifndef GL_ARB_point_sprite
-+#define GL_ARB_point_sprite 1
-+#define GL_POINT_SPRITE_ARB 0x8861
-+#define GL_COORD_REPLACE_ARB 0x8862
-+#endif /* GL_ARB_point_sprite */
-+
-+#ifndef GL_ARB_post_depth_coverage
-+#define GL_ARB_post_depth_coverage 1
-+#endif /* GL_ARB_post_depth_coverage */
-+
-+#ifndef GL_ARB_program_interface_query
-+#define GL_ARB_program_interface_query 1
-+#endif /* GL_ARB_program_interface_query */
-+
-+#ifndef GL_ARB_provoking_vertex
-+#define GL_ARB_provoking_vertex 1
-+#endif /* GL_ARB_provoking_vertex */
-+
-+#ifndef GL_ARB_query_buffer_object
-+#define GL_ARB_query_buffer_object 1
-+#endif /* GL_ARB_query_buffer_object */
-+
-+#ifndef GL_ARB_robust_buffer_access_behavior
-+#define GL_ARB_robust_buffer_access_behavior 1
-+#endif /* GL_ARB_robust_buffer_access_behavior */
-+
-+#ifndef GL_ARB_robustness
-+#define GL_ARB_robustness 1
-+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
-+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
-+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
-+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
-+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
-+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
-+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
-+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
-+typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-+typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-+typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-+typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
-+typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
-+typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
-+typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-+typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-+typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-+typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
-+GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
-+GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-+GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
-+GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-+GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-+GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-+GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
-+GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
-+GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
-+GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
-+GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
-+GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
-+GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
-+GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
-+GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
-+GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
-+GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
-+GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
-+#endif
-+#endif /* GL_ARB_robustness */
-+
-+#ifndef GL_ARB_robustness_isolation
-+#define GL_ARB_robustness_isolation 1
-+#endif /* GL_ARB_robustness_isolation */
-+
-+#ifndef GL_ARB_sample_locations
-+#define GL_ARB_sample_locations 1
-+#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D
-+#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E
-+#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F
-+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340
-+#define GL_SAMPLE_LOCATION_ARB 0x8E50
-+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341
-+#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342
-+#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glEvaluateDepthValuesARB (void);
-+#endif
-+#endif /* GL_ARB_sample_locations */
-+
-+#ifndef GL_ARB_sample_shading
-+#define GL_ARB_sample_shading 1
-+#define GL_SAMPLE_SHADING_ARB 0x8C36
-+#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
-+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
-+#endif
-+#endif /* GL_ARB_sample_shading */
-+
-+#ifndef GL_ARB_sampler_objects
-+#define GL_ARB_sampler_objects 1
-+#endif /* GL_ARB_sampler_objects */
-+
-+#ifndef GL_ARB_seamless_cube_map
-+#define GL_ARB_seamless_cube_map 1
-+#endif /* GL_ARB_seamless_cube_map */
-+
-+#ifndef GL_ARB_seamless_cubemap_per_texture
-+#define GL_ARB_seamless_cubemap_per_texture 1
-+#endif /* GL_ARB_seamless_cubemap_per_texture */
-+
-+#ifndef GL_ARB_separate_shader_objects
-+#define GL_ARB_separate_shader_objects 1
-+#endif /* GL_ARB_separate_shader_objects */
-+
-+#ifndef GL_ARB_shader_atomic_counter_ops
-+#define GL_ARB_shader_atomic_counter_ops 1
-+#endif /* GL_ARB_shader_atomic_counter_ops */
-+
-+#ifndef GL_ARB_shader_atomic_counters
-+#define GL_ARB_shader_atomic_counters 1
-+#endif /* GL_ARB_shader_atomic_counters */
-+
-+#ifndef GL_ARB_shader_ballot
-+#define GL_ARB_shader_ballot 1
-+#endif /* GL_ARB_shader_ballot */
-+
-+#ifndef GL_ARB_shader_bit_encoding
-+#define GL_ARB_shader_bit_encoding 1
-+#endif /* GL_ARB_shader_bit_encoding */
-+
-+#ifndef GL_ARB_shader_clock
-+#define GL_ARB_shader_clock 1
-+#endif /* GL_ARB_shader_clock */
-+
-+#ifndef GL_ARB_shader_draw_parameters
-+#define GL_ARB_shader_draw_parameters 1
-+#endif /* GL_ARB_shader_draw_parameters */
-+
-+#ifndef GL_ARB_shader_group_vote
-+#define GL_ARB_shader_group_vote 1
-+#endif /* GL_ARB_shader_group_vote */
-+
-+#ifndef GL_ARB_shader_image_load_store
-+#define GL_ARB_shader_image_load_store 1
-+#endif /* GL_ARB_shader_image_load_store */
-+
-+#ifndef GL_ARB_shader_image_size
-+#define GL_ARB_shader_image_size 1
-+#endif /* GL_ARB_shader_image_size */
-+
-+#ifndef GL_ARB_shader_objects
-+#define GL_ARB_shader_objects 1
-+#ifdef __APPLE__
-+#ifdef BUILDING_MESA
-+/* Avoid uint <-> void* warnings */
-+typedef unsigned long GLhandleARB;
-+#else
-+typedef void *GLhandleARB;
-+#endif
-+#else
-+typedef unsigned int GLhandleARB;
-+#endif
-+typedef char GLcharARB;
-+#define GL_PROGRAM_OBJECT_ARB 0x8B40
-+#define GL_SHADER_OBJECT_ARB 0x8B48
-+#define GL_OBJECT_TYPE_ARB 0x8B4E
-+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
-+#define GL_FLOAT_VEC2_ARB 0x8B50
-+#define GL_FLOAT_VEC3_ARB 0x8B51
-+#define GL_FLOAT_VEC4_ARB 0x8B52
-+#define GL_INT_VEC2_ARB 0x8B53
-+#define GL_INT_VEC3_ARB 0x8B54
-+#define GL_INT_VEC4_ARB 0x8B55
-+#define GL_BOOL_ARB 0x8B56
-+#define GL_BOOL_VEC2_ARB 0x8B57
-+#define GL_BOOL_VEC3_ARB 0x8B58
-+#define GL_BOOL_VEC4_ARB 0x8B59
-+#define GL_FLOAT_MAT2_ARB 0x8B5A
-+#define GL_FLOAT_MAT3_ARB 0x8B5B
-+#define GL_FLOAT_MAT4_ARB 0x8B5C
-+#define GL_SAMPLER_1D_ARB 0x8B5D
-+#define GL_SAMPLER_2D_ARB 0x8B5E
-+#define GL_SAMPLER_3D_ARB 0x8B5F
-+#define GL_SAMPLER_CUBE_ARB 0x8B60
-+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
-+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
-+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
-+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
-+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
-+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
-+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
-+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
-+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
-+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
-+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
-+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
-+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
-+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
-+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
-+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
-+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
-+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
-+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
-+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
-+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
-+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
-+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
-+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
-+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
-+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
-+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
-+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
-+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
-+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
-+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
-+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
-+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
-+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
-+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
-+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
-+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
-+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
-+GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
-+GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
-+GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
-+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
-+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
-+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
-+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
-+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
-+#endif
-+#endif /* GL_ARB_shader_objects */
-+
-+#ifndef GL_ARB_shader_precision
-+#define GL_ARB_shader_precision 1
-+#endif /* GL_ARB_shader_precision */
-+
-+#ifndef GL_ARB_shader_stencil_export
-+#define GL_ARB_shader_stencil_export 1
-+#endif /* GL_ARB_shader_stencil_export */
-+
-+#ifndef GL_ARB_shader_storage_buffer_object
-+#define GL_ARB_shader_storage_buffer_object 1
-+#endif /* GL_ARB_shader_storage_buffer_object */
-+
-+#ifndef GL_ARB_shader_subroutine
-+#define GL_ARB_shader_subroutine 1
-+#endif /* GL_ARB_shader_subroutine */
-+
-+#ifndef GL_ARB_shader_texture_image_samples
-+#define GL_ARB_shader_texture_image_samples 1
-+#endif /* GL_ARB_shader_texture_image_samples */
-+
-+#ifndef GL_ARB_shader_texture_lod
-+#define GL_ARB_shader_texture_lod 1
-+#endif /* GL_ARB_shader_texture_lod */
-+
-+#ifndef GL_ARB_shader_viewport_layer_array
-+#define GL_ARB_shader_viewport_layer_array 1
-+#endif /* GL_ARB_shader_viewport_layer_array */
-+
-+#ifndef GL_ARB_shading_language_100
-+#define GL_ARB_shading_language_100 1
-+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
-+#endif /* GL_ARB_shading_language_100 */
-+
-+#ifndef GL_ARB_shading_language_420pack
-+#define GL_ARB_shading_language_420pack 1
-+#endif /* GL_ARB_shading_language_420pack */
-+
-+#ifndef GL_ARB_shading_language_include
-+#define GL_ARB_shading_language_include 1
-+#define GL_SHADER_INCLUDE_ARB 0x8DAE
-+#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
-+#define GL_NAMED_STRING_TYPE_ARB 0x8DEA
-+typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-+typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-+typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-+typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
-+GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
-+GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
-+GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
-+GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
-+GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_ARB_shading_language_include */
-+
-+#ifndef GL_ARB_shading_language_packing
-+#define GL_ARB_shading_language_packing 1
-+#endif /* GL_ARB_shading_language_packing */
-+
-+#ifndef GL_ARB_shadow
-+#define GL_ARB_shadow 1
-+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
-+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
-+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
-+#endif /* GL_ARB_shadow */
-+
-+#ifndef GL_ARB_shadow_ambient
-+#define GL_ARB_shadow_ambient 1
-+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
-+#endif /* GL_ARB_shadow_ambient */
-+
-+#ifndef GL_ARB_sparse_buffer
-+#define GL_ARB_sparse_buffer 1
-+#define GL_SPARSE_STORAGE_BIT_ARB 0x0400
-+#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8
-+typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
-+#endif
-+#endif /* GL_ARB_sparse_buffer */
-+
-+#ifndef GL_ARB_sparse_texture
-+#define GL_ARB_sparse_texture 1
-+#define GL_TEXTURE_SPARSE_ARB 0x91A6
-+#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
-+#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA
-+#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
-+#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
-+#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
-+#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
-+#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
-+#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
-+#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
-+#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
-+typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
-+#endif
-+#endif /* GL_ARB_sparse_texture */
-+
-+#ifndef GL_ARB_sparse_texture2
-+#define GL_ARB_sparse_texture2 1
-+#endif /* GL_ARB_sparse_texture2 */
-+
-+#ifndef GL_ARB_sparse_texture_clamp
-+#define GL_ARB_sparse_texture_clamp 1
-+#endif /* GL_ARB_sparse_texture_clamp */
-+
-+#ifndef GL_ARB_stencil_texturing
-+#define GL_ARB_stencil_texturing 1
-+#endif /* GL_ARB_stencil_texturing */
-+
-+#ifndef GL_ARB_sync
-+#define GL_ARB_sync 1
-+#endif /* GL_ARB_sync */
-+
-+#ifndef GL_ARB_tessellation_shader
-+#define GL_ARB_tessellation_shader 1
-+#endif /* GL_ARB_tessellation_shader */
-+
-+#ifndef GL_ARB_texture_barrier
-+#define GL_ARB_texture_barrier 1
-+#endif /* GL_ARB_texture_barrier */
-+
-+#ifndef GL_ARB_texture_border_clamp
-+#define GL_ARB_texture_border_clamp 1
-+#define GL_CLAMP_TO_BORDER_ARB 0x812D
-+#endif /* GL_ARB_texture_border_clamp */
-+
-+#ifndef GL_ARB_texture_buffer_object
-+#define GL_ARB_texture_buffer_object 1
-+#define GL_TEXTURE_BUFFER_ARB 0x8C2A
-+#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
-+#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
-+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
-+#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
-+typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
-+#endif
-+#endif /* GL_ARB_texture_buffer_object */
-+
-+#ifndef GL_ARB_texture_buffer_object_rgb32
-+#define GL_ARB_texture_buffer_object_rgb32 1
-+#endif /* GL_ARB_texture_buffer_object_rgb32 */
-+
-+#ifndef GL_ARB_texture_buffer_range
-+#define GL_ARB_texture_buffer_range 1
-+#endif /* GL_ARB_texture_buffer_range */
-+
-+#ifndef GL_ARB_texture_compression
-+#define GL_ARB_texture_compression 1
-+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
-+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
-+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
-+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
-+#define GL_COMPRESSED_RGB_ARB 0x84ED
-+#define GL_COMPRESSED_RGBA_ARB 0x84EE
-+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
-+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
-+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
-+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
-+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
-+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
-+#endif
-+#endif /* GL_ARB_texture_compression */
-+
-+#ifndef GL_ARB_texture_compression_bptc
-+#define GL_ARB_texture_compression_bptc 1
-+#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
-+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
-+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
-+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
-+#endif /* GL_ARB_texture_compression_bptc */
-+
-+#ifndef GL_ARB_texture_compression_rgtc
-+#define GL_ARB_texture_compression_rgtc 1
-+#endif /* GL_ARB_texture_compression_rgtc */
-+
-+#ifndef GL_ARB_texture_cube_map
-+#define GL_ARB_texture_cube_map 1
-+#define GL_NORMAL_MAP_ARB 0x8511
-+#define GL_REFLECTION_MAP_ARB 0x8512
-+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
-+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
-+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
-+#endif /* GL_ARB_texture_cube_map */
-+
-+#ifndef GL_ARB_texture_cube_map_array
-+#define GL_ARB_texture_cube_map_array 1
-+#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
-+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
-+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
-+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
-+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
-+#endif /* GL_ARB_texture_cube_map_array */
-+
-+#ifndef GL_ARB_texture_env_add
-+#define GL_ARB_texture_env_add 1
-+#endif /* GL_ARB_texture_env_add */
-+
-+#ifndef GL_ARB_texture_env_combine
-+#define GL_ARB_texture_env_combine 1
-+#define GL_COMBINE_ARB 0x8570
-+#define GL_COMBINE_RGB_ARB 0x8571
-+#define GL_COMBINE_ALPHA_ARB 0x8572
-+#define GL_SOURCE0_RGB_ARB 0x8580
-+#define GL_SOURCE1_RGB_ARB 0x8581
-+#define GL_SOURCE2_RGB_ARB 0x8582
-+#define GL_SOURCE0_ALPHA_ARB 0x8588
-+#define GL_SOURCE1_ALPHA_ARB 0x8589
-+#define GL_SOURCE2_ALPHA_ARB 0x858A
-+#define GL_OPERAND0_RGB_ARB 0x8590
-+#define GL_OPERAND1_RGB_ARB 0x8591
-+#define GL_OPERAND2_RGB_ARB 0x8592
-+#define GL_OPERAND0_ALPHA_ARB 0x8598
-+#define GL_OPERAND1_ALPHA_ARB 0x8599
-+#define GL_OPERAND2_ALPHA_ARB 0x859A
-+#define GL_RGB_SCALE_ARB 0x8573
-+#define GL_ADD_SIGNED_ARB 0x8574
-+#define GL_INTERPOLATE_ARB 0x8575
-+#define GL_SUBTRACT_ARB 0x84E7
-+#define GL_CONSTANT_ARB 0x8576
-+#define GL_PRIMARY_COLOR_ARB 0x8577
-+#define GL_PREVIOUS_ARB 0x8578
-+#endif /* GL_ARB_texture_env_combine */
-+
-+#ifndef GL_ARB_texture_env_crossbar
-+#define GL_ARB_texture_env_crossbar 1
-+#endif /* GL_ARB_texture_env_crossbar */
-+
-+#ifndef GL_ARB_texture_env_dot3
-+#define GL_ARB_texture_env_dot3 1
-+#define GL_DOT3_RGB_ARB 0x86AE
-+#define GL_DOT3_RGBA_ARB 0x86AF
-+#endif /* GL_ARB_texture_env_dot3 */
-+
-+#ifndef GL_ARB_texture_filter_minmax
-+#define GL_ARB_texture_filter_minmax 1
-+#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366
-+#define GL_WEIGHTED_AVERAGE_ARB 0x9367
-+#endif /* GL_ARB_texture_filter_minmax */
-+
-+#ifndef GL_ARB_texture_float
-+#define GL_ARB_texture_float 1
-+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
-+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
-+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
-+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
-+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
-+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
-+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
-+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
-+#define GL_RGBA32F_ARB 0x8814
-+#define GL_RGB32F_ARB 0x8815
-+#define GL_ALPHA32F_ARB 0x8816
-+#define GL_INTENSITY32F_ARB 0x8817
-+#define GL_LUMINANCE32F_ARB 0x8818
-+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
-+#define GL_RGBA16F_ARB 0x881A
-+#define GL_RGB16F_ARB 0x881B
-+#define GL_ALPHA16F_ARB 0x881C
-+#define GL_INTENSITY16F_ARB 0x881D
-+#define GL_LUMINANCE16F_ARB 0x881E
-+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
-+#endif /* GL_ARB_texture_float */
-+
-+#ifndef GL_ARB_texture_gather
-+#define GL_ARB_texture_gather 1
-+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
-+#endif /* GL_ARB_texture_gather */
-+
-+#ifndef GL_ARB_texture_mirror_clamp_to_edge
-+#define GL_ARB_texture_mirror_clamp_to_edge 1
-+#endif /* GL_ARB_texture_mirror_clamp_to_edge */
-+
-+#ifndef GL_ARB_texture_mirrored_repeat
-+#define GL_ARB_texture_mirrored_repeat 1
-+#define GL_MIRRORED_REPEAT_ARB 0x8370
-+#endif /* GL_ARB_texture_mirrored_repeat */
-+
-+#ifndef GL_ARB_texture_multisample
-+#define GL_ARB_texture_multisample 1
-+#endif /* GL_ARB_texture_multisample */
-+
-+#ifndef GL_ARB_texture_non_power_of_two
-+#define GL_ARB_texture_non_power_of_two 1
-+#endif /* GL_ARB_texture_non_power_of_two */
-+
-+#ifndef GL_ARB_texture_query_levels
-+#define GL_ARB_texture_query_levels 1
-+#endif /* GL_ARB_texture_query_levels */
-+
-+#ifndef GL_ARB_texture_query_lod
-+#define GL_ARB_texture_query_lod 1
-+#endif /* GL_ARB_texture_query_lod */
-+
-+#ifndef GL_ARB_texture_rectangle
-+#define GL_ARB_texture_rectangle 1
-+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
-+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
-+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
-+#endif /* GL_ARB_texture_rectangle */
-+
-+#ifndef GL_ARB_texture_rg
-+#define GL_ARB_texture_rg 1
-+#endif /* GL_ARB_texture_rg */
-+
-+#ifndef GL_ARB_texture_rgb10_a2ui
-+#define GL_ARB_texture_rgb10_a2ui 1
-+#endif /* GL_ARB_texture_rgb10_a2ui */
-+
-+#ifndef GL_ARB_texture_stencil8
-+#define GL_ARB_texture_stencil8 1
-+#endif /* GL_ARB_texture_stencil8 */
-+
-+#ifndef GL_ARB_texture_storage
-+#define GL_ARB_texture_storage 1
-+#endif /* GL_ARB_texture_storage */
-+
-+#ifndef GL_ARB_texture_storage_multisample
-+#define GL_ARB_texture_storage_multisample 1
-+#endif /* GL_ARB_texture_storage_multisample */
-+
-+#ifndef GL_ARB_texture_swizzle
-+#define GL_ARB_texture_swizzle 1
-+#endif /* GL_ARB_texture_swizzle */
-+
-+#ifndef GL_ARB_texture_view
-+#define GL_ARB_texture_view 1
-+#endif /* GL_ARB_texture_view */
-+
-+#ifndef GL_ARB_timer_query
-+#define GL_ARB_timer_query 1
-+#endif /* GL_ARB_timer_query */
-+
-+#ifndef GL_ARB_transform_feedback2
-+#define GL_ARB_transform_feedback2 1
-+#endif /* GL_ARB_transform_feedback2 */
-+
-+#ifndef GL_ARB_transform_feedback3
-+#define GL_ARB_transform_feedback3 1
-+#endif /* GL_ARB_transform_feedback3 */
-+
-+#ifndef GL_ARB_transform_feedback_instanced
-+#define GL_ARB_transform_feedback_instanced 1
-+#endif /* GL_ARB_transform_feedback_instanced */
-+
-+#ifndef GL_ARB_transform_feedback_overflow_query
-+#define GL_ARB_transform_feedback_overflow_query 1
-+#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC
-+#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED
-+#endif /* GL_ARB_transform_feedback_overflow_query */
-+
-+#ifndef GL_ARB_transpose_matrix
-+#define GL_ARB_transpose_matrix 1
-+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
-+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
-+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
-+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
-+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
-+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
-+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
-+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
-+#endif
-+#endif /* GL_ARB_transpose_matrix */
-+
-+#ifndef GL_ARB_uniform_buffer_object
-+#define GL_ARB_uniform_buffer_object 1
-+#endif /* GL_ARB_uniform_buffer_object */
-+
-+#ifndef GL_ARB_vertex_array_bgra
-+#define GL_ARB_vertex_array_bgra 1
-+#endif /* GL_ARB_vertex_array_bgra */
-+
-+#ifndef GL_ARB_vertex_array_object
-+#define GL_ARB_vertex_array_object 1
-+#endif /* GL_ARB_vertex_array_object */
-+
-+#ifndef GL_ARB_vertex_attrib_64bit
-+#define GL_ARB_vertex_attrib_64bit 1
-+#endif /* GL_ARB_vertex_attrib_64bit */
-+
-+#ifndef GL_ARB_vertex_attrib_binding
-+#define GL_ARB_vertex_attrib_binding 1
-+#endif /* GL_ARB_vertex_attrib_binding */
-+
-+#ifndef GL_ARB_vertex_blend
-+#define GL_ARB_vertex_blend 1
-+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
-+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
-+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
-+#define GL_VERTEX_BLEND_ARB 0x86A7
-+#define GL_CURRENT_WEIGHT_ARB 0x86A8
-+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
-+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
-+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
-+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
-+#define GL_WEIGHT_ARRAY_ARB 0x86AD
-+#define GL_MODELVIEW0_ARB 0x1700
-+#define GL_MODELVIEW1_ARB 0x850A
-+#define GL_MODELVIEW2_ARB 0x8722
-+#define GL_MODELVIEW3_ARB 0x8723
-+#define GL_MODELVIEW4_ARB 0x8724
-+#define GL_MODELVIEW5_ARB 0x8725
-+#define GL_MODELVIEW6_ARB 0x8726
-+#define GL_MODELVIEW7_ARB 0x8727
-+#define GL_MODELVIEW8_ARB 0x8728
-+#define GL_MODELVIEW9_ARB 0x8729
-+#define GL_MODELVIEW10_ARB 0x872A
-+#define GL_MODELVIEW11_ARB 0x872B
-+#define GL_MODELVIEW12_ARB 0x872C
-+#define GL_MODELVIEW13_ARB 0x872D
-+#define GL_MODELVIEW14_ARB 0x872E
-+#define GL_MODELVIEW15_ARB 0x872F
-+#define GL_MODELVIEW16_ARB 0x8730
-+#define GL_MODELVIEW17_ARB 0x8731
-+#define GL_MODELVIEW18_ARB 0x8732
-+#define GL_MODELVIEW19_ARB 0x8733
-+#define GL_MODELVIEW20_ARB 0x8734
-+#define GL_MODELVIEW21_ARB 0x8735
-+#define GL_MODELVIEW22_ARB 0x8736
-+#define GL_MODELVIEW23_ARB 0x8737
-+#define GL_MODELVIEW24_ARB 0x8738
-+#define GL_MODELVIEW25_ARB 0x8739
-+#define GL_MODELVIEW26_ARB 0x873A
-+#define GL_MODELVIEW27_ARB 0x873B
-+#define GL_MODELVIEW28_ARB 0x873C
-+#define GL_MODELVIEW29_ARB 0x873D
-+#define GL_MODELVIEW30_ARB 0x873E
-+#define GL_MODELVIEW31_ARB 0x873F
-+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
-+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
-+GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
-+GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
-+GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
-+GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
-+GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
-+GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
-+GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
-+GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glVertexBlendARB (GLint count);
-+#endif
-+#endif /* GL_ARB_vertex_blend */
-+
-+#ifndef GL_ARB_vertex_buffer_object
-+#define GL_ARB_vertex_buffer_object 1
-+typedef ptrdiff_t GLsizeiptrARB;
-+typedef ptrdiff_t GLintptrARB;
-+#define GL_BUFFER_SIZE_ARB 0x8764
-+#define GL_BUFFER_USAGE_ARB 0x8765
-+#define GL_ARRAY_BUFFER_ARB 0x8892
-+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
-+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
-+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
-+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
-+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
-+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
-+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
-+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
-+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
-+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
-+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
-+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
-+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
-+#define GL_READ_ONLY_ARB 0x88B8
-+#define GL_WRITE_ONLY_ARB 0x88B9
-+#define GL_READ_WRITE_ARB 0x88BA
-+#define GL_BUFFER_ACCESS_ARB 0x88BB
-+#define GL_BUFFER_MAPPED_ARB 0x88BC
-+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
-+#define GL_STREAM_DRAW_ARB 0x88E0
-+#define GL_STREAM_READ_ARB 0x88E1
-+#define GL_STREAM_COPY_ARB 0x88E2
-+#define GL_STATIC_DRAW_ARB 0x88E4
-+#define GL_STATIC_READ_ARB 0x88E5
-+#define GL_STATIC_COPY_ARB 0x88E6
-+#define GL_DYNAMIC_DRAW_ARB 0x88E8
-+#define GL_DYNAMIC_READ_ARB 0x88E9
-+#define GL_DYNAMIC_COPY_ARB 0x88EA
-+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
-+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
-+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
-+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
-+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
-+typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
-+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
-+GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
-+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
-+GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
-+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
-+GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
-+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
-+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
-+#endif
-+#endif /* GL_ARB_vertex_buffer_object */
-+
-+#ifndef GL_ARB_vertex_program
-+#define GL_ARB_vertex_program 1
-+#define GL_COLOR_SUM_ARB 0x8458
-+#define GL_VERTEX_PROGRAM_ARB 0x8620
-+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
-+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
-+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
-+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
-+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
-+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
-+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
-+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
-+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
-+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
-+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
-+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
-+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
-+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
-+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
-+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
-+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
-+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
-+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
-+#endif
-+#endif /* GL_ARB_vertex_program */
-+
-+#ifndef GL_ARB_vertex_shader
-+#define GL_ARB_vertex_shader 1
-+#define GL_VERTEX_SHADER_ARB 0x8B31
-+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
-+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
-+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
-+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
-+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
-+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
-+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
-+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
-+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
-+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
-+#endif
-+#endif /* GL_ARB_vertex_shader */
-+
-+#ifndef GL_ARB_vertex_type_10f_11f_11f_rev
-+#define GL_ARB_vertex_type_10f_11f_11f_rev 1
-+#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
-+
-+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
-+#define GL_ARB_vertex_type_2_10_10_10_rev 1
-+#endif /* GL_ARB_vertex_type_2_10_10_10_rev */
-+
-+#ifndef GL_ARB_viewport_array
-+#define GL_ARB_viewport_array 1
-+#endif /* GL_ARB_viewport_array */
-+
-+#ifndef GL_ARB_window_pos
-+#define GL_ARB_window_pos 1
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
-+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
-+GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
-+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
-+GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
-+GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
-+#endif
-+#endif /* GL_ARB_window_pos */
-+
-+#ifndef GL_KHR_blend_equation_advanced
-+#define GL_KHR_blend_equation_advanced 1
-+#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 (APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendBarrierKHR (void);
-+#endif
-+#endif /* GL_KHR_blend_equation_advanced */
-+
-+#ifndef GL_KHR_blend_equation_advanced_coherent
-+#define GL_KHR_blend_equation_advanced_coherent 1
-+#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
-+#endif /* GL_KHR_blend_equation_advanced_coherent */
-+
-+#ifndef GL_KHR_context_flush_control
-+#define GL_KHR_context_flush_control 1
-+#endif /* GL_KHR_context_flush_control */
-+
-+#ifndef GL_KHR_debug
-+#define GL_KHR_debug 1
-+#endif /* GL_KHR_debug */
-+
-+#ifndef GL_KHR_no_error
-+#define GL_KHR_no_error 1
-+#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
-+#endif /* GL_KHR_no_error */
-+
-+#ifndef GL_KHR_robust_buffer_access_behavior
-+#define GL_KHR_robust_buffer_access_behavior 1
-+#endif /* GL_KHR_robust_buffer_access_behavior */
-+
-+#ifndef GL_KHR_robustness
-+#define GL_KHR_robustness 1
-+#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
-+#endif /* GL_KHR_robustness */
-+
-+#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 */
-+
-+#ifndef GL_KHR_texture_compression_astc_ldr
-+#define GL_KHR_texture_compression_astc_ldr 1
-+#endif /* GL_KHR_texture_compression_astc_ldr */
-+
-+#ifndef GL_OES_byte_coordinates
-+#define GL_OES_byte_coordinates 1
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
-+typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
-+typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
-+typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-+typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x, GLbyte y);
-+typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
-+typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z, GLbyte w);
-+typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
-+GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
-+GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
-+GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
-+GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
-+GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
-+GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-+GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
-+GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
-+GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
-+GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
-+GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
-+GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glVertex2bOES (GLbyte x, GLbyte y);
-+GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y, GLbyte z);
-+GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
-+GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z, GLbyte w);
-+GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
-+#endif
-+#endif /* GL_OES_byte_coordinates */
-+
-+#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_fixed_point
-+#define GL_OES_fixed_point 1
-+typedef GLint GLfixed;
-+#define GL_FIXED_OES 0x140C
-+typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
-+typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
-+typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
-+typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
-+typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
-+typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-+typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
-+typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
-+typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
-+typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
-+typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
-+typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-+typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
-+typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
-+typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
-+typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-+typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-+typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-+typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
-+typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
-+typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
-+typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
-+typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
-+typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
-+typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
-+typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
-+typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
-+typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
-+typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
-+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
-+typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
-+typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
-+typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
-+typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
-+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
-+typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
-+typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
-+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
-+typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
-+typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-+typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
-+typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
-+typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
-+typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
-+typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
-+typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
-+typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-+typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
-+typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
-+typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
-+typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
-+typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
-+typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-+typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
-+GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
-+GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
-+GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
-+GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
-+GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-+GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
-+GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
-+GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
-+GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
-+GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
-+GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
-+GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-+GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
-+GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
-+GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glPointSizexOES (GLfixed size);
-+GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
-+GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-+GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
-+GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
-+GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
-+GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
-+GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-+GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
-+GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
-+GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
-+GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
-+GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
-+GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
-+GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
-+GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
-+GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
-+GLAPI void APIENTRY glIndexxOES (GLfixed component);
-+GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
-+GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
-+GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
-+GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
-+GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
-+GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
-+GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
-+GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
-+GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
-+GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
-+GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
-+GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
-+GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
-+GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
-+GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
-+GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
-+GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
-+GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
-+GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
-+GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
-+GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
-+GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
-+GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
-+GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
-+GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
-+GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
-+GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-+GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
-+GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
-+GLAPI void APIENTRY glVertex2xOES (GLfixed x);
-+GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
-+GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
-+GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
-+GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
-+#endif
-+#endif /* GL_OES_fixed_point */
-+
-+#ifndef GL_OES_query_matrix
-+#define GL_OES_query_matrix 1
-+typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
-+#endif
-+#endif /* GL_OES_query_matrix */
-+
-+#ifndef GL_OES_read_format
-+#define GL_OES_read_format 1
-+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-+#endif /* GL_OES_read_format */
-+
-+#ifndef GL_OES_single_precision
-+#define GL_OES_single_precision 1
-+typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
-+typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
-+typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
-+typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-+typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
-+typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
-+GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
-+GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
-+GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-+GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
-+GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
-+#endif
-+#endif /* GL_OES_single_precision */
-+
-+#ifndef GL_3DFX_multisample
-+#define GL_3DFX_multisample 1
-+#define GL_MULTISAMPLE_3DFX 0x86B2
-+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
-+#define GL_SAMPLES_3DFX 0x86B4
-+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
-+#endif /* GL_3DFX_multisample */
-+
-+#ifndef GL_3DFX_tbuffer
-+#define GL_3DFX_tbuffer 1
-+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
-+#endif
-+#endif /* GL_3DFX_tbuffer */
-+
-+#ifndef GL_3DFX_texture_compression_FXT1
-+#define GL_3DFX_texture_compression_FXT1 1
-+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
-+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
-+#endif /* GL_3DFX_texture_compression_FXT1 */
-+
-+#ifndef GL_AMD_blend_minmax_factor
-+#define GL_AMD_blend_minmax_factor 1
-+#define GL_FACTOR_MIN_AMD 0x901C
-+#define GL_FACTOR_MAX_AMD 0x901D
-+#endif /* GL_AMD_blend_minmax_factor */
-+
-+#ifndef GL_AMD_conservative_depth
-+#define GL_AMD_conservative_depth 1
-+#endif /* GL_AMD_conservative_depth */
-+
-+#ifndef GL_AMD_debug_output
-+#define GL_AMD_debug_output 1
-+typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
-+#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
-+#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
-+#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
-+#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
-+#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
-+#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
-+#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
-+#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
-+#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
-+#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
-+#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
-+#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
-+#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
-+#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
-+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
-+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-+GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
-+GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
-+GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
-+#endif
-+#endif /* GL_AMD_debug_output */
-+
-+#ifndef GL_AMD_depth_clamp_separate
-+#define GL_AMD_depth_clamp_separate 1
-+#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
-+#define GL_DEPTH_CLAMP_FAR_AMD 0x901F
-+#endif /* GL_AMD_depth_clamp_separate */
-+
-+#ifndef GL_AMD_draw_buffers_blend
-+#define GL_AMD_draw_buffers_blend 1
-+typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
-+GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-+GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
-+GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-+#endif
-+#endif /* GL_AMD_draw_buffers_blend */
-+
-+#ifndef GL_AMD_gcn_shader
-+#define GL_AMD_gcn_shader 1
-+#endif /* GL_AMD_gcn_shader */
-+
-+#ifndef GL_AMD_gpu_shader_int64
-+#define GL_AMD_gpu_shader_int64 1
-+typedef int64_t GLint64EXT;
-+#define GL_INT64_NV 0x140E
-+#define GL_UNSIGNED_INT64_NV 0x140F
-+#define GL_INT8_NV 0x8FE0
-+#define GL_INT8_VEC2_NV 0x8FE1
-+#define GL_INT8_VEC3_NV 0x8FE2
-+#define GL_INT8_VEC4_NV 0x8FE3
-+#define GL_INT16_NV 0x8FE4
-+#define GL_INT16_VEC2_NV 0x8FE5
-+#define GL_INT16_VEC3_NV 0x8FE6
-+#define GL_INT16_VEC4_NV 0x8FE7
-+#define GL_INT64_VEC2_NV 0x8FE9
-+#define GL_INT64_VEC3_NV 0x8FEA
-+#define GL_INT64_VEC4_NV 0x8FEB
-+#define GL_UNSIGNED_INT8_NV 0x8FEC
-+#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
-+#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
-+#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
-+#define GL_UNSIGNED_INT16_NV 0x8FF0
-+#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
-+#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
-+#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
-+#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
-+#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
-+#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
-+#define GL_FLOAT16_NV 0x8FF8
-+#define GL_FLOAT16_VEC2_NV 0x8FF9
-+#define GL_FLOAT16_VEC3_NV 0x8FFA
-+#define GL_FLOAT16_VEC4_NV 0x8FFB
-+typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
-+typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
-+typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
-+typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
-+typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
-+typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
-+GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
-+GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
-+GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
-+GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
-+GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
-+GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
-+GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
-+GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
-+GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
-+GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+#endif
-+#endif /* GL_AMD_gpu_shader_int64 */
-+
-+#ifndef GL_AMD_interleaved_elements
-+#define GL_AMD_interleaved_elements 1
-+#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
-+#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
-+#endif
-+#endif /* GL_AMD_interleaved_elements */
-+
-+#ifndef GL_AMD_multi_draw_indirect
-+#define GL_AMD_multi_draw_indirect 1
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
-+GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
-+#endif
-+#endif /* GL_AMD_multi_draw_indirect */
-+
-+#ifndef GL_AMD_name_gen_delete
-+#define GL_AMD_name_gen_delete 1
-+#define GL_DATA_BUFFER_AMD 0x9151
-+#define GL_PERFORMANCE_MONITOR_AMD 0x9152
-+#define GL_QUERY_OBJECT_AMD 0x9153
-+#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
-+#define GL_SAMPLER_OBJECT_AMD 0x9155
-+typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
-+typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
-+typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
-+GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
-+GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
-+#endif
-+#endif /* GL_AMD_name_gen_delete */
-+
-+#ifndef GL_AMD_occlusion_query_event
-+#define GL_AMD_occlusion_query_event 1
-+#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
-+#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
-+#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
-+#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
-+#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
-+#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
-+typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
-+#endif
-+#endif /* GL_AMD_occlusion_query_event */
-+
-+#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 (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-+typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
-+typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-+typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-+typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-+typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-+typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-+GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-+GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-+GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-+GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
-+GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-+GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-+GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-+GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-+GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-+GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-+#endif
-+#endif /* GL_AMD_performance_monitor */
-+
-+#ifndef GL_AMD_pinned_memory
-+#define GL_AMD_pinned_memory 1
-+#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
-+#endif /* GL_AMD_pinned_memory */
-+
-+#ifndef GL_AMD_query_buffer_object
-+#define GL_AMD_query_buffer_object 1
-+#define GL_QUERY_BUFFER_AMD 0x9192
-+#define GL_QUERY_BUFFER_BINDING_AMD 0x9193
-+#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
-+#endif /* GL_AMD_query_buffer_object */
-+
-+#ifndef GL_AMD_sample_positions
-+#define GL_AMD_sample_positions 1
-+#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
-+typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
-+#endif
-+#endif /* GL_AMD_sample_positions */
-+
-+#ifndef GL_AMD_seamless_cubemap_per_texture
-+#define GL_AMD_seamless_cubemap_per_texture 1
-+#endif /* GL_AMD_seamless_cubemap_per_texture */
-+
-+#ifndef GL_AMD_shader_atomic_counter_ops
-+#define GL_AMD_shader_atomic_counter_ops 1
-+#endif /* GL_AMD_shader_atomic_counter_ops */
-+
-+#ifndef GL_AMD_shader_stencil_export
-+#define GL_AMD_shader_stencil_export 1
-+#endif /* GL_AMD_shader_stencil_export */
-+
-+#ifndef GL_AMD_shader_trinary_minmax
-+#define GL_AMD_shader_trinary_minmax 1
-+#endif /* GL_AMD_shader_trinary_minmax */
-+
-+#ifndef GL_AMD_sparse_texture
-+#define GL_AMD_sparse_texture 1
-+#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
-+#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
-+#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
-+#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
-+#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
-+#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
-+#define GL_MIN_SPARSE_LEVEL_AMD 0x919B
-+#define GL_MIN_LOD_WARNING_AMD 0x919C
-+#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
-+typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-+GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
-+#endif
-+#endif /* GL_AMD_sparse_texture */
-+
-+#ifndef GL_AMD_stencil_operation_extended
-+#define GL_AMD_stencil_operation_extended 1
-+#define GL_SET_AMD 0x874A
-+#define GL_REPLACE_VALUE_AMD 0x874B
-+#define GL_STENCIL_OP_VALUE_AMD 0x874C
-+#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
-+typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
-+#endif
-+#endif /* GL_AMD_stencil_operation_extended */
-+
-+#ifndef GL_AMD_texture_texture4
-+#define GL_AMD_texture_texture4 1
-+#endif /* GL_AMD_texture_texture4 */
-+
-+#ifndef GL_AMD_transform_feedback3_lines_triangles
-+#define GL_AMD_transform_feedback3_lines_triangles 1
-+#endif /* GL_AMD_transform_feedback3_lines_triangles */
-+
-+#ifndef GL_AMD_transform_feedback4
-+#define GL_AMD_transform_feedback4 1
-+#define GL_STREAM_RASTERIZATION_AMD 0x91A0
-+#endif /* GL_AMD_transform_feedback4 */
-+
-+#ifndef GL_AMD_vertex_shader_layer
-+#define GL_AMD_vertex_shader_layer 1
-+#endif /* GL_AMD_vertex_shader_layer */
-+
-+#ifndef GL_AMD_vertex_shader_tessellator
-+#define GL_AMD_vertex_shader_tessellator 1
-+#define GL_SAMPLER_BUFFER_AMD 0x9001
-+#define GL_INT_SAMPLER_BUFFER_AMD 0x9002
-+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
-+#define GL_TESSELLATION_MODE_AMD 0x9004
-+#define GL_TESSELLATION_FACTOR_AMD 0x9005
-+#define GL_DISCRETE_AMD 0x9006
-+#define GL_CONTINUOUS_AMD 0x9007
-+typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
-+typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
-+GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
-+#endif
-+#endif /* GL_AMD_vertex_shader_tessellator */
-+
-+#ifndef GL_AMD_vertex_shader_viewport_index
-+#define GL_AMD_vertex_shader_viewport_index 1
-+#endif /* GL_AMD_vertex_shader_viewport_index */
-+
-+#ifndef GL_APPLE_aux_depth_stencil
-+#define GL_APPLE_aux_depth_stencil 1
-+#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
-+#endif /* GL_APPLE_aux_depth_stencil */
-+
-+#ifndef GL_APPLE_client_storage
-+#define GL_APPLE_client_storage 1
-+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
-+#endif /* GL_APPLE_client_storage */
-+
-+#ifndef GL_APPLE_element_array
-+#define GL_APPLE_element_array 1
-+#define GL_ELEMENT_ARRAY_APPLE 0x8A0C
-+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
-+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
-+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
-+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
-+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
-+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
-+#endif
-+#endif /* GL_APPLE_element_array */
-+
-+#ifndef GL_APPLE_fence
-+#define GL_APPLE_fence 1
-+#define GL_DRAW_PIXELS_APPLE 0x8A0A
-+#define GL_FENCE_APPLE 0x8A0B
-+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
-+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
-+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
-+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
-+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
-+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
-+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
-+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
-+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
-+GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
-+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
-+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
-+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
-+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
-+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
-+#endif
-+#endif /* GL_APPLE_fence */
-+
-+#ifndef GL_APPLE_float_pixels
-+#define GL_APPLE_float_pixels 1
-+#define GL_HALF_APPLE 0x140B
-+#define GL_RGBA_FLOAT32_APPLE 0x8814
-+#define GL_RGB_FLOAT32_APPLE 0x8815
-+#define GL_ALPHA_FLOAT32_APPLE 0x8816
-+#define GL_INTENSITY_FLOAT32_APPLE 0x8817
-+#define GL_LUMINANCE_FLOAT32_APPLE 0x8818
-+#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
-+#define GL_RGBA_FLOAT16_APPLE 0x881A
-+#define GL_RGB_FLOAT16_APPLE 0x881B
-+#define GL_ALPHA_FLOAT16_APPLE 0x881C
-+#define GL_INTENSITY_FLOAT16_APPLE 0x881D
-+#define GL_LUMINANCE_FLOAT16_APPLE 0x881E
-+#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
-+#define GL_COLOR_FLOAT_APPLE 0x8A0F
-+#endif /* GL_APPLE_float_pixels */
-+
-+#ifndef GL_APPLE_flush_buffer_range
-+#define GL_APPLE_flush_buffer_range 1
-+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
-+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
-+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
-+#endif
-+#endif /* GL_APPLE_flush_buffer_range */
-+
-+#ifndef GL_APPLE_object_purgeable
-+#define GL_APPLE_object_purgeable 1
-+#define GL_BUFFER_OBJECT_APPLE 0x85B3
-+#define GL_RELEASED_APPLE 0x8A19
-+#define GL_VOLATILE_APPLE 0x8A1A
-+#define GL_RETAINED_APPLE 0x8A1B
-+#define GL_UNDEFINED_APPLE 0x8A1C
-+#define GL_PURGEABLE_APPLE 0x8A1D
-+typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-+typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
-+GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
-+GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_APPLE_object_purgeable */
-+
-+#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_row_bytes
-+#define GL_APPLE_row_bytes 1
-+#define GL_PACK_ROW_BYTES_APPLE 0x8A15
-+#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
-+#endif /* GL_APPLE_row_bytes */
-+
-+#ifndef GL_APPLE_specular_vector
-+#define GL_APPLE_specular_vector 1
-+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
-+#endif /* GL_APPLE_specular_vector */
-+
-+#ifndef GL_APPLE_texture_range
-+#define GL_APPLE_texture_range 1
-+#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
-+#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
-+#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
-+#define GL_STORAGE_PRIVATE_APPLE 0x85BD
-+#define GL_STORAGE_CACHED_APPLE 0x85BE
-+#define GL_STORAGE_SHARED_APPLE 0x85BF
-+typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
-+GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
-+#endif
-+#endif /* GL_APPLE_texture_range */
-+
-+#ifndef GL_APPLE_transform_hint
-+#define GL_APPLE_transform_hint 1
-+#define GL_TRANSFORM_HINT_APPLE 0x85B1
-+#endif /* GL_APPLE_transform_hint */
-+
-+#ifndef GL_APPLE_vertex_array_object
-+#define GL_APPLE_vertex_array_object 1
-+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
-+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
-+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
-+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
-+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
-+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
-+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
-+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
-+#endif
-+#endif /* GL_APPLE_vertex_array_object */
-+
-+#ifndef GL_APPLE_vertex_array_range
-+#define GL_APPLE_vertex_array_range 1
-+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
-+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
-+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
-+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
-+#define GL_STORAGE_CLIENT_APPLE 0x85B4
-+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
-+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
-+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
-+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
-+#endif
-+#endif /* GL_APPLE_vertex_array_range */
-+
-+#ifndef GL_APPLE_vertex_program_evaluators
-+#define GL_APPLE_vertex_program_evaluators 1
-+#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
-+#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
-+#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
-+#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
-+#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
-+#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
-+#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
-+#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
-+#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
-+#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
-+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
-+typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
-+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
-+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
-+GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
-+GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
-+GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
-+GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
-+GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
-+GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
-+#endif
-+#endif /* GL_APPLE_vertex_program_evaluators */
-+
-+#ifndef GL_APPLE_ycbcr_422
-+#define GL_APPLE_ycbcr_422 1
-+#define GL_YCBCR_422_APPLE 0x85B9
-+#endif /* GL_APPLE_ycbcr_422 */
-+
-+#ifndef GL_ATI_draw_buffers
-+#define GL_ATI_draw_buffers 1
-+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
-+#define GL_DRAW_BUFFER0_ATI 0x8825
-+#define GL_DRAW_BUFFER1_ATI 0x8826
-+#define GL_DRAW_BUFFER2_ATI 0x8827
-+#define GL_DRAW_BUFFER3_ATI 0x8828
-+#define GL_DRAW_BUFFER4_ATI 0x8829
-+#define GL_DRAW_BUFFER5_ATI 0x882A
-+#define GL_DRAW_BUFFER6_ATI 0x882B
-+#define GL_DRAW_BUFFER7_ATI 0x882C
-+#define GL_DRAW_BUFFER8_ATI 0x882D
-+#define GL_DRAW_BUFFER9_ATI 0x882E
-+#define GL_DRAW_BUFFER10_ATI 0x882F
-+#define GL_DRAW_BUFFER11_ATI 0x8830
-+#define GL_DRAW_BUFFER12_ATI 0x8831
-+#define GL_DRAW_BUFFER13_ATI 0x8832
-+#define GL_DRAW_BUFFER14_ATI 0x8833
-+#define GL_DRAW_BUFFER15_ATI 0x8834
-+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
-+#endif
-+#endif /* GL_ATI_draw_buffers */
-+
-+#ifndef GL_ATI_element_array
-+#define GL_ATI_element_array 1
-+#define GL_ELEMENT_ARRAY_ATI 0x8768
-+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
-+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
-+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
-+GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
-+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
-+#endif
-+#endif /* GL_ATI_element_array */
-+
-+#ifndef GL_ATI_envmap_bumpmap
-+#define GL_ATI_envmap_bumpmap 1
-+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
-+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
-+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
-+#define GL_BUMP_TEX_UNITS_ATI 0x8778
-+#define GL_DUDV_ATI 0x8779
-+#define GL_DU8DV8_ATI 0x877A
-+#define GL_BUMP_ENVMAP_ATI 0x877B
-+#define GL_BUMP_TARGET_ATI 0x877C
-+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
-+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
-+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
-+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
-+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
-+#endif
-+#endif /* GL_ATI_envmap_bumpmap */
-+
-+#ifndef GL_ATI_fragment_shader
-+#define GL_ATI_fragment_shader 1
-+#define GL_FRAGMENT_SHADER_ATI 0x8920
-+#define GL_REG_0_ATI 0x8921
-+#define GL_REG_1_ATI 0x8922
-+#define GL_REG_2_ATI 0x8923
-+#define GL_REG_3_ATI 0x8924
-+#define GL_REG_4_ATI 0x8925
-+#define GL_REG_5_ATI 0x8926
-+#define GL_REG_6_ATI 0x8927
-+#define GL_REG_7_ATI 0x8928
-+#define GL_REG_8_ATI 0x8929
-+#define GL_REG_9_ATI 0x892A
-+#define GL_REG_10_ATI 0x892B
-+#define GL_REG_11_ATI 0x892C
-+#define GL_REG_12_ATI 0x892D
-+#define GL_REG_13_ATI 0x892E
-+#define GL_REG_14_ATI 0x892F
-+#define GL_REG_15_ATI 0x8930
-+#define GL_REG_16_ATI 0x8931
-+#define GL_REG_17_ATI 0x8932
-+#define GL_REG_18_ATI 0x8933
-+#define GL_REG_19_ATI 0x8934
-+#define GL_REG_20_ATI 0x8935
-+#define GL_REG_21_ATI 0x8936
-+#define GL_REG_22_ATI 0x8937
-+#define GL_REG_23_ATI 0x8938
-+#define GL_REG_24_ATI 0x8939
-+#define GL_REG_25_ATI 0x893A
-+#define GL_REG_26_ATI 0x893B
-+#define GL_REG_27_ATI 0x893C
-+#define GL_REG_28_ATI 0x893D
-+#define GL_REG_29_ATI 0x893E
-+#define GL_REG_30_ATI 0x893F
-+#define GL_REG_31_ATI 0x8940
-+#define GL_CON_0_ATI 0x8941
-+#define GL_CON_1_ATI 0x8942
-+#define GL_CON_2_ATI 0x8943
-+#define GL_CON_3_ATI 0x8944
-+#define GL_CON_4_ATI 0x8945
-+#define GL_CON_5_ATI 0x8946
-+#define GL_CON_6_ATI 0x8947
-+#define GL_CON_7_ATI 0x8948
-+#define GL_CON_8_ATI 0x8949
-+#define GL_CON_9_ATI 0x894A
-+#define GL_CON_10_ATI 0x894B
-+#define GL_CON_11_ATI 0x894C
-+#define GL_CON_12_ATI 0x894D
-+#define GL_CON_13_ATI 0x894E
-+#define GL_CON_14_ATI 0x894F
-+#define GL_CON_15_ATI 0x8950
-+#define GL_CON_16_ATI 0x8951
-+#define GL_CON_17_ATI 0x8952
-+#define GL_CON_18_ATI 0x8953
-+#define GL_CON_19_ATI 0x8954
-+#define GL_CON_20_ATI 0x8955
-+#define GL_CON_21_ATI 0x8956
-+#define GL_CON_22_ATI 0x8957
-+#define GL_CON_23_ATI 0x8958
-+#define GL_CON_24_ATI 0x8959
-+#define GL_CON_25_ATI 0x895A
-+#define GL_CON_26_ATI 0x895B
-+#define GL_CON_27_ATI 0x895C
-+#define GL_CON_28_ATI 0x895D
-+#define GL_CON_29_ATI 0x895E
-+#define GL_CON_30_ATI 0x895F
-+#define GL_CON_31_ATI 0x8960
-+#define GL_MOV_ATI 0x8961
-+#define GL_ADD_ATI 0x8963
-+#define GL_MUL_ATI 0x8964
-+#define GL_SUB_ATI 0x8965
-+#define GL_DOT3_ATI 0x8966
-+#define GL_DOT4_ATI 0x8967
-+#define GL_MAD_ATI 0x8968
-+#define GL_LERP_ATI 0x8969
-+#define GL_CND_ATI 0x896A
-+#define GL_CND0_ATI 0x896B
-+#define GL_DOT2_ADD_ATI 0x896C
-+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
-+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
-+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
-+#define GL_NUM_PASSES_ATI 0x8970
-+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
-+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
-+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
-+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
-+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
-+#define GL_SWIZZLE_STR_ATI 0x8976
-+#define GL_SWIZZLE_STQ_ATI 0x8977
-+#define GL_SWIZZLE_STR_DR_ATI 0x8978
-+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
-+#define GL_SWIZZLE_STRQ_ATI 0x897A
-+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
-+#define GL_RED_BIT_ATI 0x00000001
-+#define GL_GREEN_BIT_ATI 0x00000002
-+#define GL_BLUE_BIT_ATI 0x00000004
-+#define GL_2X_BIT_ATI 0x00000001
-+#define GL_4X_BIT_ATI 0x00000002
-+#define GL_8X_BIT_ATI 0x00000004
-+#define GL_HALF_BIT_ATI 0x00000008
-+#define GL_QUARTER_BIT_ATI 0x00000010
-+#define GL_EIGHTH_BIT_ATI 0x00000020
-+#define GL_SATURATE_BIT_ATI 0x00000040
-+#define GL_COMP_BIT_ATI 0x00000002
-+#define GL_NEGATE_BIT_ATI 0x00000004
-+#define GL_BIAS_BIT_ATI 0x00000008
-+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
-+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
-+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
-+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
-+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
-+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
-+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
-+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
-+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
-+GLAPI void APIENTRY glEndFragmentShaderATI (void);
-+GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
-+GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
-+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
-+#endif
-+#endif /* GL_ATI_fragment_shader */
-+
-+#ifndef GL_ATI_map_object_buffer
-+#define GL_ATI_map_object_buffer 1
-+typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
-+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
-+#endif
-+#endif /* GL_ATI_map_object_buffer */
-+
-+#ifndef GL_ATI_meminfo
-+#define GL_ATI_meminfo 1
-+#define GL_VBO_FREE_MEMORY_ATI 0x87FB
-+#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
-+#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
-+#endif /* GL_ATI_meminfo */
-+
-+#ifndef GL_ATI_pixel_format_float
-+#define GL_ATI_pixel_format_float 1
-+#define GL_RGBA_FLOAT_MODE_ATI 0x8820
-+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
-+#endif /* GL_ATI_pixel_format_float */
-+
-+#ifndef GL_ATI_pn_triangles
-+#define GL_ATI_pn_triangles 1
-+#define GL_PN_TRIANGLES_ATI 0x87F0
-+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
-+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
-+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
-+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
-+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
-+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
-+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
-+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
-+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
-+GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
-+#endif
-+#endif /* GL_ATI_pn_triangles */
-+
-+#ifndef GL_ATI_separate_stencil
-+#define GL_ATI_separate_stencil 1
-+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
-+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
-+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
-+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
-+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-+#endif
-+#endif /* GL_ATI_separate_stencil */
-+
-+#ifndef GL_ATI_text_fragment_shader
-+#define GL_ATI_text_fragment_shader 1
-+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
-+#endif /* GL_ATI_text_fragment_shader */
-+
-+#ifndef GL_ATI_texture_env_combine3
-+#define GL_ATI_texture_env_combine3 1
-+#define GL_MODULATE_ADD_ATI 0x8744
-+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
-+#define GL_MODULATE_SUBTRACT_ATI 0x8746
-+#endif /* GL_ATI_texture_env_combine3 */
-+
-+#ifndef GL_ATI_texture_float
-+#define GL_ATI_texture_float 1
-+#define GL_RGBA_FLOAT32_ATI 0x8814
-+#define GL_RGB_FLOAT32_ATI 0x8815
-+#define GL_ALPHA_FLOAT32_ATI 0x8816
-+#define GL_INTENSITY_FLOAT32_ATI 0x8817
-+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
-+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
-+#define GL_RGBA_FLOAT16_ATI 0x881A
-+#define GL_RGB_FLOAT16_ATI 0x881B
-+#define GL_ALPHA_FLOAT16_ATI 0x881C
-+#define GL_INTENSITY_FLOAT16_ATI 0x881D
-+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
-+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
-+#endif /* GL_ATI_texture_float */
-+
-+#ifndef GL_ATI_texture_mirror_once
-+#define GL_ATI_texture_mirror_once 1
-+#define GL_MIRROR_CLAMP_ATI 0x8742
-+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
-+#endif /* GL_ATI_texture_mirror_once */
-+
-+#ifndef GL_ATI_vertex_array_object
-+#define GL_ATI_vertex_array_object 1
-+#define GL_STATIC_ATI 0x8760
-+#define GL_DYNAMIC_ATI 0x8761
-+#define GL_PRESERVE_ATI 0x8762
-+#define GL_DISCARD_ATI 0x8763
-+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
-+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
-+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
-+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
-+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
-+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
-+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
-+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
-+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
-+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
-+GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_ATI_vertex_array_object */
-+
-+#ifndef GL_ATI_vertex_attrib_array_object
-+#define GL_ATI_vertex_attrib_array_object 1
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
-+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_ATI_vertex_attrib_array_object */
-+
-+#ifndef GL_ATI_vertex_streams
-+#define GL_ATI_vertex_streams 1
-+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
-+#define GL_VERTEX_STREAM0_ATI 0x876C
-+#define GL_VERTEX_STREAM1_ATI 0x876D
-+#define GL_VERTEX_STREAM2_ATI 0x876E
-+#define GL_VERTEX_STREAM3_ATI 0x876F
-+#define GL_VERTEX_STREAM4_ATI 0x8770
-+#define GL_VERTEX_STREAM5_ATI 0x8771
-+#define GL_VERTEX_STREAM6_ATI 0x8772
-+#define GL_VERTEX_STREAM7_ATI 0x8773
-+#define GL_VERTEX_SOURCE_ATI 0x8774
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
-+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
-+GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
-+GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
-+GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
-+GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
-+GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
-+GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
-+GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
-+GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
-+GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
-+GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
-+GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
-+GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
-+GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
-+GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
-+GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
-+GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
-+GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
-+GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
-+GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
-+GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
-+GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
-+GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-+GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
-+GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-+GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
-+GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
-+GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
-+GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-+GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
-+GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-+GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
-+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
-+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
-+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
-+#endif
-+#endif /* GL_ATI_vertex_streams */
-+
-+#ifndef GL_EXT_422_pixels
-+#define GL_EXT_422_pixels 1
-+#define GL_422_EXT 0x80CC
-+#define GL_422_REV_EXT 0x80CD
-+#define GL_422_AVERAGE_EXT 0x80CE
-+#define GL_422_REV_AVERAGE_EXT 0x80CF
-+#endif /* GL_EXT_422_pixels */
-+
-+#ifndef GL_EXT_abgr
-+#define GL_EXT_abgr 1
-+#define GL_ABGR_EXT 0x8000
-+#endif /* GL_EXT_abgr */
-+
-+#ifndef GL_EXT_bgra
-+#define GL_EXT_bgra 1
-+#define GL_BGR_EXT 0x80E0
-+#define GL_BGRA_EXT 0x80E1
-+#endif /* GL_EXT_bgra */
-+
-+#ifndef GL_EXT_bindable_uniform
-+#define GL_EXT_bindable_uniform 1
-+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
-+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
-+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
-+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
-+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
-+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
-+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
-+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
-+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
-+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
-+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
-+#endif
-+#endif /* GL_EXT_bindable_uniform */
-+
-+#ifndef GL_EXT_blend_color
-+#define GL_EXT_blend_color 1
-+#define GL_CONSTANT_COLOR_EXT 0x8001
-+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
-+#define GL_CONSTANT_ALPHA_EXT 0x8003
-+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
-+#define GL_BLEND_COLOR_EXT 0x8005
-+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-+#endif
-+#endif /* GL_EXT_blend_color */
-+
-+#ifndef GL_EXT_blend_equation_separate
-+#define GL_EXT_blend_equation_separate 1
-+#define GL_BLEND_EQUATION_RGB_EXT 0x8009
-+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
-+#endif
-+#endif /* GL_EXT_blend_equation_separate */
-+
-+#ifndef GL_EXT_blend_func_separate
-+#define GL_EXT_blend_func_separate 1
-+#define GL_BLEND_DST_RGB_EXT 0x80C8
-+#define GL_BLEND_SRC_RGB_EXT 0x80C9
-+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
-+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+#endif
-+#endif /* GL_EXT_blend_func_separate */
-+
-+#ifndef GL_EXT_blend_logic_op
-+#define GL_EXT_blend_logic_op 1
-+#endif /* GL_EXT_blend_logic_op */
-+
-+#ifndef GL_EXT_blend_minmax
-+#define GL_EXT_blend_minmax 1
-+#define GL_MIN_EXT 0x8007
-+#define GL_MAX_EXT 0x8008
-+#define GL_FUNC_ADD_EXT 0x8006
-+#define GL_BLEND_EQUATION_EXT 0x8009
-+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
-+#endif
-+#endif /* GL_EXT_blend_minmax */
-+
-+#ifndef GL_EXT_blend_subtract
-+#define GL_EXT_blend_subtract 1
-+#define GL_FUNC_SUBTRACT_EXT 0x800A
-+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
-+#endif /* GL_EXT_blend_subtract */
-+
-+#ifndef GL_EXT_clip_volume_hint
-+#define GL_EXT_clip_volume_hint 1
-+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
-+#endif /* GL_EXT_clip_volume_hint */
-+
-+#ifndef GL_EXT_cmyka
-+#define GL_EXT_cmyka 1
-+#define GL_CMYK_EXT 0x800C
-+#define GL_CMYKA_EXT 0x800D
-+#define GL_PACK_CMYK_HINT_EXT 0x800E
-+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
-+#endif /* GL_EXT_cmyka */
-+
-+#ifndef GL_EXT_color_subtable
-+#define GL_EXT_color_subtable 1
-+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-+#endif
-+#endif /* GL_EXT_color_subtable */
-+
-+#ifndef GL_EXT_compiled_vertex_array
-+#define GL_EXT_compiled_vertex_array 1
-+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
-+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
-+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
-+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
-+GLAPI void APIENTRY glUnlockArraysEXT (void);
-+#endif
-+#endif /* GL_EXT_compiled_vertex_array */
-+
-+#ifndef GL_EXT_convolution
-+#define GL_EXT_convolution 1
-+#define GL_CONVOLUTION_1D_EXT 0x8010
-+#define GL_CONVOLUTION_2D_EXT 0x8011
-+#define GL_SEPARABLE_2D_EXT 0x8012
-+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
-+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
-+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
-+#define GL_REDUCE_EXT 0x8016
-+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
-+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
-+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
-+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
-+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
-+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
-+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
-+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
-+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
-+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
-+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
-+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
-+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
-+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
-+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
-+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
-+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
-+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
-+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
-+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
-+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
-+#endif
-+#endif /* GL_EXT_convolution */
-+
-+#ifndef GL_EXT_coordinate_frame
-+#define GL_EXT_coordinate_frame 1
-+#define GL_TANGENT_ARRAY_EXT 0x8439
-+#define GL_BINORMAL_ARRAY_EXT 0x843A
-+#define GL_CURRENT_TANGENT_EXT 0x843B
-+#define GL_CURRENT_BINORMAL_EXT 0x843C
-+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
-+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
-+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
-+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
-+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
-+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
-+#define GL_MAP1_TANGENT_EXT 0x8444
-+#define GL_MAP2_TANGENT_EXT 0x8445
-+#define GL_MAP1_BINORMAL_EXT 0x8446
-+#define GL_MAP2_BINORMAL_EXT 0x8447
-+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
-+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
-+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
-+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
-+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
-+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
-+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
-+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
-+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
-+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
-+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
-+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
-+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
-+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
-+GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
-+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
-+GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
-+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
-+GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
-+GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
-+GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
-+GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
-+GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
-+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
-+GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
-+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
-+GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
-+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
-+GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
-+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
-+GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
-+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
-+GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_EXT_coordinate_frame */
-+
-+#ifndef GL_EXT_copy_texture
-+#define GL_EXT_copy_texture 1
-+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_EXT_copy_texture */
-+
-+#ifndef GL_EXT_cull_vertex
-+#define GL_EXT_cull_vertex 1
-+#define GL_CULL_VERTEX_EXT 0x81AA
-+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
-+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
-+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_EXT_cull_vertex */
-+
-+#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
-+typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-+typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-+GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-+#endif
-+#endif /* GL_EXT_debug_label */
-+
-+#ifndef GL_EXT_debug_marker
-+#define GL_EXT_debug_marker 1
-+typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-+typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-+typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-+GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-+GLAPI void APIENTRY glPopGroupMarkerEXT (void);
-+#endif
-+#endif /* GL_EXT_debug_marker */
-+
-+#ifndef GL_EXT_depth_bounds_test
-+#define GL_EXT_depth_bounds_test 1
-+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
-+#define GL_DEPTH_BOUNDS_EXT 0x8891
-+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
-+#endif
-+#endif /* GL_EXT_depth_bounds_test */
-+
-+#ifndef GL_EXT_direct_state_access
-+#define GL_EXT_direct_state_access 1
-+#define GL_PROGRAM_MATRIX_EXT 0x8E2D
-+#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
-+#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
-+typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
-+typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-+typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-+typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
-+typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, 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 (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
-+typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
-+typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, 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 (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
-+typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
-+typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
-+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
-+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
-+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
-+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-+typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
-+typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
-+typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
-+typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
-+typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
-+typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
-+typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
-+typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
-+GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
-+GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
-+GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-+GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-+GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
-+GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
-+GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
-+GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
-+GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
-+GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
-+GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
-+GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
-+GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-+GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-+GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
-+GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
-+GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
-+GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
-+GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
-+GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
-+GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
-+GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
-+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
-+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
-+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
-+GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
-+GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
-+GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
-+GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
-+GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
-+GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
-+GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
-+GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
-+GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
-+GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
-+GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
-+GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
-+GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-+GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-+GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-+GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
-+GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
-+GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-+GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-+GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-+GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
-+GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
-+GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
-+GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
-+GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
-+GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
-+GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
-+GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
-+GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
-+GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
-+GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
-+GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
-+GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
-+GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
-+GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
-+GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
-+GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
-+GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
-+GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
-+GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
-+GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
-+GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
-+GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
-+GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
-+GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
-+GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
-+GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
-+GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
-+GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
-+GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
-+GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
-+GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
-+GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
-+GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
-+GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
-+GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
-+GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
-+GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
-+GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
-+GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-+GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-+GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-+GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
-+GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
-+GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
-+GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
-+GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
-+GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
-+GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
-+#endif
-+#endif /* GL_EXT_direct_state_access */
-+
-+#ifndef GL_EXT_draw_buffers2
-+#define GL_EXT_draw_buffers2 1
-+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-+#endif
-+#endif /* GL_EXT_draw_buffers2 */
-+
-+#ifndef GL_EXT_draw_instanced
-+#define GL_EXT_draw_instanced 1
-+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-+#endif
-+#endif /* GL_EXT_draw_instanced */
-+
-+#ifndef GL_EXT_draw_range_elements
-+#define GL_EXT_draw_range_elements 1
-+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
-+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
-+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
-+#endif
-+#endif /* GL_EXT_draw_range_elements */
-+
-+#ifndef GL_EXT_fog_coord
-+#define GL_EXT_fog_coord 1
-+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
-+#define GL_FOG_COORDINATE_EXT 0x8451
-+#define GL_FRAGMENT_DEPTH_EXT 0x8452
-+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
-+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
-+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
-+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
-+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
-+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
-+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
-+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
-+GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
-+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
-+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_EXT_fog_coord */
-+
-+#ifndef GL_EXT_framebuffer_blit
-+#define GL_EXT_framebuffer_blit 1
-+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
-+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
-+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
-+#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
-+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+#endif
-+#endif /* GL_EXT_framebuffer_blit */
-+
-+#ifndef GL_EXT_framebuffer_multisample
-+#define GL_EXT_framebuffer_multisample 1
-+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
-+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-+#define GL_MAX_SAMPLES_EXT 0x8D57
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_EXT_framebuffer_multisample */
-+
-+#ifndef GL_EXT_framebuffer_multisample_blit_scaled
-+#define GL_EXT_framebuffer_multisample_blit_scaled 1
-+#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
-+#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
-+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
-+
-+#ifndef GL_EXT_framebuffer_object
-+#define GL_EXT_framebuffer_object 1
-+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
-+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
-+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
-+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
-+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
-+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
-+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
-+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
-+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
-+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
-+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
-+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
-+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
-+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
-+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
-+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
-+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
-+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
-+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
-+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
-+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
-+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
-+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
-+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
-+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
-+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
-+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
-+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
-+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
-+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
-+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
-+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
-+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
-+#define GL_FRAMEBUFFER_EXT 0x8D40
-+#define GL_RENDERBUFFER_EXT 0x8D41
-+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
-+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
-+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
-+#define GL_STENCIL_INDEX1_EXT 0x8D46
-+#define GL_STENCIL_INDEX4_EXT 0x8D47
-+#define GL_STENCIL_INDEX8_EXT 0x8D48
-+#define GL_STENCIL_INDEX16_EXT 0x8D49
-+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
-+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
-+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
-+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
-+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
-+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
-+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
-+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
-+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
-+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
-+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
-+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
-+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
-+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
-+GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
-+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
-+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
-+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
-+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
-+#endif
-+#endif /* GL_EXT_framebuffer_object */
-+
-+#ifndef GL_EXT_framebuffer_sRGB
-+#define GL_EXT_framebuffer_sRGB 1
-+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
-+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
-+#endif /* GL_EXT_framebuffer_sRGB */
-+
-+#ifndef GL_EXT_geometry_shader4
-+#define GL_EXT_geometry_shader4 1
-+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
-+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
-+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
-+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
-+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
-+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
-+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
-+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
-+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
-+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
-+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
-+#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_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
-+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
-+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
-+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-+#endif
-+#endif /* GL_EXT_geometry_shader4 */
-+
-+#ifndef GL_EXT_gpu_program_parameters
-+#define GL_EXT_gpu_program_parameters 1
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
-+#endif
-+#endif /* GL_EXT_gpu_program_parameters */
-+
-+#ifndef GL_EXT_gpu_shader4
-+#define GL_EXT_gpu_shader4 1
-+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
-+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
-+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
-+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
-+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
-+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
-+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
-+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
-+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
-+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
-+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
-+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
-+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
-+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
-+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
-+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
-+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
-+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
-+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
-+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
-+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
-+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
-+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
-+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
-+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
-+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
-+#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
-+#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
-+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
-+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
-+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
-+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
-+GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
-+GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
-+GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-+GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
-+GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
-+#endif
-+#endif /* GL_EXT_gpu_shader4 */
-+
-+#ifndef GL_EXT_histogram
-+#define GL_EXT_histogram 1
-+#define GL_HISTOGRAM_EXT 0x8024
-+#define GL_PROXY_HISTOGRAM_EXT 0x8025
-+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
-+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
-+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
-+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
-+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
-+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
-+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
-+#define GL_HISTOGRAM_SINK_EXT 0x802D
-+#define GL_MINMAX_EXT 0x802E
-+#define GL_MINMAX_FORMAT_EXT 0x802F
-+#define GL_MINMAX_SINK_EXT 0x8030
-+#define GL_TABLE_TOO_LARGE_EXT 0x8031
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
-+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-+GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
-+GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
-+GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
-+#endif
-+#endif /* GL_EXT_histogram */
-+
-+#ifndef GL_EXT_index_array_formats
-+#define GL_EXT_index_array_formats 1
-+#define GL_IUI_V2F_EXT 0x81AD
-+#define GL_IUI_V3F_EXT 0x81AE
-+#define GL_IUI_N3F_V2F_EXT 0x81AF
-+#define GL_IUI_N3F_V3F_EXT 0x81B0
-+#define GL_T2F_IUI_V2F_EXT 0x81B1
-+#define GL_T2F_IUI_V3F_EXT 0x81B2
-+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
-+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
-+#endif /* GL_EXT_index_array_formats */
-+
-+#ifndef GL_EXT_index_func
-+#define GL_EXT_index_func 1
-+#define GL_INDEX_TEST_EXT 0x81B5
-+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
-+#define GL_INDEX_TEST_REF_EXT 0x81B7
-+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
-+#endif
-+#endif /* GL_EXT_index_func */
-+
-+#ifndef GL_EXT_index_material
-+#define GL_EXT_index_material 1
-+#define GL_INDEX_MATERIAL_EXT 0x81B8
-+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
-+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
-+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
-+#endif
-+#endif /* GL_EXT_index_material */
-+
-+#ifndef GL_EXT_index_texture
-+#define GL_EXT_index_texture 1
-+#endif /* GL_EXT_index_texture */
-+
-+#ifndef GL_EXT_light_texture
-+#define GL_EXT_light_texture 1
-+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
-+#define GL_FRAGMENT_NORMAL_EXT 0x834A
-+#define GL_FRAGMENT_COLOR_EXT 0x834C
-+#define GL_ATTENUATION_EXT 0x834D
-+#define GL_SHADOW_ATTENUATION_EXT 0x834E
-+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
-+#define GL_TEXTURE_LIGHT_EXT 0x8350
-+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
-+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
-+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
-+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
-+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
-+GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
-+GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
-+#endif
-+#endif /* GL_EXT_light_texture */
-+
-+#ifndef GL_EXT_misc_attribute
-+#define GL_EXT_misc_attribute 1
-+#endif /* GL_EXT_misc_attribute */
-+
-+#ifndef GL_EXT_multi_draw_arrays
-+#define GL_EXT_multi_draw_arrays 1
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-+GLAPI void 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_multisample
-+#define GL_EXT_multisample 1
-+#define GL_MULTISAMPLE_EXT 0x809D
-+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
-+#define GL_SAMPLE_MASK_EXT 0x80A0
-+#define GL_1PASS_EXT 0x80A1
-+#define GL_2PASS_0_EXT 0x80A2
-+#define GL_2PASS_1_EXT 0x80A3
-+#define GL_4PASS_0_EXT 0x80A4
-+#define GL_4PASS_1_EXT 0x80A5
-+#define GL_4PASS_2_EXT 0x80A6
-+#define GL_4PASS_3_EXT 0x80A7
-+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
-+#define GL_SAMPLES_EXT 0x80A9
-+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
-+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
-+#define GL_SAMPLE_PATTERN_EXT 0x80AC
-+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
-+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
-+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
-+GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
-+#endif
-+#endif /* GL_EXT_multisample */
-+
-+#ifndef GL_EXT_packed_depth_stencil
-+#define GL_EXT_packed_depth_stencil 1
-+#define GL_DEPTH_STENCIL_EXT 0x84F9
-+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
-+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
-+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
-+#endif /* GL_EXT_packed_depth_stencil */
-+
-+#ifndef GL_EXT_packed_float
-+#define GL_EXT_packed_float 1
-+#define GL_R11F_G11F_B10F_EXT 0x8C3A
-+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
-+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
-+#endif /* GL_EXT_packed_float */
-+
-+#ifndef GL_EXT_packed_pixels
-+#define GL_EXT_packed_pixels 1
-+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
-+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
-+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
-+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
-+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
-+#endif /* GL_EXT_packed_pixels */
-+
-+#ifndef GL_EXT_paletted_texture
-+#define GL_EXT_paletted_texture 1
-+#define GL_COLOR_INDEX1_EXT 0x80E2
-+#define GL_COLOR_INDEX2_EXT 0x80E3
-+#define GL_COLOR_INDEX4_EXT 0x80E4
-+#define GL_COLOR_INDEX8_EXT 0x80E5
-+#define GL_COLOR_INDEX12_EXT 0x80E6
-+#define GL_COLOR_INDEX16_EXT 0x80E7
-+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
-+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
-+GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
-+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_EXT_paletted_texture */
-+
-+#ifndef GL_EXT_pixel_buffer_object
-+#define GL_EXT_pixel_buffer_object 1
-+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
-+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
-+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
-+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
-+#endif /* GL_EXT_pixel_buffer_object */
-+
-+#ifndef GL_EXT_pixel_transform
-+#define GL_EXT_pixel_transform 1
-+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
-+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
-+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
-+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
-+#define GL_CUBIC_EXT 0x8334
-+#define GL_AVERAGE_EXT 0x8335
-+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
-+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
-+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
-+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_EXT_pixel_transform */
-+
-+#ifndef GL_EXT_pixel_transform_color_table
-+#define GL_EXT_pixel_transform_color_table 1
-+#endif /* GL_EXT_pixel_transform_color_table */
-+
-+#ifndef GL_EXT_point_parameters
-+#define GL_EXT_point_parameters 1
-+#define GL_POINT_SIZE_MIN_EXT 0x8126
-+#define GL_POINT_SIZE_MAX_EXT 0x8127
-+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
-+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
-+#endif
-+#endif /* GL_EXT_point_parameters */
-+
-+#ifndef GL_EXT_polygon_offset
-+#define GL_EXT_polygon_offset 1
-+#define GL_POLYGON_OFFSET_EXT 0x8037
-+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
-+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
-+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
-+#endif
-+#endif /* GL_EXT_polygon_offset */
-+
-+#ifndef GL_EXT_polygon_offset_clamp
-+#define GL_EXT_polygon_offset_clamp 1
-+#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B
-+typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp);
-+#endif
-+#endif /* GL_EXT_polygon_offset_clamp */
-+
-+#ifndef GL_EXT_post_depth_coverage
-+#define GL_EXT_post_depth_coverage 1
-+#endif /* GL_EXT_post_depth_coverage */
-+
-+#ifndef GL_EXT_provoking_vertex
-+#define GL_EXT_provoking_vertex 1
-+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
-+#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
-+#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
-+#define GL_PROVOKING_VERTEX_EXT 0x8E4F
-+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
-+#endif
-+#endif /* GL_EXT_provoking_vertex */
-+
-+#ifndef GL_EXT_raster_multisample
-+#define GL_EXT_raster_multisample 1
-+#define GL_RASTER_MULTISAMPLE_EXT 0x9327
-+#define GL_RASTER_SAMPLES_EXT 0x9328
-+#define GL_MAX_RASTER_SAMPLES_EXT 0x9329
-+#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A
-+#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B
-+#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C
-+typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations);
-+#endif
-+#endif /* GL_EXT_raster_multisample */
-+
-+#ifndef GL_EXT_rescale_normal
-+#define GL_EXT_rescale_normal 1
-+#define GL_RESCALE_NORMAL_EXT 0x803A
-+#endif /* GL_EXT_rescale_normal */
-+
-+#ifndef GL_EXT_secondary_color
-+#define GL_EXT_secondary_color 1
-+#define GL_COLOR_SUM_EXT 0x8458
-+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
-+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
-+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
-+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
-+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
-+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
-+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
-+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
-+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
-+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
-+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
-+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
-+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
-+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
-+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
-+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
-+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
-+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
-+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
-+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
-+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
-+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_EXT_secondary_color */
-+
-+#ifndef GL_EXT_separate_shader_objects
-+#define GL_EXT_separate_shader_objects 1
-+#define GL_ACTIVE_PROGRAM_EXT 0x8B8D
-+typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
-+typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
-+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
-+GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
-+GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
-+#endif
-+#endif /* GL_EXT_separate_shader_objects */
-+
-+#ifndef GL_EXT_separate_specular_color
-+#define GL_EXT_separate_specular_color 1
-+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
-+#define GL_SINGLE_COLOR_EXT 0x81F9
-+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
-+#endif /* GL_EXT_separate_specular_color */
-+
-+#ifndef GL_EXT_shader_image_load_formatted
-+#define GL_EXT_shader_image_load_formatted 1
-+#endif /* GL_EXT_shader_image_load_formatted */
-+
-+#ifndef GL_EXT_shader_image_load_store
-+#define GL_EXT_shader_image_load_store 1
-+#define GL_MAX_IMAGE_UNITS_EXT 0x8F38
-+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
-+#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
-+#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
-+#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
-+#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
-+#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
-+#define GL_IMAGE_1D_EXT 0x904C
-+#define GL_IMAGE_2D_EXT 0x904D
-+#define GL_IMAGE_3D_EXT 0x904E
-+#define GL_IMAGE_2D_RECT_EXT 0x904F
-+#define GL_IMAGE_CUBE_EXT 0x9050
-+#define GL_IMAGE_BUFFER_EXT 0x9051
-+#define GL_IMAGE_1D_ARRAY_EXT 0x9052
-+#define GL_IMAGE_2D_ARRAY_EXT 0x9053
-+#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
-+#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
-+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
-+#define GL_INT_IMAGE_1D_EXT 0x9057
-+#define GL_INT_IMAGE_2D_EXT 0x9058
-+#define GL_INT_IMAGE_3D_EXT 0x9059
-+#define GL_INT_IMAGE_2D_RECT_EXT 0x905A
-+#define GL_INT_IMAGE_CUBE_EXT 0x905B
-+#define GL_INT_IMAGE_BUFFER_EXT 0x905C
-+#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
-+#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
-+#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
-+#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
-+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
-+#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
-+#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
-+#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
-+#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
-+#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
-+#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
-+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
-+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
-+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
-+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
-+#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
-+#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
-+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
-+#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
-+#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
-+#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
-+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
-+#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
-+#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
-+#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
-+#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
-+#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
-+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
-+#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
-+#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
-+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
-+typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
-+GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
-+#endif
-+#endif /* GL_EXT_shader_image_load_store */
-+
-+#ifndef GL_EXT_shader_integer_mix
-+#define GL_EXT_shader_integer_mix 1
-+#endif /* GL_EXT_shader_integer_mix */
-+
-+#ifndef GL_EXT_shadow_funcs
-+#define GL_EXT_shadow_funcs 1
-+#endif /* GL_EXT_shadow_funcs */
-+
-+#ifndef GL_EXT_shared_texture_palette
-+#define GL_EXT_shared_texture_palette 1
-+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
-+#endif /* GL_EXT_shared_texture_palette */
-+
-+#ifndef GL_EXT_sparse_texture2
-+#define GL_EXT_sparse_texture2 1
-+#endif /* GL_EXT_sparse_texture2 */
-+
-+#ifndef GL_EXT_stencil_clear_tag
-+#define GL_EXT_stencil_clear_tag 1
-+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
-+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
-+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
-+#endif
-+#endif /* GL_EXT_stencil_clear_tag */
-+
-+#ifndef GL_EXT_stencil_two_side
-+#define GL_EXT_stencil_two_side 1
-+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
-+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
-+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
-+#endif
-+#endif /* GL_EXT_stencil_two_side */
-+
-+#ifndef GL_EXT_stencil_wrap
-+#define GL_EXT_stencil_wrap 1
-+#define GL_INCR_WRAP_EXT 0x8507
-+#define GL_DECR_WRAP_EXT 0x8508
-+#endif /* GL_EXT_stencil_wrap */
-+
-+#ifndef GL_EXT_subtexture
-+#define GL_EXT_subtexture 1
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-+#endif
-+#endif /* GL_EXT_subtexture */
-+
-+#ifndef GL_EXT_texture
-+#define GL_EXT_texture 1
-+#define GL_ALPHA4_EXT 0x803B
-+#define GL_ALPHA8_EXT 0x803C
-+#define GL_ALPHA12_EXT 0x803D
-+#define GL_ALPHA16_EXT 0x803E
-+#define GL_LUMINANCE4_EXT 0x803F
-+#define GL_LUMINANCE8_EXT 0x8040
-+#define GL_LUMINANCE12_EXT 0x8041
-+#define GL_LUMINANCE16_EXT 0x8042
-+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
-+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
-+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
-+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
-+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
-+#define GL_INTENSITY_EXT 0x8049
-+#define GL_INTENSITY4_EXT 0x804A
-+#define GL_INTENSITY8_EXT 0x804B
-+#define GL_INTENSITY12_EXT 0x804C
-+#define GL_INTENSITY16_EXT 0x804D
-+#define GL_RGB2_EXT 0x804E
-+#define GL_RGB4_EXT 0x804F
-+#define GL_RGB5_EXT 0x8050
-+#define GL_RGB8_EXT 0x8051
-+#define GL_RGB10_EXT 0x8052
-+#define GL_RGB12_EXT 0x8053
-+#define GL_RGB16_EXT 0x8054
-+#define GL_RGBA2_EXT 0x8055
-+#define GL_RGBA4_EXT 0x8056
-+#define GL_RGB5_A1_EXT 0x8057
-+#define GL_RGBA8_EXT 0x8058
-+#define GL_RGB10_A2_EXT 0x8059
-+#define GL_RGBA12_EXT 0x805A
-+#define GL_RGBA16_EXT 0x805B
-+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
-+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
-+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
-+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
-+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
-+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
-+#define GL_REPLACE_EXT 0x8062
-+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
-+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
-+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
-+#endif /* GL_EXT_texture */
-+
-+#ifndef GL_EXT_texture3D
-+#define GL_EXT_texture3D 1
-+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
-+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
-+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
-+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
-+#define GL_TEXTURE_3D_EXT 0x806F
-+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
-+#define GL_TEXTURE_DEPTH_EXT 0x8071
-+#define GL_TEXTURE_WRAP_R_EXT 0x8072
-+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-+#endif
-+#endif /* GL_EXT_texture3D */
-+
-+#ifndef GL_EXT_texture_array
-+#define GL_EXT_texture_array 1
-+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
-+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
-+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
-+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
-+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
-+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
-+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
-+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-+#endif
-+#endif /* GL_EXT_texture_array */
-+
-+#ifndef GL_EXT_texture_buffer_object
-+#define GL_EXT_texture_buffer_object 1
-+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
-+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
-+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
-+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
-+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
-+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
-+#endif
-+#endif /* GL_EXT_texture_buffer_object */
-+
-+#ifndef GL_EXT_texture_compression_latc
-+#define GL_EXT_texture_compression_latc 1
-+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
-+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
-+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
-+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
-+#endif /* GL_EXT_texture_compression_latc */
-+
-+#ifndef GL_EXT_texture_compression_rgtc
-+#define GL_EXT_texture_compression_rgtc 1
-+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
-+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
-+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
-+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
-+#endif /* GL_EXT_texture_compression_rgtc */
-+
-+#ifndef GL_EXT_texture_compression_s3tc
-+#define GL_EXT_texture_compression_s3tc 1
-+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-+#endif /* GL_EXT_texture_compression_s3tc */
-+
-+#ifndef GL_EXT_texture_cube_map
-+#define GL_EXT_texture_cube_map 1
-+#define GL_NORMAL_MAP_EXT 0x8511
-+#define GL_REFLECTION_MAP_EXT 0x8512
-+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
-+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
-+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
-+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
-+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
-+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
-+#endif /* GL_EXT_texture_cube_map */
-+
-+#ifndef GL_EXT_texture_env_add
-+#define GL_EXT_texture_env_add 1
-+#endif /* GL_EXT_texture_env_add */
-+
-+#ifndef GL_EXT_texture_env_combine
-+#define GL_EXT_texture_env_combine 1
-+#define GL_COMBINE_EXT 0x8570
-+#define GL_COMBINE_RGB_EXT 0x8571
-+#define GL_COMBINE_ALPHA_EXT 0x8572
-+#define GL_RGB_SCALE_EXT 0x8573
-+#define GL_ADD_SIGNED_EXT 0x8574
-+#define GL_INTERPOLATE_EXT 0x8575
-+#define GL_CONSTANT_EXT 0x8576
-+#define GL_PRIMARY_COLOR_EXT 0x8577
-+#define GL_PREVIOUS_EXT 0x8578
-+#define GL_SOURCE0_RGB_EXT 0x8580
-+#define GL_SOURCE1_RGB_EXT 0x8581
-+#define GL_SOURCE2_RGB_EXT 0x8582
-+#define GL_SOURCE0_ALPHA_EXT 0x8588
-+#define GL_SOURCE1_ALPHA_EXT 0x8589
-+#define GL_SOURCE2_ALPHA_EXT 0x858A
-+#define GL_OPERAND0_RGB_EXT 0x8590
-+#define GL_OPERAND1_RGB_EXT 0x8591
-+#define GL_OPERAND2_RGB_EXT 0x8592
-+#define GL_OPERAND0_ALPHA_EXT 0x8598
-+#define GL_OPERAND1_ALPHA_EXT 0x8599
-+#define GL_OPERAND2_ALPHA_EXT 0x859A
-+#endif /* GL_EXT_texture_env_combine */
-+
-+#ifndef GL_EXT_texture_env_dot3
-+#define GL_EXT_texture_env_dot3 1
-+#define GL_DOT3_RGB_EXT 0x8740
-+#define GL_DOT3_RGBA_EXT 0x8741
-+#endif /* GL_EXT_texture_env_dot3 */
-+
-+#ifndef GL_EXT_texture_filter_anisotropic
-+#define GL_EXT_texture_filter_anisotropic 1
-+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-+#endif /* GL_EXT_texture_filter_anisotropic */
-+
-+#ifndef GL_EXT_texture_filter_minmax
-+#define GL_EXT_texture_filter_minmax 1
-+#endif /* GL_EXT_texture_filter_minmax */
-+
-+#ifndef GL_EXT_texture_integer
-+#define GL_EXT_texture_integer 1
-+#define GL_RGBA32UI_EXT 0x8D70
-+#define GL_RGB32UI_EXT 0x8D71
-+#define GL_ALPHA32UI_EXT 0x8D72
-+#define GL_INTENSITY32UI_EXT 0x8D73
-+#define GL_LUMINANCE32UI_EXT 0x8D74
-+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
-+#define GL_RGBA16UI_EXT 0x8D76
-+#define GL_RGB16UI_EXT 0x8D77
-+#define GL_ALPHA16UI_EXT 0x8D78
-+#define GL_INTENSITY16UI_EXT 0x8D79
-+#define GL_LUMINANCE16UI_EXT 0x8D7A
-+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
-+#define GL_RGBA8UI_EXT 0x8D7C
-+#define GL_RGB8UI_EXT 0x8D7D
-+#define GL_ALPHA8UI_EXT 0x8D7E
-+#define GL_INTENSITY8UI_EXT 0x8D7F
-+#define GL_LUMINANCE8UI_EXT 0x8D80
-+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
-+#define GL_RGBA32I_EXT 0x8D82
-+#define GL_RGB32I_EXT 0x8D83
-+#define GL_ALPHA32I_EXT 0x8D84
-+#define GL_INTENSITY32I_EXT 0x8D85
-+#define GL_LUMINANCE32I_EXT 0x8D86
-+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
-+#define GL_RGBA16I_EXT 0x8D88
-+#define GL_RGB16I_EXT 0x8D89
-+#define GL_ALPHA16I_EXT 0x8D8A
-+#define GL_INTENSITY16I_EXT 0x8D8B
-+#define GL_LUMINANCE16I_EXT 0x8D8C
-+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
-+#define GL_RGBA8I_EXT 0x8D8E
-+#define GL_RGB8I_EXT 0x8D8F
-+#define GL_ALPHA8I_EXT 0x8D90
-+#define GL_INTENSITY8I_EXT 0x8D91
-+#define GL_LUMINANCE8I_EXT 0x8D92
-+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
-+#define GL_RED_INTEGER_EXT 0x8D94
-+#define GL_GREEN_INTEGER_EXT 0x8D95
-+#define GL_BLUE_INTEGER_EXT 0x8D96
-+#define GL_ALPHA_INTEGER_EXT 0x8D97
-+#define GL_RGB_INTEGER_EXT 0x8D98
-+#define GL_RGBA_INTEGER_EXT 0x8D99
-+#define GL_BGR_INTEGER_EXT 0x8D9A
-+#define GL_BGRA_INTEGER_EXT 0x8D9B
-+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
-+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
-+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
-+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
-+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
-+GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
-+#endif
-+#endif /* GL_EXT_texture_integer */
-+
-+#ifndef GL_EXT_texture_lod_bias
-+#define GL_EXT_texture_lod_bias 1
-+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
-+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
-+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
-+#endif /* GL_EXT_texture_lod_bias */
-+
-+#ifndef GL_EXT_texture_mirror_clamp
-+#define GL_EXT_texture_mirror_clamp 1
-+#define GL_MIRROR_CLAMP_EXT 0x8742
-+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
-+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
-+#endif /* GL_EXT_texture_mirror_clamp */
-+
-+#ifndef GL_EXT_texture_object
-+#define GL_EXT_texture_object 1
-+#define GL_TEXTURE_PRIORITY_EXT 0x8066
-+#define GL_TEXTURE_RESIDENT_EXT 0x8067
-+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
-+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
-+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
-+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
-+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
-+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
-+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
-+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
-+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
-+GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
-+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
-+GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
-+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
-+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-+#endif
-+#endif /* GL_EXT_texture_object */
-+
-+#ifndef GL_EXT_texture_perturb_normal
-+#define GL_EXT_texture_perturb_normal 1
-+#define GL_PERTURB_EXT 0x85AE
-+#define GL_TEXTURE_NORMAL_EXT 0x85AF
-+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
-+#endif
-+#endif /* GL_EXT_texture_perturb_normal */
-+
-+#ifndef GL_EXT_texture_sRGB
-+#define GL_EXT_texture_sRGB 1
-+#define GL_SRGB_EXT 0x8C40
-+#define GL_SRGB8_EXT 0x8C41
-+#define GL_SRGB_ALPHA_EXT 0x8C42
-+#define GL_SRGB8_ALPHA8_EXT 0x8C43
-+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
-+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
-+#define GL_SLUMINANCE_EXT 0x8C46
-+#define GL_SLUMINANCE8_EXT 0x8C47
-+#define GL_COMPRESSED_SRGB_EXT 0x8C48
-+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
-+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
-+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
-+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
-+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
-+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
-+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
-+#endif /* GL_EXT_texture_sRGB */
-+
-+#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_shared_exponent
-+#define GL_EXT_texture_shared_exponent 1
-+#define GL_RGB9_E5_EXT 0x8C3D
-+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
-+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
-+#endif /* GL_EXT_texture_shared_exponent */
-+
-+#ifndef GL_EXT_texture_snorm
-+#define GL_EXT_texture_snorm 1
-+#define GL_ALPHA_SNORM 0x9010
-+#define GL_LUMINANCE_SNORM 0x9011
-+#define GL_LUMINANCE_ALPHA_SNORM 0x9012
-+#define GL_INTENSITY_SNORM 0x9013
-+#define GL_ALPHA8_SNORM 0x9014
-+#define GL_LUMINANCE8_SNORM 0x9015
-+#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
-+#define GL_INTENSITY8_SNORM 0x9017
-+#define GL_ALPHA16_SNORM 0x9018
-+#define GL_LUMINANCE16_SNORM 0x9019
-+#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
-+#define GL_INTENSITY16_SNORM 0x901B
-+#define GL_RED_SNORM 0x8F90
-+#define GL_RG_SNORM 0x8F91
-+#define GL_RGB_SNORM 0x8F92
-+#define GL_RGBA_SNORM 0x8F93
-+#endif /* GL_EXT_texture_snorm */
-+
-+#ifndef GL_EXT_texture_swizzle
-+#define GL_EXT_texture_swizzle 1
-+#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
-+#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
-+#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
-+#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
-+#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
-+#endif /* GL_EXT_texture_swizzle */
-+
-+#ifndef GL_EXT_timer_query
-+#define GL_EXT_timer_query 1
-+#define GL_TIME_ELAPSED_EXT 0x88BF
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
-+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
-+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
-+#endif
-+#endif /* GL_EXT_timer_query */
-+
-+#ifndef GL_EXT_transform_feedback
-+#define GL_EXT_transform_feedback 1
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
-+#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
-+#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
-+#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
-+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
-+#define GL_RASTERIZER_DISCARD_EXT 0x8C89
-+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
-+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
-+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
-+#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
-+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
-+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
-+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
-+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-+typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
-+GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
-+GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-+GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
-+GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+#endif
-+#endif /* GL_EXT_transform_feedback */
-+
-+#ifndef GL_EXT_vertex_array
-+#define GL_EXT_vertex_array 1
-+#define GL_VERTEX_ARRAY_EXT 0x8074
-+#define GL_NORMAL_ARRAY_EXT 0x8075
-+#define GL_COLOR_ARRAY_EXT 0x8076
-+#define GL_INDEX_ARRAY_EXT 0x8077
-+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
-+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
-+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
-+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
-+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
-+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
-+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
-+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
-+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
-+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
-+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
-+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
-+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
-+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
-+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
-+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
-+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
-+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
-+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
-+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
-+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
-+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
-+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
-+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
-+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
-+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
-+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
-+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
-+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
-+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
-+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
-+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
-+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glArrayElementEXT (GLint i);
-+GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
-+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
-+GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
-+GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
-+#endif
-+#endif /* GL_EXT_vertex_array */
-+
-+#ifndef GL_EXT_vertex_array_bgra
-+#define GL_EXT_vertex_array_bgra 1
-+#endif /* GL_EXT_vertex_array_bgra */
-+
-+#ifndef GL_EXT_vertex_attrib_64bit
-+#define GL_EXT_vertex_attrib_64bit 1
-+#define GL_DOUBLE_VEC2_EXT 0x8FFC
-+#define GL_DOUBLE_VEC3_EXT 0x8FFD
-+#define GL_DOUBLE_VEC4_EXT 0x8FFE
-+#define GL_DOUBLE_MAT2_EXT 0x8F46
-+#define GL_DOUBLE_MAT3_EXT 0x8F47
-+#define GL_DOUBLE_MAT4_EXT 0x8F48
-+#define GL_DOUBLE_MAT2x3_EXT 0x8F49
-+#define GL_DOUBLE_MAT2x4_EXT 0x8F4A
-+#define GL_DOUBLE_MAT3x2_EXT 0x8F4B
-+#define GL_DOUBLE_MAT3x4_EXT 0x8F4C
-+#define GL_DOUBLE_MAT4x2_EXT 0x8F4D
-+#define GL_DOUBLE_MAT4x3_EXT 0x8F4E
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
-+#endif
-+#endif /* GL_EXT_vertex_attrib_64bit */
-+
-+#ifndef GL_EXT_vertex_shader
-+#define GL_EXT_vertex_shader 1
-+#define GL_VERTEX_SHADER_EXT 0x8780
-+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
-+#define GL_OP_INDEX_EXT 0x8782
-+#define GL_OP_NEGATE_EXT 0x8783
-+#define GL_OP_DOT3_EXT 0x8784
-+#define GL_OP_DOT4_EXT 0x8785
-+#define GL_OP_MUL_EXT 0x8786
-+#define GL_OP_ADD_EXT 0x8787
-+#define GL_OP_MADD_EXT 0x8788
-+#define GL_OP_FRAC_EXT 0x8789
-+#define GL_OP_MAX_EXT 0x878A
-+#define GL_OP_MIN_EXT 0x878B
-+#define GL_OP_SET_GE_EXT 0x878C
-+#define GL_OP_SET_LT_EXT 0x878D
-+#define GL_OP_CLAMP_EXT 0x878E
-+#define GL_OP_FLOOR_EXT 0x878F
-+#define GL_OP_ROUND_EXT 0x8790
-+#define GL_OP_EXP_BASE_2_EXT 0x8791
-+#define GL_OP_LOG_BASE_2_EXT 0x8792
-+#define GL_OP_POWER_EXT 0x8793
-+#define GL_OP_RECIP_EXT 0x8794
-+#define GL_OP_RECIP_SQRT_EXT 0x8795
-+#define GL_OP_SUB_EXT 0x8796
-+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
-+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
-+#define GL_OP_MOV_EXT 0x8799
-+#define GL_OUTPUT_VERTEX_EXT 0x879A
-+#define GL_OUTPUT_COLOR0_EXT 0x879B
-+#define GL_OUTPUT_COLOR1_EXT 0x879C
-+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
-+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
-+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
-+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
-+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
-+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
-+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
-+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
-+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
-+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
-+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
-+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
-+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
-+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
-+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
-+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
-+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
-+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
-+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
-+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
-+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
-+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
-+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
-+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
-+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
-+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
-+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
-+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
-+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
-+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
-+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
-+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
-+#define GL_OUTPUT_FOG_EXT 0x87BD
-+#define GL_SCALAR_EXT 0x87BE
-+#define GL_VECTOR_EXT 0x87BF
-+#define GL_MATRIX_EXT 0x87C0
-+#define GL_VARIANT_EXT 0x87C1
-+#define GL_INVARIANT_EXT 0x87C2
-+#define GL_LOCAL_CONSTANT_EXT 0x87C3
-+#define GL_LOCAL_EXT 0x87C4
-+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
-+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
-+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
-+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
-+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
-+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
-+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
-+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
-+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
-+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
-+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
-+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
-+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
-+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
-+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
-+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
-+#define GL_X_EXT 0x87D5
-+#define GL_Y_EXT 0x87D6
-+#define GL_Z_EXT 0x87D7
-+#define GL_W_EXT 0x87D8
-+#define GL_NEGATIVE_X_EXT 0x87D9
-+#define GL_NEGATIVE_Y_EXT 0x87DA
-+#define GL_NEGATIVE_Z_EXT 0x87DB
-+#define GL_NEGATIVE_W_EXT 0x87DC
-+#define GL_ZERO_EXT 0x87DD
-+#define GL_ONE_EXT 0x87DE
-+#define GL_NEGATIVE_ONE_EXT 0x87DF
-+#define GL_NORMALIZED_RANGE_EXT 0x87E0
-+#define GL_FULL_RANGE_EXT 0x87E1
-+#define GL_CURRENT_VERTEX_EXT 0x87E2
-+#define GL_MVP_MATRIX_EXT 0x87E3
-+#define GL_VARIANT_VALUE_EXT 0x87E4
-+#define GL_VARIANT_DATATYPE_EXT 0x87E5
-+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
-+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
-+#define GL_VARIANT_ARRAY_EXT 0x87E8
-+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
-+#define GL_INVARIANT_VALUE_EXT 0x87EA
-+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
-+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
-+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
-+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
-+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
-+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
-+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
-+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
-+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
-+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
-+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
-+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
-+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
-+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
-+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
-+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
-+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
-+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
-+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
-+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
-+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
-+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
-+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
-+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
-+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
-+GLAPI void APIENTRY glEndVertexShaderEXT (void);
-+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
-+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
-+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
-+GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
-+GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-+GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-+GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-+GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-+GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
-+GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
-+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-+GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
-+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
-+GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
-+GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
-+GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
-+GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
-+GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
-+GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
-+GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
-+GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
-+GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
-+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
-+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
-+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
-+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
-+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
-+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
-+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
-+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
-+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
-+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
-+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
-+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
-+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
-+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
-+#endif
-+#endif /* GL_EXT_vertex_shader */
-+
-+#ifndef GL_EXT_vertex_weighting
-+#define GL_EXT_vertex_weighting 1
-+#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
-+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
-+#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
-+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
-+#define GL_VERTEX_WEIGHTING_EXT 0x8509
-+#define GL_MODELVIEW0_EXT 0x1700
-+#define GL_MODELVIEW1_EXT 0x850A
-+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
-+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
-+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
-+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
-+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
-+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
-+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
-+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
-+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
-+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
-+GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
-+#endif
-+#endif /* GL_EXT_vertex_weighting */
-+
-+#ifndef GL_EXT_x11_sync_object
-+#define GL_EXT_x11_sync_object 1
-+#define GL_SYNC_X11_FENCE_EXT 0x90E1
-+typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
-+#endif
-+#endif /* GL_EXT_x11_sync_object */
-+
-+#ifndef GL_GREMEDY_frame_terminator
-+#define GL_GREMEDY_frame_terminator 1
-+typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
-+#endif
-+#endif /* GL_GREMEDY_frame_terminator */
-+
-+#ifndef GL_GREMEDY_string_marker
-+#define GL_GREMEDY_string_marker 1
-+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
-+#endif
-+#endif /* GL_GREMEDY_string_marker */
-+
-+#ifndef GL_HP_convolution_border_modes
-+#define GL_HP_convolution_border_modes 1
-+#define GL_IGNORE_BORDER_HP 0x8150
-+#define GL_CONSTANT_BORDER_HP 0x8151
-+#define GL_REPLICATE_BORDER_HP 0x8153
-+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
-+#endif /* GL_HP_convolution_border_modes */
-+
-+#ifndef GL_HP_image_transform
-+#define GL_HP_image_transform 1
-+#define GL_IMAGE_SCALE_X_HP 0x8155
-+#define GL_IMAGE_SCALE_Y_HP 0x8156
-+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
-+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
-+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
-+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
-+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
-+#define GL_IMAGE_MAG_FILTER_HP 0x815C
-+#define GL_IMAGE_MIN_FILTER_HP 0x815D
-+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
-+#define GL_CUBIC_HP 0x815F
-+#define GL_AVERAGE_HP 0x8160
-+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
-+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
-+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
-+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
-+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_HP_image_transform */
-+
-+#ifndef GL_HP_occlusion_test
-+#define GL_HP_occlusion_test 1
-+#define GL_OCCLUSION_TEST_HP 0x8165
-+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
-+#endif /* GL_HP_occlusion_test */
-+
-+#ifndef GL_HP_texture_lighting
-+#define GL_HP_texture_lighting 1
-+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
-+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
-+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
-+#endif /* GL_HP_texture_lighting */
-+
-+#ifndef GL_IBM_cull_vertex
-+#define GL_IBM_cull_vertex 1
-+#define GL_CULL_VERTEX_IBM 103050
-+#endif /* GL_IBM_cull_vertex */
-+
-+#ifndef GL_IBM_multimode_draw_arrays
-+#define GL_IBM_multimode_draw_arrays 1
-+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
-+#endif
-+#endif /* GL_IBM_multimode_draw_arrays */
-+
-+#ifndef GL_IBM_rasterpos_clip
-+#define GL_IBM_rasterpos_clip 1
-+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
-+#endif /* GL_IBM_rasterpos_clip */
-+
-+#ifndef GL_IBM_static_data
-+#define GL_IBM_static_data 1
-+#define GL_ALL_STATIC_DATA_IBM 103060
-+#define GL_STATIC_VERTEX_ARRAY_IBM 103061
-+typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
-+#endif
-+#endif /* GL_IBM_static_data */
-+
-+#ifndef GL_IBM_texture_mirrored_repeat
-+#define GL_IBM_texture_mirrored_repeat 1
-+#define GL_MIRRORED_REPEAT_IBM 0x8370
-+#endif /* GL_IBM_texture_mirrored_repeat */
-+
-+#ifndef GL_IBM_vertex_array_lists
-+#define GL_IBM_vertex_array_lists 1
-+#define GL_VERTEX_ARRAY_LIST_IBM 103070
-+#define GL_NORMAL_ARRAY_LIST_IBM 103071
-+#define GL_COLOR_ARRAY_LIST_IBM 103072
-+#define GL_INDEX_ARRAY_LIST_IBM 103073
-+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
-+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
-+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
-+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
-+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
-+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
-+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
-+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
-+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
-+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
-+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
-+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
-+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
-+#endif
-+#endif /* GL_IBM_vertex_array_lists */
-+
-+#ifndef GL_INGR_blend_func_separate
-+#define GL_INGR_blend_func_separate 1
-+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-+#endif
-+#endif /* GL_INGR_blend_func_separate */
-+
-+#ifndef GL_INGR_color_clamp
-+#define GL_INGR_color_clamp 1
-+#define GL_RED_MIN_CLAMP_INGR 0x8560
-+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
-+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
-+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
-+#define GL_RED_MAX_CLAMP_INGR 0x8564
-+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
-+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
-+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
-+#endif /* GL_INGR_color_clamp */
-+
-+#ifndef GL_INGR_interlace_read
-+#define GL_INGR_interlace_read 1
-+#define GL_INTERLACE_READ_INGR 0x8568
-+#endif /* GL_INGR_interlace_read */
-+
-+#ifndef GL_INTEL_fragment_shader_ordering
-+#define GL_INTEL_fragment_shader_ordering 1
-+#endif /* GL_INTEL_fragment_shader_ordering */
-+
-+#ifndef GL_INTEL_framebuffer_CMAA
-+#define GL_INTEL_framebuffer_CMAA 1
-+typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void);
-+#endif
-+#endif /* GL_INTEL_framebuffer_CMAA */
-+
-+#ifndef GL_INTEL_map_texture
-+#define GL_INTEL_map_texture 1
-+#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
-+#define GL_LAYOUT_DEFAULT_INTEL 0
-+#define GL_LAYOUT_LINEAR_INTEL 1
-+#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
-+typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
-+typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
-+typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
-+GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
-+GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
-+#endif
-+#endif /* GL_INTEL_map_texture */
-+
-+#ifndef GL_INTEL_parallel_arrays
-+#define GL_INTEL_parallel_arrays 1
-+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
-+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
-+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
-+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
-+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
-+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
-+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
-+GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
-+GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
-+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
-+#endif
-+#endif /* GL_INTEL_parallel_arrays */
-+
-+#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 (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
-+typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
-+typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
-+typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
-+typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
-+typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
-+typedef void (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 (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-+typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
-+typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
-+GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
-+GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
-+GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
-+GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
-+GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
-+GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
-+GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-+GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
-+GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-+#endif
-+#endif /* GL_INTEL_performance_query */
-+
-+#ifndef GL_MESAX_texture_stack
-+#define GL_MESAX_texture_stack 1
-+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
-+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
-+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
-+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
-+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
-+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
-+#endif /* GL_MESAX_texture_stack */
-+
-+#ifndef GL_MESA_pack_invert
-+#define GL_MESA_pack_invert 1
-+#define GL_PACK_INVERT_MESA 0x8758
-+#endif /* GL_MESA_pack_invert */
-+
-+#ifndef GL_MESA_resize_buffers
-+#define GL_MESA_resize_buffers 1
-+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glResizeBuffersMESA (void);
-+#endif
-+#endif /* GL_MESA_resize_buffers */
-+
-+#ifndef GL_MESA_window_pos
-+#define GL_MESA_window_pos 1
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
-+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
-+GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
-+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
-+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
-+GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
-+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
-+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
-+GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
-+GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
-+#endif
-+#endif /* GL_MESA_window_pos */
-+
-+#ifndef GL_MESA_ycbcr_texture
-+#define GL_MESA_ycbcr_texture 1
-+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
-+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
-+#define GL_YCBCR_MESA 0x8757
-+#endif /* GL_MESA_ycbcr_texture */
-+
-+#ifndef GL_NVX_conditional_render
-+#define GL_NVX_conditional_render 1
-+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
-+GLAPI void APIENTRY glEndConditionalRenderNVX (void);
-+#endif
-+#endif /* GL_NVX_conditional_render */
-+
-+#ifndef GL_NVX_gpu_memory_info
-+#define GL_NVX_gpu_memory_info 1
-+#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
-+#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
-+#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
-+#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
-+#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
-+#endif /* GL_NVX_gpu_memory_info */
-+
-+#ifndef GL_NV_bindless_multi_draw_indirect
-+#define GL_NV_bindless_multi_draw_indirect 1
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-+GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
-+#endif
-+#endif /* GL_NV_bindless_multi_draw_indirect */
-+
-+#ifndef GL_NV_bindless_multi_draw_indirect_count
-+#define GL_NV_bindless_multi_draw_indirect_count 1
-+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
-+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessCountNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
-+GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessCountNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
-+#endif
-+#endif /* GL_NV_bindless_multi_draw_indirect_count */
-+
-+#ifndef GL_NV_bindless_texture
-+#define GL_NV_bindless_texture 1
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
-+typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-+typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
-+typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
-+typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
-+GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
-+GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
-+GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
-+GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
-+GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
-+GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
-+GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
-+GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
-+GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
-+GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
-+GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
-+GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
-+#endif
-+#endif /* GL_NV_bindless_texture */
-+
-+#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 (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
-+GLAPI void APIENTRY glBlendBarrierNV (void);
-+#endif
-+#endif /* GL_NV_blend_equation_advanced */
-+
-+#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_blend_square
-+#define GL_NV_blend_square 1
-+#endif /* GL_NV_blend_square */
-+
-+#ifndef GL_NV_command_list
-+#define GL_NV_command_list 1
-+#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
-+#define GL_NOP_COMMAND_NV 0x0001
-+#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002
-+#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003
-+#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004
-+#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005
-+#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006
-+#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007
-+#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008
-+#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009
-+#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A
-+#define GL_BLEND_COLOR_COMMAND_NV 0x000B
-+#define GL_STENCIL_REF_COMMAND_NV 0x000C
-+#define GL_LINE_WIDTH_COMMAND_NV 0x000D
-+#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E
-+#define GL_ALPHA_REF_COMMAND_NV 0x000F
-+#define GL_VIEWPORT_COMMAND_NV 0x0010
-+#define GL_SCISSOR_COMMAND_NV 0x0011
-+#define GL_FRONT_FACE_COMMAND_NV 0x0012
-+typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states);
-+typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states);
-+typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state);
-+typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode);
-+typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size);
-+typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype);
-+typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count);
-+typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count);
-+typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists);
-+typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists);
-+typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list);
-+typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments);
-+typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list);
-+typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states);
-+GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states);
-+GLAPI GLboolean APIENTRY glIsStateNV (GLuint state);
-+GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode);
-+GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size);
-+GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype);
-+GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count);
-+GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count);
-+GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists);
-+GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists);
-+GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list);
-+GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count);
-+GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments);
-+GLAPI void APIENTRY glCompileCommandListNV (GLuint list);
-+GLAPI void APIENTRY glCallCommandListNV (GLuint list);
-+#endif
-+#endif /* GL_NV_command_list */
-+
-+#ifndef GL_NV_compute_program5
-+#define GL_NV_compute_program5 1
-+#define GL_COMPUTE_PROGRAM_NV 0x90FB
-+#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
-+#endif /* GL_NV_compute_program5 */
-+
-+#ifndef GL_NV_conditional_render
-+#define GL_NV_conditional_render 1
-+#define GL_QUERY_WAIT_NV 0x8E13
-+#define GL_QUERY_NO_WAIT_NV 0x8E14
-+#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
-+#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
-+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
-+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
-+GLAPI void APIENTRY glEndConditionalRenderNV (void);
-+#endif
-+#endif /* GL_NV_conditional_render */
-+
-+#ifndef GL_NV_conservative_raster
-+#define GL_NV_conservative_raster 1
-+#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
-+#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347
-+#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348
-+#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349
-+typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits);
-+#endif
-+#endif /* GL_NV_conservative_raster */
-+
-+#ifndef GL_NV_conservative_raster_dilate
-+#define GL_NV_conservative_raster_dilate 1
-+#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379
-+#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A
-+#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B
-+typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value);
-+#endif
-+#endif /* GL_NV_conservative_raster_dilate */
-+
-+#ifndef GL_NV_copy_depth_to_color
-+#define GL_NV_copy_depth_to_color 1
-+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
-+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
-+#endif /* GL_NV_copy_depth_to_color */
-+
-+#ifndef GL_NV_copy_image
-+#define GL_NV_copy_image 1
-+typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (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 width, GLsizei height, GLsizei depth);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCopyImageSubDataNV (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 width, GLsizei height, GLsizei depth);
-+#endif
-+#endif /* GL_NV_copy_image */
-+
-+#ifndef GL_NV_deep_texture3D
-+#define GL_NV_deep_texture3D 1
-+#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
-+#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
-+#endif /* GL_NV_deep_texture3D */
-+
-+#ifndef GL_NV_depth_buffer_float
-+#define GL_NV_depth_buffer_float 1
-+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
-+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
-+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
-+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
-+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
-+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
-+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
-+GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
-+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
-+#endif
-+#endif /* GL_NV_depth_buffer_float */
-+
-+#ifndef GL_NV_depth_clamp
-+#define GL_NV_depth_clamp 1
-+#define GL_DEPTH_CLAMP_NV 0x864F
-+#endif /* GL_NV_depth_clamp */
-+
-+#ifndef GL_NV_draw_texture
-+#define GL_NV_draw_texture 1
-+typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
-+#endif
-+#endif /* GL_NV_draw_texture */
-+
-+#ifndef GL_NV_evaluators
-+#define GL_NV_evaluators 1
-+#define GL_EVAL_2D_NV 0x86C0
-+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
-+#define GL_MAP_TESSELLATION_NV 0x86C2
-+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
-+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
-+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
-+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
-+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
-+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
-+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
-+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
-+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
-+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
-+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
-+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
-+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
-+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
-+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
-+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
-+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
-+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
-+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
-+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
-+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
-+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
-+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
-+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
-+GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
-+GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
-+#endif
-+#endif /* GL_NV_evaluators */
-+
-+#ifndef GL_NV_explicit_multisample
-+#define GL_NV_explicit_multisample 1
-+#define GL_SAMPLE_POSITION_NV 0x8E50
-+#define GL_SAMPLE_MASK_NV 0x8E51
-+#define GL_SAMPLE_MASK_VALUE_NV 0x8E52
-+#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
-+#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
-+#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
-+#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
-+#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
-+#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
-+#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
-+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
-+typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
-+typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
-+GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
-+GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
-+#endif
-+#endif /* GL_NV_explicit_multisample */
-+
-+#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 (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-+GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
-+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
-+GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
-+GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-+#endif
-+#endif /* GL_NV_fence */
-+
-+#ifndef GL_NV_fill_rectangle
-+#define GL_NV_fill_rectangle 1
-+#define GL_FILL_RECTANGLE_NV 0x933C
-+#endif /* GL_NV_fill_rectangle */
-+
-+#ifndef GL_NV_float_buffer
-+#define GL_NV_float_buffer 1
-+#define GL_FLOAT_R_NV 0x8880
-+#define GL_FLOAT_RG_NV 0x8881
-+#define GL_FLOAT_RGB_NV 0x8882
-+#define GL_FLOAT_RGBA_NV 0x8883
-+#define GL_FLOAT_R16_NV 0x8884
-+#define GL_FLOAT_R32_NV 0x8885
-+#define GL_FLOAT_RG16_NV 0x8886
-+#define GL_FLOAT_RG32_NV 0x8887
-+#define GL_FLOAT_RGB16_NV 0x8888
-+#define GL_FLOAT_RGB32_NV 0x8889
-+#define GL_FLOAT_RGBA16_NV 0x888A
-+#define GL_FLOAT_RGBA32_NV 0x888B
-+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
-+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
-+#define GL_FLOAT_RGBA_MODE_NV 0x888E
-+#endif /* GL_NV_float_buffer */
-+
-+#ifndef GL_NV_fog_distance
-+#define GL_NV_fog_distance 1
-+#define GL_FOG_DISTANCE_MODE_NV 0x855A
-+#define GL_EYE_RADIAL_NV 0x855B
-+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
-+#endif /* GL_NV_fog_distance */
-+
-+#ifndef GL_NV_fragment_coverage_to_color
-+#define GL_NV_fragment_coverage_to_color 1
-+#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD
-+#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE
-+typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color);
-+#endif
-+#endif /* GL_NV_fragment_coverage_to_color */
-+
-+#ifndef GL_NV_fragment_program
-+#define GL_NV_fragment_program 1
-+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
-+#define GL_FRAGMENT_PROGRAM_NV 0x8870
-+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
-+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
-+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
-+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
-+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
-+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
-+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
-+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
-+#endif
-+#endif /* GL_NV_fragment_program */
-+
-+#ifndef GL_NV_fragment_program2
-+#define GL_NV_fragment_program2 1
-+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
-+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
-+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
-+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
-+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
-+#endif /* GL_NV_fragment_program2 */
-+
-+#ifndef GL_NV_fragment_program4
-+#define GL_NV_fragment_program4 1
-+#endif /* GL_NV_fragment_program4 */
-+
-+#ifndef GL_NV_fragment_program_option
-+#define GL_NV_fragment_program_option 1
-+#endif /* GL_NV_fragment_program_option */
-+
-+#ifndef GL_NV_fragment_shader_interlock
-+#define GL_NV_fragment_shader_interlock 1
-+#endif /* GL_NV_fragment_shader_interlock */
-+
-+#ifndef GL_NV_framebuffer_mixed_samples
-+#define GL_NV_framebuffer_mixed_samples 1
-+#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331
-+#define GL_COLOR_SAMPLES_NV 0x8E20
-+#define GL_DEPTH_SAMPLES_NV 0x932D
-+#define GL_STENCIL_SAMPLES_NV 0x932E
-+#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F
-+#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330
-+#define GL_COVERAGE_MODULATION_NV 0x9332
-+#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333
-+typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v);
-+typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v);
-+GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v);
-+GLAPI void APIENTRY glCoverageModulationNV (GLenum components);
-+#endif
-+#endif /* GL_NV_framebuffer_mixed_samples */
-+
-+#ifndef GL_NV_framebuffer_multisample_coverage
-+#define GL_NV_framebuffer_multisample_coverage 1
-+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
-+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
-+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
-+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
-+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
-+#endif
-+#endif /* GL_NV_framebuffer_multisample_coverage */
-+
-+#ifndef GL_NV_geometry_program4
-+#define GL_NV_geometry_program4 1
-+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
-+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
-+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
-+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
-+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
-+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
-+#endif
-+#endif /* GL_NV_geometry_program4 */
-+
-+#ifndef GL_NV_geometry_shader4
-+#define GL_NV_geometry_shader4 1
-+#endif /* GL_NV_geometry_shader4 */
-+
-+#ifndef GL_NV_geometry_shader_passthrough
-+#define GL_NV_geometry_shader_passthrough 1
-+#endif /* GL_NV_geometry_shader_passthrough */
-+
-+#ifndef GL_NV_gpu_program4
-+#define GL_NV_gpu_program4 1
-+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
-+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
-+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
-+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
-+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
-+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
-+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
-+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
-+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
-+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
-+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
-+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
-+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
-+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
-+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
-+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
-+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
-+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
-+#endif
-+#endif /* GL_NV_gpu_program4 */
-+
-+#ifndef GL_NV_gpu_program5
-+#define GL_NV_gpu_program5 1
-+#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
-+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
-+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
-+#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
-+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
-+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
-+#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
-+#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45
-+typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
-+GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
-+#endif
-+#endif /* GL_NV_gpu_program5 */
-+
-+#ifndef GL_NV_gpu_program5_mem_extended
-+#define GL_NV_gpu_program5_mem_extended 1
-+#endif /* GL_NV_gpu_program5_mem_extended */
-+
-+#ifndef GL_NV_gpu_shader5
-+#define GL_NV_gpu_shader5 1
-+#endif /* GL_NV_gpu_shader5 */
-+
-+#ifndef GL_NV_half_float
-+#define GL_NV_half_float 1
-+typedef unsigned short GLhalfNV;
-+#define GL_HALF_FLOAT_NV 0x140B
-+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
-+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
-+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
-+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
-+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
-+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
-+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
-+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
-+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
-+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
-+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
-+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
-+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
-+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
-+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
-+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
-+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
-+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
-+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
-+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
-+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
-+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
-+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
-+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
-+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
-+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
-+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
-+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
-+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
-+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
-+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
-+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
-+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
-+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
-+#endif
-+#endif /* GL_NV_half_float */
-+
-+#ifndef GL_NV_internalformat_sample_query
-+#define GL_NV_internalformat_sample_query 1
-+#define GL_MULTISAMPLES_NV 0x9371
-+#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372
-+#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373
-+#define GL_CONFORMANT_NV 0x9374
-+typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params);
-+#endif
-+#endif /* GL_NV_internalformat_sample_query */
-+
-+#ifndef GL_NV_light_max_exponent
-+#define GL_NV_light_max_exponent 1
-+#define GL_MAX_SHININESS_NV 0x8504
-+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
-+#endif /* GL_NV_light_max_exponent */
-+
-+#ifndef GL_NV_multisample_coverage
-+#define GL_NV_multisample_coverage 1
-+#endif /* GL_NV_multisample_coverage */
-+
-+#ifndef GL_NV_multisample_filter_hint
-+#define GL_NV_multisample_filter_hint 1
-+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
-+#endif /* GL_NV_multisample_filter_hint */
-+
-+#ifndef GL_NV_occlusion_query
-+#define GL_NV_occlusion_query 1
-+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
-+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
-+#define GL_PIXEL_COUNT_NV 0x8866
-+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
-+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
-+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
-+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
-+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
-+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
-+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
-+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
-+#endif
-+#endif /* GL_NV_occlusion_query */
-+
-+#ifndef GL_NV_packed_depth_stencil
-+#define GL_NV_packed_depth_stencil 1
-+#define GL_DEPTH_STENCIL_NV 0x84F9
-+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
-+#endif /* GL_NV_packed_depth_stencil */
-+
-+#ifndef GL_NV_parameter_buffer_object
-+#define GL_NV_parameter_buffer_object 1
-+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
-+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
-+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
-+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
-+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
-+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
-+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
-+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
-+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
-+#endif
-+#endif /* GL_NV_parameter_buffer_object */
-+
-+#ifndef GL_NV_parameter_buffer_object2
-+#define GL_NV_parameter_buffer_object2 1
-+#endif /* GL_NV_parameter_buffer_object2 */
-+
-+#ifndef GL_NV_path_rendering
-+#define GL_NV_path_rendering 1
-+#define GL_PATH_FORMAT_SVG_NV 0x9070
-+#define GL_PATH_FORMAT_PS_NV 0x9071
-+#define GL_STANDARD_FONT_NAME_NV 0x9072
-+#define GL_SYSTEM_FONT_NAME_NV 0x9073
-+#define GL_FILE_NAME_NV 0x9074
-+#define GL_PATH_STROKE_WIDTH_NV 0x9075
-+#define GL_PATH_END_CAPS_NV 0x9076
-+#define GL_PATH_INITIAL_END_CAP_NV 0x9077
-+#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
-+#define GL_PATH_JOIN_STYLE_NV 0x9079
-+#define GL_PATH_MITER_LIMIT_NV 0x907A
-+#define GL_PATH_DASH_CAPS_NV 0x907B
-+#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
-+#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
-+#define GL_PATH_DASH_OFFSET_NV 0x907E
-+#define GL_PATH_CLIENT_LENGTH_NV 0x907F
-+#define GL_PATH_FILL_MODE_NV 0x9080
-+#define GL_PATH_FILL_MASK_NV 0x9081
-+#define GL_PATH_FILL_COVER_MODE_NV 0x9082
-+#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
-+#define GL_PATH_STROKE_MASK_NV 0x9084
-+#define GL_COUNT_UP_NV 0x9088
-+#define GL_COUNT_DOWN_NV 0x9089
-+#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
-+#define GL_CONVEX_HULL_NV 0x908B
-+#define GL_BOUNDING_BOX_NV 0x908D
-+#define GL_TRANSLATE_X_NV 0x908E
-+#define GL_TRANSLATE_Y_NV 0x908F
-+#define GL_TRANSLATE_2D_NV 0x9090
-+#define GL_TRANSLATE_3D_NV 0x9091
-+#define GL_AFFINE_2D_NV 0x9092
-+#define GL_AFFINE_3D_NV 0x9094
-+#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
-+#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
-+#define GL_UTF8_NV 0x909A
-+#define GL_UTF16_NV 0x909B
-+#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
-+#define GL_PATH_COMMAND_COUNT_NV 0x909D
-+#define GL_PATH_COORD_COUNT_NV 0x909E
-+#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
-+#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
-+#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
-+#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
-+#define GL_SQUARE_NV 0x90A3
-+#define GL_ROUND_NV 0x90A4
-+#define GL_TRIANGULAR_NV 0x90A5
-+#define GL_BEVEL_NV 0x90A6
-+#define GL_MITER_REVERT_NV 0x90A7
-+#define GL_MITER_TRUNCATE_NV 0x90A8
-+#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
-+#define GL_USE_MISSING_GLYPH_NV 0x90AA
-+#define GL_PATH_ERROR_POSITION_NV 0x90AB
-+#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
-+#define GL_ADJACENT_PAIRS_NV 0x90AE
-+#define GL_FIRST_TO_REST_NV 0x90AF
-+#define GL_PATH_GEN_MODE_NV 0x90B0
-+#define GL_PATH_GEN_COEFF_NV 0x90B1
-+#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
-+#define GL_PATH_STENCIL_FUNC_NV 0x90B7
-+#define GL_PATH_STENCIL_REF_NV 0x90B8
-+#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
-+#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
-+#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
-+#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
-+#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
-+#define GL_MOVE_TO_RESETS_NV 0x90B5
-+#define GL_MOVE_TO_CONTINUES_NV 0x90B6
-+#define GL_CLOSE_PATH_NV 0x00
-+#define GL_MOVE_TO_NV 0x02
-+#define GL_RELATIVE_MOVE_TO_NV 0x03
-+#define GL_LINE_TO_NV 0x04
-+#define GL_RELATIVE_LINE_TO_NV 0x05
-+#define GL_HORIZONTAL_LINE_TO_NV 0x06
-+#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
-+#define GL_VERTICAL_LINE_TO_NV 0x08
-+#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
-+#define GL_QUADRATIC_CURVE_TO_NV 0x0A
-+#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
-+#define GL_CUBIC_CURVE_TO_NV 0x0C
-+#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
-+#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
-+#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
-+#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
-+#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
-+#define GL_SMALL_CCW_ARC_TO_NV 0x12
-+#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
-+#define GL_SMALL_CW_ARC_TO_NV 0x14
-+#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
-+#define GL_LARGE_CCW_ARC_TO_NV 0x16
-+#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
-+#define GL_LARGE_CW_ARC_TO_NV 0x18
-+#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
-+#define GL_RESTART_PATH_NV 0xF0
-+#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
-+#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
-+#define GL_RECT_NV 0xF6
-+#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
-+#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
-+#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
-+#define GL_ARC_TO_NV 0xFE
-+#define GL_RELATIVE_ARC_TO_NV 0xFF
-+#define GL_BOLD_BIT_NV 0x01
-+#define GL_ITALIC_BIT_NV 0x02
-+#define GL_GLYPH_WIDTH_BIT_NV 0x01
-+#define GL_GLYPH_HEIGHT_BIT_NV 0x02
-+#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
-+#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
-+#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
-+#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
-+#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
-+#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
-+#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
-+#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
-+#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
-+#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
-+#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
-+#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
-+#define GL_FONT_ASCENDER_BIT_NV 0x00200000
-+#define GL_FONT_DESCENDER_BIT_NV 0x00400000
-+#define GL_FONT_HEIGHT_BIT_NV 0x00800000
-+#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
-+#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
-+#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
-+#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
-+#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
-+#define GL_ROUNDED_RECT_NV 0xE8
-+#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
-+#define GL_ROUNDED_RECT2_NV 0xEA
-+#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
-+#define GL_ROUNDED_RECT4_NV 0xEC
-+#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
-+#define GL_ROUNDED_RECT8_NV 0xEE
-+#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
-+#define GL_RELATIVE_RECT_NV 0xF7
-+#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
-+#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
-+#define GL_FONT_UNAVAILABLE_NV 0x936A
-+#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
-+#define GL_CONIC_CURVE_TO_NV 0x1A
-+#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
-+#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
-+#define GL_STANDARD_FONT_FORMAT_NV 0x936C
-+#define GL_2_BYTES_NV 0x1407
-+#define GL_3_BYTES_NV 0x1408
-+#define GL_4_BYTES_NV 0x1409
-+#define GL_EYE_LINEAR_NV 0x2400
-+#define GL_OBJECT_LINEAR_NV 0x2401
-+#define GL_CONSTANT_NV 0x8576
-+#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
-+#define GL_PRIMARY_COLOR_NV 0x852C
-+#define GL_SECONDARY_COLOR_NV 0x852D
-+#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
-+#define GL_PATH_PROJECTION_NV 0x1701
-+#define GL_PATH_MODELVIEW_NV 0x1700
-+#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
-+#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6
-+#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36
-+#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3
-+#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4
-+#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7
-+#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38
-+#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4
-+#define GL_FRAGMENT_INPUT_NV 0x936D
-+typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
-+typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
-+typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
-+typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-+typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-+typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-+typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-+typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
-+typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-+typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
-+typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-+typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
-+typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
-+typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
-+typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
-+typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-+typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
-+typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
-+typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
-+typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
-+typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
-+typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
-+typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
-+typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
-+typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
-+typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
-+typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
-+typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
-+typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-+typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-+typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-+typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-+typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
-+typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
-+typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-+typedef void (APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
-+typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
-+typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
-+typedef void (APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+typedef void (APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
-+typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
-+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
-+typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
-+typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
-+typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
-+typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
-+typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
-+typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
-+typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
-+GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
-+GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
-+GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-+GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
-+GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
-+GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
-+GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
-+GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
-+GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
-+GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
-+GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
-+GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
-+GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
-+GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
-+GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
-+GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
-+GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
-+GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
-+GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
-+GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
-+GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
-+GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
-+GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
-+GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
-+GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
-+GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
-+GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
-+GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
-+GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
-+GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
-+GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
-+GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
-+GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
-+GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
-+GLAPI void APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m);
-+GLAPI void APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
-+GLAPI void APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
-+GLAPI void APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+GLAPI void APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
-+GLAPI GLenum APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
-+GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
-+GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
-+GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
-+GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
-+GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
-+GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
-+GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
-+GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
-+GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
-+GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
-+#endif
-+#endif /* GL_NV_path_rendering */
-+
-+#ifndef GL_NV_path_rendering_shared_edge
-+#define GL_NV_path_rendering_shared_edge 1
-+#define GL_SHARED_EDGE_NV 0xC0
-+#endif /* GL_NV_path_rendering_shared_edge */
-+
-+#ifndef GL_NV_pixel_data_range
-+#define GL_NV_pixel_data_range 1
-+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
-+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
-+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
-+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
-+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
-+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
-+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
-+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
-+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
-+#endif
-+#endif /* GL_NV_pixel_data_range */
-+
-+#ifndef GL_NV_point_sprite
-+#define GL_NV_point_sprite 1
-+#define GL_POINT_SPRITE_NV 0x8861
-+#define GL_COORD_REPLACE_NV 0x8862
-+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
-+GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
-+#endif
-+#endif /* GL_NV_point_sprite */
-+
-+#ifndef GL_NV_present_video
-+#define GL_NV_present_video 1
-+#define GL_FRAME_NV 0x8E26
-+#define GL_FIELDS_NV 0x8E27
-+#define GL_CURRENT_TIME_NV 0x8E28
-+#define GL_NUM_FILL_STREAMS_NV 0x8E29
-+#define GL_PRESENT_TIME_NV 0x8E2A
-+#define GL_PRESENT_DURATION_NV 0x8E2B
-+typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
-+typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
-+typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
-+GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
-+GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
-+GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
-+GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
-+#endif
-+#endif /* GL_NV_present_video */
-+
-+#ifndef GL_NV_primitive_restart
-+#define GL_NV_primitive_restart 1
-+#define GL_PRIMITIVE_RESTART_NV 0x8558
-+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
-+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
-+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPrimitiveRestartNV (void);
-+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
-+#endif
-+#endif /* GL_NV_primitive_restart */
-+
-+#ifndef GL_NV_register_combiners
-+#define GL_NV_register_combiners 1
-+#define GL_REGISTER_COMBINERS_NV 0x8522
-+#define GL_VARIABLE_A_NV 0x8523
-+#define GL_VARIABLE_B_NV 0x8524
-+#define GL_VARIABLE_C_NV 0x8525
-+#define GL_VARIABLE_D_NV 0x8526
-+#define GL_VARIABLE_E_NV 0x8527
-+#define GL_VARIABLE_F_NV 0x8528
-+#define GL_VARIABLE_G_NV 0x8529
-+#define GL_CONSTANT_COLOR0_NV 0x852A
-+#define GL_CONSTANT_COLOR1_NV 0x852B
-+#define GL_SPARE0_NV 0x852E
-+#define GL_SPARE1_NV 0x852F
-+#define GL_DISCARD_NV 0x8530
-+#define GL_E_TIMES_F_NV 0x8531
-+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
-+#define GL_UNSIGNED_IDENTITY_NV 0x8536
-+#define GL_UNSIGNED_INVERT_NV 0x8537
-+#define GL_EXPAND_NORMAL_NV 0x8538
-+#define GL_EXPAND_NEGATE_NV 0x8539
-+#define GL_HALF_BIAS_NORMAL_NV 0x853A
-+#define GL_HALF_BIAS_NEGATE_NV 0x853B
-+#define GL_SIGNED_IDENTITY_NV 0x853C
-+#define GL_SIGNED_NEGATE_NV 0x853D
-+#define GL_SCALE_BY_TWO_NV 0x853E
-+#define GL_SCALE_BY_FOUR_NV 0x853F
-+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
-+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
-+#define GL_COMBINER_INPUT_NV 0x8542
-+#define GL_COMBINER_MAPPING_NV 0x8543
-+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
-+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
-+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
-+#define GL_COMBINER_MUX_SUM_NV 0x8547
-+#define GL_COMBINER_SCALE_NV 0x8548
-+#define GL_COMBINER_BIAS_NV 0x8549
-+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
-+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
-+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
-+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
-+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
-+#define GL_COLOR_SUM_CLAMP_NV 0x854F
-+#define GL_COMBINER0_NV 0x8550
-+#define GL_COMBINER1_NV 0x8551
-+#define GL_COMBINER2_NV 0x8552
-+#define GL_COMBINER3_NV 0x8553
-+#define GL_COMBINER4_NV 0x8554
-+#define GL_COMBINER5_NV 0x8555
-+#define GL_COMBINER6_NV 0x8556
-+#define GL_COMBINER7_NV 0x8557
-+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
-+GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-+GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_NV_register_combiners */
-+
-+#ifndef GL_NV_register_combiners2
-+#define GL_NV_register_combiners2 1
-+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
-+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_NV_register_combiners2 */
-+
-+#ifndef GL_NV_sample_locations
-+#define GL_NV_sample_locations 1
-+#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
-+#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
-+#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
-+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
-+#define GL_SAMPLE_LOCATION_NV 0x8E50
-+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
-+#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
-+#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glResolveDepthValuesNV (void);
-+#endif
-+#endif /* GL_NV_sample_locations */
-+
-+#ifndef GL_NV_sample_mask_override_coverage
-+#define GL_NV_sample_mask_override_coverage 1
-+#endif /* GL_NV_sample_mask_override_coverage */
-+
-+#ifndef GL_NV_shader_atomic_counters
-+#define GL_NV_shader_atomic_counters 1
-+#endif /* GL_NV_shader_atomic_counters */
-+
-+#ifndef GL_NV_shader_atomic_float
-+#define GL_NV_shader_atomic_float 1
-+#endif /* GL_NV_shader_atomic_float */
-+
-+#ifndef GL_NV_shader_atomic_fp16_vector
-+#define GL_NV_shader_atomic_fp16_vector 1
-+#endif /* GL_NV_shader_atomic_fp16_vector */
-+
-+#ifndef GL_NV_shader_atomic_int64
-+#define GL_NV_shader_atomic_int64 1
-+#endif /* GL_NV_shader_atomic_int64 */
-+
-+#ifndef GL_NV_shader_buffer_load
-+#define GL_NV_shader_buffer_load 1
-+#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
-+#define GL_GPU_ADDRESS_NV 0x8F34
-+#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
-+typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
-+typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
-+typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
-+typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
-+typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
-+typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
-+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
-+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
-+typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
-+typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
-+typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
-+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
-+GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
-+GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
-+GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
-+GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
-+GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
-+GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
-+GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
-+GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
-+GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
-+GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
-+GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
-+GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
-+#endif
-+#endif /* GL_NV_shader_buffer_load */
-+
-+#ifndef GL_NV_shader_buffer_store
-+#define GL_NV_shader_buffer_store 1
-+#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
-+#endif /* GL_NV_shader_buffer_store */
-+
-+#ifndef GL_NV_shader_storage_buffer_object
-+#define GL_NV_shader_storage_buffer_object 1
-+#endif /* GL_NV_shader_storage_buffer_object */
-+
-+#ifndef GL_NV_shader_thread_group
-+#define GL_NV_shader_thread_group 1
-+#define GL_WARP_SIZE_NV 0x9339
-+#define GL_WARPS_PER_SM_NV 0x933A
-+#define GL_SM_COUNT_NV 0x933B
-+#endif /* GL_NV_shader_thread_group */
-+
-+#ifndef GL_NV_shader_thread_shuffle
-+#define GL_NV_shader_thread_shuffle 1
-+#endif /* GL_NV_shader_thread_shuffle */
-+
-+#ifndef GL_NV_tessellation_program5
-+#define GL_NV_tessellation_program5 1
-+#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
-+#define GL_TESS_CONTROL_PROGRAM_NV 0x891E
-+#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
-+#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
-+#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
-+#endif /* GL_NV_tessellation_program5 */
-+
-+#ifndef GL_NV_texgen_emboss
-+#define GL_NV_texgen_emboss 1
-+#define GL_EMBOSS_LIGHT_NV 0x855D
-+#define GL_EMBOSS_CONSTANT_NV 0x855E
-+#define GL_EMBOSS_MAP_NV 0x855F
-+#endif /* GL_NV_texgen_emboss */
-+
-+#ifndef GL_NV_texgen_reflection
-+#define GL_NV_texgen_reflection 1
-+#define GL_NORMAL_MAP_NV 0x8511
-+#define GL_REFLECTION_MAP_NV 0x8512
-+#endif /* GL_NV_texgen_reflection */
-+
-+#ifndef GL_NV_texture_barrier
-+#define GL_NV_texture_barrier 1
-+typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTextureBarrierNV (void);
-+#endif
-+#endif /* GL_NV_texture_barrier */
-+
-+#ifndef GL_NV_texture_compression_vtc
-+#define GL_NV_texture_compression_vtc 1
-+#endif /* GL_NV_texture_compression_vtc */
-+
-+#ifndef GL_NV_texture_env_combine4
-+#define GL_NV_texture_env_combine4 1
-+#define GL_COMBINE4_NV 0x8503
-+#define GL_SOURCE3_RGB_NV 0x8583
-+#define GL_SOURCE3_ALPHA_NV 0x858B
-+#define GL_OPERAND3_RGB_NV 0x8593
-+#define GL_OPERAND3_ALPHA_NV 0x859B
-+#endif /* GL_NV_texture_env_combine4 */
-+
-+#ifndef GL_NV_texture_expand_normal
-+#define GL_NV_texture_expand_normal 1
-+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
-+#endif /* GL_NV_texture_expand_normal */
-+
-+#ifndef GL_NV_texture_multisample
-+#define GL_NV_texture_multisample 1
-+#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
-+#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
-+typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
-+GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
-+#endif
-+#endif /* GL_NV_texture_multisample */
-+
-+#ifndef GL_NV_texture_rectangle
-+#define GL_NV_texture_rectangle 1
-+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
-+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
-+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
-+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
-+#endif /* GL_NV_texture_rectangle */
-+
-+#ifndef GL_NV_texture_shader
-+#define GL_NV_texture_shader 1
-+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
-+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
-+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
-+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
-+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
-+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
-+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
-+#define GL_SHADER_CONSISTENT_NV 0x86DD
-+#define GL_TEXTURE_SHADER_NV 0x86DE
-+#define GL_SHADER_OPERATION_NV 0x86DF
-+#define GL_CULL_MODES_NV 0x86E0
-+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
-+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
-+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
-+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
-+#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
-+#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
-+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
-+#define GL_CONST_EYE_NV 0x86E5
-+#define GL_PASS_THROUGH_NV 0x86E6
-+#define GL_CULL_FRAGMENT_NV 0x86E7
-+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
-+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
-+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
-+#define GL_DOT_PRODUCT_NV 0x86EC
-+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
-+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
-+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
-+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
-+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
-+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
-+#define GL_HILO_NV 0x86F4
-+#define GL_DSDT_NV 0x86F5
-+#define GL_DSDT_MAG_NV 0x86F6
-+#define GL_DSDT_MAG_VIB_NV 0x86F7
-+#define GL_HILO16_NV 0x86F8
-+#define GL_SIGNED_HILO_NV 0x86F9
-+#define GL_SIGNED_HILO16_NV 0x86FA
-+#define GL_SIGNED_RGBA_NV 0x86FB
-+#define GL_SIGNED_RGBA8_NV 0x86FC
-+#define GL_SIGNED_RGB_NV 0x86FE
-+#define GL_SIGNED_RGB8_NV 0x86FF
-+#define GL_SIGNED_LUMINANCE_NV 0x8701
-+#define GL_SIGNED_LUMINANCE8_NV 0x8702
-+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
-+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
-+#define GL_SIGNED_ALPHA_NV 0x8705
-+#define GL_SIGNED_ALPHA8_NV 0x8706
-+#define GL_SIGNED_INTENSITY_NV 0x8707
-+#define GL_SIGNED_INTENSITY8_NV 0x8708
-+#define GL_DSDT8_NV 0x8709
-+#define GL_DSDT8_MAG8_NV 0x870A
-+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
-+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
-+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
-+#define GL_HI_SCALE_NV 0x870E
-+#define GL_LO_SCALE_NV 0x870F
-+#define GL_DS_SCALE_NV 0x8710
-+#define GL_DT_SCALE_NV 0x8711
-+#define GL_MAGNITUDE_SCALE_NV 0x8712
-+#define GL_VIBRANCE_SCALE_NV 0x8713
-+#define GL_HI_BIAS_NV 0x8714
-+#define GL_LO_BIAS_NV 0x8715
-+#define GL_DS_BIAS_NV 0x8716
-+#define GL_DT_BIAS_NV 0x8717
-+#define GL_MAGNITUDE_BIAS_NV 0x8718
-+#define GL_VIBRANCE_BIAS_NV 0x8719
-+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
-+#define GL_TEXTURE_HI_SIZE_NV 0x871B
-+#define GL_TEXTURE_LO_SIZE_NV 0x871C
-+#define GL_TEXTURE_DS_SIZE_NV 0x871D
-+#define GL_TEXTURE_DT_SIZE_NV 0x871E
-+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
-+#endif /* GL_NV_texture_shader */
-+
-+#ifndef GL_NV_texture_shader2
-+#define GL_NV_texture_shader2 1
-+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
-+#endif /* GL_NV_texture_shader2 */
-+
-+#ifndef GL_NV_texture_shader3
-+#define GL_NV_texture_shader3 1
-+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
-+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
-+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
-+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
-+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
-+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
-+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
-+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
-+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
-+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
-+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
-+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
-+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
-+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
-+#define GL_HILO8_NV 0x885E
-+#define GL_SIGNED_HILO8_NV 0x885F
-+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
-+#endif /* GL_NV_texture_shader3 */
-+
-+#ifndef GL_NV_transform_feedback
-+#define GL_NV_transform_feedback 1
-+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
-+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
-+#define GL_TEXTURE_COORD_NV 0x8C79
-+#define GL_CLIP_DISTANCE_NV 0x8C7A
-+#define GL_VERTEX_ID_NV 0x8C7B
-+#define GL_PRIMITIVE_ID_NV 0x8C7C
-+#define GL_GENERIC_ATTRIB_NV 0x8C7D
-+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
-+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
-+#define GL_ACTIVE_VARYINGS_NV 0x8C81
-+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
-+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
-+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
-+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
-+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
-+#define GL_RASTERIZER_DISCARD_NV 0x8C89
-+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
-+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
-+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
-+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
-+#define GL_LAYER_NV 0x8DAA
-+#define GL_NEXT_BUFFER_NV -2
-+#define GL_SKIP_COMPONENTS4_NV -3
-+#define GL_SKIP_COMPONENTS3_NV -4
-+#define GL_SKIP_COMPONENTS2_NV -5
-+#define GL_SKIP_COMPONENTS1_NV -6
-+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
-+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLenum bufferMode);
-+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
-+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
-+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
-+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
-+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
-+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
-+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLsizei count, const GLint *attribs, GLenum bufferMode);
-+GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
-+GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
-+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
-+GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
-+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
-+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
-+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
-+GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
-+#endif
-+#endif /* GL_NV_transform_feedback */
-+
-+#ifndef GL_NV_transform_feedback2
-+#define GL_NV_transform_feedback2 1
-+#define GL_TRANSFORM_FEEDBACK_NV 0x8E22
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
-+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
-+#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
-+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
-+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
-+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
-+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
-+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
-+GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
-+GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
-+GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
-+GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
-+GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
-+GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
-+#endif
-+#endif /* GL_NV_transform_feedback2 */
-+
-+#ifndef GL_NV_uniform_buffer_unified_memory
-+#define GL_NV_uniform_buffer_unified_memory 1
-+#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E
-+#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F
-+#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370
-+#endif /* GL_NV_uniform_buffer_unified_memory */
-+
-+#ifndef GL_NV_vdpau_interop
-+#define GL_NV_vdpau_interop 1
-+typedef GLintptr GLvdpauSurfaceNV;
-+#define GL_SURFACE_STATE_NV 0x86EB
-+#define GL_SURFACE_REGISTERED_NV 0x86FD
-+#define GL_SURFACE_MAPPED_NV 0x8700
-+#define GL_WRITE_DISCARD_NV 0x88BE
-+typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
-+typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
-+typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-+typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-+typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
-+typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
-+typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
-+typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
-+typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
-+GLAPI void APIENTRY glVDPAUFiniNV (void);
-+GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-+GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
-+GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
-+GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
-+GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-+GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
-+GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
-+GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
-+#endif
-+#endif /* GL_NV_vdpau_interop */
-+
-+#ifndef GL_NV_vertex_array_range
-+#define GL_NV_vertex_array_range 1
-+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
-+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
-+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
-+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
-+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
-+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
-+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
-+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
-+#endif
-+#endif /* GL_NV_vertex_array_range */
-+
-+#ifndef GL_NV_vertex_array_range2
-+#define GL_NV_vertex_array_range2 1
-+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
-+#endif /* GL_NV_vertex_array_range2 */
-+
-+#ifndef GL_NV_vertex_attrib_integer_64bit
-+#define GL_NV_vertex_attrib_integer_64bit 1
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
-+GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
-+GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
-+GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
-+GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
-+GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
-+GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
-+GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
-+GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
-+GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
-+GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
-+GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
-+#endif
-+#endif /* GL_NV_vertex_attrib_integer_64bit */
-+
-+#ifndef GL_NV_vertex_buffer_unified_memory
-+#define GL_NV_vertex_buffer_unified_memory 1
-+#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
-+#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
-+#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
-+#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
-+#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
-+#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
-+#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
-+#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
-+#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
-+#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
-+#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
-+#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
-+#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
-+#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
-+#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
-+#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
-+#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
-+#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
-+#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
-+#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
-+#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
-+#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
-+#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
-+#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
-+#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
-+typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
-+typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
-+typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
-+typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
-+GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
-+GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
-+GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
-+GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
-+#endif
-+#endif /* GL_NV_vertex_buffer_unified_memory */
-+
-+#ifndef GL_NV_vertex_program
-+#define GL_NV_vertex_program 1
-+#define GL_VERTEX_PROGRAM_NV 0x8620
-+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
-+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
-+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
-+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
-+#define GL_CURRENT_ATTRIB_NV 0x8626
-+#define GL_PROGRAM_LENGTH_NV 0x8627
-+#define GL_PROGRAM_STRING_NV 0x8628
-+#define GL_MODELVIEW_PROJECTION_NV 0x8629
-+#define GL_IDENTITY_NV 0x862A
-+#define GL_INVERSE_NV 0x862B
-+#define GL_TRANSPOSE_NV 0x862C
-+#define GL_INVERSE_TRANSPOSE_NV 0x862D
-+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
-+#define GL_MAX_TRACK_MATRICES_NV 0x862F
-+#define GL_MATRIX0_NV 0x8630
-+#define GL_MATRIX1_NV 0x8631
-+#define GL_MATRIX2_NV 0x8632
-+#define GL_MATRIX3_NV 0x8633
-+#define GL_MATRIX4_NV 0x8634
-+#define GL_MATRIX5_NV 0x8635
-+#define GL_MATRIX6_NV 0x8636
-+#define GL_MATRIX7_NV 0x8637
-+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
-+#define GL_CURRENT_MATRIX_NV 0x8641
-+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
-+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
-+#define GL_PROGRAM_PARAMETER_NV 0x8644
-+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
-+#define GL_PROGRAM_TARGET_NV 0x8646
-+#define GL_PROGRAM_RESIDENT_NV 0x8647
-+#define GL_TRACK_MATRIX_NV 0x8648
-+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
-+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
-+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
-+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
-+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
-+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
-+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
-+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
-+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
-+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
-+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
-+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
-+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
-+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
-+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
-+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
-+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
-+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
-+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
-+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
-+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
-+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
-+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
-+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
-+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
-+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
-+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
-+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
-+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
-+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
-+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
-+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
-+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
-+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
-+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
-+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
-+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
-+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
-+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
-+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
-+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
-+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
-+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
-+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
-+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
-+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
-+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
-+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
-+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
-+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
-+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
-+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
-+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
-+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
-+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
-+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
-+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
-+GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
-+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
-+GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
-+GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
-+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
-+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
-+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
-+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
-+GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-+GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
-+GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
-+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
-+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
-+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
-+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
-+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
-+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
-+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
-+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
-+#endif
-+#endif /* GL_NV_vertex_program */
-+
-+#ifndef GL_NV_vertex_program1_1
-+#define GL_NV_vertex_program1_1 1
-+#endif /* GL_NV_vertex_program1_1 */
-+
-+#ifndef GL_NV_vertex_program2
-+#define GL_NV_vertex_program2 1
-+#endif /* GL_NV_vertex_program2 */
-+
-+#ifndef GL_NV_vertex_program2_option
-+#define GL_NV_vertex_program2_option 1
-+#endif /* GL_NV_vertex_program2_option */
-+
-+#ifndef GL_NV_vertex_program3
-+#define GL_NV_vertex_program3 1
-+#endif /* GL_NV_vertex_program3 */
-+
-+#ifndef GL_NV_vertex_program4
-+#define GL_NV_vertex_program4 1
-+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
-+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
-+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
-+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
-+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
-+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
-+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
-+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
-+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
-+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
-+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
-+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
-+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
-+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
-+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
-+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
-+#endif
-+#endif /* GL_NV_vertex_program4 */
-+
-+#ifndef GL_NV_video_capture
-+#define GL_NV_video_capture 1
-+#define GL_VIDEO_BUFFER_NV 0x9020
-+#define GL_VIDEO_BUFFER_BINDING_NV 0x9021
-+#define GL_FIELD_UPPER_NV 0x9022
-+#define GL_FIELD_LOWER_NV 0x9023
-+#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
-+#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
-+#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
-+#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
-+#define GL_VIDEO_BUFFER_PITCH_NV 0x9028
-+#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
-+#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
-+#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
-+#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
-+#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
-+#define GL_PARTIAL_SUCCESS_NV 0x902E
-+#define GL_SUCCESS_NV 0x902F
-+#define GL_FAILURE_NV 0x9030
-+#define GL_YCBYCR8_422_NV 0x9031
-+#define GL_YCBAYCR8A_4224_NV 0x9032
-+#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
-+#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
-+#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
-+#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
-+#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
-+#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
-+#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
-+#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
-+#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
-+#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
-+typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-+typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
-+typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
-+typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
-+typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
-+typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
-+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
-+GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
-+GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
-+GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
-+GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
-+GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
-+GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
-+#endif
-+#endif /* GL_NV_video_capture */
-+
-+#ifndef GL_NV_viewport_array2
-+#define GL_NV_viewport_array2 1
-+#endif /* GL_NV_viewport_array2 */
-+
-+#ifndef GL_OML_interlace
-+#define GL_OML_interlace 1
-+#define GL_INTERLACE_OML 0x8980
-+#define GL_INTERLACE_READ_OML 0x8981
-+#endif /* GL_OML_interlace */
-+
-+#ifndef GL_OML_resample
-+#define GL_OML_resample 1
-+#define GL_PACK_RESAMPLE_OML 0x8984
-+#define GL_UNPACK_RESAMPLE_OML 0x8985
-+#define GL_RESAMPLE_REPLICATE_OML 0x8986
-+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
-+#define GL_RESAMPLE_AVERAGE_OML 0x8988
-+#define GL_RESAMPLE_DECIMATE_OML 0x8989
-+#endif /* GL_OML_resample */
-+
-+#ifndef GL_OML_subsample
-+#define GL_OML_subsample 1
-+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
-+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
-+#endif /* GL_OML_subsample */
-+
-+#ifndef GL_OVR_multiview
-+#define GL_OVR_multiview 1
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
-+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632
-+#define GL_MAX_VIEWS_OVR 0x9631
-+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
-+#endif
-+#endif /* GL_OVR_multiview */
-+
-+#ifndef GL_OVR_multiview2
-+#define GL_OVR_multiview2 1
-+#endif /* GL_OVR_multiview2 */
-+
-+#ifndef GL_PGI_misc_hints
-+#define GL_PGI_misc_hints 1
-+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
-+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
-+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
-+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
-+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
-+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
-+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
-+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
-+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
-+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
-+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
-+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
-+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
-+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
-+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
-+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
-+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
-+#define GL_CLIP_FAR_HINT_PGI 0x1A221
-+#define GL_WIDE_LINE_HINT_PGI 0x1A222
-+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
-+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
-+#endif
-+#endif /* GL_PGI_misc_hints */
-+
-+#ifndef GL_PGI_vertex_hints
-+#define GL_PGI_vertex_hints 1
-+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
-+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
-+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
-+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
-+#define GL_COLOR3_BIT_PGI 0x00010000
-+#define GL_COLOR4_BIT_PGI 0x00020000
-+#define GL_EDGEFLAG_BIT_PGI 0x00040000
-+#define GL_INDEX_BIT_PGI 0x00080000
-+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
-+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
-+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
-+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
-+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
-+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
-+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
-+#define GL_NORMAL_BIT_PGI 0x08000000
-+#define GL_TEXCOORD1_BIT_PGI 0x10000000
-+#define GL_TEXCOORD2_BIT_PGI 0x20000000
-+#define GL_TEXCOORD3_BIT_PGI 0x40000000
-+#define GL_TEXCOORD4_BIT_PGI 0x80000000
-+#define GL_VERTEX23_BIT_PGI 0x00000004
-+#define GL_VERTEX4_BIT_PGI 0x00000008
-+#endif /* GL_PGI_vertex_hints */
-+
-+#ifndef GL_REND_screen_coordinates
-+#define GL_REND_screen_coordinates 1
-+#define GL_SCREEN_COORDINATES_REND 0x8490
-+#define GL_INVERTED_SCREEN_W_REND 0x8491
-+#endif /* GL_REND_screen_coordinates */
-+
-+#ifndef GL_S3_s3tc
-+#define GL_S3_s3tc 1
-+#define GL_RGB_S3TC 0x83A0
-+#define GL_RGB4_S3TC 0x83A1
-+#define GL_RGBA_S3TC 0x83A2
-+#define GL_RGBA4_S3TC 0x83A3
-+#define GL_RGBA_DXT5_S3TC 0x83A4
-+#define GL_RGBA4_DXT5_S3TC 0x83A5
-+#endif /* GL_S3_s3tc */
-+
-+#ifndef GL_SGIS_detail_texture
-+#define GL_SGIS_detail_texture 1
-+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
-+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
-+#define GL_LINEAR_DETAIL_SGIS 0x8097
-+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
-+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
-+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
-+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
-+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
-+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
-+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
-+#endif
-+#endif /* GL_SGIS_detail_texture */
-+
-+#ifndef GL_SGIS_fog_function
-+#define GL_SGIS_fog_function 1
-+#define GL_FOG_FUNC_SGIS 0x812A
-+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
-+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
-+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
-+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
-+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
-+#endif
-+#endif /* GL_SGIS_fog_function */
-+
-+#ifndef GL_SGIS_generate_mipmap
-+#define GL_SGIS_generate_mipmap 1
-+#define GL_GENERATE_MIPMAP_SGIS 0x8191
-+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
-+#endif /* GL_SGIS_generate_mipmap */
-+
-+#ifndef GL_SGIS_multisample
-+#define GL_SGIS_multisample 1
-+#define GL_MULTISAMPLE_SGIS 0x809D
-+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
-+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
-+#define GL_SAMPLE_MASK_SGIS 0x80A0
-+#define GL_1PASS_SGIS 0x80A1
-+#define GL_2PASS_0_SGIS 0x80A2
-+#define GL_2PASS_1_SGIS 0x80A3
-+#define GL_4PASS_0_SGIS 0x80A4
-+#define GL_4PASS_1_SGIS 0x80A5
-+#define GL_4PASS_2_SGIS 0x80A6
-+#define GL_4PASS_3_SGIS 0x80A7
-+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
-+#define GL_SAMPLES_SGIS 0x80A9
-+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
-+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
-+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
-+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
-+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
-+GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
-+#endif
-+#endif /* GL_SGIS_multisample */
-+
-+#ifndef GL_SGIS_pixel_texture
-+#define GL_SGIS_pixel_texture 1
-+#define GL_PIXEL_TEXTURE_SGIS 0x8353
-+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
-+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
-+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
-+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
-+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
-+#endif
-+#endif /* GL_SGIS_pixel_texture */
-+
-+#ifndef GL_SGIS_point_line_texgen
-+#define GL_SGIS_point_line_texgen 1
-+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
-+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
-+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
-+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
-+#define GL_EYE_POINT_SGIS 0x81F4
-+#define GL_OBJECT_POINT_SGIS 0x81F5
-+#define GL_EYE_LINE_SGIS 0x81F6
-+#define GL_OBJECT_LINE_SGIS 0x81F7
-+#endif /* GL_SGIS_point_line_texgen */
-+
-+#ifndef GL_SGIS_point_parameters
-+#define GL_SGIS_point_parameters 1
-+#define GL_POINT_SIZE_MIN_SGIS 0x8126
-+#define GL_POINT_SIZE_MAX_SGIS 0x8127
-+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
-+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
-+#endif
-+#endif /* GL_SGIS_point_parameters */
-+
-+#ifndef GL_SGIS_sharpen_texture
-+#define GL_SGIS_sharpen_texture 1
-+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
-+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
-+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
-+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
-+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
-+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
-+#endif
-+#endif /* GL_SGIS_sharpen_texture */
-+
-+#ifndef GL_SGIS_texture4D
-+#define GL_SGIS_texture4D 1
-+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
-+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
-+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
-+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
-+#define GL_TEXTURE_4D_SGIS 0x8134
-+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
-+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
-+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
-+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
-+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
-+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
-+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
-+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
-+#endif
-+#endif /* GL_SGIS_texture4D */
-+
-+#ifndef GL_SGIS_texture_border_clamp
-+#define GL_SGIS_texture_border_clamp 1
-+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
-+#endif /* GL_SGIS_texture_border_clamp */
-+
-+#ifndef GL_SGIS_texture_color_mask
-+#define GL_SGIS_texture_color_mask 1
-+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
-+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-+#endif
-+#endif /* GL_SGIS_texture_color_mask */
-+
-+#ifndef GL_SGIS_texture_edge_clamp
-+#define GL_SGIS_texture_edge_clamp 1
-+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
-+#endif /* GL_SGIS_texture_edge_clamp */
-+
-+#ifndef GL_SGIS_texture_filter4
-+#define GL_SGIS_texture_filter4 1
-+#define GL_FILTER4_SGIS 0x8146
-+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
-+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
-+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
-+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-+#endif
-+#endif /* GL_SGIS_texture_filter4 */
-+
-+#ifndef GL_SGIS_texture_lod
-+#define GL_SGIS_texture_lod 1
-+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
-+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
-+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
-+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
-+#endif /* GL_SGIS_texture_lod */
-+
-+#ifndef GL_SGIS_texture_select
-+#define GL_SGIS_texture_select 1
-+#define GL_DUAL_ALPHA4_SGIS 0x8110
-+#define GL_DUAL_ALPHA8_SGIS 0x8111
-+#define GL_DUAL_ALPHA12_SGIS 0x8112
-+#define GL_DUAL_ALPHA16_SGIS 0x8113
-+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
-+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
-+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
-+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
-+#define GL_DUAL_INTENSITY4_SGIS 0x8118
-+#define GL_DUAL_INTENSITY8_SGIS 0x8119
-+#define GL_DUAL_INTENSITY12_SGIS 0x811A
-+#define GL_DUAL_INTENSITY16_SGIS 0x811B
-+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
-+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
-+#define GL_QUAD_ALPHA4_SGIS 0x811E
-+#define GL_QUAD_ALPHA8_SGIS 0x811F
-+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
-+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
-+#define GL_QUAD_INTENSITY4_SGIS 0x8122
-+#define GL_QUAD_INTENSITY8_SGIS 0x8123
-+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
-+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
-+#endif /* GL_SGIS_texture_select */
-+
-+#ifndef GL_SGIX_async
-+#define GL_SGIX_async 1
-+#define GL_ASYNC_MARKER_SGIX 0x8329
-+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
-+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
-+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
-+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
-+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
-+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
-+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
-+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
-+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
-+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
-+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
-+#endif
-+#endif /* GL_SGIX_async */
-+
-+#ifndef GL_SGIX_async_histogram
-+#define GL_SGIX_async_histogram 1
-+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
-+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
-+#endif /* GL_SGIX_async_histogram */
-+
-+#ifndef GL_SGIX_async_pixel
-+#define GL_SGIX_async_pixel 1
-+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
-+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
-+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
-+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
-+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
-+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
-+#endif /* GL_SGIX_async_pixel */
-+
-+#ifndef GL_SGIX_blend_alpha_minmax
-+#define GL_SGIX_blend_alpha_minmax 1
-+#define GL_ALPHA_MIN_SGIX 0x8320
-+#define GL_ALPHA_MAX_SGIX 0x8321
-+#endif /* GL_SGIX_blend_alpha_minmax */
-+
-+#ifndef GL_SGIX_calligraphic_fragment
-+#define GL_SGIX_calligraphic_fragment 1
-+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
-+#endif /* GL_SGIX_calligraphic_fragment */
-+
-+#ifndef GL_SGIX_clipmap
-+#define GL_SGIX_clipmap 1
-+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
-+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
-+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
-+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
-+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
-+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
-+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
-+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
-+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
-+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
-+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
-+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
-+#endif /* GL_SGIX_clipmap */
-+
-+#ifndef GL_SGIX_convolution_accuracy
-+#define GL_SGIX_convolution_accuracy 1
-+#define GL_CONVOLUTION_HINT_SGIX 0x8316
-+#endif /* GL_SGIX_convolution_accuracy */
-+
-+#ifndef GL_SGIX_depth_pass_instrument
-+#define GL_SGIX_depth_pass_instrument 1
-+#endif /* GL_SGIX_depth_pass_instrument */
-+
-+#ifndef GL_SGIX_depth_texture
-+#define GL_SGIX_depth_texture 1
-+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
-+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
-+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
-+#endif /* GL_SGIX_depth_texture */
-+
-+#ifndef GL_SGIX_flush_raster
-+#define GL_SGIX_flush_raster 1
-+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFlushRasterSGIX (void);
-+#endif
-+#endif /* GL_SGIX_flush_raster */
-+
-+#ifndef GL_SGIX_fog_offset
-+#define GL_SGIX_fog_offset 1
-+#define GL_FOG_OFFSET_SGIX 0x8198
-+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
-+#endif /* GL_SGIX_fog_offset */
-+
-+#ifndef GL_SGIX_fragment_lighting
-+#define GL_SGIX_fragment_lighting 1
-+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
-+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
-+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
-+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
-+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
-+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
-+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
-+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
-+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
-+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
-+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
-+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
-+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
-+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
-+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
-+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
-+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
-+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
-+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
-+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
-+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
-+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
-+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
-+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
-+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
-+#endif
-+#endif /* GL_SGIX_fragment_lighting */
-+
-+#ifndef GL_SGIX_framezoom
-+#define GL_SGIX_framezoom 1
-+#define GL_FRAMEZOOM_SGIX 0x818B
-+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
-+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
-+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
-+#endif
-+#endif /* GL_SGIX_framezoom */
-+
-+#ifndef GL_SGIX_igloo_interface
-+#define GL_SGIX_igloo_interface 1
-+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
-+#endif
-+#endif /* GL_SGIX_igloo_interface */
-+
-+#ifndef GL_SGIX_instruments
-+#define GL_SGIX_instruments 1
-+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
-+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
-+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
-+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
-+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
-+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
-+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
-+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
-+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
-+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
-+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
-+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
-+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
-+#endif
-+#endif /* GL_SGIX_instruments */
-+
-+#ifndef GL_SGIX_interlace
-+#define GL_SGIX_interlace 1
-+#define GL_INTERLACE_SGIX 0x8094
-+#endif /* GL_SGIX_interlace */
-+
-+#ifndef GL_SGIX_ir_instrument1
-+#define GL_SGIX_ir_instrument1 1
-+#define GL_IR_INSTRUMENT1_SGIX 0x817F
-+#endif /* GL_SGIX_ir_instrument1 */
-+
-+#ifndef GL_SGIX_list_priority
-+#define GL_SGIX_list_priority 1
-+#define GL_LIST_PRIORITY_SGIX 0x8182
-+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
-+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
-+GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
-+GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
-+#endif
-+#endif /* GL_SGIX_list_priority */
-+
-+#ifndef GL_SGIX_pixel_texture
-+#define GL_SGIX_pixel_texture 1
-+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
-+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
-+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
-+#endif
-+#endif /* GL_SGIX_pixel_texture */
-+
-+#ifndef GL_SGIX_pixel_tiles
-+#define GL_SGIX_pixel_tiles 1
-+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
-+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
-+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
-+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
-+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
-+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
-+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
-+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
-+#endif /* GL_SGIX_pixel_tiles */
-+
-+#ifndef GL_SGIX_polynomial_ffd
-+#define GL_SGIX_polynomial_ffd 1
-+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
-+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
-+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
-+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
-+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
-+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
-+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
-+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
-+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
-+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
-+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
-+GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
-+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
-+#endif
-+#endif /* GL_SGIX_polynomial_ffd */
-+
-+#ifndef GL_SGIX_reference_plane
-+#define GL_SGIX_reference_plane 1
-+#define GL_REFERENCE_PLANE_SGIX 0x817D
-+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
-+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
-+#endif
-+#endif /* GL_SGIX_reference_plane */
-+
-+#ifndef GL_SGIX_resample
-+#define GL_SGIX_resample 1
-+#define GL_PACK_RESAMPLE_SGIX 0x842E
-+#define GL_UNPACK_RESAMPLE_SGIX 0x842F
-+#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
-+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
-+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
-+#endif /* GL_SGIX_resample */
-+
-+#ifndef GL_SGIX_scalebias_hint
-+#define GL_SGIX_scalebias_hint 1
-+#define GL_SCALEBIAS_HINT_SGIX 0x8322
-+#endif /* GL_SGIX_scalebias_hint */
-+
-+#ifndef GL_SGIX_shadow
-+#define GL_SGIX_shadow 1
-+#define GL_TEXTURE_COMPARE_SGIX 0x819A
-+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
-+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
-+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
-+#endif /* GL_SGIX_shadow */
-+
-+#ifndef GL_SGIX_shadow_ambient
-+#define GL_SGIX_shadow_ambient 1
-+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
-+#endif /* GL_SGIX_shadow_ambient */
-+
-+#ifndef GL_SGIX_sprite
-+#define GL_SGIX_sprite 1
-+#define GL_SPRITE_SGIX 0x8148
-+#define GL_SPRITE_MODE_SGIX 0x8149
-+#define GL_SPRITE_AXIS_SGIX 0x814A
-+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
-+#define GL_SPRITE_AXIAL_SGIX 0x814C
-+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
-+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
-+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
-+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
-+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
-+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
-+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
-+#endif
-+#endif /* GL_SGIX_sprite */
-+
-+#ifndef GL_SGIX_subsample
-+#define GL_SGIX_subsample 1
-+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
-+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
-+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
-+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
-+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
-+#endif /* GL_SGIX_subsample */
-+
-+#ifndef GL_SGIX_tag_sample_buffer
-+#define GL_SGIX_tag_sample_buffer 1
-+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
-+#endif
-+#endif /* GL_SGIX_tag_sample_buffer */
-+
-+#ifndef GL_SGIX_texture_add_env
-+#define GL_SGIX_texture_add_env 1
-+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
-+#endif /* GL_SGIX_texture_add_env */
-+
-+#ifndef GL_SGIX_texture_coordinate_clamp
-+#define GL_SGIX_texture_coordinate_clamp 1
-+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
-+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
-+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
-+#endif /* GL_SGIX_texture_coordinate_clamp */
-+
-+#ifndef GL_SGIX_texture_lod_bias
-+#define GL_SGIX_texture_lod_bias 1
-+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
-+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
-+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
-+#endif /* GL_SGIX_texture_lod_bias */
-+
-+#ifndef GL_SGIX_texture_multi_buffer
-+#define GL_SGIX_texture_multi_buffer 1
-+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
-+#endif /* GL_SGIX_texture_multi_buffer */
-+
-+#ifndef GL_SGIX_texture_scale_bias
-+#define GL_SGIX_texture_scale_bias 1
-+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
-+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
-+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
-+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
-+#endif /* GL_SGIX_texture_scale_bias */
-+
-+#ifndef GL_SGIX_vertex_preclip
-+#define GL_SGIX_vertex_preclip 1
-+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
-+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
-+#endif /* GL_SGIX_vertex_preclip */
-+
-+#ifndef GL_SGIX_ycrcb
-+#define GL_SGIX_ycrcb 1
-+#define GL_YCRCB_422_SGIX 0x81BB
-+#define GL_YCRCB_444_SGIX 0x81BC
-+#endif /* GL_SGIX_ycrcb */
-+
-+#ifndef GL_SGIX_ycrcb_subsample
-+#define GL_SGIX_ycrcb_subsample 1
-+#endif /* GL_SGIX_ycrcb_subsample */
-+
-+#ifndef GL_SGIX_ycrcba
-+#define GL_SGIX_ycrcba 1
-+#define GL_YCRCB_SGIX 0x8318
-+#define GL_YCRCBA_SGIX 0x8319
-+#endif /* GL_SGIX_ycrcba */
-+
-+#ifndef GL_SGI_color_matrix
-+#define GL_SGI_color_matrix 1
-+#define GL_COLOR_MATRIX_SGI 0x80B1
-+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
-+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
-+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
-+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
-+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
-+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
-+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
-+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
-+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
-+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
-+#endif /* GL_SGI_color_matrix */
-+
-+#ifndef GL_SGI_color_table
-+#define GL_SGI_color_table 1
-+#define GL_COLOR_TABLE_SGI 0x80D0
-+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
-+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
-+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
-+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
-+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
-+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
-+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
-+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
-+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
-+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
-+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
-+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
-+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
-+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
-+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
-+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
-+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
-+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
-+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
-+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
-+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
-+GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-+GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
-+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
-+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
-+#endif
-+#endif /* GL_SGI_color_table */
-+
-+#ifndef GL_SGI_texture_color_table
-+#define GL_SGI_texture_color_table 1
-+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
-+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
-+#endif /* GL_SGI_texture_color_table */
-+
-+#ifndef GL_SUNX_constant_data
-+#define GL_SUNX_constant_data 1
-+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
-+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
-+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glFinishTextureSUNX (void);
-+#endif
-+#endif /* GL_SUNX_constant_data */
-+
-+#ifndef GL_SUN_convolution_border_modes
-+#define GL_SUN_convolution_border_modes 1
-+#define GL_WRAP_BORDER_SUN 0x81D4
-+#endif /* GL_SUN_convolution_border_modes */
-+
-+#ifndef GL_SUN_global_alpha
-+#define GL_SUN_global_alpha 1
-+#define GL_GLOBAL_ALPHA_SUN 0x81D9
-+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
-+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
-+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
-+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
-+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
-+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
-+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
-+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
-+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
-+#endif
-+#endif /* GL_SUN_global_alpha */
-+
-+#ifndef GL_SUN_mesh_array
-+#define GL_SUN_mesh_array 1
-+#define GL_QUAD_MESH_SUN 0x8614
-+#define GL_TRIANGLE_MESH_SUN 0x8615
-+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
-+#endif
-+#endif /* GL_SUN_mesh_array */
-+
-+#ifndef GL_SUN_slice_accum
-+#define GL_SUN_slice_accum 1
-+#define GL_SLICE_ACCUM_SUN 0x85CC
-+#endif /* GL_SUN_slice_accum */
-+
-+#ifndef GL_SUN_triangle_list
-+#define GL_SUN_triangle_list 1
-+#define GL_RESTART_SUN 0x0001
-+#define GL_REPLACE_MIDDLE_SUN 0x0002
-+#define GL_REPLACE_OLDEST_SUN 0x0003
-+#define GL_TRIANGLE_LIST_SUN 0x81D7
-+#define GL_REPLACEMENT_CODE_SUN 0x81D8
-+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
-+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
-+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
-+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
-+#define GL_R1UI_V3F_SUN 0x85C4
-+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
-+#define GL_R1UI_C3F_V3F_SUN 0x85C6
-+#define GL_R1UI_N3F_V3F_SUN 0x85C7
-+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
-+#define GL_R1UI_T2F_V3F_SUN 0x85C9
-+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
-+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
-+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
-+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
-+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
-+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
-+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
-+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
-+#endif
-+#endif /* GL_SUN_triangle_list */
-+
-+#ifndef GL_SUN_vertex
-+#define GL_SUN_vertex 1
-+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+#ifdef GL_GLEXT_PROTOTYPES
-+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
-+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
-+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
-+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-+#endif
-+#endif /* GL_SUN_vertex */
-+
-+#ifndef GL_WIN_phong_shading
-+#define GL_WIN_phong_shading 1
-+#define GL_PHONG_WIN 0x80EA
-+#define GL_PHONG_HINT_WIN 0x80EB
-+#endif /* GL_WIN_phong_shading */
-+
-+#ifndef GL_WIN_specular_fog
-+#define GL_WIN_specular_fog 1
-+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
-+#endif /* GL_WIN_specular_fog */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glx.h
-@@ -0,0 +1,446 @@
-+/*
-+ * Mesa 3-D graphics library
-+ *
-+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included
-+ * in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+
-+#ifndef GLX_H
-+#define GLX_H
-+
-+
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+#include <GL/gl.h>
-+
-+
-+#if defined(USE_MGL_NAMESPACE)
-+#include "glx_mangle.h"
-+#endif
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+#define GLX_VERSION_1_1 1
-+#define GLX_VERSION_1_2 1
-+#define GLX_VERSION_1_3 1
-+#define GLX_VERSION_1_4 1
-+
-+#define GLX_EXTENSION_NAME "GLX"
-+
-+
-+
-+/*
-+ * Tokens for glXChooseVisual and glXGetConfig:
-+ */
-+#define GLX_USE_GL 1
-+#define GLX_BUFFER_SIZE 2
-+#define GLX_LEVEL 3
-+#define GLX_RGBA 4
-+#define GLX_DOUBLEBUFFER 5
-+#define GLX_STEREO 6
-+#define GLX_AUX_BUFFERS 7
-+#define GLX_RED_SIZE 8
-+#define GLX_GREEN_SIZE 9
-+#define GLX_BLUE_SIZE 10
-+#define GLX_ALPHA_SIZE 11
-+#define GLX_DEPTH_SIZE 12
-+#define GLX_STENCIL_SIZE 13
-+#define GLX_ACCUM_RED_SIZE 14
-+#define GLX_ACCUM_GREEN_SIZE 15
-+#define GLX_ACCUM_BLUE_SIZE 16
-+#define GLX_ACCUM_ALPHA_SIZE 17
-+
-+
-+/*
-+ * Error codes returned by glXGetConfig:
-+ */
-+#define GLX_BAD_SCREEN 1
-+#define GLX_BAD_ATTRIBUTE 2
-+#define GLX_NO_EXTENSION 3
-+#define GLX_BAD_VISUAL 4
-+#define GLX_BAD_CONTEXT 5
-+#define GLX_BAD_VALUE 6
-+#define GLX_BAD_ENUM 7
-+
-+
-+/*
-+ * GLX 1.1 and later:
-+ */
-+#define GLX_VENDOR 1
-+#define GLX_VERSION 2
-+#define GLX_EXTENSIONS 3
-+
-+
-+/*
-+ * GLX 1.3 and later:
-+ */
-+#define GLX_CONFIG_CAVEAT 0x20
-+#define GLX_DONT_CARE 0xFFFFFFFF
-+#define GLX_X_VISUAL_TYPE 0x22
-+#define GLX_TRANSPARENT_TYPE 0x23
-+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
-+#define GLX_TRANSPARENT_RED_VALUE 0x25
-+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
-+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
-+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
-+#define GLX_WINDOW_BIT 0x00000001
-+#define GLX_PIXMAP_BIT 0x00000002
-+#define GLX_PBUFFER_BIT 0x00000004
-+#define GLX_AUX_BUFFERS_BIT 0x00000010
-+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
-+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
-+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
-+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
-+#define GLX_DEPTH_BUFFER_BIT 0x00000020
-+#define GLX_STENCIL_BUFFER_BIT 0x00000040
-+#define GLX_ACCUM_BUFFER_BIT 0x00000080
-+#define GLX_NONE 0x8000
-+#define GLX_SLOW_CONFIG 0x8001
-+#define GLX_TRUE_COLOR 0x8002
-+#define GLX_DIRECT_COLOR 0x8003
-+#define GLX_PSEUDO_COLOR 0x8004
-+#define GLX_STATIC_COLOR 0x8005
-+#define GLX_GRAY_SCALE 0x8006
-+#define GLX_STATIC_GRAY 0x8007
-+#define GLX_TRANSPARENT_RGB 0x8008
-+#define GLX_TRANSPARENT_INDEX 0x8009
-+#define GLX_VISUAL_ID 0x800B
-+#define GLX_SCREEN 0x800C
-+#define GLX_NON_CONFORMANT_CONFIG 0x800D
-+#define GLX_DRAWABLE_TYPE 0x8010
-+#define GLX_RENDER_TYPE 0x8011
-+#define GLX_X_RENDERABLE 0x8012
-+#define GLX_FBCONFIG_ID 0x8013
-+#define GLX_RGBA_TYPE 0x8014
-+#define GLX_COLOR_INDEX_TYPE 0x8015
-+#define GLX_MAX_PBUFFER_WIDTH 0x8016
-+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
-+#define GLX_MAX_PBUFFER_PIXELS 0x8018
-+#define GLX_PRESERVED_CONTENTS 0x801B
-+#define GLX_LARGEST_PBUFFER 0x801C
-+#define GLX_WIDTH 0x801D
-+#define GLX_HEIGHT 0x801E
-+#define GLX_EVENT_MASK 0x801F
-+#define GLX_DAMAGED 0x8020
-+#define GLX_SAVED 0x8021
-+#define GLX_WINDOW 0x8022
-+#define GLX_PBUFFER 0x8023
-+#define GLX_PBUFFER_HEIGHT 0x8040
-+#define GLX_PBUFFER_WIDTH 0x8041
-+#define GLX_RGBA_BIT 0x00000001
-+#define GLX_COLOR_INDEX_BIT 0x00000002
-+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
-+
-+
-+/*
-+ * GLX 1.4 and later:
-+ */
-+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
-+#define GLX_SAMPLES 0x186a1 /*100001*/
-+
-+
-+
-+typedef struct __GLXcontextRec *GLXContext;
-+typedef XID GLXPixmap;
-+typedef XID GLXDrawable;
-+/* GLX 1.3 and later */
-+typedef struct __GLXFBConfigRec *GLXFBConfig;
-+typedef XID GLXFBConfigID;
-+typedef XID GLXContextID;
-+typedef XID GLXWindow;
-+typedef XID GLXPbuffer;
-+
-+
-+/*
-+** Events.
-+** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
-+** event - this helps initialization if the server supports the pbuffer
-+** extension and the client doesn't.
-+*/
-+#define GLX_PbufferClobber 0
-+#define GLX_BufferSwapComplete 1
-+
-+#define __GLX_NUMBER_EVENTS 17
-+
-+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
-+ int *attribList );
-+
-+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
-+ GLXContext shareList, Bool direct );
-+
-+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
-+
-+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
-+ GLXContext ctx);
-+
-+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
-+ unsigned long mask );
-+
-+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
-+
-+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
-+ Pixmap pixmap );
-+
-+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
-+
-+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
-+
-+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
-+
-+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
-+
-+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
-+ int attrib, int *value );
-+
-+extern GLXContext glXGetCurrentContext( void );
-+
-+extern GLXDrawable glXGetCurrentDrawable( void );
-+
-+extern void glXWaitGL( void );
-+
-+extern void glXWaitX( void );
-+
-+extern void glXUseXFont( Font font, int first, int count, int list );
-+
-+
-+
-+/* GLX 1.1 and later */
-+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
-+
-+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
-+
-+extern const char *glXGetClientString( Display *dpy, int name );
-+
-+
-+/* GLX 1.2 and later */
-+extern Display *glXGetCurrentDisplay( void );
-+
-+
-+/* GLX 1.3 and later */
-+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
-+ const int *attribList, int *nitems );
-+
-+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
-+ int attribute, int *value );
-+
-+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
-+ int *nelements );
-+
-+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
-+ GLXFBConfig config );
-+
-+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
-+ Window win, const int *attribList );
-+
-+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
-+
-+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
-+ Pixmap pixmap, const int *attribList );
-+
-+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
-+
-+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
-+ const int *attribList );
-+
-+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
-+
-+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
-+ unsigned int *value );
-+
-+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
-+ int renderType, GLXContext shareList,
-+ Bool direct );
-+
-+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
-+ GLXDrawable read, GLXContext ctx );
-+
-+extern GLXDrawable glXGetCurrentReadDrawable( void );
-+
-+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
-+ int *value );
-+
-+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
-+ unsigned long mask );
-+
-+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
-+ unsigned long *mask );
-+
-+/* GLX 1.3 function pointer typedefs */
-+typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
-+typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
-+typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
-+typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
-+typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
-+typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
-+typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
-+typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
-+typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
-+typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
-+typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
-+typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
-+typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-+typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
-+typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void);
-+typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
-+typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
-+typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
-+
-+
-+/*
-+ * ARB 2. GLX_ARB_get_proc_address
-+ */
-+#ifndef GLX_ARB_get_proc_address
-+#define GLX_ARB_get_proc_address 1
-+
-+typedef void (*__GLXextFuncPtr)(void);
-+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
-+
-+#endif /* GLX_ARB_get_proc_address */
-+
-+
-+
-+/* GLX 1.4 and later */
-+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
-+
-+/* GLX 1.4 function pointer typedefs */
-+typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
-+
-+
-+#ifndef GLX_GLXEXT_LEGACY
-+
-+#include <GL/glxext.h>
-+
-+#endif /* GLX_GLXEXT_LEGACY */
-+
-+
-+/**
-+ ** The following aren't in glxext.h yet.
-+ **/
-+
-+
-+/*
-+ * ???. GLX_NV_vertex_array_range
-+ */
-+#ifndef GLX_NV_vertex_array_range
-+#define GLX_NV_vertex_array_range
-+
-+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
-+extern void glXFreeMemoryNV(GLvoid *pointer);
-+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
-+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
-+
-+#endif /* GLX_NV_vertex_array_range */
-+
-+
-+/*
-+ * ARB ?. GLX_ARB_render_texture
-+ * XXX This was never finalized!
-+ */
-+#ifndef GLX_ARB_render_texture
-+#define GLX_ARB_render_texture 1
-+
-+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
-+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
-+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
-+
-+#endif /* GLX_ARB_render_texture */
-+
-+
-+/*
-+ * #?. GLX_MESA_swap_frame_usage
-+ */
-+#ifndef GLX_MESA_swap_frame_usage
-+#define GLX_MESA_swap_frame_usage 1
-+
-+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
-+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
-+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
-+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
-+
-+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
-+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
-+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
-+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
-+
-+#endif /* GLX_MESA_swap_frame_usage */
-+
-+
-+
-+/*
-+ * #?. GLX_MESA_swap_control
-+ */
-+#ifndef GLX_MESA_swap_control
-+#define GLX_MESA_swap_control 1
-+
-+extern int glXSwapIntervalMESA(unsigned int interval);
-+extern int glXGetSwapIntervalMESA(void);
-+
-+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
-+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
-+
-+#endif /* GLX_MESA_swap_control */
-+
-+
-+/*** Should these go here, or in another header? */
-+/*
-+** GLX Events
-+*/
-+typedef struct {
-+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
-+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
-+ unsigned long serial; /* # of last request processed by server */
-+ Bool send_event; /* true if this came for SendEvent request */
-+ Display *display; /* display the event was read from */
-+ GLXDrawable drawable; /* XID of Drawable */
-+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
-+ unsigned int aux_buffer; /* which aux buffer was affected */
-+ int x, y;
-+ int width, height;
-+ int count; /* if nonzero, at least this many more */
-+} GLXPbufferClobberEvent;
-+
-+typedef struct {
-+ int type;
-+ unsigned long serial; /* # of last request processed by server */
-+ Bool send_event; /* true if this came from a SendEvent request */
-+ Display *display; /* Display the event was read from */
-+ Drawable drawable; /* drawable on which event was requested in event mask */
-+ int event_type;
-+ int64_t ust;
-+ int64_t msc;
-+ int64_t sbc;
-+} GLXBufferSwapComplete;
-+
-+typedef union __GLXEvent {
-+ GLXPbufferClobberEvent glxpbufferclobber;
-+ GLXBufferSwapComplete glxbufferswapcomplete;
-+ long pad[24];
-+} GLXEvent;
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glx_mangle.h
-@@ -0,0 +1,82 @@
-+/*
-+ * Mesa 3-D graphics library
-+ *
-+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included
-+ * in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+
-+#ifndef GLX_MANGLE_H
-+#define GLX_MANGLE_H
-+
-+#define glXChooseVisual mglXChooseVisual
-+#define glXCreateContext mglXCreateContext
-+#define glXDestroyContext mglXDestroyContext
-+#define glXMakeCurrent mglXMakeCurrent
-+#define glXCopyContext mglXCopyContext
-+#define glXSwapBuffers mglXSwapBuffers
-+#define glXCreateGLXPixmap mglXCreateGLXPixmap
-+#define glXDestroyGLXPixmap mglXDestroyGLXPixmap
-+#define glXQueryExtension mglXQueryExtension
-+#define glXQueryVersion mglXQueryVersion
-+#define glXIsDirect mglXIsDirect
-+#define glXGetConfig mglXGetConfig
-+#define glXGetCurrentContext mglXGetCurrentContext
-+#define glXGetCurrentDrawable mglXGetCurrentDrawable
-+#define glXWaitGL mglXWaitGL
-+#define glXWaitX mglXWaitX
-+#define glXUseXFont mglXUseXFont
-+#define glXQueryExtensionsString mglXQueryExtensionsString
-+#define glXQueryServerString mglXQueryServerString
-+#define glXGetClientString mglXGetClientString
-+#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
-+#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
-+#define glXCopySubBufferMESA mglXCopySubBufferMESA
-+#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
-+#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
-+
-+/* GLX 1.2 */
-+#define glXGetCurrentDisplay mglXGetCurrentDisplay
-+
-+/* GLX 1.3 */
-+#define glXChooseFBConfig mglXChooseFBConfig
-+#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
-+#define glXGetFBConfigs mglXGetFBConfigs
-+#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
-+#define glXCreateWindow mglXCreateWindow
-+#define glXDestroyWindow mglXDestroyWindow
-+#define glXCreatePixmap mglXCreatePixmap
-+#define glXDestroyPixmap mglXDestroyPixmap
-+#define glXCreatePbuffer mglXCreatePbuffer
-+#define glXDestroyPbuffer mglXDestroyPbuffer
-+#define glXQueryDrawable mglXQueryDrawable
-+#define glXCreateNewContext mglXCreateNewContext
-+#define glXMakeContextCurrent mglXMakeContextCurrent
-+#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
-+#define glXQueryContext mglXQueryContext
-+#define glXSelectEvent mglXSelectEvent
-+#define glXGetSelectedEvent mglXGetSelectedEvent
-+
-+/* GLX 1.4 */
-+#define glXGetProcAddress mglXGetProcAddress
-+#define glXGetProcAddressARB mglXGetProcAddressARB
-+
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glxext.h
-@@ -0,0 +1,906 @@
-+#ifndef __glxext_h_
-+#define __glxext_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: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $
-+*/
-+
-+#define GLX_GLXEXT_VERSION 20140810
-+
-+/* Generated C header for:
-+ * API: glx
-+ * Versions considered: .*
-+ * Versions emitted: 1\.[3-9]
-+ * Default extensions included: glx
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef GLX_VERSION_1_3
-+#define GLX_VERSION_1_3 1
-+typedef XID GLXContextID;
-+typedef struct __GLXFBConfigRec *GLXFBConfig;
-+typedef XID GLXWindow;
-+typedef XID GLXPbuffer;
-+#define GLX_WINDOW_BIT 0x00000001
-+#define GLX_PIXMAP_BIT 0x00000002
-+#define GLX_PBUFFER_BIT 0x00000004
-+#define GLX_RGBA_BIT 0x00000001
-+#define GLX_COLOR_INDEX_BIT 0x00000002
-+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
-+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
-+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
-+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
-+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
-+#define GLX_AUX_BUFFERS_BIT 0x00000010
-+#define GLX_DEPTH_BUFFER_BIT 0x00000020
-+#define GLX_STENCIL_BUFFER_BIT 0x00000040
-+#define GLX_ACCUM_BUFFER_BIT 0x00000080
-+#define GLX_CONFIG_CAVEAT 0x20
-+#define GLX_X_VISUAL_TYPE 0x22
-+#define GLX_TRANSPARENT_TYPE 0x23
-+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
-+#define GLX_TRANSPARENT_RED_VALUE 0x25
-+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
-+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
-+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
-+#define GLX_DONT_CARE 0xFFFFFFFF
-+#define GLX_NONE 0x8000
-+#define GLX_SLOW_CONFIG 0x8001
-+#define GLX_TRUE_COLOR 0x8002
-+#define GLX_DIRECT_COLOR 0x8003
-+#define GLX_PSEUDO_COLOR 0x8004
-+#define GLX_STATIC_COLOR 0x8005
-+#define GLX_GRAY_SCALE 0x8006
-+#define GLX_STATIC_GRAY 0x8007
-+#define GLX_TRANSPARENT_RGB 0x8008
-+#define GLX_TRANSPARENT_INDEX 0x8009
-+#define GLX_VISUAL_ID 0x800B
-+#define GLX_SCREEN 0x800C
-+#define GLX_NON_CONFORMANT_CONFIG 0x800D
-+#define GLX_DRAWABLE_TYPE 0x8010
-+#define GLX_RENDER_TYPE 0x8011
-+#define GLX_X_RENDERABLE 0x8012
-+#define GLX_FBCONFIG_ID 0x8013
-+#define GLX_RGBA_TYPE 0x8014
-+#define GLX_COLOR_INDEX_TYPE 0x8015
-+#define GLX_MAX_PBUFFER_WIDTH 0x8016
-+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
-+#define GLX_MAX_PBUFFER_PIXELS 0x8018
-+#define GLX_PRESERVED_CONTENTS 0x801B
-+#define GLX_LARGEST_PBUFFER 0x801C
-+#define GLX_WIDTH 0x801D
-+#define GLX_HEIGHT 0x801E
-+#define GLX_EVENT_MASK 0x801F
-+#define GLX_DAMAGED 0x8020
-+#define GLX_SAVED 0x8021
-+#define GLX_WINDOW 0x8022
-+#define GLX_PBUFFER 0x8023
-+#define GLX_PBUFFER_HEIGHT 0x8040
-+#define GLX_PBUFFER_WIDTH 0x8041
-+typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
-+typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
-+typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
-+typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
-+typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
-+typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
-+typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
-+typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
-+typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
-+typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
-+typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
-+typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
-+typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-+typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
-+typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
-+typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
-+typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements);
-+GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
-+int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
-+XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
-+GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
-+void glXDestroyWindow (Display *dpy, GLXWindow win);
-+GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
-+void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
-+GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
-+void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
-+void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
-+GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
-+Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-+GLXDrawable glXGetCurrentReadDrawable (void);
-+int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
-+void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
-+void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
-+#endif
-+#endif /* GLX_VERSION_1_3 */
-+
-+#ifndef GLX_VERSION_1_4
-+#define GLX_VERSION_1_4 1
-+typedef void ( *__GLXextFuncPtr)(void);
-+#define GLX_SAMPLE_BUFFERS 100000
-+#define GLX_SAMPLES 100001
-+typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
-+#endif
-+#endif /* GLX_VERSION_1_4 */
-+
-+#ifndef GLX_ARB_context_flush_control
-+#define GLX_ARB_context_flush_control 1
-+#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
-+#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
-+#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
-+#endif /* GLX_ARB_context_flush_control */
-+
-+#ifndef GLX_ARB_create_context
-+#define GLX_ARB_create_context 1
-+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
-+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
-+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
-+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
-+#define GLX_CONTEXT_FLAGS_ARB 0x2094
-+typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
-+#endif
-+#endif /* GLX_ARB_create_context */
-+
-+#ifndef GLX_ARB_create_context_profile
-+#define GLX_ARB_create_context_profile 1
-+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
-+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
-+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
-+#endif /* GLX_ARB_create_context_profile */
-+
-+#ifndef GLX_ARB_create_context_robustness
-+#define GLX_ARB_create_context_robustness 1
-+#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
-+#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
-+#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
-+#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
-+#endif /* GLX_ARB_create_context_robustness */
-+
-+#ifndef GLX_ARB_fbconfig_float
-+#define GLX_ARB_fbconfig_float 1
-+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
-+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
-+#endif /* GLX_ARB_fbconfig_float */
-+
-+#ifndef GLX_ARB_framebuffer_sRGB
-+#define GLX_ARB_framebuffer_sRGB 1
-+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
-+#endif /* GLX_ARB_framebuffer_sRGB */
-+
-+#ifndef GLX_ARB_get_proc_address
-+#define GLX_ARB_get_proc_address 1
-+typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
-+#endif
-+#endif /* GLX_ARB_get_proc_address */
-+
-+#ifndef GLX_ARB_multisample
-+#define GLX_ARB_multisample 1
-+#define GLX_SAMPLE_BUFFERS_ARB 100000
-+#define GLX_SAMPLES_ARB 100001
-+#endif /* GLX_ARB_multisample */
-+
-+#ifndef GLX_ARB_robustness_application_isolation
-+#define GLX_ARB_robustness_application_isolation 1
-+#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
-+#endif /* GLX_ARB_robustness_application_isolation */
-+
-+#ifndef GLX_ARB_robustness_share_group_isolation
-+#define GLX_ARB_robustness_share_group_isolation 1
-+#endif /* GLX_ARB_robustness_share_group_isolation */
-+
-+#ifndef GLX_ARB_vertex_buffer_object
-+#define GLX_ARB_vertex_buffer_object 1
-+#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
-+#endif /* GLX_ARB_vertex_buffer_object */
-+
-+#ifndef GLX_3DFX_multisample
-+#define GLX_3DFX_multisample 1
-+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
-+#define GLX_SAMPLES_3DFX 0x8051
-+#endif /* GLX_3DFX_multisample */
-+
-+#ifndef GLX_AMD_gpu_association
-+#define GLX_AMD_gpu_association 1
-+#define GLX_GPU_VENDOR_AMD 0x1F00
-+#define GLX_GPU_RENDERER_STRING_AMD 0x1F01
-+#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
-+#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
-+#define GLX_GPU_RAM_AMD 0x21A3
-+#define GLX_GPU_CLOCK_AMD 0x21A4
-+#define GLX_GPU_NUM_PIPES_AMD 0x21A5
-+#define GLX_GPU_NUM_SIMD_AMD 0x21A6
-+#define GLX_GPU_NUM_RB_AMD 0x21A7
-+#define GLX_GPU_NUM_SPI_AMD 0x21A8
-+#endif /* GLX_AMD_gpu_association */
-+
-+#ifndef GLX_EXT_buffer_age
-+#define GLX_EXT_buffer_age 1
-+#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
-+#endif /* GLX_EXT_buffer_age */
-+
-+#ifndef GLX_EXT_create_context_es2_profile
-+#define GLX_EXT_create_context_es2_profile 1
-+#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
-+#endif /* GLX_EXT_create_context_es2_profile */
-+
-+#ifndef GLX_EXT_create_context_es_profile
-+#define GLX_EXT_create_context_es_profile 1
-+#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
-+#endif /* GLX_EXT_create_context_es_profile */
-+
-+#ifndef GLX_EXT_fbconfig_packed_float
-+#define GLX_EXT_fbconfig_packed_float 1
-+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
-+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
-+#endif /* GLX_EXT_fbconfig_packed_float */
-+
-+#ifndef GLX_EXT_framebuffer_sRGB
-+#define GLX_EXT_framebuffer_sRGB 1
-+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
-+#endif /* GLX_EXT_framebuffer_sRGB */
-+
-+#ifndef GLX_EXT_import_context
-+#define GLX_EXT_import_context 1
-+#define GLX_SHARE_CONTEXT_EXT 0x800A
-+#define GLX_VISUAL_ID_EXT 0x800B
-+#define GLX_SCREEN_EXT 0x800C
-+typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
-+typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
-+typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
-+typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
-+typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Display *glXGetCurrentDisplayEXT (void);
-+int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
-+GLXContextID glXGetContextIDEXT (const GLXContext context);
-+GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
-+void glXFreeContextEXT (Display *dpy, GLXContext context);
-+#endif
-+#endif /* GLX_EXT_import_context */
-+
-+#ifndef GLX_EXT_stereo_tree
-+#define GLX_EXT_stereo_tree 1
-+typedef struct {
-+ int type;
-+ unsigned long serial;
-+ Bool send_event;
-+ Display *display;
-+ int extension;
-+ int evtype;
-+ GLXDrawable window;
-+ Bool stereo_tree;
-+} GLXStereoNotifyEventEXT;
-+#define GLX_STEREO_TREE_EXT 0x20F5
-+#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
-+#define GLX_STEREO_NOTIFY_EXT 0x00000000
-+#endif /* GLX_EXT_stereo_tree */
-+
-+#ifndef GLX_EXT_swap_control
-+#define GLX_EXT_swap_control 1
-+#define GLX_SWAP_INTERVAL_EXT 0x20F1
-+#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
-+typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
-+#endif
-+#endif /* GLX_EXT_swap_control */
-+
-+#ifndef GLX_EXT_swap_control_tear
-+#define GLX_EXT_swap_control_tear 1
-+#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
-+#endif /* GLX_EXT_swap_control_tear */
-+
-+#ifndef GLX_EXT_texture_from_pixmap
-+#define GLX_EXT_texture_from_pixmap 1
-+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
-+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
-+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
-+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
-+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
-+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
-+#define GLX_Y_INVERTED_EXT 0x20D4
-+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
-+#define GLX_TEXTURE_TARGET_EXT 0x20D6
-+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
-+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
-+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
-+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
-+#define GLX_TEXTURE_1D_EXT 0x20DB
-+#define GLX_TEXTURE_2D_EXT 0x20DC
-+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
-+#define GLX_FRONT_LEFT_EXT 0x20DE
-+#define GLX_FRONT_RIGHT_EXT 0x20DF
-+#define GLX_BACK_LEFT_EXT 0x20E0
-+#define GLX_BACK_RIGHT_EXT 0x20E1
-+#define GLX_FRONT_EXT 0x20DE
-+#define GLX_BACK_EXT 0x20E0
-+#define GLX_AUX0_EXT 0x20E2
-+#define GLX_AUX1_EXT 0x20E3
-+#define GLX_AUX2_EXT 0x20E4
-+#define GLX_AUX3_EXT 0x20E5
-+#define GLX_AUX4_EXT 0x20E6
-+#define GLX_AUX5_EXT 0x20E7
-+#define GLX_AUX6_EXT 0x20E8
-+#define GLX_AUX7_EXT 0x20E9
-+#define GLX_AUX8_EXT 0x20EA
-+#define GLX_AUX9_EXT 0x20EB
-+typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
-+typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
-+void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
-+#endif
-+#endif /* GLX_EXT_texture_from_pixmap */
-+
-+#ifndef GLX_EXT_visual_info
-+#define GLX_EXT_visual_info 1
-+#define GLX_X_VISUAL_TYPE_EXT 0x22
-+#define GLX_TRANSPARENT_TYPE_EXT 0x23
-+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
-+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
-+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
-+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
-+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
-+#define GLX_NONE_EXT 0x8000
-+#define GLX_TRUE_COLOR_EXT 0x8002
-+#define GLX_DIRECT_COLOR_EXT 0x8003
-+#define GLX_PSEUDO_COLOR_EXT 0x8004
-+#define GLX_STATIC_COLOR_EXT 0x8005
-+#define GLX_GRAY_SCALE_EXT 0x8006
-+#define GLX_STATIC_GRAY_EXT 0x8007
-+#define GLX_TRANSPARENT_RGB_EXT 0x8008
-+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
-+#endif /* GLX_EXT_visual_info */
-+
-+#ifndef GLX_EXT_visual_rating
-+#define GLX_EXT_visual_rating 1
-+#define GLX_VISUAL_CAVEAT_EXT 0x20
-+#define GLX_SLOW_VISUAL_EXT 0x8001
-+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
-+#endif /* GLX_EXT_visual_rating */
-+
-+#ifndef GLX_INTEL_swap_event
-+#define GLX_INTEL_swap_event 1
-+#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
-+#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
-+#define GLX_COPY_COMPLETE_INTEL 0x8181
-+#define GLX_FLIP_COMPLETE_INTEL 0x8182
-+#endif /* GLX_INTEL_swap_event */
-+
-+#ifndef GLX_MESA_agp_offset
-+#define GLX_MESA_agp_offset 1
-+typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+unsigned int glXGetAGPOffsetMESA (const void *pointer);
-+#endif
-+#endif /* GLX_MESA_agp_offset */
-+
-+#ifndef GLX_MESA_copy_sub_buffer
-+#define GLX_MESA_copy_sub_buffer 1
-+typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
-+#endif
-+#endif /* GLX_MESA_copy_sub_buffer */
-+
-+#ifndef GLX_MESA_pixmap_colormap
-+#define GLX_MESA_pixmap_colormap 1
-+typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
-+#endif
-+#endif /* GLX_MESA_pixmap_colormap */
-+
-+#ifndef GLX_MESA_query_renderer
-+#define GLX_MESA_query_renderer 1
-+#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
-+#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
-+#define GLX_RENDERER_VERSION_MESA 0x8185
-+#define GLX_RENDERER_ACCELERATED_MESA 0x8186
-+#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
-+#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
-+#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
-+#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
-+#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
-+#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
-+#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
-+#define GLX_RENDERER_ID_MESA 0x818E
-+typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
-+typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
-+typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
-+typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
-+const char *glXQueryCurrentRendererStringMESA (int attribute);
-+Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
-+const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
-+#endif
-+#endif /* GLX_MESA_query_renderer */
-+
-+#ifndef GLX_MESA_release_buffers
-+#define GLX_MESA_release_buffers 1
-+typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
-+#endif
-+#endif /* GLX_MESA_release_buffers */
-+
-+#ifndef GLX_MESA_set_3dfx_mode
-+#define GLX_MESA_set_3dfx_mode 1
-+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
-+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
-+typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC) (int mode);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXSet3DfxModeMESA (int mode);
-+#endif
-+#endif /* GLX_MESA_set_3dfx_mode */
-+
-+#ifndef GLX_NV_copy_buffer
-+#define GLX_NV_copy_buffer 1
-+typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-+#endif
-+#endif /* GLX_NV_copy_buffer */
-+
-+#ifndef GLX_NV_copy_image
-+#define GLX_NV_copy_image 1
-+typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
-+#endif
-+#endif /* GLX_NV_copy_image */
-+
-+#ifndef GLX_NV_delay_before_swap
-+#define GLX_NV_delay_before_swap 1
-+typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
-+#endif
-+#endif /* GLX_NV_delay_before_swap */
-+
-+#ifndef GLX_NV_float_buffer
-+#define GLX_NV_float_buffer 1
-+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
-+#endif /* GLX_NV_float_buffer */
-+
-+#ifndef GLX_NV_multisample_coverage
-+#define GLX_NV_multisample_coverage 1
-+#define GLX_COVERAGE_SAMPLES_NV 100001
-+#define GLX_COLOR_SAMPLES_NV 0x20B3
-+#endif /* GLX_NV_multisample_coverage */
-+
-+#ifndef GLX_NV_present_video
-+#define GLX_NV_present_video 1
-+#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
-+typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
-+typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
-+int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
-+#endif
-+#endif /* GLX_NV_present_video */
-+
-+#ifndef GLX_NV_swap_group
-+#define GLX_NV_swap_group 1
-+typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
-+typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
-+typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
-+typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
-+typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
-+typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
-+Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
-+Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
-+Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
-+Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
-+Bool glXResetFrameCountNV (Display *dpy, int screen);
-+#endif
-+#endif /* GLX_NV_swap_group */
-+
-+#ifndef GLX_NV_video_capture
-+#define GLX_NV_video_capture 1
-+typedef XID GLXVideoCaptureDeviceNV;
-+#define GLX_DEVICE_ID_NV 0x20CD
-+#define GLX_UNIQUE_ID_NV 0x20CE
-+#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
-+typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
-+typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
-+typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
-+typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
-+typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
-+GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
-+void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
-+int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
-+void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
-+#endif
-+#endif /* GLX_NV_video_capture */
-+
-+#ifndef GLX_NV_video_out
-+#define GLX_NV_video_out 1
-+typedef unsigned int GLXVideoDeviceNV;
-+#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
-+#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
-+#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
-+#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
-+#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
-+#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
-+#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
-+#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
-+#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
-+#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
-+typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
-+typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
-+typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
-+typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
-+typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
-+typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
-+int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
-+int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
-+int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
-+int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
-+int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
-+#endif
-+#endif /* GLX_NV_video_out */
-+
-+#ifndef GLX_OML_swap_method
-+#define GLX_OML_swap_method 1
-+#define GLX_SWAP_METHOD_OML 0x8060
-+#define GLX_SWAP_EXCHANGE_OML 0x8061
-+#define GLX_SWAP_COPY_OML 0x8062
-+#define GLX_SWAP_UNDEFINED_OML 0x8063
-+#endif /* GLX_OML_swap_method */
-+
-+#ifndef GLX_OML_sync_control
-+#define GLX_OML_sync_control 1
-+#ifndef GLEXT_64_TYPES_DEFINED
-+/* This code block is duplicated in glext.h, so must be protected */
-+#define GLEXT_64_TYPES_DEFINED
-+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
-+/* (as used in the GLX_OML_sync_control extension). */
-+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-+#include <inttypes.h>
-+#elif defined(__sun__) || defined(__digital__)
-+#include <inttypes.h>
-+#if defined(__STDC__)
-+#if defined(__arch64__) || 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 <inttypes.h>
-+#elif defined(__SCO__) || defined(__USLC__)
-+#include <stdint.h>
-+#elif defined(__UNIXOS2__) || defined(__SOL64__)
-+typedef long int int32_t;
-+typedef long long int int64_t;
-+typedef unsigned long long int uint64_t;
-+#elif defined(_WIN32) && defined(__GNUC__)
-+#include <stdint.h>
-+#elif defined(_WIN32)
-+typedef __int32 int32_t;
-+typedef __int64 int64_t;
-+typedef unsigned __int64 uint64_t;
-+#else
-+/* Fallback if nothing above works */
-+#include <inttypes.h>
-+#endif
-+#endif
-+typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
-+typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
-+typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
-+typedef Bool ( *PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
-+typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
-+Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
-+int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
-+Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
-+Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
-+#endif
-+#endif /* GLX_OML_sync_control */
-+
-+#ifndef GLX_SGIS_blended_overlay
-+#define GLX_SGIS_blended_overlay 1
-+#define GLX_BLENDED_RGBA_SGIS 0x8025
-+#endif /* GLX_SGIS_blended_overlay */
-+
-+#ifndef GLX_SGIS_multisample
-+#define GLX_SGIS_multisample 1
-+#define GLX_SAMPLE_BUFFERS_SGIS 100000
-+#define GLX_SAMPLES_SGIS 100001
-+#endif /* GLX_SGIS_multisample */
-+
-+#ifndef GLX_SGIS_shared_multisample
-+#define GLX_SGIS_shared_multisample 1
-+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
-+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
-+#endif /* GLX_SGIS_shared_multisample */
-+
-+#ifndef GLX_SGIX_dmbuffer
-+#define GLX_SGIX_dmbuffer 1
-+typedef XID GLXPbufferSGIX;
-+#ifdef _DM_BUFFER_H_
-+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
-+typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
-+#endif
-+#endif /* _DM_BUFFER_H_ */
-+#endif /* GLX_SGIX_dmbuffer */
-+
-+#ifndef GLX_SGIX_fbconfig
-+#define GLX_SGIX_fbconfig 1
-+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
-+#define GLX_WINDOW_BIT_SGIX 0x00000001
-+#define GLX_PIXMAP_BIT_SGIX 0x00000002
-+#define GLX_RGBA_BIT_SGIX 0x00000001
-+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
-+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
-+#define GLX_RENDER_TYPE_SGIX 0x8011
-+#define GLX_X_RENDERABLE_SGIX 0x8012
-+#define GLX_FBCONFIG_ID_SGIX 0x8013
-+#define GLX_RGBA_TYPE_SGIX 0x8014
-+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
-+typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
-+typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
-+typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
-+typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
-+typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
-+typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
-+GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
-+GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
-+GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
-+XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
-+GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
-+#endif
-+#endif /* GLX_SGIX_fbconfig */
-+
-+#ifndef GLX_SGIX_hyperpipe
-+#define GLX_SGIX_hyperpipe 1
-+typedef struct {
-+ char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
-+ int networkId;
-+} GLXHyperpipeNetworkSGIX;
-+typedef struct {
-+ char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
-+ int channel;
-+ unsigned int participationType;
-+ int timeSlice;
-+} GLXHyperpipeConfigSGIX;
-+typedef struct {
-+ char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
-+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
-+ int destXOrigin, destYOrigin, destWidth, destHeight;
-+} GLXPipeRect;
-+typedef struct {
-+ char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
-+ int XOrigin, YOrigin, maxHeight, maxWidth;
-+} GLXPipeRectLimits;
-+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
-+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
-+#define GLX_BAD_HYPERPIPE_SGIX 92
-+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
-+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
-+#define GLX_PIPE_RECT_SGIX 0x00000001
-+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
-+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
-+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
-+#define GLX_HYPERPIPE_ID_SGIX 0x8030
-+typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
-+typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
-+typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
-+typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
-+typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
-+typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
-+typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
-+typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
-+int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
-+GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
-+int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
-+int glXBindHyperpipeSGIX (Display *dpy, int hpId);
-+int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
-+int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
-+int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
-+#endif
-+#endif /* GLX_SGIX_hyperpipe */
-+
-+#ifndef GLX_SGIX_pbuffer
-+#define GLX_SGIX_pbuffer 1
-+#define GLX_PBUFFER_BIT_SGIX 0x00000004
-+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
-+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
-+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
-+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
-+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
-+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
-+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
-+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
-+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
-+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
-+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
-+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
-+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
-+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
-+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
-+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
-+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
-+#define GLX_WIDTH_SGIX 0x801D
-+#define GLX_HEIGHT_SGIX 0x801E
-+#define GLX_EVENT_MASK_SGIX 0x801F
-+#define GLX_DAMAGED_SGIX 0x8020
-+#define GLX_SAVED_SGIX 0x8021
-+#define GLX_WINDOW_SGIX 0x8022
-+#define GLX_PBUFFER_SGIX 0x8023
-+typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
-+typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
-+typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
-+typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
-+typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
-+void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
-+int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
-+void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
-+void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
-+#endif
-+#endif /* GLX_SGIX_pbuffer */
-+
-+#ifndef GLX_SGIX_swap_barrier
-+#define GLX_SGIX_swap_barrier 1
-+typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
-+typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
-+Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
-+#endif
-+#endif /* GLX_SGIX_swap_barrier */
-+
-+#ifndef GLX_SGIX_swap_group
-+#define GLX_SGIX_swap_group 1
-+typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
-+#endif
-+#endif /* GLX_SGIX_swap_group */
-+
-+#ifndef GLX_SGIX_video_resize
-+#define GLX_SGIX_video_resize 1
-+#define GLX_SYNC_FRAME_SGIX 0x00000000
-+#define GLX_SYNC_SWAP_SGIX 0x00000001
-+typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
-+typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
-+typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
-+typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
-+typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
-+int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
-+int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
-+int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
-+int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
-+#endif
-+#endif /* GLX_SGIX_video_resize */
-+
-+#ifndef GLX_SGIX_video_source
-+#define GLX_SGIX_video_source 1
-+typedef XID GLXVideoSourceSGIX;
-+#ifdef _VL_H
-+typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
-+typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
-+void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
-+#endif
-+#endif /* _VL_H */
-+#endif /* GLX_SGIX_video_source */
-+
-+#ifndef GLX_SGIX_visual_select_group
-+#define GLX_SGIX_visual_select_group 1
-+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
-+#endif /* GLX_SGIX_visual_select_group */
-+
-+#ifndef GLX_SGI_cushion
-+#define GLX_SGI_cushion 1
-+typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+void glXCushionSGI (Display *dpy, Window window, float cushion);
-+#endif
-+#endif /* GLX_SGI_cushion */
-+
-+#ifndef GLX_SGI_make_current_read
-+#define GLX_SGI_make_current_read 1
-+typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-+typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
-+GLXDrawable glXGetCurrentReadDrawableSGI (void);
-+#endif
-+#endif /* GLX_SGI_make_current_read */
-+
-+#ifndef GLX_SGI_swap_control
-+#define GLX_SGI_swap_control 1
-+typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXSwapIntervalSGI (int interval);
-+#endif
-+#endif /* GLX_SGI_swap_control */
-+
-+#ifndef GLX_SGI_video_sync
-+#define GLX_SGI_video_sync 1
-+typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
-+typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+int glXGetVideoSyncSGI (unsigned int *count);
-+int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
-+#endif
-+#endif /* GLX_SGI_video_sync */
-+
-+#ifndef GLX_SUN_get_transparent_index
-+#define GLX_SUN_get_transparent_index 1
-+typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
-+#ifdef GLX_GLXEXT_PROTOTYPES
-+Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
-+#endif
-+#endif /* GLX_SUN_get_transparent_index */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/osmesa.h
-@@ -0,0 +1,291 @@
-+/*
-+ * Mesa 3-D graphics library
-+ *
-+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included
-+ * in all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+
-+/*
-+ * Mesa Off-Screen rendering interface.
-+ *
-+ * This is an operating system and window system independent interface to
-+ * Mesa which allows one to render images into a client-supplied buffer in
-+ * main memory. Such images may manipulated or saved in whatever way the
-+ * client wants.
-+ *
-+ * These are the API functions:
-+ * OSMesaCreateContext - create a new Off-Screen Mesa rendering context
-+ * OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer
-+ * and make the specified context the current one.
-+ * OSMesaDestroyContext - destroy an OSMesaContext
-+ * OSMesaGetCurrentContext - return thread's current context ID
-+ * OSMesaPixelStore - controls how pixels are stored in image buffer
-+ * OSMesaGetIntegerv - return OSMesa state parameters
-+ *
-+ *
-+ * The limits on the width and height of an image buffer can be retrieved
-+ * via OSMesaGetIntegerv(OSMESA_MAX_WIDTH/OSMESA_MAX_HEIGHT).
-+ */
-+
-+
-+#ifndef OSMESA_H
-+#define OSMESA_H
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+
-+#include <GL/gl.h>
-+
-+
-+#define OSMESA_MAJOR_VERSION 10
-+#define OSMESA_MINOR_VERSION 0
-+#define OSMESA_PATCH_VERSION 0
-+
-+
-+
-+/*
-+ * Values for the format parameter of OSMesaCreateContext()
-+ * New in version 2.0.
-+ */
-+#define OSMESA_COLOR_INDEX GL_COLOR_INDEX
-+#define OSMESA_RGBA GL_RGBA
-+#define OSMESA_BGRA 0x1
-+#define OSMESA_ARGB 0x2
-+#define OSMESA_RGB GL_RGB
-+#define OSMESA_BGR 0x4
-+#define OSMESA_RGB_565 0x5
-+
-+
-+/*
-+ * OSMesaPixelStore() parameters:
-+ * New in version 2.0.
-+ */
-+#define OSMESA_ROW_LENGTH 0x10
-+#define OSMESA_Y_UP 0x11
-+
-+
-+/*
-+ * Accepted by OSMesaGetIntegerv:
-+ */
-+#define OSMESA_WIDTH 0x20
-+#define OSMESA_HEIGHT 0x21
-+#define OSMESA_FORMAT 0x22
-+#define OSMESA_TYPE 0x23
-+#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */
-+#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */
-+
-+
-+typedef struct osmesa_context *OSMesaContext;
-+
-+
-+/*
-+ * Create an Off-Screen Mesa rendering context. The only attribute needed is
-+ * an RGBA vs Color-Index mode flag.
-+ *
-+ * Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA,
-+ * OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR.
-+ * sharelist - specifies another OSMesaContext with which to share
-+ * display lists. NULL indicates no sharing.
-+ * Return: an OSMesaContext or 0 if error
-+ */
-+GLAPI OSMesaContext GLAPIENTRY
-+OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
-+
-+
-+
-+/*
-+ * Create an Off-Screen Mesa rendering context and specify desired
-+ * size of depth buffer, stencil buffer and accumulation buffer.
-+ * If you specify zero for depthBits, stencilBits, accumBits you
-+ * can save some memory.
-+ *
-+ * New in Mesa 3.5
-+ */
-+GLAPI OSMesaContext GLAPIENTRY
-+OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
-+ GLint accumBits, OSMesaContext sharelist);
-+
-+
-+/*
-+ * Destroy an Off-Screen Mesa rendering context.
-+ *
-+ * Input: ctx - the context to destroy
-+ */
-+GLAPI void GLAPIENTRY
-+OSMesaDestroyContext( OSMesaContext ctx );
-+
-+
-+
-+/*
-+ * Bind an OSMesaContext to an image buffer. The image buffer is just a
-+ * block of memory which the client provides. Its size must be at least
-+ * as large as width*height*sizeof(type). Its address should be a multiple
-+ * of 4 if using RGBA mode.
-+ *
-+ * Image data is stored in the order of glDrawPixels: row-major order
-+ * with the lower-left image pixel stored in the first array position
-+ * (ie. bottom-to-top).
-+ *
-+ * Since the only type initially supported is GL_UNSIGNED_BYTE, if the
-+ * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA
-+ * value. If the context is in color indexed mode, each pixel will be
-+ * stored as a 1-byte value.
-+ *
-+ * If the context's viewport hasn't been initialized yet, it will now be
-+ * initialized to (0,0,width,height).
-+ *
-+ * Input: ctx - the rendering context
-+ * buffer - the image buffer memory
-+ * type - data type for pixel components, only GL_UNSIGNED_BYTE
-+ * supported now
-+ * width, height - size of image buffer in pixels, at least 1
-+ * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx,
-+ * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
-+ * width>internal limit or height>internal limit.
-+ */
-+GLAPI GLboolean GLAPIENTRY
-+OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
-+ GLsizei width, GLsizei height );
-+
-+
-+
-+
-+/*
-+ * Return the current Off-Screen Mesa rendering context handle.
-+ */
-+GLAPI OSMesaContext GLAPIENTRY
-+OSMesaGetCurrentContext( void );
-+
-+
-+
-+/*
-+ * Set pixel store/packing parameters for the current context.
-+ * This is similar to glPixelStore.
-+ * Input: pname - OSMESA_ROW_LENGTH
-+ * specify actual pixels per row in image buffer
-+ * 0 = same as image width (default)
-+ * OSMESA_Y_UP
-+ * zero = Y coordinates increase downward
-+ * non-zero = Y coordinates increase upward (default)
-+ * value - the value for the parameter pname
-+ *
-+ * New in version 2.0.
-+ */
-+GLAPI void GLAPIENTRY
-+OSMesaPixelStore( GLint pname, GLint value );
-+
-+
-+
-+/*
-+ * Return an integer value like glGetIntegerv.
-+ * Input: pname -
-+ * OSMESA_WIDTH return current image width
-+ * OSMESA_HEIGHT return current image height
-+ * OSMESA_FORMAT return image format
-+ * OSMESA_TYPE return color component data type
-+ * OSMESA_ROW_LENGTH return row length in pixels
-+ * OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
-+ * value - pointer to integer in which to return result.
-+ */
-+GLAPI void GLAPIENTRY
-+OSMesaGetIntegerv( GLint pname, GLint *value );
-+
-+
-+
-+/*
-+ * Return the depth buffer associated with an OSMesa context.
-+ * Input: c - the OSMesa context
-+ * Output: width, height - size of buffer in pixels
-+ * bytesPerValue - bytes per depth value (2 or 4)
-+ * buffer - pointer to depth buffer values
-+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
-+ *
-+ * New in Mesa 2.4.
-+ */
-+GLAPI GLboolean GLAPIENTRY
-+OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
-+ GLint *bytesPerValue, void **buffer );
-+
-+
-+
-+/*
-+ * Return the color buffer associated with an OSMesa context.
-+ * Input: c - the OSMesa context
-+ * Output: width, height - size of buffer in pixels
-+ * format - buffer format (OSMESA_FORMAT)
-+ * buffer - pointer to depth buffer values
-+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
-+ *
-+ * New in Mesa 3.3.
-+ */
-+GLAPI GLboolean GLAPIENTRY
-+OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
-+ GLint *format, void **buffer );
-+
-+
-+
-+/**
-+ * This typedef is new in Mesa 6.3.
-+ */
-+typedef void (*OSMESAproc)();
-+
-+
-+/*
-+ * Return pointer to the named function.
-+ * New in Mesa 4.1
-+ * Return OSMESAproc in 6.3.
-+ */
-+GLAPI OSMESAproc GLAPIENTRY
-+OSMesaGetProcAddress( const char *funcName );
-+
-+
-+
-+/**
-+ * Enable/disable color clamping, off by default.
-+ * New in Mesa 6.4.2
-+ */
-+GLAPI void GLAPIENTRY
-+OSMesaColorClamp(GLboolean enable);
-+
-+
-+/**
-+ * Enable/disable Gallium post-process filters.
-+ * This should be called after a context is created, but before it is
-+ * made current for the first time. After a context has been made
-+ * current, this function has no effect.
-+ * If the enable_value param is zero, the filter is disabled. Otherwise
-+ * the filter is enabled, and the value may control the filter's quality.
-+ * New in Mesa 10.0
-+ */
-+GLAPI void GLAPIENTRY
-+OSMesaPostprocess(OSMesaContext osmesa, const char *filter,
-+ unsigned enable_value);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/wglext.h
-@@ -0,0 +1,840 @@
-+#ifndef __wglext_h_
-+#define __wglext_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: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $
-+*/
-+
-+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-+#define WIN32_LEAN_AND_MEAN 1
-+#include <windows.h>
-+#endif
-+
-+#define WGL_WGLEXT_VERSION 20140810
-+
-+/* Generated C header for:
-+ * API: wgl
-+ * Versions considered: .*
-+ * Versions emitted: _nomatch_^
-+ * Default extensions included: wgl
-+ * Additional extensions included: _nomatch_^
-+ * Extensions removed: _nomatch_^
-+ */
-+
-+#ifndef WGL_ARB_buffer_region
-+#define WGL_ARB_buffer_region 1
-+#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
-+#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
-+#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
-+#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
-+typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
-+typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
-+typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
-+typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
-+VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
-+BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
-+BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
-+#endif
-+#endif /* WGL_ARB_buffer_region */
-+
-+#ifndef WGL_ARB_context_flush_control
-+#define WGL_ARB_context_flush_control 1
-+#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
-+#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
-+#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
-+#endif /* WGL_ARB_context_flush_control */
-+
-+#ifndef WGL_ARB_create_context
-+#define WGL_ARB_create_context 1
-+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
-+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
-+#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
-+#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
-+#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
-+#define WGL_CONTEXT_FLAGS_ARB 0x2094
-+#define ERROR_INVALID_VERSION_ARB 0x2095
-+typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
-+#endif
-+#endif /* WGL_ARB_create_context */
-+
-+#ifndef WGL_ARB_create_context_profile
-+#define WGL_ARB_create_context_profile 1
-+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
-+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
-+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
-+#define ERROR_INVALID_PROFILE_ARB 0x2096
-+#endif /* WGL_ARB_create_context_profile */
-+
-+#ifndef WGL_ARB_create_context_robustness
-+#define WGL_ARB_create_context_robustness 1
-+#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
-+#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
-+#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
-+#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
-+#endif /* WGL_ARB_create_context_robustness */
-+
-+#ifndef WGL_ARB_extensions_string
-+#define WGL_ARB_extensions_string 1
-+typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+const char *WINAPI wglGetExtensionsStringARB (HDC hdc);
-+#endif
-+#endif /* WGL_ARB_extensions_string */
-+
-+#ifndef WGL_ARB_framebuffer_sRGB
-+#define WGL_ARB_framebuffer_sRGB 1
-+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
-+#endif /* WGL_ARB_framebuffer_sRGB */
-+
-+#ifndef WGL_ARB_make_current_read
-+#define WGL_ARB_make_current_read 1
-+#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
-+#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
-+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
-+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
-+HDC WINAPI wglGetCurrentReadDCARB (void);
-+#endif
-+#endif /* WGL_ARB_make_current_read */
-+
-+#ifndef WGL_ARB_multisample
-+#define WGL_ARB_multisample 1
-+#define WGL_SAMPLE_BUFFERS_ARB 0x2041
-+#define WGL_SAMPLES_ARB 0x2042
-+#endif /* WGL_ARB_multisample */
-+
-+#ifndef WGL_ARB_pbuffer
-+#define WGL_ARB_pbuffer 1
-+DECLARE_HANDLE(HPBUFFERARB);
-+#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
-+#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
-+#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
-+#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
-+#define WGL_PBUFFER_LARGEST_ARB 0x2033
-+#define WGL_PBUFFER_WIDTH_ARB 0x2034
-+#define WGL_PBUFFER_HEIGHT_ARB 0x2035
-+#define WGL_PBUFFER_LOST_ARB 0x2036
-+typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
-+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
-+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
-+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
-+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
-+HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
-+int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
-+BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
-+BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
-+#endif
-+#endif /* WGL_ARB_pbuffer */
-+
-+#ifndef WGL_ARB_pixel_format
-+#define WGL_ARB_pixel_format 1
-+#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
-+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
-+#define WGL_DRAW_TO_BITMAP_ARB 0x2002
-+#define WGL_ACCELERATION_ARB 0x2003
-+#define WGL_NEED_PALETTE_ARB 0x2004
-+#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
-+#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
-+#define WGL_SWAP_METHOD_ARB 0x2007
-+#define WGL_NUMBER_OVERLAYS_ARB 0x2008
-+#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
-+#define WGL_TRANSPARENT_ARB 0x200A
-+#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
-+#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
-+#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
-+#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
-+#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
-+#define WGL_SHARE_DEPTH_ARB 0x200C
-+#define WGL_SHARE_STENCIL_ARB 0x200D
-+#define WGL_SHARE_ACCUM_ARB 0x200E
-+#define WGL_SUPPORT_GDI_ARB 0x200F
-+#define WGL_SUPPORT_OPENGL_ARB 0x2010
-+#define WGL_DOUBLE_BUFFER_ARB 0x2011
-+#define WGL_STEREO_ARB 0x2012
-+#define WGL_PIXEL_TYPE_ARB 0x2013
-+#define WGL_COLOR_BITS_ARB 0x2014
-+#define WGL_RED_BITS_ARB 0x2015
-+#define WGL_RED_SHIFT_ARB 0x2016
-+#define WGL_GREEN_BITS_ARB 0x2017
-+#define WGL_GREEN_SHIFT_ARB 0x2018
-+#define WGL_BLUE_BITS_ARB 0x2019
-+#define WGL_BLUE_SHIFT_ARB 0x201A
-+#define WGL_ALPHA_BITS_ARB 0x201B
-+#define WGL_ALPHA_SHIFT_ARB 0x201C
-+#define WGL_ACCUM_BITS_ARB 0x201D
-+#define WGL_ACCUM_RED_BITS_ARB 0x201E
-+#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
-+#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
-+#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
-+#define WGL_DEPTH_BITS_ARB 0x2022
-+#define WGL_STENCIL_BITS_ARB 0x2023
-+#define WGL_AUX_BUFFERS_ARB 0x2024
-+#define WGL_NO_ACCELERATION_ARB 0x2025
-+#define WGL_GENERIC_ACCELERATION_ARB 0x2026
-+#define WGL_FULL_ACCELERATION_ARB 0x2027
-+#define WGL_SWAP_EXCHANGE_ARB 0x2028
-+#define WGL_SWAP_COPY_ARB 0x2029
-+#define WGL_SWAP_UNDEFINED_ARB 0x202A
-+#define WGL_TYPE_RGBA_ARB 0x202B
-+#define WGL_TYPE_COLORINDEX_ARB 0x202C
-+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
-+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
-+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
-+BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
-+BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
-+#endif
-+#endif /* WGL_ARB_pixel_format */
-+
-+#ifndef WGL_ARB_pixel_format_float
-+#define WGL_ARB_pixel_format_float 1
-+#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
-+#endif /* WGL_ARB_pixel_format_float */
-+
-+#ifndef WGL_ARB_render_texture
-+#define WGL_ARB_render_texture 1
-+#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
-+#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
-+#define WGL_TEXTURE_FORMAT_ARB 0x2072
-+#define WGL_TEXTURE_TARGET_ARB 0x2073
-+#define WGL_MIPMAP_TEXTURE_ARB 0x2074
-+#define WGL_TEXTURE_RGB_ARB 0x2075
-+#define WGL_TEXTURE_RGBA_ARB 0x2076
-+#define WGL_NO_TEXTURE_ARB 0x2077
-+#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
-+#define WGL_TEXTURE_1D_ARB 0x2079
-+#define WGL_TEXTURE_2D_ARB 0x207A
-+#define WGL_MIPMAP_LEVEL_ARB 0x207B
-+#define WGL_CUBE_MAP_FACE_ARB 0x207C
-+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
-+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
-+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
-+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
-+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
-+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
-+#define WGL_FRONT_LEFT_ARB 0x2083
-+#define WGL_FRONT_RIGHT_ARB 0x2084
-+#define WGL_BACK_LEFT_ARB 0x2085
-+#define WGL_BACK_RIGHT_ARB 0x2086
-+#define WGL_AUX0_ARB 0x2087
-+#define WGL_AUX1_ARB 0x2088
-+#define WGL_AUX2_ARB 0x2089
-+#define WGL_AUX3_ARB 0x208A
-+#define WGL_AUX4_ARB 0x208B
-+#define WGL_AUX5_ARB 0x208C
-+#define WGL_AUX6_ARB 0x208D
-+#define WGL_AUX7_ARB 0x208E
-+#define WGL_AUX8_ARB 0x208F
-+#define WGL_AUX9_ARB 0x2090
-+typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
-+typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
-+typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
-+BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
-+BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
-+#endif
-+#endif /* WGL_ARB_render_texture */
-+
-+#ifndef WGL_ARB_robustness_application_isolation
-+#define WGL_ARB_robustness_application_isolation 1
-+#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
-+#endif /* WGL_ARB_robustness_application_isolation */
-+
-+#ifndef WGL_ARB_robustness_share_group_isolation
-+#define WGL_ARB_robustness_share_group_isolation 1
-+#endif /* WGL_ARB_robustness_share_group_isolation */
-+
-+#ifndef WGL_3DFX_multisample
-+#define WGL_3DFX_multisample 1
-+#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
-+#define WGL_SAMPLES_3DFX 0x2061
-+#endif /* WGL_3DFX_multisample */
-+
-+#ifndef WGL_3DL_stereo_control
-+#define WGL_3DL_stereo_control 1
-+#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
-+#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
-+#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
-+#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
-+typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
-+#endif
-+#endif /* WGL_3DL_stereo_control */
-+
-+#ifndef WGL_AMD_gpu_association
-+#define WGL_AMD_gpu_association 1
-+#define WGL_GPU_VENDOR_AMD 0x1F00
-+#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
-+#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
-+#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
-+#define WGL_GPU_RAM_AMD 0x21A3
-+#define WGL_GPU_CLOCK_AMD 0x21A4
-+#define WGL_GPU_NUM_PIPES_AMD 0x21A5
-+#define WGL_GPU_NUM_SIMD_AMD 0x21A6
-+#define WGL_GPU_NUM_RB_AMD 0x21A7
-+#define WGL_GPU_NUM_SPI_AMD 0x21A8
-+typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
-+typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
-+typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
-+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
-+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
-+typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
-+typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
-+typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
-+typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
-+INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
-+UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
-+HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
-+HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
-+BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
-+BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
-+HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
-+VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-+#endif
-+#endif /* WGL_AMD_gpu_association */
-+
-+#ifndef WGL_ATI_pixel_format_float
-+#define WGL_ATI_pixel_format_float 1
-+#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
-+#endif /* WGL_ATI_pixel_format_float */
-+
-+#ifndef WGL_EXT_create_context_es2_profile
-+#define WGL_EXT_create_context_es2_profile 1
-+#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
-+#endif /* WGL_EXT_create_context_es2_profile */
-+
-+#ifndef WGL_EXT_create_context_es_profile
-+#define WGL_EXT_create_context_es_profile 1
-+#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
-+#endif /* WGL_EXT_create_context_es_profile */
-+
-+#ifndef WGL_EXT_depth_float
-+#define WGL_EXT_depth_float 1
-+#define WGL_DEPTH_FLOAT_EXT 0x2040
-+#endif /* WGL_EXT_depth_float */
-+
-+#ifndef WGL_EXT_display_color_table
-+#define WGL_EXT_display_color_table 1
-+typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
-+typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
-+typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
-+typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
-+GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
-+GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
-+VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
-+#endif
-+#endif /* WGL_EXT_display_color_table */
-+
-+#ifndef WGL_EXT_extensions_string
-+#define WGL_EXT_extensions_string 1
-+typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+const char *WINAPI wglGetExtensionsStringEXT (void);
-+#endif
-+#endif /* WGL_EXT_extensions_string */
-+
-+#ifndef WGL_EXT_framebuffer_sRGB
-+#define WGL_EXT_framebuffer_sRGB 1
-+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
-+#endif /* WGL_EXT_framebuffer_sRGB */
-+
-+#ifndef WGL_EXT_make_current_read
-+#define WGL_EXT_make_current_read 1
-+#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
-+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
-+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
-+HDC WINAPI wglGetCurrentReadDCEXT (void);
-+#endif
-+#endif /* WGL_EXT_make_current_read */
-+
-+#ifndef WGL_EXT_multisample
-+#define WGL_EXT_multisample 1
-+#define WGL_SAMPLE_BUFFERS_EXT 0x2041
-+#define WGL_SAMPLES_EXT 0x2042
-+#endif /* WGL_EXT_multisample */
-+
-+#ifndef WGL_EXT_pbuffer
-+#define WGL_EXT_pbuffer 1
-+DECLARE_HANDLE(HPBUFFEREXT);
-+#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
-+#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
-+#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
-+#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
-+#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
-+#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
-+#define WGL_PBUFFER_LARGEST_EXT 0x2033
-+#define WGL_PBUFFER_WIDTH_EXT 0x2034
-+#define WGL_PBUFFER_HEIGHT_EXT 0x2035
-+typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
-+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
-+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
-+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
-+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
-+HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
-+int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
-+BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
-+BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
-+#endif
-+#endif /* WGL_EXT_pbuffer */
-+
-+#ifndef WGL_EXT_pixel_format
-+#define WGL_EXT_pixel_format 1
-+#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
-+#define WGL_DRAW_TO_WINDOW_EXT 0x2001
-+#define WGL_DRAW_TO_BITMAP_EXT 0x2002
-+#define WGL_ACCELERATION_EXT 0x2003
-+#define WGL_NEED_PALETTE_EXT 0x2004
-+#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
-+#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
-+#define WGL_SWAP_METHOD_EXT 0x2007
-+#define WGL_NUMBER_OVERLAYS_EXT 0x2008
-+#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
-+#define WGL_TRANSPARENT_EXT 0x200A
-+#define WGL_TRANSPARENT_VALUE_EXT 0x200B
-+#define WGL_SHARE_DEPTH_EXT 0x200C
-+#define WGL_SHARE_STENCIL_EXT 0x200D
-+#define WGL_SHARE_ACCUM_EXT 0x200E
-+#define WGL_SUPPORT_GDI_EXT 0x200F
-+#define WGL_SUPPORT_OPENGL_EXT 0x2010
-+#define WGL_DOUBLE_BUFFER_EXT 0x2011
-+#define WGL_STEREO_EXT 0x2012
-+#define WGL_PIXEL_TYPE_EXT 0x2013
-+#define WGL_COLOR_BITS_EXT 0x2014
-+#define WGL_RED_BITS_EXT 0x2015
-+#define WGL_RED_SHIFT_EXT 0x2016
-+#define WGL_GREEN_BITS_EXT 0x2017
-+#define WGL_GREEN_SHIFT_EXT 0x2018
-+#define WGL_BLUE_BITS_EXT 0x2019
-+#define WGL_BLUE_SHIFT_EXT 0x201A
-+#define WGL_ALPHA_BITS_EXT 0x201B
-+#define WGL_ALPHA_SHIFT_EXT 0x201C
-+#define WGL_ACCUM_BITS_EXT 0x201D
-+#define WGL_ACCUM_RED_BITS_EXT 0x201E
-+#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
-+#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
-+#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
-+#define WGL_DEPTH_BITS_EXT 0x2022
-+#define WGL_STENCIL_BITS_EXT 0x2023
-+#define WGL_AUX_BUFFERS_EXT 0x2024
-+#define WGL_NO_ACCELERATION_EXT 0x2025
-+#define WGL_GENERIC_ACCELERATION_EXT 0x2026
-+#define WGL_FULL_ACCELERATION_EXT 0x2027
-+#define WGL_SWAP_EXCHANGE_EXT 0x2028
-+#define WGL_SWAP_COPY_EXT 0x2029
-+#define WGL_SWAP_UNDEFINED_EXT 0x202A
-+#define WGL_TYPE_RGBA_EXT 0x202B
-+#define WGL_TYPE_COLORINDEX_EXT 0x202C
-+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
-+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
-+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
-+BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
-+BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
-+#endif
-+#endif /* WGL_EXT_pixel_format */
-+
-+#ifndef WGL_EXT_pixel_format_packed_float
-+#define WGL_EXT_pixel_format_packed_float 1
-+#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
-+#endif /* WGL_EXT_pixel_format_packed_float */
-+
-+#ifndef WGL_EXT_swap_control
-+#define WGL_EXT_swap_control 1
-+typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
-+typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglSwapIntervalEXT (int interval);
-+int WINAPI wglGetSwapIntervalEXT (void);
-+#endif
-+#endif /* WGL_EXT_swap_control */
-+
-+#ifndef WGL_EXT_swap_control_tear
-+#define WGL_EXT_swap_control_tear 1
-+#endif /* WGL_EXT_swap_control_tear */
-+
-+#ifndef WGL_I3D_digital_video_control
-+#define WGL_I3D_digital_video_control 1
-+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
-+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
-+#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
-+#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
-+typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
-+typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
-+BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
-+#endif
-+#endif /* WGL_I3D_digital_video_control */
-+
-+#ifndef WGL_I3D_gamma
-+#define WGL_I3D_gamma 1
-+#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
-+#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
-+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
-+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
-+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
-+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
-+BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
-+BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
-+BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
-+#endif
-+#endif /* WGL_I3D_gamma */
-+
-+#ifndef WGL_I3D_genlock
-+#define WGL_I3D_genlock 1
-+#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
-+#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
-+#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
-+#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
-+#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
-+#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
-+#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
-+#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
-+#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
-+typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
-+typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
-+typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
-+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
-+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
-+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
-+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
-+typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
-+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
-+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
-+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
-+typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
-+BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
-+BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
-+BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
-+BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
-+BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
-+BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
-+BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
-+BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
-+BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
-+BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
-+BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
-+#endif
-+#endif /* WGL_I3D_genlock */
-+
-+#ifndef WGL_I3D_image_buffer
-+#define WGL_I3D_image_buffer 1
-+#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
-+#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
-+typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
-+typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
-+typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
-+typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
-+BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
-+BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
-+BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
-+#endif
-+#endif /* WGL_I3D_image_buffer */
-+
-+#ifndef WGL_I3D_swap_frame_lock
-+#define WGL_I3D_swap_frame_lock 1
-+typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
-+typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
-+typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
-+typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglEnableFrameLockI3D (void);
-+BOOL WINAPI wglDisableFrameLockI3D (void);
-+BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
-+BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
-+#endif
-+#endif /* WGL_I3D_swap_frame_lock */
-+
-+#ifndef WGL_I3D_swap_frame_usage
-+#define WGL_I3D_swap_frame_usage 1
-+typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
-+typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
-+typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
-+typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
-+BOOL WINAPI wglBeginFrameTrackingI3D (void);
-+BOOL WINAPI wglEndFrameTrackingI3D (void);
-+BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
-+#endif
-+#endif /* WGL_I3D_swap_frame_usage */
-+
-+#ifndef WGL_NV_DX_interop
-+#define WGL_NV_DX_interop 1
-+#define WGL_ACCESS_READ_ONLY_NV 0x00000000
-+#define WGL_ACCESS_READ_WRITE_NV 0x00000001
-+#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
-+typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
-+typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
-+typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
-+typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
-+typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
-+typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
-+typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
-+typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
-+HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
-+BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
-+HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
-+BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
-+BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
-+BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
-+BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
-+#endif
-+#endif /* WGL_NV_DX_interop */
-+
-+#ifndef WGL_NV_DX_interop2
-+#define WGL_NV_DX_interop2 1
-+#endif /* WGL_NV_DX_interop2 */
-+
-+#ifndef WGL_NV_copy_image
-+#define WGL_NV_copy_image 1
-+typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
-+#endif
-+#endif /* WGL_NV_copy_image */
-+
-+#ifndef WGL_NV_delay_before_swap
-+#define WGL_NV_delay_before_swap 1
-+typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds);
-+#endif
-+#endif /* WGL_NV_delay_before_swap */
-+
-+#ifndef WGL_NV_float_buffer
-+#define WGL_NV_float_buffer 1
-+#define WGL_FLOAT_COMPONENTS_NV 0x20B0
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
-+#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
-+#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
-+#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
-+#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
-+#endif /* WGL_NV_float_buffer */
-+
-+#ifndef WGL_NV_gpu_affinity
-+#define WGL_NV_gpu_affinity 1
-+DECLARE_HANDLE(HGPUNV);
-+struct _GPU_DEVICE {
-+ DWORD cb;
-+ CHAR DeviceName[32];
-+ CHAR DeviceString[128];
-+ DWORD Flags;
-+ RECT rcVirtualScreen;
-+};
-+typedef struct _GPU_DEVICE *PGPU_DEVICE;
-+#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
-+#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
-+typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
-+typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
-+typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
-+typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
-+typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
-+BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
-+HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
-+BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
-+BOOL WINAPI wglDeleteDCNV (HDC hdc);
-+#endif
-+#endif /* WGL_NV_gpu_affinity */
-+
-+#ifndef WGL_NV_multisample_coverage
-+#define WGL_NV_multisample_coverage 1
-+#define WGL_COVERAGE_SAMPLES_NV 0x2042
-+#define WGL_COLOR_SAMPLES_NV 0x20B9
-+#endif /* WGL_NV_multisample_coverage */
-+
-+#ifndef WGL_NV_present_video
-+#define WGL_NV_present_video 1
-+DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
-+#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
-+typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
-+typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
-+typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
-+BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
-+BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
-+#endif
-+#endif /* WGL_NV_present_video */
-+
-+#ifndef WGL_NV_render_depth_texture
-+#define WGL_NV_render_depth_texture 1
-+#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
-+#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
-+#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
-+#define WGL_DEPTH_COMPONENT_NV 0x20A7
-+#endif /* WGL_NV_render_depth_texture */
-+
-+#ifndef WGL_NV_render_texture_rectangle
-+#define WGL_NV_render_texture_rectangle 1
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
-+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
-+#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
-+#endif /* WGL_NV_render_texture_rectangle */
-+
-+#ifndef WGL_NV_swap_group
-+#define WGL_NV_swap_group 1
-+typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
-+typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
-+typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
-+typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
-+typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
-+typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
-+BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
-+BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
-+BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
-+BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
-+BOOL WINAPI wglResetFrameCountNV (HDC hDC);
-+#endif
-+#endif /* WGL_NV_swap_group */
-+
-+#ifndef WGL_NV_vertex_array_range
-+#define WGL_NV_vertex_array_range 1
-+typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
-+typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
-+void WINAPI wglFreeMemoryNV (void *pointer);
-+#endif
-+#endif /* WGL_NV_vertex_array_range */
-+
-+#ifndef WGL_NV_video_capture
-+#define WGL_NV_video_capture 1
-+DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
-+#define WGL_UNIQUE_ID_NV 0x20CE
-+#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
-+typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
-+typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
-+typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-+typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
-+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
-+UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
-+BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-+BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
-+BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
-+#endif
-+#endif /* WGL_NV_video_capture */
-+
-+#ifndef WGL_NV_video_output
-+#define WGL_NV_video_output 1
-+DECLARE_HANDLE(HPVIDEODEV);
-+#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
-+#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
-+#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
-+#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
-+#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
-+#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
-+#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
-+#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
-+#define WGL_VIDEO_OUT_FRAME 0x20C8
-+#define WGL_VIDEO_OUT_FIELD_1 0x20C9
-+#define WGL_VIDEO_OUT_FIELD_2 0x20CA
-+#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
-+#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
-+typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
-+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
-+typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
-+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
-+typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
-+typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
-+BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
-+BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
-+BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
-+BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
-+BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
-+#endif
-+#endif /* WGL_NV_video_output */
-+
-+#ifndef WGL_OML_sync_control
-+#define WGL_OML_sync_control 1
-+typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
-+typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
-+typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
-+typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
-+typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
-+typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
-+#ifdef WGL_WGLEXT_PROTOTYPES
-+BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
-+BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
-+INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
-+INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
-+BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
-+BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
-+#endif
-+#endif /* WGL_OML_sync_control */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/KHR/khrplatform.h
-@@ -0,0 +1,290 @@
-+#ifndef __khrplatform_h_
-+#define __khrplatform_h_
-+
-+/*
-+** Copyright (c) 2008-2009 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.
-+*/
-+
-+/* Khronos platform-specific types and definitions.
-+ *
-+ * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
-+ *
-+ * Adopters may modify this file to suit their platform. Adopters are
-+ * encouraged to submit platform specific modifications to the Khronos
-+ * group so that they can be included in future versions of this file.
-+ * Please submit changes by sending them to the public Khronos Bugzilla
-+ * (http://khronos.org/bugzilla) by filing a bug against product
-+ * "Khronos (general)" component "Registry".
-+ *
-+ * A predefined template which fills in some of the bug fields can be
-+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
-+ * must create a Bugzilla login first.
-+ *
-+ *
-+ * See the Implementer's Guidelines for information about where this file
-+ * should be located on your system and for more details of its use:
-+ * http://www.khronos.org/registry/implementers_guide.pdf
-+ *
-+ * This file should be included as
-+ * #include <KHR/khrplatform.h>
-+ * by Khronos client API header files that use its types and defines.
-+ *
-+ * The types in khrplatform.h should only be used to define API-specific types.
-+ *
-+ * Types defined in khrplatform.h:
-+ * khronos_int8_t signed 8 bit
-+ * khronos_uint8_t unsigned 8 bit
-+ * khronos_int16_t signed 16 bit
-+ * khronos_uint16_t unsigned 16 bit
-+ * khronos_int32_t signed 32 bit
-+ * khronos_uint32_t unsigned 32 bit
-+ * khronos_int64_t signed 64 bit
-+ * khronos_uint64_t unsigned 64 bit
-+ * khronos_intptr_t signed same number of bits as a pointer
-+ * khronos_uintptr_t unsigned same number of bits as a pointer
-+ * khronos_ssize_t signed size
-+ * khronos_usize_t unsigned size
-+ * khronos_float_t signed 32 bit floating point
-+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
-+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
-+ * nanoseconds
-+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
-+ * khronos_boolean_enum_t enumerated boolean type. This should
-+ * only be used as a base type when a client API's boolean type is
-+ * an enum. Client APIs which use an integer or other type for
-+ * booleans cannot use this as the base type for their boolean.
-+ *
-+ * Tokens defined in khrplatform.h:
-+ *
-+ * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
-+ *
-+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
-+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
-+ *
-+ * Calling convention macros defined in this file:
-+ * KHRONOS_APICALL
-+ * KHRONOS_APIENTRY
-+ * KHRONOS_APIATTRIBUTES
-+ *
-+ * These may be used in function prototypes as:
-+ *
-+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
-+ * int arg1,
-+ * int arg2) KHRONOS_APIATTRIBUTES;
-+ */
-+
-+/*-------------------------------------------------------------------------
-+ * Definition of KHRONOS_APICALL
-+ *-------------------------------------------------------------------------
-+ * This precedes the return type of the function in the function prototype.
-+ */
-+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
-+# if defined(KHRONOS_DLL_EXPORTS)
-+# define KHRONOS_APICALL __declspec(dllexport)
-+# else
-+# define KHRONOS_APICALL __declspec(dllimport)
-+# endif
-+#elif defined (__SYMBIAN32__)
-+# define KHRONOS_APICALL IMPORT_C
-+#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
-+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
-+/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */
-+# define KHRONOS_APICALL __attribute__((visibility("default")))
-+#else
-+# define KHRONOS_APICALL
-+#endif
-+
-+/*-------------------------------------------------------------------------
-+ * Definition of KHRONOS_APIENTRY
-+ *-------------------------------------------------------------------------
-+ * This follows the return type of the function and precedes the function
-+ * name in the function prototype.
-+ */
-+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
-+ /* Win32 but not WinCE */
-+# define KHRONOS_APIENTRY __stdcall
-+#else
-+# define KHRONOS_APIENTRY
-+#endif
-+
-+/*-------------------------------------------------------------------------
-+ * Definition of KHRONOS_APIATTRIBUTES
-+ *-------------------------------------------------------------------------
-+ * This follows the closing parenthesis of the function prototype arguments.
-+ */
-+#if defined (__ARMCC_2__)
-+#define KHRONOS_APIATTRIBUTES __softfp
-+#else
-+#define KHRONOS_APIATTRIBUTES
-+#endif
-+
-+/*-------------------------------------------------------------------------
-+ * basic type definitions
-+ *-----------------------------------------------------------------------*/
-+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-+
-+
-+/*
-+ * Using <stdint.h>
-+ */
-+#include <stdint.h>
-+typedef int32_t khronos_int32_t;
-+typedef uint32_t khronos_uint32_t;
-+typedef int64_t khronos_int64_t;
-+typedef uint64_t khronos_uint64_t;
-+#define KHRONOS_SUPPORT_INT64 1
-+#define KHRONOS_SUPPORT_FLOAT 1
-+
-+#elif defined(__VMS ) || defined(__sgi)
-+
-+/*
-+ * Using <inttypes.h>
-+ */
-+#include <inttypes.h>
-+typedef int32_t khronos_int32_t;
-+typedef uint32_t khronos_uint32_t;
-+typedef int64_t khronos_int64_t;
-+typedef uint64_t khronos_uint64_t;
-+#define KHRONOS_SUPPORT_INT64 1
-+#define KHRONOS_SUPPORT_FLOAT 1
-+
-+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-+
-+/*
-+ * Win32
-+ */
-+typedef __int32 khronos_int32_t;
-+typedef unsigned __int32 khronos_uint32_t;
-+typedef __int64 khronos_int64_t;
-+typedef unsigned __int64 khronos_uint64_t;
-+#define KHRONOS_SUPPORT_INT64 1
-+#define KHRONOS_SUPPORT_FLOAT 1
-+
-+#elif defined(__sun__) || defined(__digital__)
-+
-+/*
-+ * Sun or Digital
-+ */
-+typedef int khronos_int32_t;
-+typedef unsigned int khronos_uint32_t;
-+#if defined(__arch64__) || defined(_LP64)
-+typedef long int khronos_int64_t;
-+typedef unsigned long int khronos_uint64_t;
-+#else
-+typedef long long int khronos_int64_t;
-+typedef unsigned long long int khronos_uint64_t;
-+#endif /* __arch64__ */
-+#define KHRONOS_SUPPORT_INT64 1
-+#define KHRONOS_SUPPORT_FLOAT 1
-+
-+#elif 0
-+
-+/*
-+ * Hypothetical platform with no float or int64 support
-+ */
-+typedef int khronos_int32_t;
-+typedef unsigned int khronos_uint32_t;
-+#define KHRONOS_SUPPORT_INT64 0
-+#define KHRONOS_SUPPORT_FLOAT 0
-+
-+#else
-+
-+/*
-+ * Generic fallback
-+ */
-+#include <stdint.h>
-+typedef int32_t khronos_int32_t;
-+typedef uint32_t khronos_uint32_t;
-+typedef int64_t khronos_int64_t;
-+typedef uint64_t khronos_uint64_t;
-+#define KHRONOS_SUPPORT_INT64 1
-+#define KHRONOS_SUPPORT_FLOAT 1
-+
-+#endif
-+
-+
-+/*
-+ * Types that are (so far) the same on all platforms
-+ */
-+typedef signed char khronos_int8_t;
-+typedef unsigned char khronos_uint8_t;
-+typedef signed short int khronos_int16_t;
-+typedef unsigned short int khronos_uint16_t;
-+
-+/*
-+ * Types that differ between LLP64 and LP64 architectures - in LLP64,
-+ * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
-+ * to be the only LLP64 architecture in current use.
-+ */
-+#ifdef _WIN64
-+typedef signed long long int khronos_intptr_t;
-+typedef unsigned long long int khronos_uintptr_t;
-+typedef signed long long int khronos_ssize_t;
-+typedef unsigned long long int khronos_usize_t;
-+#else
-+typedef signed long int khronos_intptr_t;
-+typedef unsigned long int khronos_uintptr_t;
-+typedef signed long int khronos_ssize_t;
-+typedef unsigned long int khronos_usize_t;
-+#endif
-+
-+#if KHRONOS_SUPPORT_FLOAT
-+/*
-+ * Float type
-+ */
-+typedef float khronos_float_t;
-+#endif
-+
-+#if KHRONOS_SUPPORT_INT64
-+/* Time types
-+ *
-+ * These types can be used to represent a time interval in nanoseconds or
-+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
-+ * of nanoseconds since some arbitrary system event (e.g. since the last
-+ * time the system booted). The Unadjusted System Time is an unsigned
-+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
-+ * may be either signed or unsigned.
-+ */
-+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
-+typedef khronos_int64_t khronos_stime_nanoseconds_t;
-+#endif
-+
-+/*
-+ * Dummy value used to pad enum types to 32 bits.
-+ */
-+#ifndef KHRONOS_MAX_ENUM
-+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
-+#endif
-+
-+/*
-+ * Enumerated boolean type
-+ *
-+ * Values other than zero should be considered to be true. Therefore
-+ * comparisons should not be made against KHRONOS_TRUE.
-+ */
-+typedef enum {
-+ KHRONOS_FALSE = 0,
-+ KHRONOS_TRUE = 1,
-+ KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
-+} khronos_boolean_enum_t;
-+
-+#endif /* __khrplatform_h_ */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Additions/x11/x11include/mesa-11.0.7/README
-@@ -0,0 +1,6 @@
-+The contents of this directory were extracted from the contents of the
-+archive mesa-11.0.7.tar.gz, as downloaded from ftp.freedesktop.org/pub/mesa,
-+using the following shell script:
-+
-+cp -r mesa-11.0.7/include/EGL mesa-11.0.7/include/GL mesa-11.0.7/include/KHR \
-+ ${PATH_VBOX}/src/VBox/Additions/x11/x11include/mesa-11.0.7
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
-@@ -294,7 +294,7 @@ typedef struct COREAUDIOSTREAMIN
- /** The AudioUnit used. */
- AudioUnit audioUnit;
- /** The audio converter if necessary. */
-- AudioConverterRef converter;
-+ AudioConverterRef pConverter;
- /** Native buffer used for render the audio data in the recording thread. */
- AudioBufferList bufferList;
- /** Reading offset for the bufferList's buffer. */
-@@ -406,12 +406,18 @@ static int drvHostCoreAudioReinitInput(P
-
- PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-- drvHostCoreAudioFiniIn(pInterface, &pStreamIn->streamIn);
-+ int rc = drvHostCoreAudioFiniIn(pInterface, &pStreamIn->streamIn);
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = drvHostCoreAudioInitInput(&pStreamIn->streamIn, NULL /* pcSamples */);
-+ if (RT_SUCCESS(rc))
-+ rc = drvHostCoreAudioControlIn(pInterface, &pStreamIn->streamIn, PDMAUDIOSTREAMCMD_ENABLE);
-+ }
-
-- drvHostCoreAudioInitInput(&pStreamIn->streamIn, NULL /* pcSamples */);
-- drvHostCoreAudioControlIn(pInterface, &pStreamIn->streamIn, PDMAUDIOSTREAMCMD_ENABLE);
-+ if (RT_FAILURE(rc))
-+ LogRel(("CoreAudio: Unable to re-init input stream: %Rrc\n", rc));
-
-- return VINF_SUCCESS;
-+ return rc;
- }
-
- static int drvHostCoreAudioReinitOutput(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
-@@ -421,12 +427,18 @@ static int drvHostCoreAudioReinitOutput(
-
- PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-- drvHostCoreAudioFiniOut(pInterface, &pStreamOut->streamOut);
-+ int rc = drvHostCoreAudioFiniOut(pInterface, &pStreamOut->streamOut);
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = drvHostCoreAudioInitOutput(&pStreamOut->streamOut, NULL /* pcSamples */);
-+ if (RT_SUCCESS(rc))
-+ rc = drvHostCoreAudioControlOut(pInterface, &pStreamOut->streamOut, PDMAUDIOSTREAMCMD_ENABLE);
-+ }
-
-- drvHostCoreAudioInitOutput(&pStreamOut->streamOut, NULL /* pcSamples */);
-- drvHostCoreAudioControlOut(pInterface, &pStreamOut->streamOut, PDMAUDIOSTREAMCMD_ENABLE);
-+ if (RT_FAILURE(rc))
-+ LogRel(("CoreAudio: Unable to re-init output stream: %Rrc\n", rc));
-
-- return VINF_SUCCESS;
-+ return rc;
- }
-
- /* Callback for getting notified when some of the properties of an audio device has changed. */
-@@ -543,7 +555,7 @@ static DECLCALLBACK(OSStatus) drvHostCor
- do
- {
- /* Are we using a converter? */
-- if (pStreamIn->converter)
-+ if (pStreamIn->pConverter)
- {
- /* First, render the data as usual. */
- pStreamIn->bufferList.mBuffers[0].mNumberChannels = pStreamIn->deviceFormat.mChannelsPerFrame;
-@@ -593,9 +605,9 @@ static DECLCALLBACK(OSStatus) drvHostCor
- tmpList.mBuffers[0].mDataByteSize = cbToWrite;
- tmpList.mBuffers[0].mData = puDst;
-
-- AudioConverterReset(pStreamIn->converter);
-+ AudioConverterReset(pStreamIn->pConverter);
-
-- err = AudioConverterFillComplexBuffer(pStreamIn->converter, drvHostCoreAudioConverterCallback, pStreamIn,
-+ err = AudioConverterFillComplexBuffer(pStreamIn->pConverter, drvHostCoreAudioConverterCallback, pStreamIn,
- &ioOutputDataPacketSize, &tmpList, NULL);
- if( err != noErr
- && err != caConverterEOFDErr)
-@@ -866,7 +878,7 @@ static int drvHostCoreAudioInitInput(PPD
- {
- LogRel(("CoreAudio: Input converter is active\n"));
-
-- err = AudioConverterNew(&pStreamIn->deviceFormat, &pStreamIn->streamFormat, &pStreamIn->converter);
-+ err = AudioConverterNew(&pStreamIn->deviceFormat, &pStreamIn->streamFormat, &pStreamIn->pConverter);
- if (RT_UNLIKELY(err != noErr))
- {
- LogRel(("CoreAudio: Failed to create the audio converter (%RI32)\n", err));
-@@ -885,7 +897,7 @@ static int drvHostCoreAudioInitInput(PPD
- */
- const SInt32 channelMap[2] = {0, 0}; /* Channel map for mono -> stereo, */
-
-- err = AudioConverterSetProperty(pStreamIn->converter, kAudioConverterChannelMap, sizeof(channelMap), channelMap);
-+ err = AudioConverterSetProperty(pStreamIn->pConverter, kAudioConverterChannelMap, sizeof(channelMap), channelMap);
- if (err != noErr)
- {
- LogRel(("CoreAudio: Failed to set channel mapping (mono -> stereo) for the audio input converter (%RI32)\n", err));
-@@ -982,11 +994,16 @@ static int drvHostCoreAudioInitInput(PPD
- return VERR_AUDIO_BACKEND_INIT_FAILED;
- }
-
-+ /* Destroy any former internal ring buffer. */
-+ if (pStreamIn->pBuf)
-+ {
-+ RTCircBufDestroy(pStreamIn->pBuf);
-+ pStreamIn->pBuf = NULL;
-+ }
-+
- /* Calculate the ratio between the device and the stream sample rate. */
- pStreamIn->sampleRatio = pStreamIn->streamFormat.mSampleRate / pStreamIn->deviceFormat.mSampleRate;
-
-- /* Set to zero first */
-- pStreamIn->pBuf = NULL;
- /* Create the AudioBufferList structure with one buffer. */
- pStreamIn->bufferList.mNumberBuffers = 1;
- /* Initialize the buffer to nothing. */
-@@ -1285,6 +1302,13 @@ static int drvHostCoreAudioInitOutput(PP
- rc = VERR_INVALID_PARAMETER;
- }
-
-+ /* Destroy any former internal ring buffer. */
-+ if (pStreamOut->pBuf)
-+ {
-+ RTCircBufDestroy(pStreamOut->pBuf);
-+ pStreamOut->pBuf = NULL;
-+ }
-+
- /* Create the internal ring buffer. */
- rc = RTCircBufCreate(&pStreamOut->pBuf, cSamples << pHstStrmOut->Props.cShift);
- if (RT_SUCCESS(rc))
-@@ -1516,9 +1540,15 @@ static DECLCALLBACK(int) drvHostCoreAudi
-
- PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-+ int rc = VINF_SUCCESS;
-+
- /* Check if the audio device should be reinitialized. If so do it. */
- if (ASMAtomicReadU32(&pStreamOut->status) == CA_STATUS_REINIT)
-- drvHostCoreAudioReinitOutput(pInterface, &pStreamOut->streamOut);
-+ {
-+ rc = drvHostCoreAudioReinitOutput(pInterface, &pStreamOut->streamOut);
-+ if (RT_FAILURE(rc))
-+ return rc;
-+ }
-
- /* Not much else to do here. */
-
-@@ -1530,7 +1560,6 @@ static DECLCALLBACK(int) drvHostCoreAudi
- return VINF_SUCCESS;
- }
-
-- int rc = VINF_SUCCESS;
- uint32_t cbReadTotal = 0;
- uint32_t cAvail = AudioMixBufAvail(&pHstStrmOut->MixBuf);
- size_t cbAvail = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cAvail);
-@@ -1797,10 +1826,10 @@ static DECLCALLBACK(int) drvHostCoreAudi
- LogRel(("CoreAudio: [Output] Failed to remove the default input device changed listener (%RI32)\n", err));
- }
-
-- if (pStreamIn->converter)
-+ if (pStreamIn->pConverter)
- {
-- AudioConverterDispose(pStreamIn->converter);
-- pStreamIn->converter = NULL;
-+ AudioConverterDispose(pStreamIn->pConverter);
-+ pStreamIn->pConverter = NULL;
- }
-
- err = AudioUnitUninitialize(pStreamIn->audioUnit);
-@@ -1809,13 +1838,15 @@ static DECLCALLBACK(int) drvHostCoreAudi
- err = CloseComponent(pStreamIn->audioUnit);
- if (RT_LIKELY(err == noErr))
- {
-- RTCircBufDestroy(pStreamIn->pBuf);
--
-- pStreamIn->audioUnit = NULL;
- pStreamIn->deviceID = kAudioDeviceUnknown;
-- pStreamIn->pBuf = NULL;
-- pStreamIn->sampleRatio = 1;
-+ pStreamIn->audioUnit = NULL;
- pStreamIn->offBufferRead = 0;
-+ pStreamIn->sampleRatio = 1;
-+ if (pStreamIn->pBuf)
-+ {
-+ RTCircBufDestroy(pStreamIn->pBuf);
-+ pStreamIn->pBuf = NULL;
-+ }
-
- ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_UNINIT);
- }
-@@ -1905,11 +1936,13 @@ static DECLCALLBACK(int) drvHostCoreAudi
- err = CloseComponent(pStreamOut->audioUnit);
- if (err == noErr)
- {
-- RTCircBufDestroy(pStreamOut->pBuf);
-- pStreamOut->pBuf = NULL;
--
-- pStreamOut->audioUnit = NULL;
- pStreamOut->deviceID = kAudioDeviceUnknown;
-+ pStreamOut->audioUnit = NULL;
-+ if (pStreamOut->pBuf)
-+ {
-+ RTCircBufDestroy(pStreamOut->pBuf);
-+ pStreamOut->pBuf = NULL;
-+ }
-
- ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_UNINIT);
- }
-@@ -1933,17 +1966,19 @@ static DECLCALLBACK(int) drvHostCoreAudi
- {
- PCOREAUDIOSTREAMIN pStreamIn = (PCOREAUDIOSTREAMIN)pHstStrmIn;
-
-- LogFlowFunc(("enmRecSource=%ld\n"));
--
-- ASMAtomicXchgU32(&pStreamIn->status, CA_STATUS_UNINIT);
-+ LogFlowFunc(("enmRecSource=%ld\n", enmRecSource));
-
-- pStreamIn->audioUnit = NULL;
-- pStreamIn->deviceID = kAudioDeviceUnknown;
-- pStreamIn->converter = NULL;
-- pStreamIn->sampleRatio = 1;
-- pStreamIn->offBufferRead = 0;
-+ pStreamIn->deviceID = kAudioDeviceUnknown;
-+ pStreamIn->audioUnit = NULL;
-+ pStreamIn->pConverter = NULL;
-+ pStreamIn->bufferList.mNumberBuffers = 0;
-+ pStreamIn->offBufferRead = 0;
-+ pStreamIn->sampleRatio = 1;
-+ pStreamIn->pBuf = NULL;
-+ pStreamIn->status = CA_STATUS_UNINIT;
-+ pStreamIn->fDefDevChgListReg = false;
-
-- bool fDeviceByUser = false;
-+ bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
-
- /* Initialize the hardware info section with the audio settings */
- int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamIn->streamIn.Props);
-@@ -1993,56 +2028,58 @@ static DECLCALLBACK(int) drvHostCoreAudi
- {
- PCOREAUDIOSTREAMOUT pStreamOut = (PCOREAUDIOSTREAMOUT)pHstStrmOut;
-
-- OSStatus err = noErr;
-- int rc = 0;
-- bool fDeviceByUser = false; /* use we a device which was set by the user? */
--
- LogFlowFuncEnter();
-
-- ASMAtomicXchgU32(&pStreamOut->status, CA_STATUS_UNINIT);
-+ pStreamOut->deviceID = kAudioDeviceUnknown;
-+ pStreamOut->audioUnit = NULL;
-+ pStreamOut->pBuf = NULL;
-+ pStreamOut->status = CA_STATUS_UNINIT;
-+ pStreamOut->fDefDevChgListReg = false;
-
-- pStreamOut->audioUnit = NULL;
-- pStreamOut->deviceID = kAudioDeviceUnknown;
-+ bool fDeviceByUser = false; /* Do we use a device which was set by the user? */
-
- /* Initialize the hardware info section with the audio settings */
-- DrvAudioStreamCfgToProps(pCfg, &pStreamOut->streamOut.Props);
--
-+ int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamOut->streamOut.Props);
-+ if (RT_SUCCESS(rc))
-+ {
- #if 0
-- /* Try to find the audio device set by the user. Use
-- * export VBOX_COREAUDIO_OUTPUT_DEVICE_UID=AppleHDAEngineOutput:0
-- * to set it. */
-- if (DeviceUID.pszOutputDeviceUID)
-- {
-- pStreamOut->audioDeviceId = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszOutputDeviceUID);
-- /* Not fatal */
-- if (pStreamOut->audioDeviceId == kAudioDeviceUnknown)
-- LogRel(("CoreAudio: Unable to find output device %s. Falling back to the default audio device. \n", DeviceUID.pszOutputDeviceUID));
-- else
-- fDeviceByUser = true;
-- }
-+ /* Try to find the audio device set by the user. Use
-+ * export VBOX_COREAUDIO_OUTPUT_DEVICE_UID=AppleHDAEngineOutput:0
-+ * to set it. */
-+ if (DeviceUID.pszOutputDeviceUID)
-+ {
-+ pStreamOut->audioDeviceId = drvHostCoreAudioDeviceUIDtoID(DeviceUID.pszOutputDeviceUID);
-+ /* Not fatal */
-+ if (pStreamOut->audioDeviceId == kAudioDeviceUnknown)
-+ LogRel(("CoreAudio: Unable to find output device %s. Falling back to the default audio device. \n", DeviceUID.pszOutputDeviceUID));
-+ else
-+ fDeviceByUser = true;
-+ }
- #endif
-+ rc = drvHostCoreAudioInitOutput(pHstStrmOut, pcSamples);
-+ }
-
-- rc = drvHostCoreAudioInitOutput(pHstStrmOut, pcSamples);
-- if (RT_FAILURE(rc))
-- return rc;
--
-- /* When the devices isn't forced by the user, we want default device change notifications. */
-- if (!fDeviceByUser)
-+ if (RT_SUCCESS(rc))
- {
-- AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
-- kAudioObjectPropertyElementMaster };
-- err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-- drvHostCoreAudioDefaultDeviceChanged, (void *)pStreamOut);
-- /* Not fatal. */
-- if (RT_LIKELY(err == noErr))
-+ /* When the devices isn't forced by the user, we want default device change notifications. */
-+ if (!fDeviceByUser)
- {
-- pStreamOut->fDefDevChgListReg = true;
-+ AudioObjectPropertyAddress propAdr = { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeGlobal,
-+ kAudioObjectPropertyElementMaster };
-+ OSStatus err = AudioObjectAddPropertyListener(kAudioObjectSystemObject, &propAdr,
-+ drvHostCoreAudioDefaultDeviceChanged, (void *)pStreamOut);
-+ /* Not fatal. */
-+ if (RT_LIKELY(err == noErr))
-+ {
-+ pStreamOut->fDefDevChgListReg = true;
-+ }
-+ else
-+ LogRel(("CoreAudio: Failed to add the default output device changed listener (%RI32)\n", err));
- }
-- else
-- LogRel(("CoreAudio: Failed to add the default output device changed listener (%RI32)\n", err));
- }
-
-- return VINF_SUCCESS;
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
- }
-
- static DECLCALLBACK(bool) drvHostCoreAudioIsEnabled(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
-@@ -1376,7 +1376,7 @@ PDMBOTHCBDECL(int) vmsvgaWritePort(PVGAS
- && desc.numPages == 0)
- {
- /* Pointer to the next physical page of descriptors. */
-- GCPhys = GCPhysBase = desc.ppn << PAGE_SHIFT;
-+ GCPhys = GCPhysBase = (RTGCPHYS)desc.ppn << PAGE_SHIFT;
- }
- else
- {
-@@ -1387,7 +1387,7 @@ PDMBOTHCBDECL(int) vmsvgaWritePort(PVGAS
- AssertReturn(pSVGAState->aGMR[idGMR].paDesc, VERR_NO_MEMORY);
- }
-
-- pSVGAState->aGMR[idGMR].paDesc[iDescriptor].GCPhys = desc.ppn << PAGE_SHIFT;
-+ pSVGAState->aGMR[idGMR].paDesc[iDescriptor].GCPhys = (RTGCPHYS)desc.ppn << PAGE_SHIFT;
- pSVGAState->aGMR[idGMR].paDesc[iDescriptor++].numPages = desc.numPages;
- pSVGAState->aGMR[idGMR].cbTotal += desc.numPages * PAGE_SIZE;
-
-@@ -2920,7 +2920,7 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(
- if (fGCPhys64)
- GCPhys = (pPage64[0] << PAGE_SHIFT) & 0x00000FFFFFFFFFFFULL; /* seeing rubbish in the top bits with certain linux guests*/
- else
-- GCPhys = pPage32[0] << PAGE_SHIFT;
-+ GCPhys = (RTGCPHYS)pPage32[0] << PAGE_SHIFT;
-
- pGMR->paDesc[0].GCPhys = GCPhys;
- pGMR->paDesc[0].numPages = 1;
-@@ -2931,7 +2931,7 @@ static DECLCALLBACK(int) vmsvgaFIFOLoop(
- if (pCmd->flags & SVGA_REMAP_GMR2_PPN64)
- GCPhys = (pPage64[i] << PAGE_SHIFT) & 0x00000FFFFFFFFFFFULL; /* seeing rubbish in the top bits with certain linux guests*/
- else
-- GCPhys = pPage32[i] << PAGE_SHIFT;
-+ GCPhys = (RTGCPHYS)pPage32[i] << PAGE_SHIFT;
-
- /* Continuous physical memory? */
- if (GCPhys == pGMR->paDesc[iDescriptor].GCPhys + pGMR->paDesc[iDescriptor].numPages * PAGE_SIZE)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
-@@ -4647,7 +4647,7 @@ int vmsvga3dSetClipPlane(PVGASTATE pThis
-
- /* Store for vm state save/restore. */
- pContext->state.aClipPlane[index].fValid = true;
-- memcpy(pContext->state.aClipPlane[index].plane, plane, sizeof(plane));
-+ memcpy(pContext->state.aClipPlane[index].plane, plane, sizeof(pContext->state.aClipPlane[index].plane));
-
- hr = pContext->pDevice->SetClipPlane(index, plane);
- AssertMsgReturn(hr == D3D_OK, ("vmsvga3dSetClipPlane: SetClipPlane failed with %x\n", hr), VERR_INTERNAL_ERROR);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/DevVGA.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/DevVGA.cpp
-@@ -1147,7 +1147,7 @@ static int vbe_ioport_write_data(PVGASTA
- */
- pThis->pDrv->pfnLFBModeChange(pThis->pDrv, (val & VBE_DISPI_ENABLED) != 0);
- #ifdef VBOX_WITH_HGSMI
-- VBVAPause(pThis, (val & VBE_DISPI_ENABLED) == 0);
-+ VBVAOnVBEChanged(pThis);
- #endif /* VBOX_WITH_HGSMI */
-
- /* The VGA region is (could be) affected by this change; reset all aliases we've created. */
-@@ -3056,6 +3056,8 @@ static DECLCALLBACK(int) vgaR3IOPortHGSM
- | HGSMIHOSTFLAGS_WATCHDOG
- # endif
- | HGSMIHOSTFLAGS_VSYNC
-+ | HGSMIHOSTFLAGS_HOTPLUG
-+ | HGSMIHOSTFLAGS_CURSOR_CAPABILITIES
- );
- }
- else
-@@ -5228,12 +5230,34 @@ vgaPortCopyRect(PPDMIDISPLAYPORT pInterf
- return VERR_INVALID_PARAMETER;
- }
-
-+ int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
-+ AssertRC(rc);
-+
-+ /* This method only works if the VGA device is in a VBE mode or not paused VBVA mode.
-+ * VGA modes are reported to the caller by returning VERR_INVALID_STATE.
-+ *
-+ * If VBE_DISPI_ENABLED is set, then it is a VBE or VBE compatible VBVA mode. Both of them can be handled.
-+ *
-+ * If VBE_DISPI_ENABLED is clear, then it is either a VGA mode or a VBVA mode set by guest additions
-+ * which have VBVACAPS_USE_VBVA_ONLY capability.
-+ * When VBE_DISPI_ENABLED is being cleared and VBVACAPS_USE_VBVA_ONLY is not set (i.e. guest wants a VGA mode),
-+ * then VBVAOnVBEChanged makes sure that VBVA is paused.
-+ * That is a not paused VBVA means that the video mode can be handled even if VBE_DISPI_ENABLED is clear.
-+ */
-+ if ( (pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0
-+ && VBVAIsPaused(pThis))
-+ {
-+ PDMCritSectLeave(&pThis->CritSect);
-+ return VERR_INVALID_STATE;
-+ }
-+
- /* Choose the rendering function. */
- switch (cSrcBitsPerPixel)
- {
- default:
- case 0:
- /* Nothing to do, just return. */
-+ PDMCritSectLeave(&pThis->CritSect);
- return VINF_SUCCESS;
- case 8:
- v = VGA_DRAW_LINE8;
-@@ -5252,16 +5276,6 @@ vgaPortCopyRect(PPDMIDISPLAYPORT pInterf
- break;
- }
-
-- int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
-- AssertRC(rc);
--
-- /* This method only works if the VGA device is in a VBE mode. */
-- if ((pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0)
-- {
-- PDMCritSectLeave(&pThis->CritSect);
-- return VERR_INVALID_STATE;
-- }
--
- vga_draw_line = vga_draw_line_table[v * 4 + get_depth_index(cDstBitsPerPixel)];
-
- /* Compute source and destination addresses and pitches. */
-@@ -5635,13 +5649,14 @@ static DECLCALLBACK(int) vgaR3LoadDone(P
-
- #ifdef VBOX_WITH_HGSMI
- PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-- VBVAPause(pThis, (pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0);
- rc = vboxVBVALoadStateDone(pDevIns, pSSM);
- AssertRCReturn(rc, rc);
- # ifdef VBOX_WITH_VDMA
- rc = vboxVDMASaveLoadDone(pThis->pVdma);
- AssertRCReturn(rc, rc);
- # endif
-+ /* Now update the current VBVA state which depends on VBE registers. vboxVBVALoadStateDone cleared the state. */
-+ VBVAOnVBEChanged(pThis);
- #endif
- #ifdef VBOX_WITH_VMSVGA
- if (pThis->fVMSVGAEnabled)
-@@ -6949,6 +6964,18 @@ static DECLCALLBACK(int) vgaR3Construc
- return rc;
- }
-
-+static DECLCALLBACK(void) vgaR3PowerOn(PPDMDEVINS pDevIns)
-+{
-+ PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-+ vmsvgaR3PowerOn(pDevIns);
-+ VBVAOnResume(pThis);
-+}
-+
-+static DECLCALLBACK(void) vgaR3Resume(PPDMDEVINS pDevIns)
-+{
-+ PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE);
-+ VBVAOnResume(pThis);
-+}
-
- /**
- * The device registration structure.
-@@ -6983,7 +7010,7 @@ const PDMDEVREG g_DeviceVga =
- NULL,
- /* pfnPowerOn */
- #ifdef VBOX_WITH_VMSVGA
-- vmsvgaR3PowerOn,
-+ vgaR3PowerOn,
- #else
- NULL,
- #endif
-@@ -6992,7 +7019,7 @@ const PDMDEVREG g_DeviceVga =
- /* pfnSuspend */
- NULL,
- /* pfnResume */
-- NULL,
-+ vgaR3Resume,
- /* pfnAttach */
- vgaAttach,
- /* pfnDetach */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/DevVGA.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/DevVGA.h
-@@ -681,7 +681,10 @@ void VBVADestroy (PVGASTATE pVGAS
- int VBVAUpdateDisplay (PVGASTATE pVGAState);
- void VBVAReset (PVGASTATE pVGAState);
- void VBVAPause (PVGASTATE pVGAState, bool fPause);
-+void VBVAOnVBEChanged(PVGASTATE pVGAState);
-+void VBVAOnResume(PVGASTATE pThis);
-
-+bool VBVAIsPaused(PVGASTATE pVGAState);
- bool VBVAIsEnabled(PVGASTATE pVGAState);
-
- void VBVARaiseIrq (PVGASTATE pVGAState, uint32_t fFlags);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
-@@ -2085,7 +2085,16 @@ void VBVARaiseIrq (PVGASTATE pVGAState,
- HGSMISetHostGuestFlags(pVGAState->pHGSMI, HGSMIHOSTFLAGS_IRQ | fFlags);
- PDMCritSectLeave(&pVGAState->CritSect);
-
-- PDMDevHlpPCISetIrq(pDevIns, 0, PDM_IRQ_LEVEL_HIGH);
-+ /* Set IRQ only for a running VM.
-+ * If HGSMIHOSTFLAGS_IRQ is set, then vgaR3Resume/vgaR3PowerOn will
-+ * set the postponed IRQ.
-+ */
-+ VMSTATE enmVMState = PDMDevHlpVMState(pDevIns);
-+ if ( enmVMState == VMSTATE_RUNNING
-+ || enmVMState == VMSTATE_RUNNING_LS)
-+ {
-+ PDMDevHlpPCISetIrq(pDevIns, 0, PDM_IRQ_LEVEL_HIGH);
-+ }
- }
-
- static DECLCALLBACK(int) vbvaRaiseIrqEMT(PVGASTATE pVGAState, uint32_t fFlags)
-@@ -2104,6 +2113,18 @@ void VBVARaiseIrqNoWait(PVGASTATE pVGASt
- VMR3ReqCallNoWait(PDMDevHlpGetVM(pVGAState->pDevInsR3), VMCPUID_ANY, (PFNRT)vbvaRaiseIrqEMT, 2, pVGAState, fFlags);
- }
-
-+void VBVAOnResume(PVGASTATE pThis)
-+{
-+ PPDMDEVINS pDevIns = pThis->pDevInsR3;
-+
-+ PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
-+ bool fIrq = RT_BOOL(HGSMIGetHostGuestFlags(pThis->pHGSMI) & HGSMIHOSTFLAGS_IRQ);
-+ PDMCritSectLeave(&pThis->CritSect);
-+
-+ if (fIrq)
-+ PDMDevHlpPCISetIrq(pDevIns, 0, PDM_IRQ_LEVEL_HIGH);
-+}
-+
- static int vbvaHandleQueryConf32(PVGASTATE pVGAState, VBVACONF32 *pConf32)
- {
- int rc = VINF_SUCCESS;
-@@ -2764,6 +2785,34 @@ void VBVAPause(PVGASTATE pVGAState, bool
- }
- }
-
-+bool VBVAIsPaused(PVGASTATE pVGAState)
-+{
-+ if (pVGAState && pVGAState->pHGSMI)
-+ {
-+ const VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pVGAState->pHGSMI);
-+ if (pCtx && pCtx->cViews)
-+ {
-+ /* If VBVA is enabled at all. */
-+ const VBVAVIEW *pView = &pCtx->aViews[0];
-+ if (pView->vbva.guest.pVBVA)
-+ return pCtx->fPaused;
-+ }
-+ }
-+ /* VBVA is disabled. */
-+ return true;
-+}
-+
-+void VBVAOnVBEChanged(PVGASTATE pVGAState)
-+{
-+ /* The guest does not depend on host handling the VBE registers. */
-+ if (pVGAState->fGuestCaps & VBVACAPS_USE_VBVA_ONLY)
-+ {
-+ return;
-+ }
-+
-+ VBVAPause(pVGAState, (pVGAState->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0);
-+}
-+
- void VBVAReset (PVGASTATE pVGAState)
- {
- if (!pVGAState || !pVGAState->pHGSMI)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
-@@ -475,6 +475,11 @@ void HGSMISetHostGuestFlags(HGSMIINSTANC
- ASMAtomicOrU32(&pIns->pHGFlags->u32HostFlags, flags);
- }
-
-+uint32_t HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns)
-+{
-+ return pIns->pHGFlags? ASMAtomicReadU32(&pIns->pHGFlags->u32HostFlags) : 0;
-+}
-+
- void HGSMIClearHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)
- {
- AssertPtrReturnVoid(pIns->pHGFlags);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
-@@ -91,6 +91,7 @@ void HGSMIHostWrite (PHGSMIINSTANCE pIns
- HGSMIOFFSET offBuffer);
-
- void HGSMISetHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
-+uint32_t HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns);
-
- void HGSMIClearHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
-@@ -4099,7 +4099,7 @@ static void generate_texcoord_assignment
-
- for (i = 0, map = ps->baseShader.reg_maps.texcoord; map && i < min(8, MAX_REG_TEXCRD); map >>= 1, ++i)
- {
-- if (!map & 1)
-+ if (!(map & 1))
- continue;
-
- /* so far we assume that if texcoord_mask has any write flags, they are assigned appropriately with pixel shader */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Network/DevE1000.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Network/DevE1000.cpp
-@@ -1479,7 +1479,7 @@ static const struct E1kRegMap_st
- { 0x00600, 0x00200, 0xFFFFFFFF, 0xFFFFFFFF, e1kRegReadVFTA , e1kRegWriteVFTA , "VFTA82542", "VLAN Filter Table Array (n) (82542)" }
- };
-
--#ifdef DEBUG
-+#ifdef LOG_ENABLED
-
- /**
- * Convert U32 value to hex string. Masked bytes are replaced with dots.
-@@ -5695,7 +5695,7 @@ static int e1kRegReadUnaligned(PE1KSTATE
- uint32_t shift;
- int rc = VINF_SUCCESS;
- int index = e1kRegLookup(pThis, offReg);
--#ifdef DEBUG
-+#ifdef LOG_ENABLED
- char buf[9];
- #endif
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Network/DevPCNet.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Network/DevPCNet.cpp
-@@ -1228,7 +1228,6 @@ static void pcnetSoftReset(PPCNETSTATE p
- pThis->aCSR[94] = 0x0000;
- pThis->aCSR[100] = 0x0200;
- pThis->aCSR[103] = 0x0105;
-- pThis->aCSR[103] = 0x0105;
- CSR_MISSC(pThis) = 0;
- pThis->aCSR[114] = 0x0000;
- pThis->aCSR[122] = 0x0000;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Network/slirp/slirp.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Network/slirp/slirp.c
-@@ -1590,10 +1590,10 @@ static void activate_port_forwarding(PNA
- continue;
-
- remove_port_forwarding:
-- LogRel(("NAT: failed to redirect %s %RTnaipv4:%d => %RTnaipv4:%d\n",
-+ LogRel(("NAT: failed to redirect %s %RTnaipv4:%d => %RTnaipv4:%d (%s)\n",
- (rule->proto == IPPROTO_UDP ? "UDP" : "TCP"),
- rule->bind_ip.s_addr, rule->host_port,
-- guest_addr, rule->guest_port));
-+ guest_addr, rule->guest_port, strerror(errno)));
- LIST_REMOVE(rule, list);
- pData->cRedirectionsStored--;
- RTMemFree(rule);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/PC/DevHPET.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/PC/DevHPET.cpp
-@@ -1002,7 +1002,7 @@ static void hpetR3TimerUpdateIrq(HPET *p
-
- /* ISR bits are only set in level-triggered mode. */
- if ((pHpetTimer->u64Config & HPET_TN_INT_TYPE) == HPET_TIMER_TYPE_LEVEL)
-- pThis->u64Isr |= (uint64_t)(1 << pHpetTimer->idxTimer);
-+ pThis->u64Isr |= UINT64_C(1) << pHpetTimer->idxTimer;
-
- /* We trigger flip/flop in edge-triggered mode and do nothing in
- level-triggered mode yet. */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/PC/DevPit-i8254.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/PC/DevPit-i8254.cpp
-@@ -296,7 +296,7 @@ static int pitTryDeviceOpenSanitizeIoctl
- {
- int errno_eviocgsnd0 = 0;
- int errno_kiocsound = 0;
-- if (ioctl(fd, EVIOCGSND(0)) != -1)
-+ if (ioctl(fd, EVIOCGSND(0)) == -1)
- {
- errno_eviocgsnd0 = errno;
- if (ioctl(fd, KIOCSOUND, 1) == -1)
-@@ -1404,8 +1404,11 @@ static DECLCALLBACK(int) pitConstruct(P
- #else
- LogRel(("PIT: speaker: emulation deactivated\n"));
- #endif
-- RTStrFree(pszPassthroughSpeakerDevice);
-- pszPassthroughSpeakerDevice = NULL;
-+ if (pszPassthroughSpeakerDevice)
-+ {
-+ MMR3HeapFree(pszPassthroughSpeakerDevice);
-+ pszPassthroughSpeakerDevice = NULL;
-+ }
- }
- pThis->channels[0].irq = u8Irq;
- for (i = 0; i < RT_ELEMENTS(pThis->channels); i++)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/PC/vbox.dsl
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/PC/vbox.dsl
-@@ -74,6 +74,10 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1,
- Return(Sizeof(Local0))
- }
-
-+
-+ //
-+ // S2BF(Str) - Convert a string object into a buffer object.
-+ //
- Method(S2BF, 1)
- {
- //
-@@ -91,6 +95,101 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1,
- Return(BUFF)
- }
-
-+ //
-+ // MIN(Int1, Int2) - Returns the minimum of Int1 or Int2.
-+ //
-+ //
-+ Method(MIN, 2)
-+ {
-+ //
-+ // Note: The caller must make sure that both arguments are integer objects.
-+ //
-+ If (LLess(Arg0, Arg1))
-+ {
-+ Return(Arg0)
-+ }
-+ Else
-+ {
-+ Return(Arg1)
-+ }
-+ }
-+
-+ //
-+ // SCMP(Str1, Str2) - Compare Str1 and Str2.
-+ // Returns One if Str1 > Str2
-+ // Returns Zero if Str1 == Str2
-+ // Returns Ones if Str1 < Str2
-+ //
-+ Method(SCMP, 2)
-+ {
-+ //
-+ // Note: The caller must make sure that both arguments are string objects.
-+ //
-+ // Local0 is a buffer of Str1.
-+ // Local1 is a buffer of Str2.
-+ // Local2 is the indexed byte of Str1.
-+ // Local3 is the indexed byte of Str2.
-+ // Local4 is the index to both Str1 and Str2.
-+ // Local5 is the length of Str1.
-+ // Local6 is the length of Str2.
-+ // Local7 is the minimum of Str1 or Str2 length.
-+ //
-+
-+ Store(Arg0, Local0)
-+ Store(S2BF(Local0), Local0)
-+
-+ Store(S2BF(Arg1), Local1)
-+ Store(Zero, Local4)
-+
-+ Store(SLEN(Arg0), Local5)
-+ Store(SLEN(Arg1), Local6)
-+ Store(MIN(Local5, Local6), Local7)
-+
-+ While (LLess(Local4, Local7))
-+ {
-+ Store(Derefof(Index(Local0, Local4)), Local2)
-+ Store(Derefof(Index(Local1, Local4)), Local3)
-+ If (LGreater(Local2, Local3))
-+ {
-+ Return(One)
-+ }
-+ Else
-+ {
-+ If (LLess(Local2, Local3))
-+ {
-+ Return(Ones)
-+ }
-+ }
-+
-+ Increment(Local4)
-+ }
-+
-+ If (LLess(Local4, Local5))
-+ {
-+ Return(One)
-+ }
-+ Else
-+ {
-+ If (LLess(Local4, Local6))
-+ {
-+ Return(Ones)
-+ }
-+ Else
-+ {
-+ Return(Zero)
-+ }
-+ }
-+ }
-+
-+ // Return one if strings match, zero otherwise. Wrapper around SCMP
-+ Method (MTCH, 2)
-+ {
-+ Store(Arg0, Local0)
-+ Store(Arg1, Local1)
-+ Store(SCMP(Local0, Local1), Local2)
-+ Return(LNot(Local2))
-+ }
-+
- // Convert ASCII string to buffer and store it's contents (char by
- // char) into DCHR (thus possibly writing the string to console)
- Method (\DBG, 1, NotSerialized)
-@@ -108,6 +207,118 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1,
- }
- }
-
-+ // Microsoft Windows version indicator
-+ Name(MSWV, Ones)
-+
-+ //
-+ // Return Windows version. Detect non-Microsoft OSes.
-+ //
-+ // 0 : Not Windows OS
-+ // 2 : Windows Me
-+ // 3 : Windows 2000 (NT pre-XP)
-+ // 4 : Windows XP
-+ // 5 : Windows Server 2003
-+ // 6 : Windows Vista
-+ // 7 : Windows 7
-+ // 8 : Windows 8
-+ // 9 : Windows 8.1
-+ // 10 : Windows 10
-+ Method(MSWN, 0, NotSerialized)
-+ {
-+ If (LNotEqual(MSWV, Ones))
-+ {
-+ Return(MSWV)
-+ }
-+
-+ Store(0x00, MSWV)
-+ DBG("_OS: ")
-+ DBG(_OS)
-+ DBG("\n")
-+
-+ // Does OS provide the _OSI method?
-+ If (CondRefOf(_OSI, Local1))
-+ {
-+ DBG("_OSI exists\n")
-+ // OS returns non-zero value in response to _OSI query if it
-+ // supports the interface. Newer Windows releases support older
-+ // versions of the ACPI interface.
-+ If (_OSI("Windows 2001"))
-+ {
-+ Store(4, MSWV) // XP
-+ }
-+ If (_OSI("Windows 2001.1"))
-+ {
-+ Store(5, MSWV) // Server 2003
-+ }
-+ If (_OSI("Windows 2006"))
-+ {
-+ Store(6, MSWV) // Vista
-+ }
-+ If (_OSI("Windows 2009"))
-+ {
-+ Store(7, MSWV) // Windows 7
-+ }
-+ If (_OSI("Windows 2012"))
-+ {
-+ Store(8, MSWV) // Windows 8
-+ }
-+ If (_OSI("Windows 2013"))
-+ {
-+ Store(9, MSWV) // Windows 8.1
-+ }
-+ If (_OSI("Windows 2015"))
-+ {
-+ Store(10, MSWV) // Windows 10
-+ }
-+
-+ // This must come last and is a trap. No version of Windows
-+ // reports this!
-+ If (_OSI("Windows 2006 SP2"))
-+ {
-+ DBG("Windows 2006 SP2 supported\n")
-+ // Not a Microsoft OS
-+ Store(0, MSWV)
-+ }
-+ }
-+ Else
-+ {
-+ // No _OSI, could be older NT or Windows 9x
-+ If (MTCH(_OS, "Microsoft Windows NT"))
-+ {
-+ Store(3, MSWV)
-+ }
-+ If (MTCH(_OS, "Microsoft WindowsME: Millennium Edition"))
-+ {
-+ Store(2, MSWV)
-+ }
-+ }
-+
-+ // Does OS provide the _REV method?
-+ If (CondRefOf(_REV, Local2))
-+ {
-+ DBG("_REV: ")
-+ HEX4(_REV)
-+
-+ // Defeat most Linuxes and other non-Microsoft OSes. Microsoft Windows
-+ // up to Server 2003 reports ACPI 1.0 support, Vista up to Windows 10
-+ // reports ACPI 2.0 support. Anything pretending to be a Windows OS
-+ // with higher ACPI revision support is a fake.
-+ If (LAnd(LGreater(MSWV, 0),LGreater(_REV, 2)))
-+ {
-+ If (LLess(MSWV,8))
-+ {
-+ DBG("ACPI rev mismatch, not a Microsoft OS\n")
-+ Store(0, MSWV)
-+ }
-+ }
-+ }
-+
-+ DBG("Determined MSWV: ")
-+ HEX4(MSWV)
-+
-+ Return(MSWV)
-+ }
-+
- Name(PICM, 0)
- Method(_PIC, 1)
- {
-@@ -1034,6 +1245,23 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1,
- {
- Name (_ADR, 0x00020000)
-
-+ // Windows releases older than Windows 8 (starting with Windows 2000)
-+ // get confused by this and lose the monitor device node. One of
-+ // the consequences is that color management is not available.
-+ // For Windows 2000 - Windows 7, disable this device (while keeping
-+ // it enabled for non-Microsoft OSes).
-+ Method (_STA, 0, NotSerialized)
-+ {
-+ If (LAnd (LGreater (MSWN(), 0x00), LLess (MSWN(), 0x08)))
-+ {
-+ Return(0x00)
-+ }
-+ Else
-+ {
-+ Return(0x0F)
-+ }
-+ }
-+
- Scope (\_GPE)
- {
- // GPE bit 2 handler
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Storage/DevBusLogic.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Storage/DevBusLogic.cpp
-@@ -404,8 +404,8 @@ typedef struct BUSLOGIC
- uint32_t uMailboxOutgoingPositionCurrent;
- /** Number of mailboxes ready. */
- volatile uint32_t cMailboxesReady;
-- /** Whether a notification to R3 was send. */
-- volatile bool fNotificationSend;
-+ /** Whether a notification to R3 was sent. */
-+ volatile bool fNotificationSent;
-
- #if HC_ARCH_BITS == 64
- uint32_t Alignment1;
-@@ -459,9 +459,21 @@ typedef struct BUSLOGIC
- bool volatile fSignalIdle;
- /** Flag whether we have tasks which need to be processed again. */
- bool volatile fRedo;
-+ /** Flag whether the worker thread is sleeping. */
-+ volatile bool fWrkThreadSleeping;
-+ /** Flag whether a request from the BIOS is pending which the
-+ * worker thread needs to process. */
-+ volatile bool fBiosReqPending;
- /** List of tasks which can be redone. */
- R3PTRTYPE(volatile PBUSLOGICTASKSTATE) pTasksRedoHead;
-
-+ /** The support driver session handle. */
-+ R3R0PTRTYPE(PSUPDRVSESSION) pSupDrvSession;
-+ /** Worker thread. */
-+ R3PTRTYPE(PPDMTHREAD) pThreadWrk;
-+ /** The event semaphore the processing thread waits on. */
-+ SUPSEMEVENT hEvtProcess;
-+
- #ifdef LOG_ENABLED
- # if HC_ARCH_BITS == 64
- uint32_t Alignment4;
-@@ -875,7 +887,7 @@ typedef struct CCBC
- /** The SCSI CDB (up to 12 bytes). */
- uint8_t abCDB[12];
- } CCBC, *PCCBC;
--AssertCompileSize(CCB24, 30);
-+AssertCompileSize(CCBC, 30);
-
- /* Make sure that the 24-bit/32-bit/common CCB offsets match. */
- AssertCompileMemberOffset(CCBC, cbCDB, 2);
-@@ -2241,7 +2253,7 @@ static int buslogicRegisterWrite(PBUSLOG
- if (pBusLogic->cMailbox)
- {
- ASMAtomicIncU32(&pBusLogic->cMailboxesReady);
-- if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSend, true))
-+ if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSent, true))
- {
- /* Send new notification to the queue. */
- PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pBusLogic->CTX_SUFF(pNotifierQueue));
-@@ -2552,18 +2564,29 @@ static DECLCALLBACK(int) buslogicR3BiosI
- static DECLCALLBACK(int) buslogicR3BiosIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
- {
- int rc;
-- PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-
- Log2(("#%d %s: pvUser=%#p cb=%d u32=%#x Port=%#x\n",
- pDevIns->iInstance, __FUNCTION__, pvUser, cb, u32, Port));
-
-+ /*
-+ * If there is already a request form the BIOS pending ignore this write
-+ * because it should not happen.
-+ */
-+ if (ASMAtomicReadBool(&pThis->fBiosReqPending))
-+ return VINF_SUCCESS;
-+
- Assert(cb == 1);
-
-- rc = vboxscsiWriteRegister(&pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), (uint8_t)u32);
-+ rc = vboxscsiWriteRegister(&pThis->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), (uint8_t)u32);
- if (rc == VERR_MORE_DATA)
- {
-- rc = buslogicR3PrepareBIOSSCSIRequest(pBusLogic);
-- AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, true);
-+ /* Send a notifier to the PDM queue that there are pending requests. */
-+ PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotifierQueue));
-+ AssertMsg(pItem, ("Allocating item for queue failed\n"));
-+ PDMQueueInsert(pThis->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem);
-+ rc = VINF_SUCCESS;
- }
- else if (RT_FAILURE(rc))
- AssertMsgFailed(("Writing BIOS register failed %Rrc\n", rc));
-@@ -2578,19 +2601,29 @@ static DECLCALLBACK(int) buslogicR3BiosI
- static DECLCALLBACK(int) buslogicR3BiosIoPortWriteStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port,
- uint8_t const *pbSrc, uint32_t *pcTransfers, unsigned cb)
- {
-- PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
- Log2(("#%d %s: pvUser=%#p cb=%d Port=%#x\n", pDevIns->iInstance, __FUNCTION__, pvUser, cb, Port));
-
-- int rc = vboxscsiWriteString(pDevIns, &pBusLogic->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), pbSrc, pcTransfers, cb);
-+ /*
-+ * If there is already a request form the BIOS pending ignore this write
-+ * because it should not happen.
-+ */
-+ if (ASMAtomicReadBool(&pThis->fBiosReqPending))
-+ return VINF_SUCCESS;
-+
-+ int rc = vboxscsiWriteString(pDevIns, &pThis->VBoxSCSI, (Port - BUSLOGIC_BIOS_IO_PORT), pbSrc, pcTransfers, cb);
- if (rc == VERR_MORE_DATA)
- {
-- rc = buslogicR3PrepareBIOSSCSIRequest(pBusLogic);
-- AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, true);
-+ /* Send a notifier to the PDM queue that there are pending requests. */
-+ PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotifierQueue));
-+ AssertMsg(pItem, ("Allocating item for queue failed\n"));
-+ PDMQueueInsert(pThis->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem);
- }
- else if (RT_FAILURE(rc))
- AssertMsgFailed(("Writing BIOS register failed %Rrc\n", rc));
-
-- return rc;
-+ return VINF_SUCCESS;
- }
-
- /**
-@@ -2714,7 +2747,7 @@ static void buslogicR3RedoSetWarning(PBU
- * connection (second error). Pause VM. On resume we'll retry. */
- buslogicR3WarningISCSI(pThis->CTX_SUFF(pDevIns));
- }
-- else
-+ else if (rc != VERR_VD_DEK_MISSING)
- buslogicR3WarningUnknown(pThis->CTX_SUFF(pDevIns), rc);
- }
-
-@@ -2891,73 +2924,85 @@ static int buslogicR3DeviceSCSIRequestSe
- &pTaskState->CommandControlBlockGuest, sizeof(CCB32));
-
- uTargetIdCCB = pTaskState->fIs24Bit ? pTaskState->CommandControlBlockGuest.o.uTargetId : pTaskState->CommandControlBlockGuest.n.uTargetId;
-- pTargetDevice = &pBusLogic->aDeviceStates[uTargetIdCCB];
-- pTaskState->CTX_SUFF(pTargetDevice) = pTargetDevice;
-+ if (RT_LIKELY(uTargetIdCCB < RT_ELEMENTS(pBusLogic->aDeviceStates)))
-+ {
-+ pTargetDevice = &pBusLogic->aDeviceStates[uTargetIdCCB];
-+ pTaskState->CTX_SUFF(pTargetDevice) = pTargetDevice;
-
- #ifdef LOG_ENABLED
-- buslogicR3DumpCCBInfo(&pTaskState->CommandControlBlockGuest, pTaskState->fIs24Bit);
-+ buslogicR3DumpCCBInfo(&pTaskState->CommandControlBlockGuest, pTaskState->fIs24Bit);
- #endif
-
-- /* Alloc required buffers. */
-- rc = buslogicR3DataBufferAlloc(pTaskState);
-- AssertMsgRC(rc, ("Alloc failed rc=%Rrc\n", rc));
--
-- rc = buslogicR3SenseBufferAlloc(pTaskState);
-- AssertMsgRC(rc, ("Mapping sense buffer failed rc=%Rrc\n", rc));
-+ /* Alloc required buffers. */
-+ rc = buslogicR3DataBufferAlloc(pTaskState);
-+ AssertMsgRC(rc, ("Alloc failed rc=%Rrc\n", rc));
-
-- /* Check if device is present on bus. If not return error immediately and don't process this further. */
-- if (!pBusLogic->aDeviceStates[uTargetIdCCB].fPresent)
-- {
-- buslogicR3DataBufferFree(pTaskState);
-+ rc = buslogicR3SenseBufferAlloc(pTaskState);
-+ AssertMsgRC(rc, ("Mapping sense buffer failed rc=%Rrc\n", rc));
-
-- if (pTaskState->pbSenseBuffer)
-- buslogicR3SenseBufferFree(pTaskState, true);
-+ /* Check if device is present on bus. If not return error immediately and don't process this further. */
-+ if (!pBusLogic->aDeviceStates[uTargetIdCCB].fPresent)
-+ {
-+ buslogicR3DataBufferFree(pTaskState);
-
-- buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-- BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_SCSI_SELECTION_TIMEOUT,
-- BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-- BUSLOGIC_MAILBOX_INCOMING_COMPLETION_WITH_ERROR);
-+ if (pTaskState->pbSenseBuffer)
-+ buslogicR3SenseBufferFree(pTaskState, true);
-
-- RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
-- }
-- else
-- {
-- /* Setup SCSI request. */
-- pTaskState->PDMScsiRequest.uLogicalUnit = pTaskState->fIs24Bit ? pTaskState->CommandControlBlockGuest.o.uLogicalUnit
-- : pTaskState->CommandControlBlockGuest.n.uLogicalUnit;
--
-- if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_UNKNOWN)
-- pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_UNKNOWN;
-- else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_IN)
-- pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_FROM_DEVICE;
-- else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_OUT)
-- pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_TO_DEVICE;
-- else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_NO_DATA)
-- pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_NONE;
-- else
-- AssertMsgFailed(("Invalid data direction type %d\n", pTaskState->CommandControlBlockGuest.c.uDataDirection));
-+ buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-+ BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_SCSI_SELECTION_TIMEOUT,
-+ BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-+ BUSLOGIC_MAILBOX_INCOMING_COMPLETION_WITH_ERROR);
-
-- pTaskState->PDMScsiRequest.cbCDB = pTaskState->CommandControlBlockGuest.c.cbCDB;
-- pTaskState->PDMScsiRequest.pbCDB = pTaskState->CommandControlBlockGuest.c.abCDB;
-- if (pTaskState->DataSeg.cbSeg)
-- {
-- pTaskState->PDMScsiRequest.cbScatterGather = pTaskState->DataSeg.cbSeg;
-- pTaskState->PDMScsiRequest.cScatterGatherEntries = 1;
-- pTaskState->PDMScsiRequest.paScatterGatherHead = &pTaskState->DataSeg;
-+ RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
- }
- else
- {
-- pTaskState->PDMScsiRequest.cbScatterGather = 0;
-- pTaskState->PDMScsiRequest.cScatterGatherEntries = 0;
-- pTaskState->PDMScsiRequest.paScatterGatherHead = NULL;
-- }
-- pTaskState->PDMScsiRequest.cbSenseBuffer = buslogicR3ConvertSenseBufferLength(pTaskState->CommandControlBlockGuest.c.cbSenseData);
-- pTaskState->PDMScsiRequest.pbSenseBuffer = pTaskState->pbSenseBuffer;
-- pTaskState->PDMScsiRequest.pvUser = pTaskState;
-+ /* Setup SCSI request. */
-+ pTaskState->PDMScsiRequest.uLogicalUnit = pTaskState->fIs24Bit ? pTaskState->CommandControlBlockGuest.o.uLogicalUnit
-+ : pTaskState->CommandControlBlockGuest.n.uLogicalUnit;
-+
-+ if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_UNKNOWN)
-+ pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_UNKNOWN;
-+ else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_IN)
-+ pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_FROM_DEVICE;
-+ else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_OUT)
-+ pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_TO_DEVICE;
-+ else if (pTaskState->CommandControlBlockGuest.c.uDataDirection == BUSLOGIC_CCB_DIRECTION_NO_DATA)
-+ pTaskState->PDMScsiRequest.uDataDirection = PDMSCSIREQUESTTXDIR_NONE;
-+ else
-+ AssertMsgFailed(("Invalid data direction type %d\n", pTaskState->CommandControlBlockGuest.c.uDataDirection));
-
-- ASMAtomicIncU32(&pTargetDevice->cOutstandingRequests);
-- rc = pTargetDevice->pDrvSCSIConnector->pfnSCSIRequestSend(pTargetDevice->pDrvSCSIConnector, &pTaskState->PDMScsiRequest);
-- AssertMsgRC(rc, ("Sending request to SCSI layer failed rc=%Rrc\n", rc));
-+ pTaskState->PDMScsiRequest.cbCDB = pTaskState->CommandControlBlockGuest.c.cbCDB;
-+ pTaskState->PDMScsiRequest.pbCDB = pTaskState->CommandControlBlockGuest.c.abCDB;
-+ if (pTaskState->DataSeg.cbSeg)
-+ {
-+ pTaskState->PDMScsiRequest.cbScatterGather = pTaskState->DataSeg.cbSeg;
-+ pTaskState->PDMScsiRequest.cScatterGatherEntries = 1;
-+ pTaskState->PDMScsiRequest.paScatterGatherHead = &pTaskState->DataSeg;
-+ }
-+ else
-+ {
-+ pTaskState->PDMScsiRequest.cbScatterGather = 0;
-+ pTaskState->PDMScsiRequest.cScatterGatherEntries = 0;
-+ pTaskState->PDMScsiRequest.paScatterGatherHead = NULL;
-+ }
-+ pTaskState->PDMScsiRequest.cbSenseBuffer = buslogicR3ConvertSenseBufferLength(pTaskState->CommandControlBlockGuest.c.cbSenseData);
-+ pTaskState->PDMScsiRequest.pbSenseBuffer = pTaskState->pbSenseBuffer;
-+ pTaskState->PDMScsiRequest.pvUser = pTaskState;
-+
-+ ASMAtomicIncU32(&pTargetDevice->cOutstandingRequests);
-+ rc = pTargetDevice->pDrvSCSIConnector->pfnSCSIRequestSend(pTargetDevice->pDrvSCSIConnector, &pTaskState->PDMScsiRequest);
-+ AssertMsgRC(rc, ("Sending request to SCSI layer failed rc=%Rrc\n", rc));
-+ }
-+ }
-+ else
-+ {
-+ RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
-+
-+ buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-+ BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_INVALID_COMMAND_PARAMETER,
-+ BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-+ BUSLOGIC_MAILBOX_INCOMING_COMPLETION_WITH_ERROR);
- }
-
- return rc;
-@@ -2974,15 +3019,27 @@ static int buslogicR3DeviceSCSIRequestAb
- &pTaskState->CommandControlBlockGuest, sizeof(CCB32));
-
- uTargetIdCCB = pTaskState->fIs24Bit ? pTaskState->CommandControlBlockGuest.o.uTargetId : pTaskState->CommandControlBlockGuest.n.uTargetId;
-- pTargetDevice = &pBusLogic->aDeviceStates[uTargetIdCCB];
-- pTaskState->CTX_SUFF(pTargetDevice) = pTargetDevice;
-+ if (RT_LIKELY(uTargetIdCCB < RT_ELEMENTS(pBusLogic->aDeviceStates)))
-+ {
-+ pTargetDevice = &pBusLogic->aDeviceStates[uTargetIdCCB];
-+ pTaskState->CTX_SUFF(pTargetDevice) = pTargetDevice;
-
-- buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-- BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_ABORT_QUEUE_GENERATED,
-- BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-- BUSLOGIC_MAILBOX_INCOMING_COMPLETION_ABORTED_NOT_FOUND);
-+ buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-+ BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_ABORT_QUEUE_GENERATED,
-+ BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-+ BUSLOGIC_MAILBOX_INCOMING_COMPLETION_ABORTED_NOT_FOUND);
-
-- RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
-+ RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
-+ }
-+ else
-+ {
-+ RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
-+
-+ buslogicR3SendIncomingMailbox(pBusLogic, pTaskState,
-+ BUSLOGIC_MAILBOX_INCOMING_ADAPTER_STATUS_INVALID_COMMAND_PARAMETER,
-+ BUSLOGIC_MAILBOX_INCOMING_DEVICE_STATUS_OPERATION_GOOD,
-+ BUSLOGIC_MAILBOX_INCOMING_COMPLETION_WITH_ERROR);
-+ }
-
- return rc;
- }
-@@ -3110,20 +3167,10 @@ static int buslogicR3ProcessMailboxNext(
- */
- static DECLCALLBACK(bool) buslogicR3NotifyQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
- {
-- PBUSLOGIC pBusLogic = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
--
-- /* Reset notification send flag now. */
-- Assert(pBusLogic->fNotificationSend);
-- ASMAtomicXchgBool(&pBusLogic->fNotificationSend, false);
-- ASMAtomicXchgU32(&pBusLogic->cMailboxesReady, 0); /** @todo Actually not required anymore but to stay compatible with older saved states. */
-+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-
-- /* Process mailboxes. */
-- int rc;
-- do
-- {
-- rc = buslogicR3ProcessMailboxNext(pBusLogic);
-- AssertMsg(RT_SUCCESS(rc) || rc == VERR_NO_DATA, ("Processing mailbox failed rc=%Rrc\n", rc));
-- } while (RT_SUCCESS(rc));
-+ int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
-+ AssertRC(rc);
-
- return true;
- }
-@@ -3214,7 +3261,7 @@ static DECLCALLBACK(int) buslogicR3SaveE
- SSMR3PutGCPhys(pSSM, pBusLogic->GCPhysAddrMailboxOutgoingBase);
- SSMR3PutU32 (pSSM, pBusLogic->uMailboxOutgoingPositionCurrent);
- SSMR3PutU32 (pSSM, pBusLogic->cMailboxesReady);
-- SSMR3PutBool (pSSM, pBusLogic->fNotificationSend);
-+ SSMR3PutBool (pSSM, pBusLogic->fNotificationSent);
- SSMR3PutGCPhys(pSSM, pBusLogic->GCPhysAddrMailboxIncomingBase);
- SSMR3PutU32 (pSSM, pBusLogic->uMailboxIncomingPositionCurrent);
- SSMR3PutBool (pSSM, pBusLogic->fStrictRoundRobinMode);
-@@ -3316,7 +3363,7 @@ static DECLCALLBACK(int) buslogicR3LoadE
- SSMR3GetGCPhys(pSSM, &pBusLogic->GCPhysAddrMailboxOutgoingBase);
- SSMR3GetU32 (pSSM, &pBusLogic->uMailboxOutgoingPositionCurrent);
- SSMR3GetU32 (pSSM, (uint32_t *)&pBusLogic->cMailboxesReady);
-- SSMR3GetBool (pSSM, (bool *)&pBusLogic->fNotificationSend);
-+ SSMR3GetBool (pSSM, (bool *)&pBusLogic->fNotificationSent);
- SSMR3GetGCPhys(pSSM, &pBusLogic->GCPhysAddrMailboxIncomingBase);
- SSMR3GetU32 (pSSM, &pBusLogic->uMailboxIncomingPositionCurrent);
- SSMR3GetBool (pSSM, &pBusLogic->fStrictRoundRobinMode);
-@@ -3441,6 +3488,75 @@ static DECLCALLBACK(void *) buslogicR3St
- }
-
- /**
-+ * The worker thread processing requests from the guest.
-+ *
-+ * @returns VBox status code.
-+ * @param pDevIns The device instance.
-+ * @param pThread The thread structure.
-+ */
-+static DECLCALLBACK(int) buslogicR3Worker(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
-+{
-+ PBUSLOGIC pThis = (PBUSLOGIC)pThread->pvUser;
-+ int rc = VINF_SUCCESS;
-+
-+ if (pThread->enmState == PDMTHREADSTATE_INITIALIZING)
-+ return VINF_SUCCESS;
-+
-+ while (pThread->enmState == PDMTHREADSTATE_RUNNING)
-+ {
-+ ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, true);
-+ bool fNotificationSent = ASMAtomicXchgBool(&pThis->fNotificationSent, false);
-+ if (!fNotificationSent)
-+ {
-+ Assert(ASMAtomicReadBool(&pThis->fWrkThreadSleeping));
-+ rc = SUPSemEventWaitNoResume(pThis->pSupDrvSession, pThis->hEvtProcess, RT_INDEFINITE_WAIT);
-+ AssertLogRelMsgReturn(RT_SUCCESS(rc) || rc == VERR_INTERRUPTED, ("%Rrc\n", rc), rc);
-+ if (RT_UNLIKELY(pThread->enmState != PDMTHREADSTATE_RUNNING))
-+ break;
-+ LogFlowFunc(("Woken up with rc=%Rrc\n", rc));
-+ ASMAtomicWriteBool(&pThis->fNotificationSent, false);
-+ }
-+
-+ ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, false);
-+
-+ /* Check whether there is a BIOS request pending and process it first. */
-+ if (ASMAtomicReadBool(&pThis->fBiosReqPending))
-+ {
-+ rc = buslogicR3PrepareBIOSSCSIRequest(pThis);
-+ AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, false);
-+ }
-+ else
-+ {
-+ ASMAtomicXchgU32(&pThis->cMailboxesReady, 0); /** @todo Actually not required anymore but to stay compatible with older saved states. */
-+
-+ /* Process mailboxes. */
-+ do
-+ {
-+ rc = buslogicR3ProcessMailboxNext(pThis);
-+ AssertMsg(RT_SUCCESS(rc) || rc == VERR_NO_DATA, ("Processing mailbox failed rc=%Rrc\n", rc));
-+ } while (RT_SUCCESS(rc));
-+ }
-+ } /* While running */
-+
-+ return VINF_SUCCESS;
-+}
-+
-+
-+/**
-+ * Unblock the worker thread so it can respond to a state change.
-+ *
-+ * @returns VBox status code.
-+ * @param pDevIns The device instance.
-+ * @param pThread The send thread.
-+ */
-+static DECLCALLBACK(int) buslogicR3WorkerWakeUp(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
-+{
-+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-+ return SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
-+}
-+
-+/**
- * BusLogic debugger info callback.
- *
- * @param pDevIns The device instance.
-@@ -3607,7 +3723,7 @@ static void buslogicR3SuspendOrPowerOff(
- {
- ASMAtomicWriteBool(&pThis->fSignalIdle, false);
-
-- AssertMsg(!pThis->fNotificationSend, ("The PDM Queue should be empty at this point\n"));
-+ AssertMsg(!pThis->fNotificationSent, ("The PDM Queue should be empty at this point\n"));
-
- if (pThis->fRedo)
- {
-@@ -3842,6 +3958,12 @@ static DECLCALLBACK(int) buslogicR3Destr
- pThis->fRedo = false;
- }
-
-+ if (pThis->hEvtProcess != NIL_SUPSEMEVENT)
-+ {
-+ SUPSemEventClose(pThis->pSupDrvSession, pThis->hEvtProcess);
-+ pThis->hEvtProcess = NIL_SUPSEMEVENT;
-+ }
-+
- int rc = RTMemCacheDestroy(pThis->hTaskCache);
- AssertMsgRC(rc, ("Destroying task cache failed rc=%Rrc\n", rc));
-
-@@ -3982,6 +4104,23 @@ static DECLCALLBACK(int) buslogicR3Const
- if (RT_FAILURE(rc))
- return PDMDEV_SET_ERROR(pDevIns, rc, N_("BusLogic: cannot create critical section"));
-
-+ /*
-+ * Create event semaphore and worker thread.
-+ */
-+ rc = SUPSemEventCreate(pThis->pSupDrvSession, &pThis->hEvtProcess);
-+ if (RT_FAILURE(rc))
-+ return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
-+ N_("BusLogic: Failed to create SUP event semaphore"));
-+
-+ char szDevTag[20];
-+ RTStrPrintf(szDevTag, sizeof(szDevTag), "BUSLOGIC-%u", iInstance);
-+
-+ rc = PDMDevHlpThreadCreate(pDevIns, &pThis->pThreadWrk, pThis, buslogicR3Worker,
-+ buslogicR3WorkerWakeUp, 0, RTTHREADTYPE_IO, szDevTag);
-+ if (RT_FAILURE(rc))
-+ return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
-+ N_("BusLogic: Failed to create worker thread %s"), szDevTag);
-+
- /* Initialize per device state. */
- for (unsigned i = 0; i < RT_ELEMENTS(pThis->aDeviceStates); i++)
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
-@@ -339,8 +339,13 @@ typedef struct LSILOGICSCSI
- bool volatile fRedo;
- /** Flag whether the worker thread is sleeping. */
- volatile bool fWrkThreadSleeping;
-+ /** Flag whether a request from the BIOS is pending which the
-+ * worker thread needs to process. */
-+ volatile bool fBiosReqPending;
-+#if HC_ARCH_BITS == 64
- /** Alignment padding. */
-- bool afPadding2[HC_ARCH_BITS == 32 ? 1 : 5];
-+ bool afPadding2[4];
-+#endif
- /** List of tasks which can be redone. */
- R3PTRTYPE(volatile PLSILOGICREQ) pTasksRedoHead;
-
-@@ -2141,7 +2146,7 @@ static void lsilogicR3RedoSetWarning(PLS
- * connection (second error). Pause VM. On resume we'll retry. */
- lsilogicR3WarningISCSI(pThis->CTX_SUFF(pDevIns));
- }
-- else
-+ else if (rc != VERR_VD_DEK_MISSING)
- lsilogicR3WarningUnknown(pThis->CTX_SUFF(pDevIns), rc);
- }
-
-@@ -3834,14 +3839,24 @@ static DECLCALLBACK(int) lsilogicR3IsaIO
-
- Assert(cb == 1);
-
-+ /*
-+ * If there is already a request form the BIOS pending ignore this write
-+ * because it should not happen.
-+ */
-+ if (ASMAtomicReadBool(&pThis->fBiosReqPending))
-+ return VINF_SUCCESS;
-+
- uint8_t iRegister = pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI
- ? Port - LSILOGIC_BIOS_IO_PORT
- : Port - LSILOGIC_SAS_BIOS_IO_PORT;
- int rc = vboxscsiWriteRegister(&pThis->VBoxSCSI, iRegister, (uint8_t)u32);
- if (rc == VERR_MORE_DATA)
- {
-- rc = lsilogicR3PrepareBiosScsiRequest(pThis);
-- AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, true);
-+ /* Send a notifier to the PDM queue that there are pending requests. */
-+ PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue));
-+ AssertMsg(pItem, ("Allocating item for queue failed\n"));
-+ PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), (PPDMQUEUEITEMCORE)pItem);
- }
- else if (RT_FAILURE(rc))
- AssertMsgFailed(("Writing BIOS register failed %Rrc\n", rc));
-@@ -3865,8 +3880,11 @@ static DECLCALLBACK(int) lsilogicR3IsaIO
- int rc = vboxscsiWriteString(pDevIns, &pThis->VBoxSCSI, iRegister, pbSrc, pcTransfers, cb);
- if (rc == VERR_MORE_DATA)
- {
-- rc = lsilogicR3PrepareBiosScsiRequest(pThis);
-- AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, true);
-+ /* Send a notifier to the PDM queue that there are pending requests. */
-+ PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue));
-+ AssertMsg(pItem, ("Allocating item for queue failed\n"));
-+ PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), (PPDMQUEUEITEMCORE)pItem);
- }
- else if (RT_FAILURE(rc))
- AssertMsgFailed(("Writing BIOS register failed %Rrc\n", rc));
-@@ -4182,6 +4200,14 @@ static DECLCALLBACK(int) lsilogicR3Worke
-
- ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, false);
-
-+ /* Check whether there is a BIOS request pending and process it first. */
-+ if (ASMAtomicReadBool(&pThis->fBiosReqPending))
-+ {
-+ rc = lsilogicR3PrepareBiosScsiRequest(pThis);
-+ AssertRC(rc);
-+ ASMAtomicXchgBool(&pThis->fBiosReqPending, false);
-+ }
-+
- /* Only process request which arrived before we received the notification. */
- uint32_t uRequestQueueNextEntryWrite = ASMAtomicReadU32(&pThis->uRequestQueueNextEntryFreeWrite);
-
-@@ -4300,6 +4326,10 @@ static DECLCALLBACK(int) lsilogicR3Worke
- */
- static void lsilogicR3Kick(PLSILOGICSCSI pThis)
- {
-+ if ( pThis->VBoxSCSI.fBusy
-+ && !pThis->fBiosReqPending)
-+ pThis->fBiosReqPending = true;
-+
- if (pThis->fNotificationSent)
- {
- /* Send a notifier to the PDM queue that there are pending requests. */
-@@ -4307,13 +4337,6 @@ static void lsilogicR3Kick(PLSILOGICSCSI
- AssertMsg(pItem, ("Allocating item for queue failed\n"));
- PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), (PPDMQUEUEITEMCORE)pItem);
- }
-- else if (pThis->VBoxSCSI.fBusy)
-- {
-- /* The BIOS had a request active when we got suspended. Resume it. */
-- int rc = lsilogicR3PrepareBiosScsiRequest(pThis);
-- AssertRC(rc);
-- }
--
- }
-
-
-@@ -4995,8 +5018,6 @@ static void lsilogicR3SuspendOrPowerOff(
-
- pThis->uRequestQueueNextEntryFreeWrite++;
- pThis->uRequestQueueNextEntryFreeWrite %= pThis->cRequestQueueEntries;
--
-- pThis->fNotificationSent = true;
- }
- else
- {
-@@ -5004,6 +5025,8 @@ static void lsilogicR3SuspendOrPowerOff(
- vboxscsiSetRequestRedo(&pThis->VBoxSCSI, &pLsiReq->PDMScsiRequest);
- }
-
-+ pThis->fNotificationSent = true;
-+
- pFree = pLsiReq;
- pLsiReq = pLsiReq->pRedoNext;
-
-@@ -5225,6 +5248,7 @@ static DECLCALLBACK(int) lsilogicR3Const
- */
- pThis->hTaskCache = NIL_RTMEMCACHE;
- pThis->hEvtProcess = NIL_SUPSEMEVENT;
-+ pThis->fBiosReqPending = false;
- RTListInit(&pThis->ListMemRegns);
-
- /*
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
-@@ -343,9 +343,7 @@ VBOXDDU_DECL(int) VSCSIDeviceReqCreate(V
- pVScsiReq->pbSense = pbSense;
- pVScsiReq->cbSense = cbSense;
- pVScsiReq->pvVScsiReqUser = pvVScsiReqUser;
--
-- if (cSGListEntries)
-- RTSgBufInit(&pVScsiReq->SgBuf, paSGList, cSGListEntries);
-+ RTSgBufInit(&pVScsiReq->SgBuf, paSGList, cSGListEntries);
-
- *phVScsiReq = pVScsiReq;
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/USB/DevOHCI.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/USB/DevOHCI.cpp
-@@ -2846,9 +2846,11 @@ static bool ohciServiceTdMultiple(POHCI
- ohciReadTd(pThis, pCur->TdAddr, &pCur->Td);
- ohciBufInit(&pCur->Buf, pCur->Td.cbp, pCur->Td.be);
-
-- /* don't combine if the direction doesn't match up. */
-+ /* Don't combine if the direction doesn't match up. There can't actually be
-+ * a mismatch for bulk/interrupt EPs unless the guest is buggy.
-+ */
- if ( (pCur->Td.hwinfo & (TD_HWINFO_DIR))
-- != (pCur->Td.hwinfo & (TD_HWINFO_DIR)))
-+ != (Head.Td.hwinfo & (TD_HWINFO_DIR)))
- break;
-
- pTail->pNext = pCur;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
-@@ -1713,7 +1713,7 @@ int main()
- GEN_CHECK_OFF(BUSLOGIC, GCPhysAddrMailboxOutgoingBase);
- GEN_CHECK_OFF(BUSLOGIC, uMailboxOutgoingPositionCurrent);
- GEN_CHECK_OFF(BUSLOGIC, cMailboxesReady);
-- GEN_CHECK_OFF(BUSLOGIC, fNotificationSend);
-+ GEN_CHECK_OFF(BUSLOGIC, fNotificationSent);
- GEN_CHECK_OFF(BUSLOGIC, GCPhysAddrMailboxIncomingBase);
- GEN_CHECK_OFF(BUSLOGIC, uMailboxIncomingPositionCurrent);
- GEN_CHECK_OFF(BUSLOGIC, fStrictRoundRobinMode);
-@@ -1731,7 +1731,14 @@ int main()
- GEN_CHECK_OFF(BUSLOGIC, pLedsConnector);
- GEN_CHECK_OFF(BUSLOGIC, fSignalIdle);
- GEN_CHECK_OFF(BUSLOGIC, fRedo);
-+ GEN_CHECK_OFF(BUSLOGIC, fWrkThreadSleeping);
-+ GEN_CHECK_OFF(BUSLOGIC, fBiosReqPending);
- GEN_CHECK_OFF(BUSLOGIC, pTasksRedoHead);
-+ GEN_CHECK_OFF(BUSLOGIC, pSupDrvSession);
-+ GEN_CHECK_OFF(BUSLOGIC, hEvtProcess);
-+# ifdef LOG_ENABLED
-+ GEN_CHECK_OFF(BUSLOGIC, cInMailboxesReady);
-+# endif
- #endif /* VBOX_WITH_BUSLOGIC */
-
- #ifdef VBOX_WITH_LSILOGIC
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Disassembler/DisasmCore.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Disassembler/DisasmCore.cpp
-@@ -862,7 +862,7 @@ static void disasmModRMReg(unsigned idx,
- Assert(idx < (pDis->fPrefix & DISPREFIX_REX ? 16U : 8U));
-
- /* AH, BH, CH & DH map to DIL, SIL, EBL & SPL when a rex prefix is present. */
-- /* Intel� 64 and IA-32 Architectures Software Developer�s Manual: 3.4.1.1 */
-+ /* Intel 64 and IA-32 Architectures Software Developer's Manual: 3.4.1.1 */
- if ( (pDis->fPrefix & DISPREFIX_REX)
- && idx >= DISGREG_AH
- && idx <= DISGREG_BH)
-@@ -2532,7 +2532,8 @@ static size_t ParseVex3b(size_t offInstr
- uint8_t implOpcode = (byte1 & 0x1f);
-
- // REX.RXB
-- if (pDis->uCpuMode == DISCPUMODE_64BIT && ~(byte1 & 0xe0))
-+ /** @todo Check this! was weird: ~(byte1 & 0xe0) */
-+ if (pDis->uCpuMode == DISCPUMODE_64BIT && !(byte1 & 0xe0))
- pDis->fRexPrefix |= (byte1 >> 5) ^ 7;
-
- // VEX.W
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
-@@ -37,6 +37,7 @@
- #include <VBox/err.h>
- #include <VBox/log.h>
-
-+#include <iprt/ctype.h>
- #include <iprt/file.h>
- #include <iprt/getopt.h>
- #include <iprt/stream.h>
-@@ -1660,14 +1661,31 @@ static RTEXITCODE CmdCreateRawVMDK(int a
- #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
- /* Refer to the correct partition and use offset 0. */
- char *psz;
-- RTStrAPrintf(&psz,
- #if defined(RT_OS_LINUX)
-- "%s%u",
-+ /*
-+ * Check whether raw disk ends with a digit. In that case
-+ * insert a p before adding the partition number.
-+ * This is used for nvme devices only currently which look like
-+ * /dev/nvme0n1p1 but might be extended to other devices in the
-+ * future.
-+ */
-+ size_t cchRawDisk = rawdisk.length();
-+ if (RT_C_IS_DIGIT(pszRawName[cchRawDisk - 1]))
-+ RTStrAPrintf(&psz,
-+ "%sp%u",
-+ rawdisk.c_str(),
-+ partitions.aPartitions[i].uIndex);
-+ else
-+ RTStrAPrintf(&psz,
-+ "%s%u",
-+ rawdisk.c_str(),
-+ partitions.aPartitions[i].uIndex);
- #elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
-+ RTStrAPrintf(&psz,
- "%ss%u",
--#endif
- rawdisk.c_str(),
- partitions.aPartitions[i].uIndex);
-+#endif
- if (!psz)
- {
- vrc = VERR_NO_STR_MEMORY;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
-@@ -249,7 +249,7 @@ static RTEXITCODE handleDebugVM_LogXXXX(
- if (fRelease)
- {
- com::Utf8Str strTmp(strSettings);
-- strSettings = "release: ";
-+ strSettings = "release:";
- strSettings.append(strTmp);
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/nls/VirtualBox_de.ts
-@@ -1139,8 +1139,8 @@
- <source>%n machine(s)</source>
- <comment>Group item tool-tip / Machine info</comment>
- <translation>
-- <numerusform>% Maschine</numerusform>
-- <numerusform>% Maschinen</numerusform>
-+ <numerusform>%n Maschine</numerusform>
-+ <numerusform>%n Maschinen</numerusform>
- </translation>
- </message>
- <message numerus="yes">
-@@ -5228,7 +5228,7 @@
- </message>
- <message>
- <source><p>Deleting the snapshot will cause the state information saved in it to be lost, and storage data spread over several image files that VirtualBox has created together with the snapshot will be merged into one file. This can be a lengthy process, and the information in the snapshot cannot be recovered.</p></p>Are you sure you want to delete the selected snapshot <b>%1</b>?</p></source>
-- <translation><p>Wenn ein Sicherungspunkt gelöscht wird, dann werden die Zustandsinformationen des Sicherungspunktes verworfen und Dateien, die Differenzinformationen enthalten, zusammengefasst. Dieser Vorgang kann einige Zeit in Anspruch nehmen, und die Information aus dem Sicherungspunkt kann danach nicht mehr restaueriert werden.</p><p>Möchten Sie den Sicherungspunkt <b>%1</b> wirklich löschen?</p></translation>
-+ <translation><p>Wenn ein Sicherungspunkt gelöscht wird, dann werden die Zustandsinformationen des Sicherungspunktes verworfen und Dateien, die Differenzinformationen enthalten, zusammengefasst. Dieser Vorgang kann einige Zeit in Anspruch nehmen, und die Information aus dem Sicherungspunkt kann danach nicht mehr wiederhergestellt werden.</p><p>Möchten Sie den Sicherungspunkt <b>%1</b> wirklich löschen?</p></translation>
- </message>
- <message>
- <source><p>Deleting the snapshot %1 will temporarily need more storage space. In the worst case the size of image %2 will grow by %3, however on this filesystem there is only %4 free.</p><p>Running out of storage space during the merge operation can result in corruption of the image and the VM configuration, i.e. loss of the VM and its data.</p><p>You may continue with deleting the snapshot at your own risk.</p></source>
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/nls/VirtualBox_es.ts
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/nls/VirtualBox_es.ts
-@@ -1523,8 +1523,8 @@
- <source>This virtual machine is password protected. Please enter the %n encryption password(s) below.</source>
- <comment>This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many passwords are in the list and doesn't need to be told).</comment>
- <translation>
-- <numerusform>Esta máquina virtual está protegida con contraseña. Inserte la contarseña de cifrado abajo.</numerusform>
-- <numerusform>Esta máquina virtual está protegida con contraseña. Inserte la contarseña de cifrado abajo.</numerusform>
-+ <numerusform>Esta máquina virtual está protegida con contraseña. Inserte la contraseña de cifrado abajo.</numerusform>
-+ <numerusform>Esta máquina virtual está protegida con contraseña. Inserte la contraseña de cifrado abajo.</numerusform>
- </translation>
- </message>
- <message>
-@@ -4778,27 +4778,27 @@ p, li { white-space: pre-wrap; }
- </message>
- <message>
- <source>When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like downloading Guest Additions from the network or checking for updates.</source>
-- <translation type="unfinished"></translation>
-+ <translation>Seleccionado, VirtualBox intentará detectar las preferencias del proxy del anfitrión para tareas como descargar las «Guest Additions» de la red o para comprobar actualizaciones.</translation>
- </message>
- <message>
- <source>&Auto-detect Host Proxy Settings</source>
-- <translation type="unfinished"></translation>
-+ <translation>&Autodetectar preferencias del proxy del anfitrión</translation>
- </message>
- <message>
- <source>When chosen, VirtualBox will use direct Internet connection for tasks like downloading Guest Additions from the network or checking for updates.</source>
-- <translation type="unfinished"></translation>
-+ <translation>Seleccionado, VirtualBox usará una conexión directa para tareas como descargar las «Guest Additions» de la red o para comprobar actualizaciones.</translation>
- </message>
- <message>
- <source>&Direct Connection to the Internet</source>
-- <translation type="unfinished"></translation>
-+ <translation>Conexión &directa a Internet</translation>
- </message>
- <message>
- <source>When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading Guest Additions from the network or checking for updates.</source>
-- <translation type="unfinished"></translation>
-+ <translation>Seleccionado, VirtualBox usará las preferencias de proxy proporcionadas para tareas como descargar las «Guest Additions» de la red o para comprobar actualizaciones.</translation>
- </message>
- <message>
- <source>&Manual Proxy Configuration</source>
-- <translation type="unfinished"></translation>
-+ <translation>Configuración de proxy &manual</translation>
- </message>
- </context>
- <context>
-@@ -7561,7 +7561,7 @@ p, li { white-space: pre-wrap; }
- <message>
- <source>Choose disk image...</source>
- <comment>This is used for hard disks, optical media and floppies</comment>
-- <translation type="unfinished"></translation>
-+ <translation>Seleccionar imagen de disco...</translation>
- </message>
- </context>
- <context>
-@@ -10353,15 +10353,15 @@ p, li { white-space: pre-wrap; }
- </message>
- <message>
- <source>Encryption password for <nobr>ID = '%1'</nobr> is invalid.</source>
-- <translation type="unfinished"></translation>
-+ <translation>La contraseña de cifrado para <nobr>ID = '%1'</nobr> es incorrecta.</translation>
- </message>
- <message>
- <source>The current port forwarding rules are not valid. All of the host or guest address values should be correct or empty.</source>
-- <translation type="unfinished"></translation>
-+ <translation>Las reglas de reenvío de puertos no son válidas. Todos los valores de direcciones de anfitriones o invitados deben ser correctos o vacíos.</translation>
- </message>
- <message>
- <source>The current port forwarding rules are not valid. None of the guest address values may be empty.</source>
-- <translation type="unfinished"></translation>
-+ <translation>Las reglas de reenvío de puertos actuales no son válidas. Ninguno de los valores de direcciones del invitado deberían ser vacíos.</translation>
- </message>
- </context>
- <context>
-@@ -10577,42 +10577,42 @@ p, li { white-space: pre-wrap; }
- <message>
- <source>%1: %2</source>
- <comment>Context description: Error description</comment>
-- <translation type="unfinished"></translation>
-+ <translation>%1: %2</translation>
- </message>
- <message>
- <source>Unable to initialize HTTP library</source>
-- <translation type="unfinished"></translation>
-+ <translation>Incapad de inicializar la librería HTTP</translation>
- </message>
- <message>
- <source>Connection refused</source>
-- <translation type="unfinished"></translation>
-+ <translation>Conexión rechazada</translation>
- </message>
- <message>
- <source>Content moved</source>
-- <translation type="unfinished"></translation>
-+ <translation>Contenido movido</translation>
- </message>
- <message>
- <source>Proxy not found</source>
-- <translation type="unfinished"></translation>
-+ <translation>Proxy no encontrado</translation>
- </message>
- <message>
- <source>Url not found on the server</source>
-- <translation type="unfinished"></translation>
-+ <translation>URL no encontrada en el servidor</translation>
- </message>
- </context>
- <context>
- <name>UINetworkReplyPrivateThread</name>
- <message>
- <source>During proxy configuration</source>
-- <translation type="unfinished"></translation>
-+ <translation>Durante configuración de proxy</translation>
- </message>
- <message>
- <source>During certificate downloading</source>
-- <translation type="unfinished"></translation>
-+ <translation>Durante descarga de certificado</translation>
- </message>
- <message>
- <source>During network request</source>
-- <translation type="unfinished"></translation>
-+ <translation>Durante petición de red</translation>
- </message>
- </context>
- <context>
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
-@@ -2317,11 +2317,11 @@ QRect UIExtraDataManager::selectorWindow
- const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
- vboxGlobal().availableGeometry();
-
-- /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
-+ /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
- #ifdef Q_WS_WIN
- /* Make sure resulting geometry is within current bounds: */
-- if (fOk && geometry.intersects(availableGeometry))
-- geometry.moveCenter(availableGeometry.center());
-+ if (fOk && !availableGeometry.contains(geometry))
-+ geometry = VBoxGlobal::getNormalized(geometry, QRegion(availableGeometry));
- #endif /* Q_WS_WIN */
-
- /* As final fallback, move default-geometry to available-geometry' center: */
-@@ -3529,11 +3529,11 @@ QRect UIExtraDataManager::informationWin
- const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
- vboxGlobal().availableGeometry();
-
-- /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
-+ /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
- #ifdef Q_WS_WIN
- /* Make sure resulting geometry is within current bounds: */
-- if (fOk && geometry.intersects(availableGeometry))
-- geometry.moveCenter(availableGeometry.center());
-+ if (fOk && !availableGeometry.contains(geometry))
-+ geometry = VBoxGlobal::getNormalized(geometry, QRegion(availableGeometry));
- #endif /* Q_WS_WIN */
-
- /* As a fallback, move default-geometry to pParentWidget' geometry center: */
-@@ -3646,11 +3646,11 @@ QRect UIExtraDataManager::extraDataManag
- const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
- vboxGlobal().availableGeometry();
-
-- /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
-+ /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
- #ifdef Q_WS_WIN
- /* Make sure resulting geometry is within current bounds: */
-- if (fOk && geometry.intersects(availableGeometry))
-- geometry.moveCenter(availableGeometry.center());
-+ if (fOk && !availableGeometry.contains(geometry))
-+ geometry = VBoxGlobal::getNormalized(geometry, QRegion(availableGeometry));
- #endif /* Q_WS_WIN */
-
- /* As final fallback, move default-geometry to available-geometry' center: */
-@@ -3759,15 +3759,15 @@ QRect UIExtraDataManager::logWindowGeome
- if (pWidget)
- geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
-
-- /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
-+ /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
- #ifdef Q_WS_WIN
- /* Get available-geometry [of screen with point (iX, iY) if possible]: */
- const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
- vboxGlobal().availableGeometry();
-
- /* Make sure resulting geometry is within current bounds: */
-- if (!availableGeometry.contains(geometry, true))
-- geometry.moveCenter(defaultGeometry.center());
-+ if (!availableGeometry.contains(geometry))
-+ geometry = VBoxGlobal::getNormalized(geometry, QRegion(availableGeometry));
- #endif /* Q_WS_WIN */
-
- /* Return result: */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
-@@ -4367,6 +4367,11 @@ void VBoxGlobal::cleanup()
- UISelectorWindow::destroy();
- if (gpMachine)
- UIMachine::destroy();
-+ /* As part of recent change UIVirtualBoxEventHandler also used in runtimeUI.
-+ * This needs to be destroyed before COM cleanup. As this is supposed to be only part of selectorUI,
-+ * and needs to be reworked later doing this here for now: */
-+ if (gpMachine)
-+ UIVirtualBoxEventHandler::destroy();
-
- /* Cleanup medium-enumerator: */
- m_mediumEnumeratorDtorRwLock.lockForWrite();
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
-@@ -828,7 +828,7 @@ void UINetworkReplyPrivateThread::downlo
- if (!pafNewFoundCerts[i])
- {
- CERTINFO const *pInfo = (CERTINFO const *)s_aCerts[i].pvUser;
-- for (uint32_t iUrl = 0; iUrl < RT_ELEMENTS(pInfo->apszUrls); i++)
-+ for (uint32_t iUrl = 0; iUrl < RT_ELEMENTS(pInfo->apszUrls); iUrl++)
- if (pInfo->apszUrls[iUrl])
- {
- void *pvResponse;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaApplication.mm
-@@ -88,6 +88,10 @@
- if (self)
- m_pCallbacks = [[NSMutableArray alloc] init];
-
-+ /* Gently disable El Capitan tries to break everything with the Enter Full Screen action.
-+ * S.a. https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/ for reference. */
-+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
-+
- return self;
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
-@@ -41,14 +41,15 @@
-
- UIDnDDataObject::UIDnDDataObject(UIDnDHandler *pDnDHandler, const QStringList &lstFormats)
- : m_pDnDHandler(pDnDHandler)
-- , mStatus(Uninitialized)
-- , mRefCount(1)
-- , mcFormats(0)
-- , mpFormatEtc(NULL)
-- , mpStgMedium(NULL)
-- , mSemEvent(NIL_RTSEMEVENT)
-- , mpvData(NULL)
-- , mcbData(0)
-+ , m_enmStatus(DnDDataObjectStatus_Uninitialized)
-+ , m_cRefs(1)
-+ , m_cFormats(0)
-+ , m_pFormatEtc(NULL)
-+ , m_pStgMedium(NULL)
-+ , m_SemEvent(NIL_RTSEMEVENT)
-+ , m_fDataRetrieved(false)
-+ , m_pvData(NULL)
-+ , m_cbData(0)
- {
- HRESULT hr;
-
-@@ -57,40 +58,40 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHa
-
- try
- {
-- mpFormatEtc = new FORMATETC[cMaxFormats];
-- RT_BZERO(mpFormatEtc, sizeof(FORMATETC) * cMaxFormats);
-- mpStgMedium = new STGMEDIUM[cMaxFormats];
-- RT_BZERO(mpStgMedium, sizeof(STGMEDIUM) * cMaxFormats);
-+ m_pFormatEtc = new FORMATETC[cMaxFormats];
-+ RT_BZERO(m_pFormatEtc, sizeof(FORMATETC) * cMaxFormats);
-+ m_pStgMedium = new STGMEDIUM[cMaxFormats];
-+ RT_BZERO(m_pStgMedium, sizeof(STGMEDIUM) * cMaxFormats);
-
- for (int i = 0;
- ( i < lstFormats.size()
- && i < cMaxFormats); i++)
- {
- const QString &strFormat = lstFormats.at(i);
-- if (mlstFormats.contains(strFormat))
-+ if (m_lstFormats.contains(strFormat))
- continue;
-
- /* URI data ("text/uri-list"). */
- if (strFormat.contains("text/uri-list", Qt::CaseInsensitive))
- {
-- RegisterFormat(&mpFormatEtc[cRegisteredFormats], CF_TEXT);
-- mpStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-- RegisterFormat(&mpFormatEtc[cRegisteredFormats], CF_UNICODETEXT);
-- mpStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-- RegisterFormat(&mpFormatEtc[cRegisteredFormats], CF_HDROP);
-- mpStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-+ RegisterFormat(&m_pFormatEtc[cRegisteredFormats], CF_TEXT);
-+ m_pStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-+ RegisterFormat(&m_pFormatEtc[cRegisteredFormats], CF_UNICODETEXT);
-+ m_pStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-+ RegisterFormat(&m_pFormatEtc[cRegisteredFormats], CF_HDROP);
-+ m_pStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-
-- mlstFormats << strFormat;
-+ m_lstFormats << strFormat;
- }
- /* Plain text ("text/plain"). */
- if (strFormat.contains("text/plain", Qt::CaseInsensitive))
- {
-- RegisterFormat(&mpFormatEtc[cRegisteredFormats], CF_TEXT);
-- mpStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-- RegisterFormat(&mpFormatEtc[cRegisteredFormats], CF_UNICODETEXT);
-- mpStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-+ RegisterFormat(&m_pFormatEtc[cRegisteredFormats], CF_TEXT);
-+ m_pStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-+ RegisterFormat(&m_pFormatEtc[cRegisteredFormats], CF_UNICODETEXT);
-+ m_pStgMedium[cRegisteredFormats++].tymed = TYMED_HGLOBAL;
-
-- mlstFormats << strFormat;
-+ m_lstFormats << strFormat;
- }
- }
-
-@@ -105,7 +106,7 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHa
-
- if (SUCCEEDED(hr))
- {
-- int rc2 = RTSemEventCreate(&mSemEvent);
-+ int rc2 = RTSemEventCreate(&m_SemEvent);
- AssertRC(rc2);
-
- /*
-@@ -129,8 +130,8 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHa
- RegisterFormat(&mpFormatEtc[cFormats++],
- RegisterClipboardFormat(CFSTR_SHELLIDLISTOFFSET));
- #endif
-- mcFormats = cRegisteredFormats;
-- mStatus = Dropped;
-+ m_cFormats = cRegisteredFormats;
-+ m_enmStatus = DnDDataObjectStatus_Dropping;
- }
-
- LogFlowFunc(("hr=%Rhrc\n", hr));
-@@ -138,19 +139,19 @@ UIDnDDataObject::UIDnDDataObject(UIDnDHa
-
- UIDnDDataObject::~UIDnDDataObject(void)
- {
-- if (mpFormatEtc)
-- delete[] mpFormatEtc;
-+ if (m_pFormatEtc)
-+ delete[] m_pFormatEtc;
-
-- if (mpStgMedium)
-- delete[] mpStgMedium;
-+ if (m_pStgMedium)
-+ delete[] m_pStgMedium;
-
-- if (mpvData)
-- RTMemFree(mpvData);
-+ if (m_pvData)
-+ RTMemFree(m_pvData);
-
-- if (mSemEvent != NIL_RTSEMEVENT)
-- RTSemEventDestroy(mSemEvent);
-+ if (m_SemEvent != NIL_RTSEMEVENT)
-+ RTSemEventDestroy(m_SemEvent);
-
-- LogFlowFunc(("mRefCount=%RI32\n", mRefCount));
-+ LogFlowFunc(("mRefCount=%RI32\n", m_cRefs));
- }
-
- /*
-@@ -159,12 +160,12 @@ UIDnDDataObject::~UIDnDDataObject(void)
-
- STDMETHODIMP_(ULONG) UIDnDDataObject::AddRef(void)
- {
-- return InterlockedIncrement(&mRefCount);
-+ return InterlockedIncrement(&m_cRefs);
- }
-
- STDMETHODIMP_(ULONG) UIDnDDataObject::Release(void)
- {
-- LONG lCount = InterlockedDecrement(&mRefCount);
-+ LONG lCount = InterlockedDecrement(&m_cRefs);
- if (lCount == 0)
- {
- delete this;
-@@ -209,36 +210,41 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- LPFORMATETC pThisFormat = NULL;
- LPSTGMEDIUM pThisMedium = NULL;
-
-+ LogFlowThisFunc(("\n"));
-+
- /* Format supported? */
- ULONG lIndex;
- if ( LookupFormatEtc(pFormatEtc, &lIndex)
-- && lIndex < mcFormats) /* Paranoia. */
-+ && lIndex < m_cFormats) /* Paranoia. */
- {
-- pThisMedium = &mpStgMedium[lIndex];
-+ pThisMedium = &m_pStgMedium[lIndex];
- AssertPtr(pThisMedium);
-- pThisFormat = &mpFormatEtc[lIndex];
-+ pThisFormat = &m_pFormatEtc[lIndex];
- AssertPtr(pThisFormat);
-
-- LogFlowFunc(("pThisMedium=%p, pThisFormat=%p\n", pThisMedium, pThisFormat));
-- LogFlowFunc(("mStatus=%ld\n", mStatus));
-- switch (mStatus)
-+ LogFlowThisFunc(("pThisMedium=%p, pThisFormat=%p\n", pThisMedium, pThisFormat));
-+ LogFlowThisFunc(("mStatus=%RU32\n", m_enmStatus));
-+ switch (m_enmStatus)
- {
-- case Dropping:
-+ case DnDDataObjectStatus_Dropping:
- {
-- LogRel3(("DnD: Dropping\n"));
-- LogFlowFunc(("Waiting for event ...\n"));
-- int rc2 = RTSemEventWait(mSemEvent, RT_INDEFINITE_WAIT);
-- LogFlowFunc(("rc=%Rrc, mStatus=%ld\n", rc2, mStatus));
-+#if 0
-+ LogRel3(("DnD: Dropping\n"));
-+ LogFlowFunc(("Waiting for event ...\n"));
-+ int rc2 = RTSemEventWait(m_SemEvent, RT_INDEFINITE_WAIT);
-+ LogFlowFunc(("rc=%Rrc, mStatus=%RU32\n", rc2, m_enmStatus));
-+#endif
-+ break;
- }
-
-- case Dropped:
-+ case DnDDataObjectStatus_Dropped:
- {
- LogRel3(("DnD: Dropped\n"));
- LogRel3(("DnD: cfFormat=%RI16, sFormat=%s, tyMed=%RU32, dwAspect=%RU32\n",
- pThisFormat->cfFormat, UIDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat),
- pThisFormat->tymed, pThisFormat->dwAspect));
- LogRel3(("DnD: Got strFormat=%s, pvData=%p, cbData=%RU32\n",
-- mstrFormat.toAscii().constData(), mpvData, mcbData));
-+ m_strFormat.toAscii().constData(), m_pvData, m_cbData));
-
- QVariant::Type vaType;
- QString strMIMEType;
-@@ -248,8 +254,9 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- || pFormatEtc->cfFormat == CF_UNICODETEXT)
- )
- {
-- strMIMEType = "text/plain"; /** @todo Indicate UTF8 encoding? */
-- vaType = QVariant::String;
-+ /* Use UTF-8, always. */
-+ strMIMEType = "text/plain;charset=utf-8";
-+ vaType = QVariant::String;
- }
- else if ( (pFormatEtc->tymed & TYMED_HGLOBAL)
- && (pFormatEtc->dwAspect == DVASPECT_CONTENT)
-@@ -287,31 +294,34 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- LogRel3(("DnD: strMIMEType=%s, vaType=%ld\n", strMIMEType.toAscii().constData(), vaType));
-
- int rc;
-- if (!mVaData.isValid())
-+
-+ if (!m_fDataRetrieved)
- {
-- /* Note: We're usig Qt::MoveAction because this speeds up the whole operation
-- * significantly: Instead of copying the data from the temporary location to
-- * the final destination we just move it.
-- *
-- * Note2: The Qt::MoveAction *only* affects the behavior on the host! The desired
-- * action for the guest (e.g. moving a file from guest to host) is not affected
-- * by this setting. */
-- rc = m_pDnDHandler->retrieveData(Qt::MoveAction,
-- strMIMEType, vaType, mVaData);
-+ if (m_pDnDHandler)
-+ {
-+ rc = m_pDnDHandler->retrieveData(Qt::CopyAction,
-+ strMIMEType, vaType, m_vaData);
-+ }
-+ else
-+ rc = VERR_NOT_FOUND;
-+
-+ m_fDataRetrieved = true;
-+ LogFlowFunc(("Retrieving data ended with %Rrc\n", rc));
- }
-- else
-- rc = VINF_SUCCESS; /* Data already retrieved. */
-+ else /* Data already been retrieved. */
-+ rc = VINF_SUCCESS;
-
-- if (RT_SUCCESS(rc))
-+ if ( RT_SUCCESS(rc)
-+ && m_vaData.isValid())
- {
- if ( strMIMEType.startsWith("text/uri-list")
- /* One item. */
-- && ( mVaData.canConvert(QVariant::String)
-+ && ( m_vaData.canConvert(QVariant::String)
- /* Multiple items. */
-- || mVaData.canConvert(QVariant::StringList))
-+ || m_vaData.canConvert(QVariant::StringList))
- )
- {
-- QStringList lstFilesURI = mVaData.toStringList();
-+ QStringList lstFilesURI = m_vaData.toStringList();
- QStringList lstFiles;
- for (size_t i = 0; i < lstFilesURI.size(); i++)
- {
-@@ -330,36 +340,42 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- }
-
- size_t cFiles = lstFiles.size();
-+ LogFlowThisFunc(("Files (%zu)\n", cFiles));
- if ( RT_SUCCESS(rc)
- && cFiles)
- {
--#ifdef DEBUG
-- LogFlowFunc(("Files (%zu)\n", cFiles));
-- for (size_t i = 0; i < cFiles; i++)
-- LogFlowFunc(("\tFile: %s\n", lstFiles.at(i).toAscii().constData()));
--#endif
-- size_t cchFiles = 0; /* Number of ASCII characters. */
-+ size_t cchFiles = 0; /* Number of characters. */
- for (size_t i = 0; i < cFiles; i++)
- {
-- cchFiles += strlen(lstFiles.at(i).toAscii().constData());
-+ const char *pszFile = lstFiles.at(i).toAscii().constData();
-+ cchFiles += strlen(pszFile);
- cchFiles += 1; /* Terminating '\0'. */
-+ LogFlowThisFunc(("\tFile: %s (cchFiles=%zu)\n", pszFile, cchFiles));
- }
-
-- size_t cbBuf = sizeof(DROPFILES) + ((cchFiles + 1) * sizeof(RTUTF16));
-+ /* List termination with '\0'. */
-+ cchFiles++;
-+
-+ size_t cbBuf = sizeof(DROPFILES) + (cchFiles * sizeof(RTUTF16));
- DROPFILES *pDropFiles = (DROPFILES *)RTMemAllocZ(cbBuf);
- if (pDropFiles)
- {
-- pDropFiles->pFiles = sizeof(DROPFILES);
-- pDropFiles->fWide = 1; /* We use unicode. Always. */
-+ /* Put the files list right after our DROPFILES structure. */
-+ pDropFiles->pFiles = sizeof(DROPFILES); /* Offset to file list. */
-+ pDropFiles->fWide = 1; /* We use Unicode. Always. */
-
- uint8_t *pCurFile = (uint8_t *)pDropFiles + pDropFiles->pFiles;
- AssertPtr(pCurFile);
-
-+ LogFlowThisFunc(("Encoded:\n"));
- for (size_t i = 0; i < cFiles; i++)
- {
-+ const char *pszFile = lstFiles.at(i).toUtf8().constData();
-+ Assert(strlen(pszFile));
-+
- size_t cchCurFile;
- PRTUTF16 pwszFile;
-- rc = RTStrToUtf16(lstFiles.at(i).toAscii().constData(), &pwszFile);
-+ rc = RTStrToUtf16(pszFile, &pwszFile);
- if (RT_SUCCESS(rc))
- {
- cchCurFile = RTUtf16Len(pwszFile);
-@@ -375,17 +391,22 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- /* Terminate current file name. */
- *pCurFile = L'\0';
- pCurFile += sizeof(RTUTF16);
-+
-+ LogFlowThisFunc(("\t#%zu: cchCurFile=%zu\n", i, cchCurFile));
- }
-
- if (RT_SUCCESS(rc))
- {
- *pCurFile = L'\0'; /* Final list terminator. */
-
-- pMedium->tymed = TYMED_HGLOBAL;
-+ /*
-+ * Fill out the medium structure we're going to report back.
-+ */
-+ pMedium->tymed = TYMED_HGLOBAL;
- pMedium->pUnkForRelease = NULL;
-- pMedium->hGlobal = GlobalAlloc( GMEM_ZEROINIT
-- | GMEM_MOVEABLE
-- | GMEM_DDESHARE, cbBuf);
-+ pMedium->hGlobal = GlobalAlloc( GMEM_ZEROINIT
-+ | GMEM_MOVEABLE
-+ | GMEM_DDESHARE, cbBuf);
- if (pMedium->hGlobal)
- {
- LPVOID pvMem = GlobalLock(pMedium->hGlobal);
-@@ -401,36 +422,41 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- }
- else
- rc = VERR_NO_MEMORY;
-+
-+ LogFlowThisFunc(("Copying to TYMED_HGLOBAL (%zu bytes): %Rrc\n", cbBuf, rc));
- }
-
- RTMemFree(pDropFiles);
- }
-+ else
-+ rc = VERR_NO_MEMORY;
-+
-+ if (RT_FAILURE(rc))
-+ LogFlowThisFunc(("Failed with %Rrc\n", rc));
- }
- }
-- else if ( strMIMEType.startsWith("text/plain")
-- && mVaData.canConvert(QVariant::String))
-+ else if ( strMIMEType.startsWith("text/plain;charset=utf-8") /* Use UTF-8, always. */
-+ && m_vaData.canConvert(QVariant::String))
- {
-- bool fUnicode = pFormatEtc->cfFormat == CF_UNICODETEXT;
-- int cbCh = fUnicode
-- ? sizeof(WCHAR) : sizeof(char);
--
-- QString strText = mVaData.toString();
-- size_t cbSrc = strText.length() * cbCh;
-- Assert(cbSrc);
-- LPCVOID pvSrc = fUnicode
-- ? (void *)strText.unicode()
-- : (void *)strText.toAscii().constData();
-+ const bool fUnicode = pFormatEtc->cfFormat == CF_UNICODETEXT;
-+ const size_t cbCh = fUnicode
-+ ? sizeof(WCHAR) : sizeof(char);
-+
-+ QString strText = m_vaData.toString();
-+ size_t cbSrc = strText.length() * cbCh;
-+ LPCVOID pvSrc = fUnicode
-+ ? (void *)strText.unicode()
-+ : (void *)strText.toUtf8().constData();
-+
-+ AssertMsg(cbSrc, ("pvSrc=0x%p, cbSrc=%zu, cbCh=%zu\n", pvSrc, cbSrc, cbCh));
- AssertPtr(pvSrc);
-
-- LogFlowFunc(("pvSrc=0x%p, cbSrc=%zu, cbch=%d, fUnicode=%RTbool\n",
-+ LogFlowFunc(("pvSrc=0x%p, cbSrc=%zu, cbCh=%zu, fUnicode=%RTbool\n",
- pvSrc, cbSrc, cbCh, fUnicode));
-
-- pMedium->tymed = TYMED_HGLOBAL;
-+ pMedium->tymed = TYMED_HGLOBAL;
- pMedium->pUnkForRelease = NULL;
-- pMedium->hGlobal = GlobalAlloc( GMEM_ZEROINIT
-- | GMEM_MOVEABLE
-- | GMEM_DDESHARE,
-- cbSrc);
-+ pMedium->hGlobal = GlobalAlloc(GHND | GMEM_SHARE, cbSrc);
- if (pMedium->hGlobal)
- {
- LPVOID pvDst = GlobalLock(pMedium->hGlobal);
-@@ -448,11 +474,12 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- hr = VERR_NO_MEMORY;
- }
- else
-- LogFlowFunc(("MIME type=%s not supported\n",
-- strMIMEType.toAscii().constData()));
-+ LogRel2(("DnD: MIME type '%s' not supported\n", strMIMEType.toAscii().constData()));
-
-- LogFlowFunc(("Handling formats ended with rc=%Rrc\n", rc));
-+ LogFlowThisFunc(("Handling formats ended with rc=%Rrc\n", rc));
- }
-+
-+ break;
- }
-
- default:
-@@ -487,7 +514,7 @@ STDMETHODIMP UIDnDDataObject::GetData(LP
- pMedium->pUnkForRelease = NULL;
- }
-
-- LogFlowFunc(("Returning hr=%Rhrc\n", hr));
-+ LogFlowThisFunc(("Returning hr=%Rhrc\n", hr));
- return hr;
- }
-
-@@ -534,12 +561,12 @@ STDMETHODIMP UIDnDDataObject::SetData(LP
- STDMETHODIMP UIDnDDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc)
- {
- LogFlowFunc(("dwDirection=%RI32, mcFormats=%RI32, mpFormatEtc=%p\n",
-- dwDirection, mcFormats, mpFormatEtc));
-+ dwDirection, m_cFormats, m_pFormatEtc));
-
- HRESULT hr;
- if (dwDirection == DATADIR_GET)
- {
-- hr = UIDnDEnumFormatEtc::CreateEnumFormatEtc(mcFormats, mpFormatEtc, ppEnumFormatEtc);
-+ hr = UIDnDEnumFormatEtc::CreateEnumFormatEtc(m_cFormats, m_pFormatEtc, ppEnumFormatEtc);
- }
- else
- hr = E_NOTIMPL;
-@@ -570,8 +597,8 @@ STDMETHODIMP UIDnDDataObject::EnumDAdvis
- int UIDnDDataObject::Abort(void)
- {
- LogFlowFunc(("Aborting ...\n"));
-- mStatus = Aborted;
-- return RTSemEventSignal(mSemEvent);
-+ m_enmStatus = DnDDataObjectStatus_Aborted;
-+ return RTSemEventSignal(m_SemEvent);
- }
-
- /* static */
-@@ -660,14 +687,14 @@ bool UIDnDDataObject::LookupFormatEtc(LP
- AssertReturn(pFormatEtc, false);
- /* puIndex is optional. */
-
-- for (ULONG i = 0; i < mcFormats; i++)
-+ for (ULONG i = 0; i < m_cFormats; i++)
- {
-- if( (pFormatEtc->tymed & mpFormatEtc[i].tymed)
-- && pFormatEtc->cfFormat == mpFormatEtc[i].cfFormat
-- && pFormatEtc->dwAspect == mpFormatEtc[i].dwAspect)
-+ if( (pFormatEtc->tymed & m_pFormatEtc[i].tymed)
-+ && pFormatEtc->cfFormat == m_pFormatEtc[i].cfFormat
-+ && pFormatEtc->dwAspect == m_pFormatEtc[i].dwAspect)
- {
- LogRel3(("DnD: Format found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32, ulIndex=%RU32\n",
-- pFormatEtc->tymed, pFormatEtc->cfFormat, UIDnDDataObject::ClipboardFormatToString(mpFormatEtc[i].cfFormat),
-+ pFormatEtc->tymed, pFormatEtc->cfFormat, UIDnDDataObject::ClipboardFormatToString(m_pFormatEtc[i].cfFormat),
- pFormatEtc->dwAspect, i));
-
- if (puIndex)
-@@ -676,32 +703,15 @@ bool UIDnDDataObject::LookupFormatEtc(LP
- }
- }
-
-+#if 0
- LogRel3(("DnD: Format NOT found: tyMed=%RI32, cfFormat=%RI16, sFormats=%s, dwAspect=%RI32\n",
- pFormatEtc->tymed, pFormatEtc->cfFormat, UIDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat),
- pFormatEtc->dwAspect));
-+#endif
-
- return false;
- }
-
--/* static */
--HGLOBAL UIDnDDataObject::MemDup(HGLOBAL hMemSource)
--{
-- DWORD dwLen = GlobalSize(hMemSource);
-- AssertReturn(dwLen, NULL);
-- PVOID pvSource = GlobalLock(hMemSource);
-- if (pvSource)
-- {
-- PVOID pvDest = GlobalAlloc(GMEM_FIXED, dwLen);
-- if (pvDest)
-- memcpy(pvDest, pvSource, dwLen);
--
-- GlobalUnlock(hMemSource);
-- return pvDest;
-- }
--
-- return NULL;
--}
--
- void UIDnDDataObject::RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat,
- TYMED tyMed, LONG lIndex, DWORD dwAspect,
- DVTARGETDEVICE *pTargetDevice)
-@@ -718,10 +728,15 @@ void UIDnDDataObject::RegisterFormat(LPF
- pFormatEtc->cfFormat, UIDnDDataObject::ClipboardFormatToString(pFormatEtc->cfFormat)));
- }
-
--void UIDnDDataObject::SetStatus(Status status)
-+void UIDnDDataObject::SetStatus(DnDDataObjectStatus enmStatus)
- {
-- LogFlowFunc(("Setting status to %ld\n", status));
-- mStatus = status;
-+ LogFlowFunc(("Setting status to %RU32\n", enmStatus));
-+ m_enmStatus = enmStatus;
-+}
-+
-+void UIDnDDataObject::Signal(void)
-+{
-+ SetStatus(DnDDataObjectStatus_Dropped);
- }
-
- int UIDnDDataObject::Signal(const QString &strFormat,
-@@ -731,16 +746,13 @@ int UIDnDDataObject::Signal(const QStrin
-
- int rc;
-
-- SetStatus(Dropped);
--
-- mstrFormat = strFormat;
- if (cbData)
- {
-- mpvData = RTMemAlloc(cbData);
-- if (mpvData)
-+ m_pvData = RTMemAlloc(cbData);
-+ if (m_pvData)
- {
-- memcpy(mpvData, pvData, cbData);
-- mcbData = cbData;
-+ memcpy(m_pvData, pvData, cbData);
-+ m_cbData = cbData;
- rc = VINF_SUCCESS;
- }
- else
-@@ -749,11 +761,16 @@ int UIDnDDataObject::Signal(const QStrin
- else
- rc = VINF_SUCCESS;
-
-- if (RT_FAILURE(rc))
-- mStatus = Aborted;
-+ if (RT_SUCCESS(rc))
-+ {
-+ m_strFormat = strFormat;
-+ SetStatus(DnDDataObjectStatus_Dropped);
-+ }
-+ else
-+ SetStatus(DnDDataObjectStatus_Aborted);
-
- /* Signal in any case. */
-- int rc2 = RTSemEventSignal(mSemEvent);
-+ int rc2 = RTSemEventSignal(m_SemEvent);
- if (RT_SUCCESS(rc))
- rc = rc2;
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
-@@ -36,13 +36,14 @@ class UIDnDDataObject : public IDataObje
- {
- public:
-
-- enum Status
-+ enum DnDDataObjectStatus
- {
-- Uninitialized = 0,
-- Initialized,
-- Dropping,
-- Dropped,
-- Aborted
-+ DnDDataObjectStatus_Uninitialized = 0,
-+ DnDDataObjectStatus_Initialized,
-+ DnDDataObjectStatus_Dropping,
-+ DnDDataObjectStatus_Dropped,
-+ DnDDataObjectStatus_Aborted,
-+ DnDDataObjectStatus_32Bit_Hack = 0x7fffffff
- };
-
- public:
-@@ -70,37 +71,42 @@ public: /* IDataObject methods. */
-
- public:
-
-- static const char* ClipboardFormatToString(CLIPFORMAT fmt);
-+ static const char *ClipboardFormatToString(CLIPFORMAT fmt);
-
- int Abort(void);
-- void SetStatus(Status status);
-+ void Signal(void);
- int Signal(const QString &strFormat, const void *pvData, uint32_t cbData);
-
- protected:
-
-+ void SetStatus(DnDDataObjectStatus enmStatus);
-+
- bool LookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex);
-- static HGLOBAL MemDup(HGLOBAL hMemSource);
- void RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, TYMED tyMed = TYMED_HGLOBAL,
- LONG lindex = -1, DWORD dwAspect = DVASPECT_CONTENT, DVTARGETDEVICE *pTargetDevice = NULL);
-
-- UIDnDHandler *m_pDnDHandler;
--
-- Status mStatus;
-- LONG mRefCount;
-+ /** Pointe rto drag and drop handler. */
-+ UIDnDHandler *m_pDnDHandler;
-+ /** Current drag and drop status. */
-+ DnDDataObjectStatus m_enmStatus;
-+ /** Internal reference count of this object. */
-+ LONG m_cRefs;
- /** Number of native formats registered. This can be a different number than supplied with mlstFormats. */
-- ULONG mcFormats;
-- FORMATETC *mpFormatEtc;
-- STGMEDIUM *mpStgMedium;
-- RTSEMEVENT mSemEvent;
-- QStringList mlstFormats;
-- QString mstrFormat;
-+ ULONG m_cFormats;
-+ FORMATETC *m_pFormatEtc;
-+ STGMEDIUM *m_pStgMedium;
-+ RTSEMEVENT m_SemEvent;
-+ QStringList m_lstFormats;
-+ QString m_strFormat;
- /** The retrieved data as a QVariant. Needed for buffering in case a second format needs the same data,
- * e.g. CF_TEXT and CF_UNICODETEXT. */
-- QVariant mVaData;
-+ QVariant m_vaData;
-+ /** Whether the data already was retrieved or not. */
-+ bool m_fDataRetrieved;
- /** The retrieved data as a raw buffer. */
-- void *mpvData;
-+ void *m_pvData;
- /** Raw buffer size (in bytes). */
-- uint32_t mcbData;
-+ uint32_t m_cbData;
- };
-
- #endif /* ___UIDnDDataObject_win_h___ */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.cpp
-@@ -23,25 +23,30 @@
- #include <iprt/assert.h>
- #include <iprt/thread.h>
-
-+/* Qt includes: */
-+#include <QApplication>
-+
-+/* Windows includes: */
-+#include <QApplication>
- #include <windows.h>
- #include <new> /* For bad_alloc. */
-
- #include "UIDnDDropSource_win.h"
-+#include "UIDnDDataObject_win.h"
-
--
--
--UIDnDDropSource::UIDnDDropSource(QWidget *pParent)
-- : mRefCount(1),
-- mpParent(pParent),
-- mdwCurEffect(0),
-- muCurAction(Qt::IgnoreAction)
-+UIDnDDropSource::UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject)
-+ : m_cRefCount(1)
-+ , m_pParent(pParent)
-+ , m_pDataObject(pDataObject)
-+ , m_dwCurEffect(DROPEFFECT_NONE)
-+ , m_uCurAction(Qt::IgnoreAction)
- {
-- LogFlowFunc(("pParent=0x%p\n", mpParent));
-+ LogFlowFunc(("pParent=0x%p\n", m_pParent));
- }
-
- UIDnDDropSource::~UIDnDDropSource(void)
- {
-- LogFlowFunc(("mRefCount=%RI32\n", mRefCount));
-+ LogFlowFunc(("mRefCount=%RU32\n", m_cRefCount));
- }
-
- /*
-@@ -50,19 +55,22 @@ UIDnDDropSource::~UIDnDDropSource(void)
-
- STDMETHODIMP_(ULONG) UIDnDDropSource::AddRef(void)
- {
-- return InterlockedIncrement(&mRefCount);
-+ LogFlowFunc(("mRefCount=%RU32\n", m_cRefCount + 1));
-+ return (ULONG)InterlockedIncrement(&m_cRefCount);
- }
-
- STDMETHODIMP_(ULONG) UIDnDDropSource::Release(void)
- {
-- LONG lCount = InterlockedDecrement(&mRefCount);
-- if (lCount == 0)
-+ Assert(m_cRefCount > 0);
-+ LogFlowFunc(("mRefCount=%RU32\n", m_cRefCount - 1));
-+ LONG lCount = InterlockedDecrement(&m_cRefCount);
-+ if (lCount <= 0)
- {
- delete this;
- return 0;
- }
-
-- return lCount;
-+ return (ULONG)lCount;
- }
-
- STDMETHODIMP UIDnDDropSource::QueryInterface(REFIID iid, void **ppvObject)
-@@ -93,16 +101,14 @@ STDMETHODIMP UIDnDDropSource::QueryInter
- */
- STDMETHODIMP UIDnDDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD dwKeyState)
- {
--#ifndef DEBUG_andy
-- LogFlowFunc(("fEscapePressed=%RTbool, dwKeyState=0x%x, mdwCurEffect=%RI32, muCurAction=%RU32\n",
-- fEscapePressed, dwKeyState, mdwCurEffect, muCurAction));
--#endif
-+ LogFlowFunc(("fEscapePressed=%RTbool, dwKeyState=0x%x, m_dwCurEffect=%RI32, m_uCurAction=%RU32\n",
-+ RT_BOOL(fEscapePressed), dwKeyState, m_dwCurEffect, m_uCurAction));
-
- /* ESC pressed? Bail out. */
- if (fEscapePressed)
- {
-- mdwCurEffect = 0;
-- muCurAction = Qt::IgnoreAction;
-+ m_dwCurEffect = DROPEFFECT_NONE;
-+ m_uCurAction = Qt::IgnoreAction;
-
- LogRel2(("DnD: User cancelled dropping data to the host\n"));
- return DRAGDROP_S_CANCEL;
-@@ -117,10 +123,15 @@ STDMETHODIMP UIDnDDropSource::QueryConti
-
- if (fDropContent)
- {
-+ if (m_pDataObject)
-+ m_pDataObject->Signal();
-+
- LogRel2(("DnD: User dropped data to the host\n"));
- return DRAGDROP_S_DROP;
- }
-
-+ QApplication::processEvents();
-+
- /* No change, just continue. */
- return S_OK;
- }
-@@ -133,11 +144,9 @@ STDMETHODIMP UIDnDDropSource::QueryConti
- */
- STDMETHODIMP UIDnDDropSource::GiveFeedback(DWORD dwEffect)
- {
-- Qt::DropActions dropActions = Qt::IgnoreAction;
-+ Qt::DropActions dropActions = Qt::IgnoreAction;
-
--#ifndef DEBUG_andy
- LogFlowFunc(("dwEffect=0x%x\n", dwEffect));
--#endif
- if (dwEffect)
- {
- if (dwEffect & DROPEFFECT_COPY)
-@@ -146,10 +155,11 @@ STDMETHODIMP UIDnDDropSource::GiveFeedba
- dropActions |= Qt::MoveAction;
- if (dwEffect & DROPEFFECT_LINK)
- dropActions |= Qt::LinkAction;
-+
-+ m_dwCurEffect = dwEffect;
- }
-
-- mdwCurEffect = dwEffect;
-- muCurAction = dropActions;
-+ m_uCurAction = dropActions;
-
- return DRAGDROP_S_USEDEFAULTCURSORS;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
-@@ -21,16 +21,21 @@
- /* COM includes: */
- #include "COMEnums.h"
-
-+class UIDnDDataObject;
-+
-+/**
-+ * Implementation of IDropSource for drag and drop on the host.
-+ */
- class UIDnDDropSource : public IDropSource
- {
- public:
-
-- UIDnDDropSource(QWidget *pParent);
-+ UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject);
- virtual ~UIDnDDropSource(void);
-
- public:
-
-- uint32_t GetCurrentAction(void) { return muCurAction; }
-+ uint32_t GetCurrentAction(void) const { return m_uCurAction; }
-
- public: /* IUnknown methods. */
-
-@@ -45,10 +50,15 @@ public: /* IDropSource methods. */
-
- protected:
-
-- LONG mRefCount;
-- QWidget *mpParent;
-- DWORD mdwCurEffect;
-- Qt::DropActions muCurAction;
-+ /** Pointer to parent widget. */
-+ QWidget *m_pParent;
-+ UIDnDDataObject *m_pDataObject;
-+ /** The current reference count. */
-+ LONG m_cRefCount;
-+ /** Current (last) drop effect issued. */
-+ DWORD m_dwCurEffect;
-+ /** Current drop action to perform in case of a successful drop. */
-+ Qt::DropActions m_uCurAction;
- };
-
- #endif /* ___UIDnDDropSource_win_h___ */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -64,17 +64,21 @@
- #if 0
- # ifdef DEBUG
- # include <QTextStream>
-+# include <QFile>
- /** Enable this to log debug output of a Qt debug build to a file defined by DEBUG_DND_QT_LOGFILE. */
- # define DEBUG_DND_QT
--/** File to log Qt debug output to. */
--# define DEBUG_DND_QT_LOGFILE "/var/tmp/qt.log"
-+# ifdef RT_OS_WINDOWS
-+# define DEBUG_DND_QT_LOGFILE "c:\\temp\\VBoxQt.log"
-+# else
-+# define DEBUG_DND_QT_LOGFILE "/var/tmp/vboxqt.log"
-+# endif
- # endif /* DEBUG */
- #endif
-
- UIDnDHandler::UIDnDHandler(UISession *pSession, QWidget *pParent)
- : m_pSession(pSession)
- , m_pParent(pParent)
-- , m_enmMode(DNDMODE_UNKNOWN)
-+ , m_enmOpMode(DNDMODE_UNKNOWN)
- , m_fIsPending(false)
- , m_fDataRetrieved(false)
- #ifndef RT_OS_WINDOWS
-@@ -98,11 +102,11 @@ Qt::DropAction UIDnDHandler::dragEnter(u
- Qt::DropAction proposedAction, Qt::DropActions possibleActions,
- const QMimeData *pMimeData)
- {
-- LogFlowFunc(("enmMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-- m_enmMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-+ LogFlowFunc(("enmOpMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-+ m_enmOpMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-
-- if ( m_enmMode != DNDMODE_UNKNOWN
-- && m_enmMode != DNDMODE_HOSTTOGUEST)
-+ if ( m_enmOpMode != DNDMODE_UNKNOWN
-+ && m_enmOpMode != DNDMODE_HOSTTOGUEST)
- return Qt::IgnoreAction;
-
- /* Ask the guest for starting a DnD event. */
-@@ -113,20 +117,22 @@ Qt::DropAction UIDnDHandler::dragEnter(u
- toVBoxDnDActions(possibleActions),
- pMimeData->formats().toVector());
- if (m_dndTarget.isOk())
-- setMode(DNDMODE_HOSTTOGUEST);
-+ {
-+ setOpMode(DNDMODE_HOSTTOGUEST);
-+ return toQtDnDAction(result);
-+ }
-
-- /* Set the DnD action returned by the guest. */
-- return toQtDnDAction(result);
-+ return Qt::IgnoreAction;
- }
-
- Qt::DropAction UIDnDHandler::dragMove(ulong screenID, int x, int y,
- Qt::DropAction proposedAction, Qt::DropActions possibleActions,
- const QMimeData *pMimeData)
- {
-- LogFlowFunc(("enmMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-- m_enmMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-+ LogFlowFunc(("enmOpMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-+ m_enmOpMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-
-- if (m_enmMode != DNDMODE_HOSTTOGUEST)
-+ if (m_enmOpMode != DNDMODE_HOSTTOGUEST)
- return Qt::IgnoreAction;
-
- /* Notify the guest that the mouse has been moved while doing
-@@ -137,18 +143,20 @@ Qt::DropAction UIDnDHandler::dragMove(ul
- toVBoxDnDAction(proposedAction),
- toVBoxDnDActions(possibleActions),
- pMimeData->formats().toVector());
-- /* Set the DnD action returned by the guest. */
-- return toQtDnDAction(result);
-+ if (m_dndTarget.isOk())
-+ return toQtDnDAction(result);
-+
-+ return Qt::IgnoreAction;
- }
-
- Qt::DropAction UIDnDHandler::dragDrop(ulong screenID, int x, int y,
- Qt::DropAction proposedAction, Qt::DropActions possibleActions,
- const QMimeData *pMimeData)
- {
-- LogFlowFunc(("enmMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-- m_enmMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-+ LogFlowFunc(("enmOpMode=%RU32, screenID=%RU32, x=%d, y=%d, action=%ld\n",
-+ m_enmOpMode, screenID, x, y, toVBoxDnDAction(proposedAction)));
-
-- if (m_enmMode != DNDMODE_HOSTTOGUEST)
-+ if (m_enmOpMode != DNDMODE_HOSTTOGUEST)
- return Qt::IgnoreAction;
-
- /* The format the guest requests. */
-@@ -257,19 +265,19 @@ Qt::DropAction UIDnDHandler::dragDrop(ul
- * the end of the current transfer direction. So reset the current
- * mode as well here.
- */
-- setMode(DNDMODE_UNKNOWN);
-+ setOpMode(DNDMODE_UNKNOWN);
-
- return toQtDnDAction(enmResult);
- }
-
- void UIDnDHandler::dragLeave(ulong screenID)
- {
-- LogFlowFunc(("enmMode=%RU32, screenID=%RU32\n", m_enmMode, screenID));
-+ LogFlowFunc(("enmOpMode=%RU32, screenID=%RU32\n", m_enmOpMode, screenID));
-
-- if (m_enmMode == DNDMODE_HOSTTOGUEST)
-+ if (m_enmOpMode == DNDMODE_HOSTTOGUEST)
- {
- m_dndTarget.Leave(screenID);
-- setMode(DNDMODE_UNKNOWN);
-+ setOpMode(DNDMODE_UNKNOWN);
- }
- }
-
-@@ -334,13 +342,12 @@ int UIDnDHandler::dragStartInternal(cons
- # endif
-
- # ifdef RT_OS_WINDOWS
--
-- UIDnDDropSource *pDropSource = new UIDnDDropSource(m_pParent);
-- if (!pDropSource)
-- return VERR_NO_MEMORY;
- UIDnDDataObject *pDataObject = new UIDnDDataObject(this, lstFormats);
- if (!pDataObject)
- return VERR_NO_MEMORY;
-+ UIDnDDropSource *pDropSource = new UIDnDDropSource(m_pParent, pDataObject);
-+ if (!pDropSource)
-+ return VERR_NO_MEMORY;
-
- DWORD dwOKEffects = DROPEFFECT_NONE;
- if (actions)
-@@ -448,13 +455,13 @@ int UIDnDHandler::dragCheckPending(ulong
- int rc;
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
-
-- LogFlowFunc(("enmMode=%RU32, fIsPending=%RTbool, screenID=%RU32\n", m_enmMode, m_fIsPending, screenID));
-+ LogFlowFunc(("enmOpMode=%RU32, fIsPending=%RTbool, screenID=%RU32\n", m_enmOpMode, m_fIsPending, screenID));
-
- {
- QMutexLocker AutoReadLock(&m_ReadLock);
-
-- if ( m_enmMode != DNDMODE_UNKNOWN
-- && m_enmMode != DNDMODE_GUESTTOHOST) /* Wrong mode set? */
-+ if ( m_enmOpMode != DNDMODE_UNKNOWN
-+ && m_enmOpMode != DNDMODE_GUESTTOHOST) /* Wrong mode set? */
- return VINF_SUCCESS;
-
- if (m_fIsPending) /* Pending operation is in progress. */
-@@ -548,7 +555,7 @@ int UIDnDHandler::dragStart(ulong screen
- return VERR_INVALID_PARAMETER;
- }
-
-- setMode(DNDMODE_GUESTTOHOST);
-+ setOpMode(DNDMODE_GUESTTOHOST);
-
- rc = dragStartInternal(m_dataSource.lstFormats,
- toQtDnDAction(m_dataSource.defaultAction), toQtDnDActions(m_dataSource.vecActions));
-@@ -594,7 +601,7 @@ void UIDnDHandler::reset(void)
- m_fDataRetrieved = false;
- m_fIsPending = false;
-
-- setMode(DNDMODE_UNKNOWN);
-+ setOpMode(DNDMODE_UNKNOWN);
- }
-
- int UIDnDHandler::retrieveData(Qt::DropAction dropAction,
-@@ -611,9 +618,9 @@ int UIDnDHandler::retrieveData(Qt::DropA
- * Retrieve the actual data from the guest.
- */
- rc = retrieveDataInternal(dropAction, strMIMEType, m_vecData);
-- LogRel3(("DnD: Received data, rc=%Rrc\n", rc));
--
-- if (RT_SUCCESS(rc))
-+ if (RT_FAILURE(rc))
-+ LogRel3(("DnD: Receiving data failed: %Rrc\n", rc));
-+ else
- m_fDataRetrieved = true;
- }
- else /* Data already received, supply cached version. */
-@@ -650,7 +657,7 @@ int UIDnDHandler::retrieveDataInternal(
- const QString &strMIMEType,
- QVector<uint8_t> &vecData)
- {
-- LogFlowFunc(("Retrieving data as '%s', dropAction=%d\n", qPrintable(strMIMEType), dropAction));
-+ LogRel3(("DnD: Retrieving data from guest as '%s' (%d)\n", qPrintable(strMIMEType), dropAction));
-
- int rc = VINF_SUCCESS;
-
-@@ -684,8 +691,16 @@ int UIDnDHandler::retrieveDataInternal(
- {
- /* After we successfully retrieved data from the source we query it from Main. */
- vecData = m_dndSource.ReceiveData(); /** @todo QVector.size() is "int" only!? */
-- if (vecData.isEmpty())
-- rc = VERR_NO_DATA;
-+ if (m_dndSource.isOk())
-+ {
-+ if (vecData.isEmpty())
-+ rc = VERR_NO_DATA;
-+ }
-+ else
-+ {
-+ msgCenter().cannotDropDataToHost(m_dndSource, m_pParent);
-+ rc = VERR_GENERAL_FAILURE; /** @todo Fudge; do a GetResultCode() to rc translation. */
-+ }
- }
- else
- msgCenter().cannotDropDataToHost(progress, m_pParent);
-@@ -699,17 +714,17 @@ int UIDnDHandler::retrieveDataInternal(
- rc = VERR_GENERAL_FAILURE; /** @todo Fudge; do a GetResultCode() to rc translation. */
- }
-
-- setMode(DNDMODE_UNKNOWN);
-+ setOpMode(DNDMODE_UNKNOWN);
-
- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
--void UIDnDHandler::setMode(DNDMODE enmMode)
-+void UIDnDHandler::setOpMode(DNDOPMODE enmMode)
- {
- QMutexLocker AutoWriteLock(&m_WriteLock);
-- m_enmMode = enmMode;
-- LogFlowFunc(("Mode is now: %RU32\n", m_enmMode));
-+ m_enmOpMode = enmMode;
-+ LogFunc(("Operation mode is now: %RU32\n", m_enmOpMode));
- }
-
- int UIDnDHandler::sltGetData( Qt::DropAction dropAction,
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
-@@ -48,7 +48,7 @@ public:
- * Note: The operation mode is independent of the machine's overall
- * drag and drop mode.
- */
-- typedef enum DNDMODE
-+ typedef enum DNDOPMODE
- {
- /** Unknown mode. */
- DNDMODE_UNKNOWN = 0,
-@@ -59,7 +59,7 @@ public:
- /** @todo Implement guest to guest. */
- /** The usual 32-bit type blow up. */
- DNDMODE_32BIT_HACK = 0x7fffffff
-- } DNDMODE;
-+ } DNDOPMODE;
-
- /**
- * Drag and drop data set from the source.
-@@ -124,7 +124,7 @@ protected:
-
- int dragStartInternal(const QStringList &lstFormats, Qt::DropAction defAction, Qt::DropActions actions);
- int retrieveDataInternal(Qt::DropAction dropAction, const QString &strMIMEType, QVector<uint8_t> &vecData);
-- void setMode(DNDMODE enmMode);
-+ void setOpMode(DNDOPMODE enmMode);
-
- protected:
-
-@@ -132,13 +132,14 @@ protected:
- UISession *m_pSession;
- /** Pointer to parent widget. */
- QWidget *m_pParent;
--
- /** Drag and drop source instance. */
- CDnDSource m_dndSource;
- /** Drag and drop target instance. */
- CDnDTarget m_dndTarget;
-- /** Current transfer direction. */
-- DNDMODE m_enmMode;
-+ /** Current operation mode, indicating the transfer direction.
-+ * Note: This is independent of the current drag and drop
-+ * mode being set for this VM! */
-+ DNDOPMODE m_enmOpMode;
- /** Current data from the source (if any).
- * At the momenet we only support one source at a time. */
- UIDnDDataSource m_dataSource;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
-@@ -108,7 +108,7 @@ QVariant UIDnDMIMEData::retrieveData(con
- rc = VERR_NOT_IMPLEMENTED;
-
- /* Let the user know. */
-- LogRel(("Drag and drop support for OS X is disabled in this version."));
-+ LogRel(("DnD: Drag and drop support for OS X is not available in this version\n"));
- # endif /* VBOX_WITH_DRAG_AND_DROP_PROMISES */
- #else /* !RT_OS_DARWIN */
- /*
-@@ -119,7 +119,7 @@ QVariant UIDnDMIMEData::retrieveData(con
- if (m_curAction == Qt::IgnoreAction)
- {
- LogFlowFunc(("Current drop action is 0x%x, so can't drop yet\n", m_curAction));
-- rc = VERR_WRONG_ORDER;
-+ rc = VERR_NOT_FOUND;
- }
- #endif
-
-@@ -171,7 +171,7 @@ QVariant UIDnDMIMEData::retrieveData(con
- rc = VINF_SUCCESS;
-
- if (RT_FAILURE(rc))
-- LogRel(("DnD: Retrieving data failed with %Rrc\n", rc));
-+ LogRel2(("DnD: Retrieving data failed with %Rrc\n", rc));
-
- return QVariant(QVariant::Invalid);
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
-@@ -103,7 +103,7 @@ const int XKeyRelease = KeyRelease;
- #ifdef DEBUG_andy
- /* Macro for debugging drag and drop actions which usually would
- * go to Main's logging group. */
--# define DNDDEBUG(x) LogRel(x)
-+# define DNDDEBUG(x) LogFlowFunc(x)
- #else
- # define DNDDEBUG(x)
- #endif
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/DragAndDrop/DnDDroppedFiles.cpp
-@@ -0,0 +1,268 @@
-+/* $Id: DnDDroppedFiles.cpp $ */
-+/** @file
-+ * DnD: Directory handling.
-+ */
-+
-+/*
-+ * Copyright (C) 2014-2015 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ */
-+
-+
-+/*********************************************************************************************************************************
-+* Header Files *
-+*********************************************************************************************************************************/
-+
-+#include <iprt/assert.h>
-+#include <iprt/dir.h>
-+#include <iprt/path.h>
-+#include <iprt/string.h>
-+
-+#include <VBox/GuestHost/DragAndDrop.h>
-+
-+#ifdef LOG_GROUP
-+ #undef LOG_GROUP
-+#endif
-+#define LOG_GROUP LOG_GROUP_GUEST_DND
-+#include <VBox/log.h>
-+
-+DnDDroppedFiles::DnDDroppedFiles(void)
-+ : m_fOpen(0)
-+ , m_hDir(NULL) { }
-+
-+DnDDroppedFiles::DnDDroppedFiles(const char *pszPath, uint32_t fFlags)
-+ : m_fOpen(0)
-+ , m_hDir(NULL)
-+{
-+ OpenEx(pszPath, fFlags);
-+}
-+
-+DnDDroppedFiles::~DnDDroppedFiles(void)
-+{
-+ /* Only make sure to not leak any handles and stuff, don't delete any
-+ * directories / files here. */
-+ closeInternal();
-+}
-+
-+int DnDDroppedFiles::AddFile(const char *pszFile)
-+{
-+ AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
-+
-+ if (!this->m_lstFiles.contains(pszFile))
-+ this->m_lstFiles.append(pszFile);
-+ return VINF_SUCCESS;
-+}
-+
-+int DnDDroppedFiles::AddDir(const char *pszDir)
-+{
-+ AssertPtrReturn(pszDir, VERR_INVALID_POINTER);
-+
-+ if (!this->m_lstDirs.contains(pszDir))
-+ this->m_lstDirs.append(pszDir);
-+ return VINF_SUCCESS;
-+}
-+
-+int DnDDroppedFiles::closeInternal(void)
-+{
-+ int rc;
-+ if (this->m_hDir != NULL)
-+ {
-+ rc = RTDirClose(this->m_hDir);
-+ if (RT_SUCCESS(rc))
-+ this->m_hDir = NULL;
-+ }
-+ else
-+ rc = VINF_SUCCESS;
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
-+int DnDDroppedFiles::Close(void)
-+{
-+ return closeInternal();
-+}
-+
-+const char *DnDDroppedFiles::GetDirAbs(void) const
-+{
-+ return this->m_strPathAbs.c_str();
-+}
-+
-+bool DnDDroppedFiles::IsOpen(void) const
-+{
-+ return (this->m_hDir != NULL);
-+}
-+
-+int DnDDroppedFiles::OpenEx(const char *pszPath, uint32_t fFlags)
-+{
-+ AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
-+ AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER); /* Flags not supported yet. */
-+
-+ int rc;
-+
-+ do
-+ {
-+ char pszDropDir[RTPATH_MAX];
-+ size_t cchDropDir = RTStrPrintf(pszDropDir, sizeof(pszDropDir), "%s", pszPath);
-+
-+ /** @todo On Windows we also could use the registry to override
-+ * this path, on Posix a dotfile and/or a guest property
-+ * can be used. */
-+
-+ /* Append our base drop directory. */
-+ rc = RTPathAppend(pszDropDir, sizeof(pszDropDir), "VirtualBox Dropped Files"); /** @todo Make this tag configurable? */
-+ if (RT_FAILURE(rc))
-+ break;
-+
-+ /* Create it when necessary. */
-+ if (!RTDirExists(pszDropDir))
-+ {
-+ rc = RTDirCreateFullPath(pszDropDir, RTFS_UNIX_IRWXU);
-+ if (RT_FAILURE(rc))
-+ break;
-+ }
-+
-+ /* The actually drop directory consist of the current time stamp and a
-+ * unique number when necessary. */
-+ char pszTime[64];
-+ RTTIMESPEC time;
-+ if (!RTTimeSpecToString(RTTimeNow(&time), pszTime, sizeof(pszTime)))
-+ {
-+ rc = VERR_BUFFER_OVERFLOW;
-+ break;
-+ }
-+
-+ rc = DnDPathSanitizeFilename(pszTime, sizeof(pszTime));
-+ if (RT_FAILURE(rc))
-+ break;
-+
-+ rc = RTPathAppend(pszDropDir, sizeof(pszDropDir), pszTime);
-+ if (RT_FAILURE(rc))
-+ break;
-+
-+ /* Create it (only accessible by the current user) */
-+ rc = RTDirCreateUniqueNumbered(pszDropDir, sizeof(pszDropDir), RTFS_UNIX_IRWXU, 3, '-');
-+ if (RT_SUCCESS(rc))
-+ {
-+ PRTDIR phDir;
-+ rc = RTDirOpen(&phDir, pszDropDir);
-+ if (RT_SUCCESS(rc))
-+ {
-+ this->m_hDir = phDir;
-+ this->m_strPathAbs = pszDropDir;
-+ this->m_fOpen = fFlags;
-+ }
-+ }
-+
-+ } while (0);
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
-+int DnDDroppedFiles::OpenTemp(uint32_t fFlags)
-+{
-+ AssertReturn(fFlags == 0, VERR_INVALID_PARAMETER); /* Flags not supported yet. */
-+
-+ /*
-+ * Get the user's temp directory. Don't use the user's root directory (or
-+ * something inside it) because we don't know for how long/if the data will
-+ * be kept after the guest OS used it.
-+ */
-+ char szTemp[RTPATH_MAX];
-+ int rc = RTPathTemp(szTemp, sizeof(szTemp));
-+ if (RT_SUCCESS(rc))
-+ rc = OpenEx(szTemp, fFlags);
-+
-+ return rc;
-+}
-+
-+int DnDDroppedFiles::Reset(bool fRemoveDropDir)
-+{
-+ int rc = closeInternal();
-+ if (RT_SUCCESS(rc))
-+ {
-+ if (fRemoveDropDir)
-+ {
-+ rc = Rollback();
-+ }
-+ else
-+ {
-+ this->m_lstDirs.clear();
-+ this->m_lstFiles.clear();
-+ }
-+ }
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
-+int DnDDroppedFiles::Reopen(void)
-+{
-+ if (this->m_strPathAbs.isEmpty())
-+ return VERR_NOT_FOUND;
-+
-+ return OpenEx(this->m_strPathAbs.c_str(), this->m_fOpen);
-+}
-+
-+int DnDDroppedFiles::Rollback(void)
-+{
-+ if (this->m_strPathAbs.isEmpty())
-+ return VINF_SUCCESS;
-+
-+ int rc = VINF_SUCCESS;
-+
-+ /* Rollback by removing any stuff created.
-+ * Note: Only remove empty directories, never ever delete
-+ * anything recursive here! Steam (tm) knows best ... :-) */
-+ int rc2;
-+ for (size_t i = 0; i < this->m_lstFiles.size(); i++)
-+ {
-+ rc2 = RTFileDelete(this->m_lstFiles.at(i).c_str());
-+ if (RT_SUCCESS(rc2))
-+ this->m_lstFiles.removeAt(i);
-+
-+ if (RT_SUCCESS(rc))
-+ rc = rc2;
-+ /* Keep going. */
-+ }
-+
-+ for (size_t i = 0; i < this->m_lstDirs.size(); i++)
-+ {
-+ rc2 = RTDirRemove(this->m_lstDirs.at(i).c_str());
-+ if (RT_SUCCESS(rc2))
-+ this->m_lstDirs.removeAt(i);
-+
-+ if (RT_SUCCESS(rc))
-+ rc = rc2;
-+ /* Keep going. */
-+ }
-+
-+ if (RT_SUCCESS(rc))
-+ {
-+ Assert(this->m_lstFiles.isEmpty());
-+ Assert(this->m_lstDirs.isEmpty());
-+
-+ rc2 = closeInternal();
-+ if (RT_SUCCESS(rc2))
-+ {
-+ /* Try to remove the empty root dropped files directory as well.
-+ * Might return VERR_DIR_NOT_EMPTY or similar. */
-+ rc2 = RTDirRemove(this->m_strPathAbs.c_str());
-+ }
-+ }
-+
-+ if (RT_SUCCESS(rc))
-+ rc = rc2;
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
---- virtualbox-5.0.16-dfsg.orig/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
-@@ -24,6 +24,7 @@
- #include <iprt/file.h>
- #include <iprt/fs.h>
- #include <iprt/path.h>
-+#include <iprt/string.h>
- #include <iprt/symlink.h>
- #include <iprt/uri.h>
-
-@@ -283,7 +284,7 @@ int DnDURIList::AppendNativePath(const c
- {
- RTPathChangeToUnixSlashes(pszPathNative, true /* fForce */);
-
-- char *pszPathURI = RTUriCreate("file" /* pszScheme */, "/" /* pszAuthority */,
-+ char *pszPathURI = RTUriCreate("file" /* pszScheme */, NULL /* pszAuthority */,
- pszPathNative, NULL /* pszQuery */, NULL /* pszFragment */);
- if (pszPathURI)
- {
-@@ -447,8 +448,11 @@ int DnDURIList::RootFromURIData(const vo
- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-
-+ if (!RTStrIsValidEncoding(static_cast<const char *>(pvData)))
-+ return VERR_INVALID_PARAMETER;
-+
- RTCList<RTCString> lstURI =
-- RTCString(static_cast<const char*>(pvData), cbData - 1).split("\r\n");
-+ RTCString(static_cast<const char *>(pvData), cbData - 1).split("\r\n");
- if (lstURI.isEmpty())
- return VINF_SUCCESS;
-
-@@ -485,7 +489,7 @@ int DnDURIList::RootFromURIData(const vo
- }
-
- RTCString DnDURIList::RootToString(const RTCString &strPathBase /* = "" */,
-- const RTCString &strSeparator /* = "\r\n" */)
-+ const RTCString &strSeparator /* = "\r\n" */) const
- {
- RTCString strRet;
- for (size_t i = 0; i < m_lstRoot.size(); i++)
-@@ -503,7 +507,7 @@ RTCString DnDURIList::RootToString(const
- if (pszPathURI)
- {
- strRet += RTCString(pszPathURI) + strSeparator;
-- LogFlowFunc(("URI: %s\n", strRet.c_str()));
-+ LogFlowFunc(("URI (Base): %s\n", strRet.c_str()));
- RTStrFree(pszPathURI);
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp
-@@ -5,7 +5,7 @@
- */
-
- /*
-- * Copyright (C) 2014-2015 Oracle Corporation
-+ * Copyright (C) 2014-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -37,6 +37,7 @@
-
- DnDURIObject::DnDURIObject(void)
- : m_Type(Unknown)
-+ , m_fOpen(false)
- , m_fMode(0)
- , m_cbSize(0)
- , m_cbProcessed(0)
-@@ -51,22 +52,11 @@ DnDURIObject::DnDURIObject(Type type,
- : m_Type(type)
- , m_strSrcPath(strSrcPath)
- , m_strTgtPath(strDstPath)
-+ , m_fOpen(false)
- , m_fMode(fMode)
- , m_cbSize(cbSize)
- , m_cbProcessed(0)
- {
-- switch (m_Type)
-- {
-- case File:
-- u.m_hFile = NULL;
-- break;
--
-- case Directory:
-- break;
--
-- default:
-- break;
-- }
- }
-
- DnDURIObject::~DnDURIObject(void)
-@@ -76,17 +66,17 @@ DnDURIObject::~DnDURIObject(void)
-
- void DnDURIObject::closeInternal(void)
- {
-+ LogFlowThisFuncEnter();
-+
-+ if (!m_fOpen)
-+ return;
-+
- switch (m_Type)
- {
- case File:
- {
-- if (u.m_hFile)
-- {
-- int rc2 = RTFileClose(u.m_hFile);
-- AssertRC(rc2);
--
-- u.m_hFile = NULL;
-- }
-+ RTFileClose(u.m_hFile);
-+ u.m_hFile = NIL_RTFILE;
- break;
- }
-
-@@ -97,7 +87,7 @@ void DnDURIObject::closeInternal(void)
- break;
- }
-
-- LogFlowThisFuncLeave();
-+ m_fOpen = false;
- }
-
- void DnDURIObject::Close(void)
-@@ -130,24 +120,7 @@ bool DnDURIObject::IsComplete(void) cons
-
- bool DnDURIObject::IsOpen(void) const
- {
-- bool fIsOpen;
--
-- switch (m_Type)
-- {
-- case File:
-- fIsOpen = u.m_hFile != NULL;
-- break;
--
-- case Directory:
-- fIsOpen = true;
-- break;
--
-- default:
-- fIsOpen = false;
-- break;
-- }
--
-- return fIsOpen;
-+ return m_fOpen;
- }
-
- int DnDURIObject::Open(Dest enmDest, uint64_t fOpen /* = 0 */, uint32_t fMode /* = 0 */)
-@@ -180,20 +153,21 @@ int DnDURIObject::OpenEx(const RTCString
- if ( RT_SUCCESS(rc)
- && fOpen) /* Opening mode specified? */
- {
-+ LogFlowThisFunc(("enmType=%RU32, strPath=%s, fOpen=0x%x, enmType=%RU32, enmDest=%RU32\n",
-+ enmType, strPath.c_str(), fOpen, enmType, enmDest));
- switch (enmType)
- {
- case File:
- {
-- if (!u.m_hFile)
-+ if (!m_fOpen)
- {
- /*
- * Open files on the source with RTFILE_O_DENY_WRITE to prevent races
- * where the OS writes to the file while the destination side transfers
- * it over.
- */
-+ LogFlowThisFunc(("Opening ...\n"));
- rc = RTFileOpen(&u.m_hFile, strPath.c_str(), fOpen);
-- LogFlowThisFunc(("strPath=%s, fOpen=0x%x, enmType=%RU32, enmDest=%RU32, rc=%Rrc\n",
-- strPath.c_str(), fOpen, enmType, enmDest, rc));
- if (RT_SUCCESS(rc))
- rc = RTFileGetSize(u.m_hFile, &m_cbSize);
-
-@@ -242,7 +216,10 @@ int DnDURIObject::OpenEx(const RTCString
- }
-
- if (RT_SUCCESS(rc))
-- m_Type = enmType;
-+ {
-+ m_Type = enmType;
-+ m_fOpen = true;
-+ }
-
- LogFlowFuncLeaveRC(rc);
- return rc;
-@@ -363,6 +340,8 @@ int DnDURIObject::Read(void *pvBuf, size
-
- void DnDURIObject::Reset(void)
- {
-+ LogFlowThisFuncEnter();
-+
- Close();
-
- m_Type = Unknown;
-@@ -395,7 +374,6 @@ int DnDURIObject::Write(const void *pvBu
- if (RT_SUCCESS(rc))
- m_cbProcessed += cbWritten;
- }
--
- break;
- }
-
-@@ -416,7 +394,7 @@ int DnDURIObject::Write(const void *pvBu
- *pcbWritten = (uint32_t)cbWritten;
- }
-
-- LogFlowFunc(("Returning strSourcePath=%s, cbWritten=%zu, rc=%Rrc\n", m_strSrcPath.c_str(), cbWritten, rc));
-+ LogFlowThisFunc(("Returning strSourcePath=%s, cbWritten=%zu, rc=%Rrc\n", m_strSrcPath.c_str(), cbWritten, rc));
- return rc;
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/GuestHost/DragAndDrop/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/DragAndDrop/Makefile.kmk
-@@ -19,7 +19,7 @@ SUB_DEPTH = ../../../..
- include $(KBUILD_PATH)/subheader.kmk
-
- VBOX_DND_GUESTHOST_FILES := \
-- DnDDir.cpp \
-+ DnDDroppedFiles.cpp \
- DnDMIME.cpp \
- DnDPath.cpp \
- DnDURIList.cpp \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/GuestHost/OpenGL/state_tracker/state_evaluators.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/OpenGL/state_tracker/state_evaluators.c
-@@ -897,13 +897,13 @@ crStateEvaluatorSwitch(CREvaluatorBits *
- int size = from->eval1D[i].order * gleval_sizes[i] *
- sizeof(*from->eval1D[i].coeff);
- if (from->eval1D[i].order != to->eval1D[i].order ||
-- from->eval1D[i].u1 != from->eval1D[i].u1 ||
-- from->eval1D[i].u2 != from->eval1D[i].u2 ||
-- crMemcmp((const void *) from->eval1D[i].coeff,
-- (const void *) to->eval1D[i].coeff, size)) {
-+ from->eval1D[i].u1 != to->eval1D[i].u1 ||
-+ from->eval1D[i].u2 != to->eval1D[i].u2 ||
-+ crMemcmp((const void *) from->eval1D[i].coeff,
-+ (const void *) to->eval1D[i].coeff, size)) {
- diff_api.Map1f(i + GL_MAP1_COLOR_4, to->eval1D[i].u1,
-- to->eval1D[i].u2, gleval_sizes[i], to->eval1D[i].order,
-- to->eval1D[i].coeff);
-+ to->eval1D[i].u2, gleval_sizes[i], to->eval1D[i].order,
-+ to->eval1D[i].coeff);
- FILLDIRTY(e->dirty);
- FILLDIRTY(e->eval1D[i]);
- }
-@@ -913,22 +913,22 @@ crStateEvaluatorSwitch(CREvaluatorBits *
-
- for (i = 0; i < GLEVAL_TOT; i++) {
- if (CHECKDIRTY(e->eval2D[i], bitID)) {
-- int size = from->eval2D[i].uorder * from->eval2D[i].vorder *
-- gleval_sizes[i] * sizeof(*from->eval2D[i].coeff);
-+ int size = from->eval2D[i].uorder * from->eval2D[i].vorder
-+ * gleval_sizes[i] * sizeof(*from->eval2D[i].coeff);
- if (from->eval2D[i].uorder != to->eval2D[i].uorder ||
-- from->eval2D[i].vorder != to->eval2D[i].vorder ||
-- from->eval2D[i].u1 != from->eval2D[i].u1 ||
-- from->eval2D[i].u2 != from->eval2D[i].u2 ||
-- from->eval2D[i].v1 != from->eval2D[i].v1 ||
-- from->eval2D[i].v2 != from->eval2D[i].v2 ||
-- crMemcmp((const void *) from->eval2D[i].coeff,
-- (const void *) to->eval2D[i].coeff, size)) {
-+ from->eval2D[i].vorder != to->eval2D[i].vorder ||
-+ from->eval2D[i].u1 != to->eval2D[i].u1 ||
-+ from->eval2D[i].u2 != to->eval2D[i].u2 ||
-+ from->eval2D[i].v1 != to->eval2D[i].v1 ||
-+ from->eval2D[i].v2 != to->eval2D[i].v2 ||
-+ crMemcmp((const void *) from->eval2D[i].coeff,
-+ (const void *) to->eval2D[i].coeff, size)) {
- diff_api.Map2f(i + GL_MAP2_COLOR_4,
-- to->eval2D[i].u1, to->eval2D[i].u2,
-- gleval_sizes[i], to->eval2D[i].uorder,
-- to->eval2D[i].v1, to->eval2D[i].v2,
-- gleval_sizes[i], to->eval2D[i].vorder,
-- to->eval2D[i].coeff);
-+ to->eval2D[i].u1, to->eval2D[i].u2,
-+ gleval_sizes[i], to->eval2D[i].uorder,
-+ to->eval2D[i].v1, to->eval2D[i].v2,
-+ gleval_sizes[i], to->eval2D[i].vorder,
-+ to->eval2D[i].coeff);
- FILLDIRTY(e->dirty);
- FILLDIRTY(e->eval2D[i]);
- }
-@@ -937,7 +937,8 @@ crStateEvaluatorSwitch(CREvaluatorBits *
- }
- if (CHECKDIRTY(e->grid1D, bitID)) {
- if (from->u11D != to->u11D ||
-- from->u21D != to->u21D || from->un1D != to->un1D) {
-+ from->u21D != to->u21D ||
-+ from->un1D != to->un1D) {
- diff_api.MapGrid1d(to->un1D, to->u11D, to->u21D);
- FILLDIRTY(e->dirty);
- FILLDIRTY(e->grid1D);
-@@ -946,12 +947,13 @@ crStateEvaluatorSwitch(CREvaluatorBits *
- }
- if (CHECKDIRTY(e->grid2D, bitID)) {
- if (from->u12D != to->u12D ||
-- from->u22D != to->u22D ||
-- from->un2D != to->un2D ||
-- from->v12D != to->v12D ||
-- from->v22D != to->v22D || from->vn2D != to->vn2D) {
-+ from->u22D != to->u22D ||
-+ from->un2D != to->un2D ||
-+ from->v12D != to->v12D ||
-+ from->v22D != to->v22D ||
-+ from->vn2D != to->vn2D) {
- diff_api.MapGrid2d(to->un2D, to->u12D, to->u22D,
-- to->vn2D, to->v12D, to->v22D);
-+ to->vn2D, to->v12D, to->v22D);
- FILLDIRTY(e->dirty);
- FILLDIRTY(e->grid1D);
- }
-@@ -995,18 +997,18 @@ crStateEvaluatorDiff(CREvaluatorBits *e,
- int size = from->eval1D[i].order * gleval_sizes[i] *
- sizeof(*from->eval1D[i].coeff);
- if (from->eval1D[i].order != to->eval1D[i].order ||
-- from->eval1D[i].u1 != from->eval1D[i].u1 ||
-- from->eval1D[i].u2 != from->eval1D[i].u2 ||
-- crMemcmp((const void *) from->eval1D[i].coeff,
-- (const void *) to->eval1D[i].coeff, size)) {
-+ from->eval1D[i].u1 != to->eval1D[i].u1 ||
-+ from->eval1D[i].u2 != to->eval1D[i].u2 ||
-+ crMemcmp((const void *) from->eval1D[i].coeff,
-+ (const void *) to->eval1D[i].coeff, size)) {
- diff_api.Map1f(i + GL_MAP1_COLOR_4, to->eval1D[i].u1,
-- to->eval1D[i].u2, gleval_sizes[i], to->eval1D[i].order,
-- to->eval1D[i].coeff);
-+ to->eval1D[i].u2, gleval_sizes[i], to->eval1D[i].order,
-+ to->eval1D[i].coeff);
- from->eval1D[i].order = to->eval1D[i].order;
-- from->eval1D[i].u1 = from->eval1D[i].u1;
-- from->eval1D[i].u2 = from->eval1D[i].u2;
-+ from->eval1D[i].u1 = to->eval1D[i].u1;
-+ from->eval1D[i].u2 = to->eval1D[i].u2;
- crMemcpy((void *) from->eval1D[i].coeff,
-- (const void *) to->eval1D[i].coeff, size);
-+ (const void *) to->eval1D[i].coeff, size);
- }
- CLEARDIRTY(e->eval1D[i], nbitID);
- }
-@@ -1021,37 +1023,38 @@ crStateEvaluatorDiff(CREvaluatorBits *e,
- CLEARDIRTY(e->enable2D[i], nbitID);
- }
- if (to->enable2D[i] && CHECKDIRTY(e->eval2D[i], bitID)) {
-- int size = from->eval2D[i].uorder * from->eval2D[i].vorder *
-- gleval_sizes[i] * sizeof(*from->eval2D[i].coeff);
-+ int size = from->eval2D[i].uorder * from->eval2D[i].vorder
-+ * gleval_sizes[i] * sizeof(*from->eval2D[i].coeff);
- if (from->eval2D[i].uorder != to->eval2D[i].uorder ||
-- from->eval2D[i].vorder != to->eval2D[i].vorder ||
-- from->eval2D[i].u1 != from->eval2D[i].u1 ||
-- from->eval2D[i].u2 != from->eval2D[i].u2 ||
-- from->eval2D[i].v1 != from->eval2D[i].v1 ||
-- from->eval2D[i].v2 != from->eval2D[i].v2 ||
-- crMemcmp((const void *) from->eval2D[i].coeff,
-- (const void *) to->eval2D[i].coeff, size)) {
-+ from->eval2D[i].vorder != to->eval2D[i].vorder ||
-+ from->eval2D[i].u1 != to->eval2D[i].u1 ||
-+ from->eval2D[i].u2 != to->eval2D[i].u2 ||
-+ from->eval2D[i].v1 != to->eval2D[i].v1 ||
-+ from->eval2D[i].v2 != to->eval2D[i].v2 ||
-+ crMemcmp((const void *) from->eval2D[i].coeff,
-+ (const void *) to->eval2D[i].coeff, size)) {
- diff_api.Map2f(i + GL_MAP2_COLOR_4,
-- to->eval2D[i].u1, to->eval2D[i].u2,
-- gleval_sizes[i], to->eval2D[i].uorder,
-- to->eval2D[i].v1, to->eval2D[i].v2,
-- gleval_sizes[i], to->eval2D[i].vorder,
-- to->eval2D[i].coeff);
-+ to->eval2D[i].u1, to->eval2D[i].u2,
-+ gleval_sizes[i], to->eval2D[i].uorder,
-+ to->eval2D[i].v1, to->eval2D[i].v2,
-+ gleval_sizes[i], to->eval2D[i].vorder,
-+ to->eval2D[i].coeff);
- from->eval2D[i].uorder = to->eval2D[i].uorder;
- from->eval2D[i].vorder = to->eval2D[i].vorder;
-- from->eval2D[i].u1 = from->eval2D[i].u1;
-- from->eval2D[i].u2 = from->eval2D[i].u2;
-- from->eval2D[i].v1 = from->eval2D[i].v1;
-- from->eval2D[i].v2 = from->eval2D[i].v2;
-+ from->eval2D[i].u1 = to->eval2D[i].u1;
-+ from->eval2D[i].u2 = to->eval2D[i].u2;
-+ from->eval2D[i].v1 = to->eval2D[i].v1;
-+ from->eval2D[i].v2 = to->eval2D[i].v2;
- crMemcpy((void *) from->eval2D[i].coeff,
-- (const void *) to->eval2D[i].coeff, size);
-+ (const void *) to->eval2D[i].coeff, size);
- }
- CLEARDIRTY(e->eval2D[i], nbitID);
- }
- }
- if (CHECKDIRTY(e->grid1D, bitID)) {
- if (from->u11D != to->u11D ||
-- from->u21D != to->u21D || from->un1D != to->un1D) {
-+ from->u21D != to->u21D ||
-+ from->un1D != to->un1D) {
- diff_api.MapGrid1d(to->un1D, to->u11D, to->u21D);
- from->u11D = to->u11D;
- from->u21D = to->u21D;
-@@ -1064,9 +1067,10 @@ crStateEvaluatorDiff(CREvaluatorBits *e,
- from->u22D != to->u22D ||
- from->un2D != to->un2D ||
- from->v12D != to->v12D ||
-- from->v22D != to->v22D || from->vn2D != to->vn2D) {
-+ from->v22D != to->v22D ||
-+ from->vn2D != to->vn2D) {
- diff_api.MapGrid2d(to->un2D, to->u12D, to->u22D,
-- to->vn2D, to->v12D, to->v22D);
-+ to->vn2D, to->v12D, to->v22D);
- from->u12D = to->u12D;
- from->u22D = to->u22D;
- from->un2D = to->un2D;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/GuestHost/OpenGL/util/process.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/GuestHost/OpenGL/util/process.c
-@@ -14,6 +14,9 @@
- #include <signal.h>
- #ifndef WINDOWS
- #include <unistd.h>
-+# ifdef VBOX
-+# include <string.h>
-+# endif
- #else
- #pragma warning ( disable : 4127 )
- #define snprintf _snprintf
-@@ -129,6 +132,26 @@ void crGetProcName( char *name, int maxL
- break;
- }
- #else
-+#ifdef VBOX
-+ const char *pszExecName, *pszProgName;
-+# ifdef SunOS
-+ pszExecName = getexecname();
-+# elif defined(DARWIN)
-+ pszExecName = getprogname();
-+# else
-+ extern const char *__progname;
-+ pszExecName = __progname;
-+# endif
-+ if (!pszExecName)
-+ pszExecName = "<unknown>";
-+ pszProgName = strrchr(pszExecName, '/');
-+ if (pszProgName && *(pszProgName + 1))
-+ pszProgName++;
-+ else
-+ pszProgName = pszExecName;
-+ strncpy(name, pszProgName, maxLen);
-+ name[maxLen - 1] = '\0';
-+# else
- /* Unix:
- * Call getpid() to get our process ID.
- * Then use system() to write the output of 'ps' to a temp file.
-@@ -148,17 +171,9 @@ void crGetProcName( char *name, int maxL
- return;
- /* pipe output of ps to temp file */
- #ifndef SunOS
--# ifdef VBOX
-- snprintf(command, sizeof(command), "ps > %s", tmp);
--# else
- sprintf(command, "ps > %s", tmp);
--# endif
- #else
--# ifdef VBOX
-- snprintf(command, sizeof(command), "ps -e -o 'pid tty time comm'> %s", tmp);
--# else
- sprintf(command, "ps -e -o 'pid tty time comm'> %s", tmp);
--# endif
- #endif
- system(command);
-
-@@ -187,6 +202,7 @@ void crGetProcName( char *name, int maxL
- fclose(f);
- }
- remove(tmp);
-+# endif
- #endif
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/Makefile.kmk
-@@ -367,6 +367,8 @@ if "$(KBUILD_TARGET)" == "win" && define
- SUPR3HardenedStatic_SOURCES.win += \
- win/SUPR3HardenedNoCrt-win.cpp \
- $(VBOX_PATH_RUNTIME_SRC)/nt/RTErrConvertFromNtStatus.cpp \
-+ $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathFindPossible8dot3Name.cpp \
-+ $(VBOX_PATH_RUNTIME_SRC)/nt/RTNtPathExpand8dot3Path.cpp \
- $(VBOX_PATH_RUNTIME_SRC)/r3/nt/pathint-nt.cpp \
- $(VBOX_PATH_RUNTIME_SRC)/win/RTErrConvertFromWin32.cpp \
- $(VBOX_PATH_RUNTIME_SRC)/win/errmsgwin.cpp
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/SUPDrv.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/SUPDrv.cpp
-@@ -467,6 +467,7 @@ PFNRT g_apfnVBoxDrvIPRTDeps[] =
- (PFNRT)RTRandBytes,
- /* VBoxUSB */
- (PFNRT)RTPathStripFilename,
-+ (PFNRT)RTStrPurgeEncoding,
- NULL
- };
- #endif /* RT_OS_DARWIN || RT_OS_SOLARIS || RT_OS_SOLARIS */
-@@ -3026,7 +3027,7 @@ SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSI
- * Let IPRT do the job.
- */
- Mem.eType = MEMREF_TYPE_LOCKED;
-- rc = RTR0MemObjLockUser(&Mem.MemObj, pvR3, cb, RTMEM_PROT_READ | RTMEM_PROT_WRITE, RTR0ProcHandleSelf());
-+ rc = RTR0MemObjLockUser(&Mem.MemObj, pvR3, cb, RTMEM_PROT_READ | RTMEM_PROT_WRITE, NIL_RTR0PROCESS);
- if (RT_SUCCESS(rc))
- {
- uint32_t iPage = cPages;
-@@ -3113,7 +3114,7 @@ SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSES
- {
- int rc2;
- rc = RTR0MemObjMapUser(&Mem.MapObjR3, Mem.MemObj, (RTR3PTR)-1, 0,
-- RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, RTR0ProcHandleSelf());
-+ RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, NIL_RTR0PROCESS);
- if (RT_SUCCESS(rc))
- {
- Mem.eType = MEMREF_TYPE_CONT;
-@@ -3196,7 +3197,7 @@ SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESS
- {
- int rc2;
- rc = RTR0MemObjMapUser(&Mem.MapObjR3, Mem.MemObj, (RTR3PTR)-1, 0,
-- RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, RTR0ProcHandleSelf());
-+ RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, NIL_RTR0PROCESS);
- if (RT_SUCCESS(rc))
- {
- Mem.eType = MEMREF_TYPE_LOW;
-@@ -3277,7 +3278,7 @@ SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESS
- {
- int rc2;
- rc = RTR0MemObjMapUser(&Mem.MapObjR3, Mem.MemObj, (RTR3PTR)-1, 0,
-- RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, RTR0ProcHandleSelf());
-+ RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, NIL_RTR0PROCESS);
- if (RT_SUCCESS(rc))
- {
- Mem.eType = MEMREF_TYPE_MEM;
-@@ -3422,7 +3423,7 @@ SUPR0DECL(int) SUPR0PageAllocEx(PSUPDRVS
- int rc2;
- if (ppvR3)
- rc = RTR0MemObjMapUser(&Mem.MapObjR3, Mem.MemObj, (RTR3PTR)-1, 0,
-- RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, RTR0ProcHandleSelf());
-+ RTMEM_PROT_EXEC | RTMEM_PROT_WRITE | RTMEM_PROT_READ, NIL_RTR0PROCESS);
- else
- Mem.MapObjR3 = NIL_RTR0MEMOBJ;
- if (RT_SUCCESS(rc))
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
-@@ -449,7 +449,7 @@ SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSIO
- {
- if (pSession->GipMapObjR3 == NIL_RTR0MEMOBJ)
- rc = RTR0MemObjMapUser(&pSession->GipMapObjR3, pDevExt->GipMemObj, (RTR3PTR)-1, 0,
-- RTMEM_PROT_READ, RTR0ProcHandleSelf());
-+ RTMEM_PROT_READ, NIL_RTR0PROCESS);
- if (RT_SUCCESS(rc))
- pGipR3 = RTR0MemObjAddressR3(pSession->GipMapObjR3);
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
-@@ -75,8 +75,6 @@ DECLHIDDEN(int) supHardenedWinVerify
- uint32_t *pcFixes, PRTERRINFO pErrInfo);
- DECLHIDDEN(int) supHardNtVpThread(HANDLE hProcess, HANDLE hThread, PRTERRINFO pErrInfo);
- DECLHIDDEN(int) supHardNtVpDebugger(HANDLE hProcess, PRTERRINFO pErrInfo);
--DECLHIDDEN(PRTUTF16) supHardNtVpIsPossible8dot3Path(PCRTUTF16 pwszPath);
--DECLHIDDEN(void) supHardNtVpFix8dot3Path(PUNICODE_STRING pUniStr, bool fPathOnly);
-
- DECLHIDDEN(bool) supHardViUtf16PathIsEqualEx(PCRTUTF16 pawcLeft, size_t cwcLeft, const char *pszRight);
- DECLHIDDEN(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniStrLeft,
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
-@@ -1088,172 +1088,6 @@ DECLHIDDEN(int) supHardNtVpDebugger(HAND
-
-
- /**
-- * Checks whether the path could be containing alternative 8.3 names generated
-- * by NTFS, FAT, or other similar file systems.
-- *
-- * @returns Pointer to the first component that might be an 8.3 name, NULL if
-- * not 8.3 path.
-- * @param pwszPath The path to check.
-- *
-- * @remarks This is making bad ASSUMPTION wrt to the naming scheme of 8.3 names,
-- * however, non-tilde 8.3 aliases are probably rare enough to not be
-- * worth all the extra code necessary to open each path component and
-- * check if we've got the short name or not.
-- */
--DECLHIDDEN(PRTUTF16) supHardNtVpIsPossible8dot3Path(PCRTUTF16 pwszPath)
--{
-- PCRTUTF16 pwszName = pwszPath;
-- for (;;)
-- {
-- RTUTF16 wc = *pwszPath++;
-- if (wc == '~')
-- {
-- /* Could check more here before jumping to conclusions... */
-- if (pwszPath - pwszName <= 8+1+3)
-- return (PRTUTF16)pwszName;
-- }
-- else if (wc == '\\' || wc == '/' || wc == ':')
-- pwszName = pwszPath;
-- else if (wc == 0)
-- break;
-- }
-- return NULL;
--}
--
--
--/**
-- * Fixes up a path possibly containing one or more alternative 8-dot-3 style
-- * components.
-- *
-- * The path is fixed up in place. Errors are ignored.
-- *
-- * @param pUniStr The path to fix up. MaximumLength is the max buffer
-- * length.
-- * @param fPathOnly Whether to only process the path and leave the filename
-- * as passed in.
-- */
--DECLHIDDEN(void) supHardNtVpFix8dot3Path(PUNICODE_STRING pUniStr, bool fPathOnly)
--{
-- /*
-- * We could use FileNormalizedNameInformation here and slap the volume device
-- * path in front of the result, but it's only supported since windows 8.0
-- * according to some docs... So we expand all supicious names.
-- */
-- union fix8dot3tmp
-- {
-- FILE_BOTH_DIR_INFORMATION Info;
-- uint8_t abBuffer[sizeof(FILE_BOTH_DIR_INFORMATION) + 2048 * sizeof(WCHAR)];
-- } *puBuf = NULL;
--
--
-- PRTUTF16 pwszFix = pUniStr->Buffer;
-- while (*pwszFix)
-- {
-- pwszFix = supHardNtVpIsPossible8dot3Path(pwszFix);
-- if (pwszFix == NULL)
-- break;
--
-- RTUTF16 wc;
-- PRTUTF16 pwszFixEnd = pwszFix;
-- while ((wc = *pwszFixEnd) != '\0' && wc != '\\' && wc != '/')
-- pwszFixEnd++;
-- if (wc == '\0' && fPathOnly)
-- break;
--
-- if (!puBuf)
-- {
-- puBuf = (union fix8dot3tmp *)RTMemAlloc(sizeof(*puBuf));
-- if (!puBuf)
-- break;
-- }
--
-- RTUTF16 const wcSaved = *pwszFix;
-- *pwszFix = '\0'; /* paranoia. */
--
-- UNICODE_STRING NtDir;
-- NtDir.Buffer = pUniStr->Buffer;
-- NtDir.Length = NtDir.MaximumLength = (USHORT)((pwszFix - pUniStr->Buffer) * sizeof(WCHAR));
--
-- HANDLE hDir = RTNT_INVALID_HANDLE_VALUE;
-- IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
--
-- OBJECT_ATTRIBUTES ObjAttr;
-- InitializeObjectAttributes(&ObjAttr, &NtDir, OBJ_CASE_INSENSITIVE, NULL /*hRootDir*/, NULL /*pSecDesc*/);
--#ifdef IN_RING0
-- ObjAttr.Attributes |= OBJ_KERNEL_HANDLE;
--#endif
--
-- NTSTATUS rcNt = NtCreateFile(&hDir,
-- FILE_READ_DATA | SYNCHRONIZE,
-- &ObjAttr,
-- &Ios,
-- NULL /* Allocation Size*/,
-- FILE_ATTRIBUTE_NORMAL,
-- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
-- FILE_OPEN,
-- FILE_DIRECTORY_FILE | FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT,
-- NULL /*EaBuffer*/,
-- 0 /*EaLength*/);
-- *pwszFix = wcSaved;
-- if (NT_SUCCESS(rcNt))
-- {
-- RT_ZERO(*puBuf);
--
-- IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
-- UNICODE_STRING NtFilterStr;
-- NtFilterStr.Buffer = pwszFix;
-- NtFilterStr.Length = (USHORT)((uintptr_t)pwszFixEnd - (uintptr_t)pwszFix);
-- NtFilterStr.MaximumLength = NtFilterStr.Length;
-- rcNt = NtQueryDirectoryFile(hDir,
-- NULL /* Event */,
-- NULL /* ApcRoutine */,
-- NULL /* ApcContext */,
-- &Ios,
-- puBuf,
-- sizeof(*puBuf) - sizeof(WCHAR),
-- FileBothDirectoryInformation,
-- FALSE /*ReturnSingleEntry*/,
-- &NtFilterStr,
-- FALSE /*RestartScan */);
-- if (NT_SUCCESS(rcNt) && puBuf->Info.NextEntryOffset == 0) /* There shall only be one entry matching... */
-- {
-- uint32_t offName = puBuf->Info.FileNameLength / sizeof(WCHAR);
-- while (offName > 0 && puBuf->Info.FileName[offName - 1] != '\\' && puBuf->Info.FileName[offName - 1] != '/')
-- offName--;
-- uint32_t cwcNameNew = (puBuf->Info.FileNameLength / sizeof(WCHAR)) - offName;
-- uint32_t cwcNameOld = (uint32_t)(pwszFixEnd - pwszFix);
--
-- if (cwcNameOld == cwcNameNew)
-- memcpy(pwszFix, &puBuf->Info.FileName[offName], cwcNameNew * sizeof(WCHAR));
-- else if ( pUniStr->Length + cwcNameNew * sizeof(WCHAR) - cwcNameOld * sizeof(WCHAR) + sizeof(WCHAR)
-- <= pUniStr->MaximumLength)
-- {
-- size_t cwcLeft = pUniStr->Length - (pwszFixEnd - pUniStr->Buffer) * sizeof(WCHAR) + sizeof(WCHAR);
-- memmove(&pwszFix[cwcNameNew], pwszFixEnd, cwcLeft * sizeof(WCHAR));
-- pUniStr->Length -= (USHORT)(cwcNameOld * sizeof(WCHAR));
-- pUniStr->Length += (USHORT)(cwcNameNew * sizeof(WCHAR));
-- pwszFixEnd -= cwcNameOld;
-- pwszFixEnd -= cwcNameNew;
-- memcpy(pwszFix, &puBuf->Info.FileName[offName], cwcNameNew * sizeof(WCHAR));
-- }
-- /* else: ignore overflow. */
-- }
-- /* else: ignore failure. */
--
-- NtClose(hDir);
-- }
--
-- /* Advance */
-- pwszFix = pwszFixEnd;
-- }
--
-- if (puBuf)
-- RTMemFree(puBuf);
--}
--
--
--
--/**
- * Matches two UNICODE_STRING structures in a case sensitive fashion.
- *
- * @returns true if equal, false if not.
-@@ -1314,7 +1148,7 @@ static int supHardNtVpNewImage(PSUPHNTVP
- * path so that we will recognize the DLLs and their location.
- */
- PUNICODE_STRING pLongName = &pImage->Name.UniStr;
-- if (supHardNtVpIsPossible8dot3Path(pLongName->Buffer))
-+ if (RTNtPathFindPossible8dot3Name(pLongName->Buffer))
- {
- AssertCompile(sizeof(pThis->abMemory) > sizeof(pImage->Name));
- PUNICODE_STRING pTmp = (PUNICODE_STRING)pThis->abMemory;
-@@ -1323,7 +1157,7 @@ static int supHardNtVpNewImage(PSUPHNTVP
- pTmp->Buffer = (PRTUTF16)(pTmp + 1);
- memcpy(pTmp->Buffer, pLongName->Buffer, pLongName->Length + sizeof(RTUTF16));
-
-- supHardNtVpFix8dot3Path(pTmp, false /*fPathOnly*/);
-+ RTNtPathExpand8dot3Path(pTmp, false /*fPathOnly*/);
- Assert(pTmp->Buffer[pTmp->Length / sizeof(RTUTF16)] == '\0');
-
- pLongName = pTmp;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
-@@ -1224,10 +1224,13 @@ static NTSTATUS supR3HardenedScreenImage
- return rcNt;
- }
-
-- if (supHardNtVpIsPossible8dot3Path(uBuf.UniStr.Buffer))
-+ if (!RTNtPathFindPossible8dot3Name(uBuf.UniStr.Buffer))
-+ cbNameBuf += sizeof(WCHAR);
-+ else
- {
- uBuf.UniStr.MaximumLength = sizeof(uBuf) - 128;
-- supHardNtVpFix8dot3Path(&uBuf.UniStr, true /*fPathOnly*/);
-+ RTNtPathExpand8dot3Path(&uBuf.UniStr, true /*fPathOnly*/);
-+ cbNameBuf = (uintptr_t)uBuf.UniStr.Buffer + uBuf.UniStr.Length + sizeof(WCHAR) - (uintptr_t)&uBuf.abBuffer[0];
- }
-
- /*
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp
-@@ -18,7 +18,6 @@
-
- #define _WIN32_DCOM
-
--#include <iphlpapi.h>
-
- #include <devguid.h>
- #include <stdio.h>
-@@ -34,7 +33,12 @@
-
- #include <Wbemidl.h>
- #include <comdef.h>
-+
-+#include <winsock2.h>
- #include <Ws2tcpip.h>
-+#include <ws2ipdef.h>
-+#include <netioapi.h>
-+#include <iphlpapi.h>
-
-
- #ifndef Assert /** @todo r=bird: where would this be defined? */
-@@ -56,6 +60,11 @@ static VOID DoLogging(LPCSTR szString, .
-
- #define VBOX_NETCFG_LOCK_TIME_OUT 5000 /** @todo r=bird: What does this do? */
-
-+/*
-+* Forward declaration for using vboxNetCfgWinSetupMetric()
-+*/
-+HRESULT vboxNetCfgWinSetupMetric(IN HKEY hKey);
-+HRESULT vboxNetCfgWinGetInterfaceLUID(IN HKEY hKey, OUT NET_LUID* pLUID);
-
- /*
- * For some weird reason we do not want to use IPRT here, hence the following
-@@ -275,15 +284,45 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWi
- OBO_TOKEN Token;
- ZeroMemory(&Token, sizeof (Token));
- Token.Type = OBO_USER;
-+ INetCfgComponent* pTempComponent = NULL;
-
- hr = pSetup->Install(pszwComponentId, &Token,
- 0, /* IN DWORD dwSetupFlags */
- 0, /* IN DWORD dwUpgradeFromBuildNo */
- NULL, /* IN LPCWSTR pszwAnswerFile */
- NULL, /* IN LPCWSTR pszwAnswerSections */
-- ppComponent);
-+ &pTempComponent);
- if (SUCCEEDED(hr))
- {
-+ if (pTempComponent != NULL)
-+ {
-+ HKEY hkey;
-+ NET_LUID luid;
-+ HRESULT res;
-+
-+ /*
-+ * Set default metric value of interface to fix multicast issue
-+ * See @bugref{6379} for details.
-+ */
-+ res = pTempComponent->OpenParamKey(&hkey);
-+ if(SUCCEEDED(res) && hkey != NULL)
-+ res = vboxNetCfgWinSetupMetric(hkey);
-+ if (FAILED(res))
-+ {
-+ /*
-+ * The setting of Metric is not very important functionality,
-+ * So we will not break installation process due to this error.
-+ */
-+ NonStandardLogFlow(("VBoxNetCfgWinInstallComponent Warning! "
-+ "vboxNetCfgWinSetupMetric failed, default metric "
-+ "for new interface will not be set, hr (0x%x)\n", res));
-+ }
-+ if (ppComponent != NULL)
-+ *ppComponent = pTempComponent;
-+ else
-+ pTempComponent->Release();
-+ }
-+
- /* ignore the apply failure */
- HRESULT tmpHr = pNetCfg->Apply();
- Assert(tmpHr == S_OK);
-@@ -3099,6 +3138,22 @@ static HRESULT vboxNetCfgWinCreateHostOn
- if (ret != ERROR_SUCCESS)
- SetErrBreak(("Querying NetCfgInstanceId failed (0x%08X)", ret));
-
-+ /*
-+ * Set default metric value of interface to fix multicast issue
-+ * See @bugref{6379} for details.
-+ */
-+ HRESULT hSMRes = vboxNetCfgWinSetupMetric(hkey);
-+ if (FAILED(hSMRes))
-+ {
-+ /*
-+ * The setting of Metric is not very important functionality,
-+ * So we will not break installation process due to this error.
-+ */
-+ NonStandardLogFlow(("vboxNetCfgWinCreateHostOnlyNetworkInterface Warning! "
-+ "vboxNetCfgWinSetupMetric failed, default metric "
-+ "for new interface will not be set, hr (0x%x)\n", hSMRes));
-+ }
-+
- #ifndef VBOXNETCFG_DELAYEDRENAME
- /*
- * We need to query the device name after we have succeeded in querying its
-@@ -3300,6 +3355,95 @@ VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWi
- return hrc;
- }
-
-+
-+HRESULT vboxNetCfgWinGetLoopbackMetric(OUT int* Metric)
-+{
-+ HRESULT status = S_OK;
-+ MIB_IPINTERFACE_ROW row;
-+
-+ InitializeIpInterfaceEntry(&row);
-+ row.Family = AF_INET;
-+ row.InterfaceLuid.Info.IfType = IF_TYPE_SOFTWARE_LOOPBACK;
-+
-+ status = GetIpInterfaceEntry(&row);
-+ if (status != 0)
-+ return E_FAIL;
-+
-+ *Metric = row.Metric;
-+
-+ return status;
-+}
-+
-+
-+HRESULT vboxNetCfgWinSetInterfaceMetric(
-+ IN NET_LUID* pInterfaceLuid,
-+ IN DWORD metric)
-+{
-+ MIB_IPINTERFACE_ROW newRow;
-+ InitializeIpInterfaceEntry(&newRow);
-+ // identificate the interface to change
-+ newRow.InterfaceLuid = *pInterfaceLuid;
-+ newRow.Family = AF_INET;
-+ // changed settings
-+ newRow.UseAutomaticMetric = false;
-+ newRow.Metric = metric;
-+
-+ // change settings
-+ return SetIpInterfaceEntry(&newRow);
-+}
-+
-+
-+HRESULT vboxNetCfgWinGetInterfaceLUID(IN HKEY hKey, OUT NET_LUID* pLUID)
-+{
-+ HRESULT res = S_OK;
-+ DWORD luidIndex = 0;
-+ DWORD ifType = 0;
-+ DWORD cbSize = sizeof(luidIndex);
-+ DWORD dwValueType = REG_DWORD;
-+
-+ if (pLUID == NULL)
-+ return E_INVALIDARG;
-+
-+ res = RegQueryValueExW(hKey, L"NetLuidIndex", NULL,
-+ &dwValueType, (LPBYTE)&luidIndex, &cbSize);
-+ if (FAILED(res))
-+ return res;
-+
-+ cbSize = sizeof(ifType);
-+ dwValueType = REG_DWORD;
-+ res = RegQueryValueExW(hKey, L"*IfType", NULL,
-+ &dwValueType, (LPBYTE)&ifType, &cbSize);
-+ if (FAILED(res))
-+ return res;
-+
-+ ZeroMemory(pLUID, sizeof(NET_LUID));
-+ pLUID->Info.IfType = ifType;
-+ pLUID->Info.NetLuidIndex = luidIndex;
-+
-+ return res;
-+}
-+
-+
-+HRESULT vboxNetCfgWinSetupMetric(IN HKEY hKey)
-+{
-+ HRESULT status = S_OK;
-+ NET_LUID luid;
-+ int loopbackMetric;
-+
-+ status = vboxNetCfgWinGetInterfaceLUID(hKey, &luid);
-+ if (FAILED(status))
-+ return status;
-+
-+ status = vboxNetCfgWinGetLoopbackMetric(&loopbackMetric);
-+ if (FAILED(status))
-+ return status;
-+
-+ status = vboxNetCfgWinSetInterfaceMetric(&luid, loopbackMetric - 1);
-+
-+ return status;
-+}
-+
-+
- #ifdef VBOXNETCFG_DELAYEDRENAME
- VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRenameHostOnlyConnection(IN const GUID *pGuid, IN LPCWSTR pwszId, OUT BSTR *pDevName)
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp
-@@ -15,9 +15,29 @@
- */
- #define LOG_GROUP LOG_GROUP_NET_FLT_DRV
-
-+/*
-+ * If VBOXNETLWF_SYNC_SEND is defined we won't allocate data buffers, but use
-+ * the original buffers coming from IntNet to build MDLs around them. This
-+ * also means that we need to wait for send operation to complete before
-+ * returning the buffers, which hinders performance way too much.
-+ */
- //#define VBOXNETLWF_SYNC_SEND
--/* Payload + Ethernet header + VLAN tag = Max Ethernet frame size */
--#define VBOXNETLWF_MAX_FRAME_SIZE(mtu) (mtu + sizeof(RTNETETHERHDR) + 4)
-+
-+/*
-+ * If VBOXNETLWF_FIXED_SIZE_POOLS is defined we pre-allocate data buffers of
-+ * fixed size in five pools. Each pool uses different size to accomodate packets
-+ * of various sizes. We allocate these buffers once and re-use them when send
-+ * operation is complete.
-+ * If VBOXNETLWF_FIXED_SIZE_POOLS is not defined we allocate data buffers before
-+ * each send operation and free then upon completion.
-+ */
-+#define VBOXNETLWF_FIXED_SIZE_POOLS
-+
-+/*
-+ * Don't ask me why it is 42. Empirically this is what goes down the stack.
-+ * OTOH, as we know from trustworthy sources, 42 is the answer, so be it.
-+ */
-+#define VBOXNETLWF_MAX_FRAME_SIZE(mtu) (mtu + 42)
-
- #include <VBox/version.h>
- #include <VBox/err.h>
-@@ -165,11 +185,19 @@ static VBOXNETFLTGLOBALS g_VBoxNetFltGlo
- /* win-specific global data */
- VBOXNETLWFGLOBALS g_VBoxNetLwfGlobals;
-
-+#ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+static ULONG g_cbPool[] = { 576+56, 1556, 4096+56, 6192+56, 9056 };
-+#endif /* VBOXNETLWF_FIXED_SIZE_POOLS */
-+
- typedef struct _VBOXNETLWF_MODULE {
- RTLISTNODE node;
-
- NDIS_HANDLE hFilter;
-+#ifndef VBOXNETLWF_FIXED_SIZE_POOLS
- NDIS_HANDLE hPool;
-+#else /* VBOXNETLWF_FIXED_SIZE_POOLS */
-+ NDIS_HANDLE hPool[RT_ELEMENTS(g_cbPool)];
-+#endif /* VBOXNETLWF_FIXED_SIZE_POOLS */
- PVBOXNETLWFGLOBALS pGlobals;
- /** Associated instance of NetFlt, one-to-one relationship */
- PVBOXNETFLTINS pNetFlt; /// @todo Consider automic access!
-@@ -192,8 +220,6 @@ typedef struct _VBOXNETLWF_MODULE {
- #endif /* !VBOXNETLWF_SYNC_SEND */
- /** MAC address of underlying adapter */
- RTMAC MacAddr;
-- /** Saved MTU size */
-- ULONG uMtuSize;
- /** Saved offload configuration */
- NDIS_OFFLOAD SavedOffloadConfig;
- /** the cloned request we have passed down */
-@@ -461,11 +487,176 @@ static const char *vboxNetLwfWinStateToT
- return "invalid";
- }
-
-+static void vboxNetLwfWinDumpPackets(const char *pszMsg, PNET_BUFFER_LIST pBufLists)
-+{
-+ for (PNET_BUFFER_LIST pList = pBufLists; pList; pList = NET_BUFFER_LIST_NEXT_NBL(pList))
-+ {
-+ for (PNET_BUFFER pBuf = NET_BUFFER_LIST_FIRST_NB(pList); pBuf; pBuf = NET_BUFFER_NEXT_NB(pBuf))
-+ {
-+ Log6(("%s packet: cb=%d offset=%d", pszMsg, NET_BUFFER_DATA_LENGTH(pBuf), NET_BUFFER_DATA_OFFSET(pBuf)));
-+ for (PMDL pMdl = NET_BUFFER_FIRST_MDL(pBuf);
-+ pMdl != NULL;
-+ pMdl = NDIS_MDL_LINKAGE(pMdl))
-+ {
-+ Log6((" MDL: cb=%d", MmGetMdlByteCount(pMdl)));
-+ }
-+ Log6(("\n"));
-+ }
-+ }
-+}
-+
-+DECLINLINE(const char *) vboxNetLwfWinEthTypeStr(uint16_t uType)
-+{
-+ switch (uType)
-+ {
-+ case RTNET_ETHERTYPE_IPV4: return "IP";
-+ case RTNET_ETHERTYPE_IPV6: return "IPv6";
-+ case RTNET_ETHERTYPE_ARP: return "ARP";
-+ }
-+ return "unknown";
-+}
-+
-+#define VBOXNETLWF_PKTDMPSIZE 0x50
-+
-+/**
-+ * Dump a packet to debug log.
-+ *
-+ * @param cpPacket The packet.
-+ * @param cb The size of the packet.
-+ * @param cszText A string denoting direction of packet transfer.
-+ */
-+DECLINLINE(void) vboxNetLwfWinDumpPacket(PCINTNETSG pSG, const char *cszText)
-+{
-+ uint8_t bPacket[VBOXNETLWF_PKTDMPSIZE];
-+
-+ uint32_t cb = pSG->cbTotal < VBOXNETLWF_PKTDMPSIZE ? pSG->cbTotal : VBOXNETLWF_PKTDMPSIZE;
-+ IntNetSgReadEx(pSG, 0, cb, bPacket);
-+
-+ AssertReturnVoid(cb >= 14);
-+
-+ uint8_t *pHdr = bPacket;
-+ uint8_t *pEnd = bPacket + cb;
-+ AssertReturnVoid(pEnd - pHdr >= 14);
-+ uint16_t uEthType = RT_N2H_U16(*(uint16_t*)(pHdr+12));
-+ Log2(("NetLWF: %s (%d bytes), %RTmac => %RTmac, EthType=%s(0x%x)\n",
-+ cszText, pSG->cbTotal, pHdr+6, pHdr, vboxNetLwfWinEthTypeStr(uEthType), uEthType));
-+ pHdr += sizeof(RTNETETHERHDR);
-+ if (uEthType == RTNET_ETHERTYPE_VLAN)
-+ {
-+ AssertReturnVoid(pEnd - pHdr >= 4);
-+ uEthType = RT_N2H_U16(*(uint16_t*)(pHdr+2));
-+ Log2((" + VLAN: id=%d EthType=%s(0x%x)\n", RT_N2H_U16(*(uint16_t*)(pHdr)) & 0xFFF,
-+ vboxNetLwfWinEthTypeStr(uEthType), uEthType));
-+ pHdr += 2 * sizeof(uint16_t);
-+ }
-+ uint8_t uProto = 0xFF;
-+ switch (uEthType)
-+ {
-+ case RTNET_ETHERTYPE_IPV6:
-+ AssertReturnVoid(pEnd - pHdr >= 40);
-+ uProto = pHdr[6];
-+ Log2((" + IPv6: %RTnaipv6 => %RTnaipv6\n", pHdr+8, pHdr+24));
-+ pHdr += 40;
-+ break;
-+ case RTNET_ETHERTYPE_IPV4:
-+ AssertReturnVoid(pEnd - pHdr >= 20);
-+ uProto = pHdr[9];
-+ Log2((" + IP: %RTnaipv4 => %RTnaipv4\n", *(uint32_t*)(pHdr+12), *(uint32_t*)(pHdr+16)));
-+ pHdr += (pHdr[0] & 0xF) * 4;
-+ break;
-+ case RTNET_ETHERTYPE_ARP:
-+ AssertReturnVoid(pEnd - pHdr >= 28);
-+ AssertReturnVoid(RT_N2H_U16(*(uint16_t*)(pHdr+2)) == RTNET_ETHERTYPE_IPV4);
-+ switch (RT_N2H_U16(*(uint16_t*)(pHdr+6)))
-+ {
-+ case 1: /* ARP request */
-+ Log2((" + ARP-REQ: who-has %RTnaipv4 tell %RTnaipv4\n",
-+ *(uint32_t*)(pHdr+24), *(uint32_t*)(pHdr+14)));
-+ break;
-+ case 2: /* ARP reply */
-+ Log2((" + ARP-RPL: %RTnaipv4 is-at %RTmac\n",
-+ *(uint32_t*)(pHdr+14), pHdr+8));
-+ break;
-+ default:
-+ Log2((" + ARP: unknown op %d\n", RT_N2H_U16(*(uint16_t*)(pHdr+6))));
-+ break;
-+ }
-+ break;
-+ /* There is no default case as uProto is initialized with 0xFF */
-+ }
-+ while (uProto != 0xFF)
-+ {
-+ switch (uProto)
-+ {
-+ case 0: /* IPv6 Hop-by-Hop option*/
-+ case 60: /* IPv6 Destination option*/
-+ case 43: /* IPv6 Routing option */
-+ case 44: /* IPv6 Fragment option */
-+ Log2((" + IPv6 option (%d): <not implemented>\n", uProto));
-+ uProto = pHdr[0];
-+ pHdr += pHdr[1] * 8 + 8; /* Skip to the next extension/protocol */
-+ break;
-+ case 51: /* IPv6 IPsec AH */
-+ Log2((" + IPv6 IPsec AH: <not implemented>\n"));
-+ uProto = pHdr[0];
-+ pHdr += (pHdr[1] + 2) * 4; /* Skip to the next extension/protocol */
-+ break;
-+ case 50: /* IPv6 IPsec ESP */
-+ /* Cannot decode IPsec, fall through */
-+ Log2((" + IPv6 IPsec ESP: <not implemented>\n"));
-+ uProto = 0xFF;
-+ break;
-+ case 59: /* No Next Header */
-+ Log2((" + IPv6 No Next Header\n"));
-+ uProto = 0xFF;
-+ break;
-+ case 58: /* IPv6-ICMP */
-+ switch (pHdr[0])
-+ {
-+ case 1: Log2((" + IPv6-ICMP: destination unreachable, code %d\n", pHdr[1])); break;
-+ case 128: Log2((" + IPv6-ICMP: echo request\n")); break;
-+ case 129: Log2((" + IPv6-ICMP: echo reply\n")); break;
-+ default: Log2((" + IPv6-ICMP: unknown type %d, code %d\n", pHdr[0], pHdr[1])); break;
-+ }
-+ uProto = 0xFF;
-+ break;
-+ case 1: /* ICMP */
-+ switch (pHdr[0])
-+ {
-+ case 0: Log2((" + ICMP: echo reply\n")); break;
-+ case 8: Log2((" + ICMP: echo request\n")); break;
-+ case 3: Log2((" + ICMP: destination unreachable, code %d\n", pHdr[1])); break;
-+ default: Log2((" + ICMP: unknown type %d, code %d\n", pHdr[0], pHdr[1])); break;
-+ }
-+ uProto = 0xFF;
-+ break;
-+ case 6: /* TCP */
-+ Log2((" + TCP: src=%d dst=%d seq=%x ack=%x\n",
-+ RT_N2H_U16(*(uint16_t*)(pHdr)), RT_N2H_U16(*(uint16_t*)(pHdr+2)),
-+ RT_N2H_U32(*(uint32_t*)(pHdr+4)), RT_N2H_U32(*(uint32_t*)(pHdr+8))));
-+ uProto = 0xFF;
-+ break;
-+ case 17: /* UDP */
-+ Log2((" + UDP: src=%d dst=%d\n",
-+ RT_N2H_U16(*(uint16_t*)(pHdr)), RT_N2H_U16(*(uint16_t*)(pHdr+2))));
-+ uProto = 0xFF;
-+ break;
-+ default:
-+ Log2((" + Unknown: proto=0x%x\n", uProto));
-+ uProto = 0xFF;
-+ break;
-+ }
-+ }
-+ Log3(("%.*Rhxd\n", cb, bPacket));
-+}
-+
- #else /* !DEBUG */
- #define vboxNetLwfWinDumpFilterTypes(uFlags)
- #define vboxNetLwfWinDumpOffloadSettings(p)
- #define vboxNetLwfWinDumpSetOffloadSettings(p)
--#endif /* DEBUG */
-+#define vboxNetLwfWinDumpPackets(m,l)
-+#define vboxNetLwfWinDumpPacket(p,t)
-+#endif /* !DEBUG */
-
- DECLINLINE(bool) vboxNetLwfWinChangeState(PVBOXNETLWF_MODULE pModuleCtx, uint32_t enmNew, uint32_t enmOld = LwfState_32BitHack)
- {
-@@ -833,6 +1024,20 @@ static void vboxNetLwfWinUpdateSavedOffl
- pModuleCtx->fOffloadConfigValid = true;
- }
-
-+#ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+static void vboxNetLwfWinFreePools(PVBOXNETLWF_MODULE pModuleCtx, int cPools)
-+{
-+ for (int i = 0; i < cPools; ++i)
-+ {
-+ if (pModuleCtx->hPool[i])
-+ {
-+ NdisFreeNetBufferListPool(pModuleCtx->hPool[i]);
-+ Log4(("vboxNetLwfWinAttach: freeed NBL+NB pool 0x%p\n", pModuleCtx->hPool[i]));
-+ }
-+ }
-+}
-+#endif /* VBOXNETLWF_FIXED_SIZE_POOLS */
-+
- static NDIS_STATUS vboxNetLwfWinAttach(IN NDIS_HANDLE hFilter, IN NDIS_HANDLE hDriverCtx,
- IN PNDIS_FILTER_ATTACH_PARAMETERS pParameters)
- {
-@@ -905,6 +1110,54 @@ static NDIS_STATUS vboxNetLwfWinAttach(I
- pModuleCtx->cPendingBuffers = 0;
- #endif /* !VBOXNETLWF_SYNC_SEND */
-
-+#ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+ for (int i = 0; i < RT_ELEMENTS(g_cbPool); ++i)
-+ {
-+ /* Allocate buffer pools */
-+ NET_BUFFER_LIST_POOL_PARAMETERS PoolParams;
-+ NdisZeroMemory(&PoolParams, sizeof(PoolParams));
-+ PoolParams.Header.Type = NDIS_OBJECT_TYPE_DEFAULT;
-+ PoolParams.Header.Revision = NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1;
-+ PoolParams.Header.Size = sizeof(PoolParams);
-+ PoolParams.ProtocolId = NDIS_PROTOCOL_ID_DEFAULT;
-+ PoolParams.fAllocateNetBuffer = TRUE;
-+ PoolParams.ContextSize = 0; /** @todo Do we need to consider underlying drivers? I think not. */
-+ PoolParams.PoolTag = VBOXNETLWF_MEM_TAG;
-+ PoolParams.DataSize = g_cbPool[i];
-+ pModuleCtx->hPool[i] = NdisAllocateNetBufferListPool(hFilter, &PoolParams);
-+ if (!pModuleCtx->hPool[i])
-+ {
-+ Log(("ERROR! vboxNetLwfWinAttach: NdisAllocateNetBufferListPool failed\n"));
-+ vboxNetLwfWinFreePools(pModuleCtx, i);
-+ NdisFreeIoWorkItem(pModuleCtx->hWorkItem);
-+ NdisFreeMemory(pModuleCtx, 0, 0);
-+ return NDIS_STATUS_RESOURCES;
-+ }
-+ Log4(("vboxNetLwfWinAttach: allocated NBL+NB pool (data size=%u) 0x%p\n",
-+ PoolParams.DataSize, pModuleCtx->hPool[i]));
-+ }
-+#else /* !VBOXNETLWF_FIXED_SIZE_POOLS */
-+ /* Allocate buffer pools */
-+ NET_BUFFER_LIST_POOL_PARAMETERS PoolParams;
-+ NdisZeroMemory(&PoolParams, sizeof(PoolParams));
-+ PoolParams.Header.Type = NDIS_OBJECT_TYPE_DEFAULT;
-+ PoolParams.Header.Revision = NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1;
-+ PoolParams.Header.Size = sizeof(PoolParams);
-+ PoolParams.ProtocolId = NDIS_PROTOCOL_ID_DEFAULT;
-+ PoolParams.fAllocateNetBuffer = TRUE;
-+ PoolParams.ContextSize = 0; /** @todo Do we need to consider underlying drivers? I think not. */
-+ PoolParams.PoolTag = VBOXNETLWF_MEM_TAG;
-+ pModuleCtx->hPool = NdisAllocateNetBufferListPool(hFilter, &PoolParams);
-+ if (!pModuleCtx->hPool)
-+ {
-+ Log(("ERROR! vboxNetLwfWinAttach: NdisAllocateNetBufferListPool failed\n"));
-+ NdisFreeIoWorkItem(pModuleCtx->hWorkItem);
-+ NdisFreeMemory(pModuleCtx, 0, 0);
-+ return NDIS_STATUS_RESOURCES;
-+ }
-+ Log4(("vboxNetLwfWinAttach: allocated NBL+NB pool 0x%p\n", pModuleCtx->hPool));
-+#endif /* !VBOXNETLWF_FIXED_SIZE_POOLS */
-+
- NDIS_FILTER_ATTRIBUTES Attributes;
- NdisZeroMemory(&Attributes, sizeof(Attributes));
- Attributes.Header.Revision = NDIS_FILTER_ATTRIBUTES_REVISION_1;
-@@ -915,8 +1168,12 @@ static NDIS_STATUS vboxNetLwfWinAttach(I
- if (Status != NDIS_STATUS_SUCCESS)
- {
- Log(("ERROR! vboxNetLwfWinAttach: NdisFSetAttributes failed with 0x%x\n", Status));
-+#ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+ vboxNetLwfWinFreePools(pModuleCtx, RT_ELEMENTS(g_cbPool));
-+#else /* !VBOXNETLWF_FIXED_SIZE_POOLS */
- NdisFreeNetBufferListPool(pModuleCtx->hPool);
- Log4(("vboxNetLwfWinAttach: freed NBL+NB pool 0x%p\n", pModuleCtx->hPool));
-+#endif /* !VBOXNETLWF_FIXED_SIZE_POOLS */
- NdisFreeIoWorkItem(pModuleCtx->hWorkItem);
- NdisFreeMemory(pModuleCtx, 0, 0);
- vboxNetLwfLogErrorEvent(IO_ERR_INTERNAL_ERROR, NDIS_STATUS_RESOURCES, 5);
-@@ -966,11 +1223,15 @@ static VOID vboxNetLwfWinDetach(IN NDIS_
- * it does not require us to do anything here since it has already been taken care of
- * by vboxNetLwfWinPause().
- */
-+#ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+ vboxNetLwfWinFreePools(pModuleCtx, RT_ELEMENTS(g_cbPool));
-+#else /* !VBOXNETLWF_FIXED_SIZE_POOLS */
- if (pModuleCtx->hPool)
- {
- NdisFreeNetBufferListPool(pModuleCtx->hPool);
- Log4(("vboxNetLwfWinDetach: freed NBL+NB pool 0x%p\n", pModuleCtx->hPool));
- }
-+#endif /* !VBOXNETLWF_FIXED_SIZE_POOLS */
- NdisFreeIoWorkItem(pModuleCtx->hWorkItem);
- NdisFreeMemory(hModuleCtx, 0, 0);
- Log4(("vboxNetLwfWinDetach: freed module context 0x%p\n", pModuleCtx));
-@@ -1017,223 +1278,13 @@ static NDIS_STATUS vboxNetLwfWinRestart(
- LogFlow(("==>vboxNetLwfWinRestart: module=%p\n", hModuleCtx));
- PVBOXNETLWF_MODULE pModuleCtx = (PVBOXNETLWF_MODULE)hModuleCtx;
- vboxNetLwfWinChangeState(pModuleCtx, LwfState_Restarting, LwfState_Paused);
--
-+ vboxNetLwfWinChangeState(pModuleCtx, LwfState_Running, LwfState_Restarting);
- NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
-- ULONG uNewMtuSize = 1500; /* If we fail to find out MTU, we can always assume 1500. */
-- PNDIS_RESTART_ATTRIBUTES pAttributes = pParameters->RestartAttributes;
-- while (pAttributes && pAttributes->Oid != OID_GEN_MINIPORT_RESTART_ATTRIBUTES)
-- pAttributes = pAttributes->Next;
-- if (pAttributes)
-- {
-- PNDIS_RESTART_GENERAL_ATTRIBUTES pGenAttrs = (PNDIS_RESTART_GENERAL_ATTRIBUTES)pAttributes->Data;
-- uNewMtuSize = pGenAttrs->MtuSize;
-- }
--
-- /* Let's see if MTU has changed. Re-allocate the pool if it has. */
-- if (pModuleCtx->uMtuSize != uNewMtuSize)
-- {
-- pModuleCtx->uMtuSize = uNewMtuSize;
-- if (pModuleCtx->hPool)
-- {
-- /*
-- * Don't need to wait for pending sends to complete since we are already
-- * in paused state. Just free the old pool.
-- */
-- NdisFreeNetBufferListPool(pModuleCtx->hPool);
-- pModuleCtx->hPool = NULL;
-- }
-- }
-- if (!pModuleCtx->hPool)
-- {
-- /* Allocate a new pool. */
-- NET_BUFFER_LIST_POOL_PARAMETERS PoolParams;
-- NdisZeroMemory(&PoolParams, sizeof(PoolParams));
-- PoolParams.Header.Type = NDIS_OBJECT_TYPE_DEFAULT;
-- PoolParams.Header.Revision = NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1;
-- PoolParams.Header.Size = sizeof(PoolParams);
-- PoolParams.ProtocolId = NDIS_PROTOCOL_ID_DEFAULT;
-- PoolParams.fAllocateNetBuffer = TRUE;
-- PoolParams.ContextSize = 0; /** @todo Do we need to consider underlying drivers? I think not. */
-- PoolParams.PoolTag = VBOXNETLWF_MEM_TAG;
--#ifndef VBOXNETLWF_SYNC_SEND
-- PoolParams.DataSize = VBOXNETLWF_MAX_FRAME_SIZE(pModuleCtx->uMtuSize);
--#endif /* !VBOXNETLWF_SYNC_SEND */
--
-- pModuleCtx->hPool = NdisAllocateNetBufferListPool(pModuleCtx->hFilter, &PoolParams);
-- if (!pModuleCtx->hPool)
-- {
-- Log(("ERROR! vboxNetLwfWinRestart: NdisAllocateNetBufferListPool failed\n"));
-- Status = NDIS_STATUS_RESOURCES;
-- }
-- else
-- {
-- Log4(("vboxNetLwfWinRestart: allocated NBL+NB pool 0x%p with MTU=%u\n",
-- pModuleCtx->hPool, pModuleCtx->uMtuSize));
-- }
-- }
--
-- vboxNetLwfWinChangeState(pModuleCtx, Status == NDIS_STATUS_SUCCESS ? LwfState_Running : LwfState_Paused, LwfState_Restarting);
- LogFlow(("<==vboxNetLwfWinRestart: Status = 0x%x\n", Status));
- return Status;
- }
-
-
--static void vboxNetLwfWinDumpPackets(const char *pszMsg, PNET_BUFFER_LIST pBufLists)
--{
-- for (PNET_BUFFER_LIST pList = pBufLists; pList; pList = NET_BUFFER_LIST_NEXT_NBL(pList))
-- {
-- for (PNET_BUFFER pBuf = NET_BUFFER_LIST_FIRST_NB(pList); pBuf; pBuf = NET_BUFFER_NEXT_NB(pBuf))
-- {
-- Log(("%s packet: cb=%d\n", pszMsg, NET_BUFFER_DATA_LENGTH(pBuf)));
-- }
-- }
--}
--
--DECLINLINE(const char *) vboxNetLwfWinEthTypeStr(uint16_t uType)
--{
-- switch (uType)
-- {
-- case RTNET_ETHERTYPE_IPV4: return "IP";
-- case RTNET_ETHERTYPE_IPV6: return "IPv6";
-- case RTNET_ETHERTYPE_ARP: return "ARP";
-- }
-- return "unknown";
--}
--
--#define VBOXNETLWF_PKTDMPSIZE 0x50
--
--/**
-- * Dump a packet to debug log.
-- *
-- * @param cpPacket The packet.
-- * @param cb The size of the packet.
-- * @param cszText A string denoting direction of packet transfer.
-- */
--DECLINLINE(void) vboxNetLwfWinDumpPacket(PCINTNETSG pSG, const char *cszText)
--{
-- uint8_t bPacket[VBOXNETLWF_PKTDMPSIZE];
--
-- uint32_t cb = pSG->cbTotal < VBOXNETLWF_PKTDMPSIZE ? pSG->cbTotal : VBOXNETLWF_PKTDMPSIZE;
-- IntNetSgReadEx(pSG, 0, cb, bPacket);
--
-- AssertReturnVoid(cb >= 14);
--
-- uint8_t *pHdr = bPacket;
-- uint8_t *pEnd = bPacket + cb;
-- AssertReturnVoid(pEnd - pHdr >= 14);
-- uint16_t uEthType = RT_N2H_U16(*(uint16_t*)(pHdr+12));
-- Log2(("NetLWF: %s (%d bytes), %RTmac => %RTmac, EthType=%s(0x%x)\n",
-- cszText, pSG->cbTotal, pHdr+6, pHdr, vboxNetLwfWinEthTypeStr(uEthType), uEthType));
-- pHdr += sizeof(RTNETETHERHDR);
-- if (uEthType == RTNET_ETHERTYPE_VLAN)
-- {
-- AssertReturnVoid(pEnd - pHdr >= 4);
-- uEthType = RT_N2H_U16(*(uint16_t*)(pHdr+2));
-- Log2((" + VLAN: id=%d EthType=%s(0x%x)\n", RT_N2H_U16(*(uint16_t*)(pHdr)) & 0xFFF,
-- vboxNetLwfWinEthTypeStr(uEthType), uEthType));
-- pHdr += 2 * sizeof(uint16_t);
-- }
-- uint8_t uProto = 0xFF;
-- switch (uEthType)
-- {
-- case RTNET_ETHERTYPE_IPV6:
-- AssertReturnVoid(pEnd - pHdr >= 40);
-- uProto = pHdr[6];
-- Log2((" + IPv6: %RTnaipv6 => %RTnaipv6\n", pHdr+8, pHdr+24));
-- pHdr += 40;
-- break;
-- case RTNET_ETHERTYPE_IPV4:
-- AssertReturnVoid(pEnd - pHdr >= 20);
-- uProto = pHdr[9];
-- Log2((" + IP: %RTnaipv4 => %RTnaipv4\n", *(uint32_t*)(pHdr+12), *(uint32_t*)(pHdr+16)));
-- pHdr += (pHdr[0] & 0xF) * 4;
-- break;
-- case RTNET_ETHERTYPE_ARP:
-- AssertReturnVoid(pEnd - pHdr >= 28);
-- AssertReturnVoid(RT_N2H_U16(*(uint16_t*)(pHdr+2)) == RTNET_ETHERTYPE_IPV4);
-- switch (RT_N2H_U16(*(uint16_t*)(pHdr+6)))
-- {
-- case 1: /* ARP request */
-- Log2((" + ARP-REQ: who-has %RTnaipv4 tell %RTnaipv4\n",
-- *(uint32_t*)(pHdr+24), *(uint32_t*)(pHdr+14)));
-- break;
-- case 2: /* ARP reply */
-- Log2((" + ARP-RPL: %RTnaipv4 is-at %RTmac\n",
-- *(uint32_t*)(pHdr+14), pHdr+8));
-- break;
-- default:
-- Log2((" + ARP: unknown op %d\n", RT_N2H_U16(*(uint16_t*)(pHdr+6))));
-- break;
-- }
-- break;
-- /* There is no default case as uProto is initialized with 0xFF */
-- }
-- while (uProto != 0xFF)
-- {
-- switch (uProto)
-- {
-- case 0: /* IPv6 Hop-by-Hop option*/
-- case 60: /* IPv6 Destination option*/
-- case 43: /* IPv6 Routing option */
-- case 44: /* IPv6 Fragment option */
-- Log2((" + IPv6 option (%d): <not implemented>\n", uProto));
-- uProto = pHdr[0];
-- pHdr += pHdr[1] * 8 + 8; /* Skip to the next extension/protocol */
-- break;
-- case 51: /* IPv6 IPsec AH */
-- Log2((" + IPv6 IPsec AH: <not implemented>\n"));
-- uProto = pHdr[0];
-- pHdr += (pHdr[1] + 2) * 4; /* Skip to the next extension/protocol */
-- break;
-- case 50: /* IPv6 IPsec ESP */
-- /* Cannot decode IPsec, fall through */
-- Log2((" + IPv6 IPsec ESP: <not implemented>\n"));
-- uProto = 0xFF;
-- break;
-- case 59: /* No Next Header */
-- Log2((" + IPv6 No Next Header\n"));
-- uProto = 0xFF;
-- break;
-- case 58: /* IPv6-ICMP */
-- switch (pHdr[0])
-- {
-- case 1: Log2((" + IPv6-ICMP: destination unreachable, code %d\n", pHdr[1])); break;
-- case 128: Log2((" + IPv6-ICMP: echo request\n")); break;
-- case 129: Log2((" + IPv6-ICMP: echo reply\n")); break;
-- default: Log2((" + IPv6-ICMP: unknown type %d, code %d\n", pHdr[0], pHdr[1])); break;
-- }
-- uProto = 0xFF;
-- break;
-- case 1: /* ICMP */
-- switch (pHdr[0])
-- {
-- case 0: Log2((" + ICMP: echo reply\n")); break;
-- case 8: Log2((" + ICMP: echo request\n")); break;
-- case 3: Log2((" + ICMP: destination unreachable, code %d\n", pHdr[1])); break;
-- default: Log2((" + ICMP: unknown type %d, code %d\n", pHdr[0], pHdr[1])); break;
-- }
-- uProto = 0xFF;
-- break;
-- case 6: /* TCP */
-- Log2((" + TCP: src=%d dst=%d seq=%x ack=%x\n",
-- RT_N2H_U16(*(uint16_t*)(pHdr)), RT_N2H_U16(*(uint16_t*)(pHdr+2)),
-- RT_N2H_U32(*(uint32_t*)(pHdr+4)), RT_N2H_U32(*(uint32_t*)(pHdr+8))));
-- uProto = 0xFF;
-- break;
-- case 17: /* UDP */
-- Log2((" + UDP: src=%d dst=%d\n",
-- RT_N2H_U16(*(uint16_t*)(pHdr)), RT_N2H_U16(*(uint16_t*)(pHdr+2))));
-- uProto = 0xFF;
-- break;
-- default:
-- Log2((" + Unknown: proto=0x%x\n", uProto));
-- uProto = 0xFF;
-- break;
-- }
-- }
-- Log3(("%.*Rhxd\n", cb, bPacket));
--}
--
- static void vboxNetLwfWinDestroySG(PINTNETSG pSG)
- {
- NdisFreeMemory(pSG, 0, 0);
-@@ -1250,16 +1301,25 @@ DECLINLINE(ULONG) vboxNetLwfWinCalcSegme
-
- DECLINLINE(void) vboxNetLwfWinFreeMdlChain(PMDL pMdl)
- {
--#ifdef VBOXNETLWF_SYNC_SEND
-+#ifndef VBOXNETLWF_FIXED_SIZE_POOLS
- PMDL pMdlNext;
- while (pMdl)
- {
- pMdlNext = pMdl->Next;
-+#ifndef VBOXNETLWF_SYNC_SEND
-+ PUCHAR pDataBuf;
-+ ULONG cb = 0;
-+ NdisQueryMdl(pMdl, &pDataBuf, &cb, NormalPagePriority);
-+#endif /* !VBOXNETLWF_SYNC_SEND */
- NdisFreeMdl(pMdl);
- Log4(("vboxNetLwfWinFreeMdlChain: freed MDL 0x%p\n", pMdl));
-+#ifndef VBOXNETLWF_SYNC_SEND
-+ NdisFreeMemory(pDataBuf, 0, 0);
-+ Log4(("vboxNetLwfWinFreeMdlChain: freed data buffer 0x%p\n", pDataBuf));
-+#endif /* !VBOXNETLWF_SYNC_SEND */
- pMdl = pMdlNext;
- }
--#endif /* VBOXNETLWF_SYNC_SEND */
-+#endif /* VBOXNETLWF_FIXED_SIZE_POOLS */
- }
-
- /** @todo
-@@ -1270,8 +1330,8 @@ DECLINLINE(void) vboxNetLwfWinFreeMdlCha
- static PNET_BUFFER_LIST vboxNetLwfWinSGtoNB(PVBOXNETLWF_MODULE pModule, PINTNETSG pSG)
- {
- AssertReturn(pSG->cSegsUsed >= 1, NULL);
-- LogFlow(("==>vboxNetLwfWinSGtoNB: segments=%d hPool=%p cb=%u max=%u\n", pSG->cSegsUsed,
-- pModule->hPool, pSG->cbTotal, VBOXNETLWF_MAX_FRAME_SIZE(pModule->uMtuSize)));
-+ LogFlow(("==>vboxNetLwfWinSGtoNB: segments=%d hPool=%p cb=%u\n", pSG->cSegsUsed,
-+ pModule->hPool, pSG->cbTotal));
- AssertReturn(pModule->hPool, NULL);
-
- #ifdef VBOXNETLWF_SYNC_SEND
-@@ -1317,11 +1377,29 @@ static PNET_BUFFER_LIST vboxNetLwfWinSGt
- vboxNetLwfWinFreeMdlChain(pMdl);
- }
- #else /* !VBOXNETLWF_SYNC_SEND */
-- AssertReturn(pSG->cbTotal <= VBOXNETLWF_MAX_FRAME_SIZE(pModule->uMtuSize), NULL);
-- PNET_BUFFER_LIST pBufList = NdisAllocateNetBufferList(pModule->hPool,
-+
-+# ifdef VBOXNETLWF_FIXED_SIZE_POOLS
-+ int iPool = 0;
-+ ULONG cbFrame = VBOXNETLWF_MAX_FRAME_SIZE(pSG->cbTotal);
-+ /* Let's find the appropriate pool first */
-+ for (iPool = 0; iPool < RT_ELEMENTS(g_cbPool); ++iPool)
-+ if (cbFrame <= g_cbPool[iPool])
-+ break;
-+ if (iPool >= RT_ELEMENTS(g_cbPool))
-+ {
-+ Log(("ERROR! vboxNetLwfWinSGtoNB: frame is too big (%u > %u), drop it.\n", cbFrame, g_cbPool[RT_ELEMENTS(g_cbPool)-1]));
-+ LogFlow(("<==vboxNetLwfWinSGtoNB: return NULL\n"));
-+ return NULL;
-+ }
-+ PNET_BUFFER_LIST pBufList = NdisAllocateNetBufferList(pModule->hPool[iPool],
- 0 /** @todo ContextSize */,
- 0 /** @todo ContextBackFill */);
-- NET_BUFFER_LIST_NEXT_NBL(pBufList) = NULL; /** @todo Is it even needed? */
-+ if (!pBufList)
-+ {
-+ Log(("ERROR! vboxNetLwfWinSGtoNB: failed to allocate netbuffer (cb=%u) from pool %d\n", cbFrame, iPool));
-+ LogFlow(("<==vboxNetLwfWinSGtoNB: return NULL\n"));
-+ return NULL;
-+ }
- NET_BUFFER *pBuffer = NET_BUFFER_LIST_FIRST_NB(pBufList);
- NDIS_STATUS Status = NdisRetreatNetBufferDataStart(pBuffer, pSG->cbTotal, 0 /** @todo DataBackfill */, NULL);
- if (Status == NDIS_STATUS_SUCCESS)
-@@ -1334,9 +1412,8 @@ static PNET_BUFFER_LIST vboxNetLwfWinSGt
- NdisMoveMemory(pDst, pSG->aSegs[i].pv, pSG->aSegs[i].cb);
- pDst += pSG->aSegs[i].cb;
- }
-- Log4(("vboxNetLwfWinSGtoNB: allocated NBL+NB+MDL+Data 0x%p\n", pBufList));
-+ Log4(("vboxNetLwfWinSGtoNB: allocated NBL+NB 0x%p\n", pBufList));
- pBufList->SourceHandle = pModule->hFilter;
-- /** @todo Do we need to initialize anything else? */
- }
- else
- {
-@@ -1352,6 +1429,54 @@ static PNET_BUFFER_LIST vboxNetLwfWinSGt
- NdisFreeNetBufferList(pBufList);
- pBufList = NULL;
- }
-+# else /* !VBOXNETLWF_FIXED_SIZE_POOLS */
-+ PNET_BUFFER_LIST pBufList = NULL;
-+ ULONG cbMdl = VBOXNETLWF_MAX_FRAME_SIZE(pSG->cbTotal);
-+ ULONG uDataOffset = cbMdl - pSG->cbTotal;
-+ PUCHAR pDataBuf = (PUCHAR)NdisAllocateMemoryWithTagPriority(pModule->hFilter, cbMdl,
-+ VBOXNETLWF_MEM_TAG, NormalPoolPriority);
-+ if (pDataBuf)
-+ {
-+ Log4(("vboxNetLwfWinSGtoNB: allocated data buffer (cb=%u) 0x%p\n", cbMdl, pDataBuf));
-+ PMDL pMdl = NdisAllocateMdl(pModule->hFilter, pDataBuf, cbMdl);
-+ if (!pMdl)
-+ {
-+ NdisFreeMemory(pDataBuf, 0, 0);
-+ Log4(("vboxNetLwfWinSGtoNB: freed data buffer 0x%p\n", pDataBuf));
-+ Log(("ERROR! vboxNetLwfWinSGtoNB: failed to allocate an MDL (cb=%u)\n", cbMdl));
-+ LogFlow(("<==vboxNetLwfWinSGtoNB: return NULL\n"));
-+ return NULL;
-+ }
-+ PUCHAR pDst = pDataBuf + uDataOffset;
-+ for (int i = 0; i < pSG->cSegsUsed; i++)
-+ {
-+ NdisMoveMemory(pDst, pSG->aSegs[i].pv, pSG->aSegs[i].cb);
-+ pDst += pSG->aSegs[i].cb;
-+ }
-+ pBufList = NdisAllocateNetBufferAndNetBufferList(pModule->hPool,
-+ 0 /* ContextSize */,
-+ 0 /* ContextBackFill */,
-+ pMdl,
-+ uDataOffset,
-+ pSG->cbTotal);
-+ if (pBufList)
-+ {
-+ Log4(("vboxNetLwfWinSGtoNB: allocated NBL+NB 0x%p\n", pBufList));
-+ pBufList->SourceHandle = pModule->hFilter;
-+ /** @todo Do we need to initialize anything else? */
-+ }
-+ else
-+ {
-+ Log(("ERROR! vboxNetLwfWinSGtoNB: failed to allocate an NBL+NB\n"));
-+ vboxNetLwfWinFreeMdlChain(pMdl);
-+ }
-+ }
-+ else
-+ {
-+ Log(("ERROR! vboxNetLwfWinSGtoNB: failed to allocate data buffer (size=%u)\n", cbMdl));
-+ }
-+# endif /* !VBOXNETLWF_FIXED_SIZE_POOLS */
-+
- #endif /* !VBOXNETLWF_SYNC_SEND */
- LogFlow(("<==vboxNetLwfWinSGtoNB: return %p\n", pBufList));
- return pBufList;
-@@ -1528,6 +1653,7 @@ VOID vboxNetLwfWinSendNetBufferLists(IN
- size_t cb = 0;
- LogFlow(("==>vboxNetLwfWinSendNetBufferLists: module=%p\n", hModuleCtx));
- PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
-+ vboxNetLwfWinDumpPackets("vboxNetLwfWinSendNetBufferLists: got", pBufLists);
-
- if (!ASMAtomicReadBool(&pModule->fActive))
- {
-@@ -1663,6 +1789,7 @@ VOID vboxNetLwfWinReceiveNetBufferLists(
- /// @todo Do we need loopback handling?
- LogFlow(("==>vboxNetLwfWinReceiveNetBufferLists: module=%p\n", hModuleCtx));
- PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)hModuleCtx;
-+ vboxNetLwfWinDumpPackets("vboxNetLwfWinReceiveNetBufferLists: got", pBufLists);
-
- if (!ASMAtomicReadBool(&pModule->fActive))
- {
-@@ -2172,6 +2299,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS
- PNET_BUFFER_LIST pBufList = vboxNetLwfWinSGtoNB(pModule, pSG);
- if (pBufList)
- {
-+ vboxNetLwfWinDumpPackets("vboxNetFltPortOsXmit: sending down", pBufList);
- #ifdef VBOXNETLWF_SYNC_SEND
- aEvents[nEvents++] = &pModule->EventWire;
- #else /* !VBOXNETLWF_SYNC_SEND */
-@@ -2186,6 +2314,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS
- PNET_BUFFER_LIST pBufList = vboxNetLwfWinSGtoNB(pModule, pSG);
- if (pBufList)
- {
-+ vboxNetLwfWinDumpPackets("vboxNetFltPortOsXmit: sending up", pBufList);
- #ifdef VBOXNETLWF_SYNC_SEND
- aEvents[nEvents++] = &pModule->EventHost;
- #else /* !VBOXNETLWF_SYNC_SEND */
-@@ -2300,9 +2429,9 @@ int vboxNetFltOsConnectIt(PVBOXNETFLTINS
- * debug purposes only!
- * #define VBOXNETLWFWIN_DEBUGIPADDRNOTIF 1
- */
--static void vboxNetLwfWinIpAddrChangeCallback(IN PVOID pvCtx,
-- IN PMIB_UNICASTIPADDRESS_ROW pRow,
-- IN MIB_NOTIFICATION_TYPE enmNotifType)
-+static void __stdcall vboxNetLwfWinIpAddrChangeCallback(IN PVOID pvCtx,
-+ IN PMIB_UNICASTIPADDRESS_ROW pRow,
-+ IN MIB_NOTIFICATION_TYPE enmNotifType)
- {
- PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvCtx;
- PVBOXNETLWF_MODULE pModule = (PVBOXNETLWF_MODULE)pThis->u.s.WinIf.hModuleCtx;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/USBFilter.cpp
-@@ -20,6 +20,7 @@
- * Header Files *
- *********************************************************************************************************************************/
- #include <VBox/usbfilter.h>
-+#include <VBox/usblib.h>
- #include <VBox/err.h>
- #include <VBox/log.h>
- #include <iprt/string.h>
-@@ -1073,8 +1074,10 @@ USBLIB_DECL(int) USBFilterSetFilterType(
- * @param pFilter The filter.
- * @param enmFieldIdx The field index.
- * @param pszString The string to add.
-+ * @param fPurge Purge invalid UTF-8 encoding and control characters
-+ * before setting it.
- */
--static int usbfilterSetString(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszString)
-+static int usbfilterSetString(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszString, bool fPurge)
- {
- /*
- * Validate input.
-@@ -1123,12 +1126,14 @@ static int usbfilterSetString(PUSBFILTER
- pFilter->aFields[enmFieldIdx].u16Value = 0;
- else
- {
-- const size_t cch = strlen(pszString);
-+ size_t cch = strlen(pszString);
- if (pFilter->offCurEnd + cch + 2 > sizeof(pFilter->achStrTab))
- return VERR_BUFFER_OVERFLOW;
-
- pFilter->aFields[enmFieldIdx].u16Value = pFilter->offCurEnd + 1;
- memcpy(&pFilter->achStrTab[pFilter->offCurEnd + 1], pszString, cch + 1);
-+ if (fPurge)
-+ cch = USBLibPurgeEncoding(&pFilter->achStrTab[pFilter->offCurEnd + 1]);
- pFilter->offCurEnd += (uint32_t)cch + 1;
- }
-
-@@ -1153,7 +1158,7 @@ static int usbfilterDeleteAnyStringValue
- int rc = VINF_SUCCESS;
- if ( USBFilterIsMethodUsingStringValue((USBFILTERMATCH)pFilter->aFields[enmFieldIdx].enmMatch)
- && pFilter->aFields[enmFieldIdx].u16Value != 0)
-- rc = usbfilterSetString(pFilter, enmFieldIdx, "");
-+ rc = usbfilterSetString(pFilter, enmFieldIdx, "", false /*fPurge*/);
- else if ((unsigned)enmFieldIdx >= (unsigned)USBFILTERIDX_END)
- rc = VERR_INVALID_PARAMETER;
- return rc;
-@@ -1267,7 +1272,7 @@ USBLIB_DECL(int) USBFilterSetNumExpressi
- {
- /* We could optimize the expression further (stripping spaces, convert numbers),
- but it's more work than what it's worth and it could upset some users. */
-- rc = usbfilterSetString(pFilter, enmFieldIdx, pszExpression);
-+ rc = usbfilterSetString(pFilter, enmFieldIdx, pszExpression, false /*fPurge*/);
- if (RT_SUCCESS(rc))
- pFilter->aFields[enmFieldIdx].enmMatch = fMustBePresent ? USBFILTERMATCH_NUM_EXPRESSION : USBFILTERMATCH_NUM_EXPRESSION_NP;
- else if (rc == VERR_NO_DIGITS)
-@@ -1293,13 +1298,16 @@ USBLIB_DECL(int) USBFilterSetNumExpressi
- * @param pszValue The string value.
- * @param fMustBePresent If set, a non-present field on the device will result in a mismatch.
- * If clear, a non-present field on the device will match.
-+ * @param fPurge Purge invalid UTF-8 encoding and control
-+ * characters before setting it.
- */
--USBLIB_DECL(int) USBFilterSetStringExact(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszValue, bool fMustBePresent)
-+USBLIB_DECL(int) USBFilterSetStringExact(PUSBFILTER pFilter, USBFILTERIDX enmFieldIdx, const char *pszValue,
-+ bool fMustBePresent, bool fPurge)
- {
- int rc = USBFilterIsStringField(enmFieldIdx) ? VINF_SUCCESS : VERR_INVALID_PARAMETER;
- if (RT_SUCCESS(rc))
- {
-- rc = usbfilterSetString(pFilter, enmFieldIdx, pszValue);
-+ rc = usbfilterSetString(pFilter, enmFieldIdx, pszValue, fPurge);
- if (RT_SUCCESS(rc))
- pFilter->aFields[enmFieldIdx].enmMatch = fMustBePresent ? USBFILTERMATCH_STR_EXACT : USBFILTERMATCH_STR_EXACT_NP;
- }
-@@ -1331,7 +1339,7 @@ USBLIB_DECL(int) USBFilterSetStringPatte
- rc = usbfilterValidateStringPattern(pszPattern);
- if (RT_SUCCESS(rc))
- {
-- rc = usbfilterSetString(pFilter, enmFieldIdx, pszPattern);
-+ rc = usbfilterSetString(pFilter, enmFieldIdx, pszPattern, false /*fPurge*/);
- if (RT_SUCCESS(rc))
- pFilter->aFields[enmFieldIdx].enmMatch = fMustBePresent ? USBFILTERMATCH_STR_PATTERN : USBFILTERMATCH_STR_PATTERN_NP;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
-@@ -1065,7 +1065,8 @@ org_virtualbox_VBoxUSBDevice::probe(IOSe
- if (pStr)
- {
- Log2(("VBoxUSBDevice::probe: %d/%s - %s\n", i, s_aProps[i].pszName, pStr->getCStringNoCopy()));
-- int vrc = USBFilterSetStringExact(&Device, s_aProps[i].enmIdx, pStr->getCStringNoCopy(), true);
-+ int vrc = USBFilterSetStringExact(&Device, s_aProps[i].enmIdx, pStr->getCStringNoCopy(),
-+ true /*fMustBePresent*/, true /*fPurge*/);
- if (RT_FAILURE(vrc))
- Log(("VBoxUSBDevice::probe: pObj=%p pStr=%p - %d/%s - rc=%d!\n", pObj, pStr, i, s_aProps[i].pszName, vrc));
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
-@@ -1019,9 +1019,12 @@ int VBoxUSBMonSolarisElectDriver(usb_dev
- USBFilterSetNumExact(&Filter, USBFILTERIDX_DEVICE_PROTOCOL, pDevDesc->bDeviceProtocol, true);
- USBFilterSetNumExact(&Filter, USBFILTERIDX_BUS, 0x0 /* Bus */, true); /* Use 0x0 as userland initFilterFromDevice function in Main: see comment on "SetMustBePresent" below */
- USBFilterSetNumExact(&Filter, USBFILTERIDX_PORT, Port, true);
-- USBFilterSetStringExact(&Filter, USBFILTERIDX_MANUFACTURER_STR, pDevStrings->usb_mfg ? pDevStrings->usb_mfg : "", true);
-- USBFilterSetStringExact(&Filter, USBFILTERIDX_PRODUCT_STR, pDevStrings->usb_product ? pDevStrings->usb_product : "", true);
-- USBFilterSetStringExact(&Filter, USBFILTERIDX_SERIAL_NUMBER_STR, pDevStrings->usb_serialno ? pDevStrings->usb_serialno : "", true);
-+ USBFilterSetStringExact(&Filter, USBFILTERIDX_MANUFACTURER_STR, pDevStrings->usb_mfg ? pDevStrings->usb_mfg : "",
-+ true /*fMustBePresent*/, true /*fPurge*/);
-+ USBFilterSetStringExact(&Filter, USBFILTERIDX_PRODUCT_STR, pDevStrings->usb_product ? pDevStrings->usb_product : "",
-+ true /*fMustBePresent*/, true /*fPurge*/);
-+ USBFilterSetStringExact(&Filter, USBFILTERIDX_SERIAL_NUMBER_STR, pDevStrings->usb_serialno ? pDevStrings->usb_serialno : "",
-+ true /*fMustBePresent*/, true /*fPurge*/);
-
- /* This doesn't work like it should (USBFilterMatch fails on matching field (6) i.e. Bus despite this. Investigate later. */
- USBFilterSetMustBePresent(&Filter, USBFILTERIDX_BUS, false /* fMustBePresent */);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/testcase/tstUSBFilter.cpp
-@@ -102,30 +102,30 @@ int main()
- TST_CHECK_RC(USBFilterSetNumExact(&Flt1, USBFILTERIDX_PORT, 1, false));
- TST_CHECK_RC(USBFilterSetIgnore(&Flt1, USBFILTERIDX_PORT));
- /* strings */
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "foobar", true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "foobar", true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "barbar", true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "vendor", true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "product", true ));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, "serial", true ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "foobar", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "foobar", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString128, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "barbar", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, g_szString64, true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_MANUFACTURER_STR, "vendor", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "product", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_SERIAL_NUMBER_STR, "serial", true, false ));
-
- /* cloning */
- USBFILTER Dev;
-@@ -147,9 +147,9 @@ int main()
- TST_CHECK_RC(USBFilterSetNumExact(&Dev, USBFILTERIDX_DEVICE_PROTOCOL, 0xff, true));
- TST_CHECK_RC(USBFilterSetNumExact(&Dev, USBFILTERIDX_BUS, 1, true));
- TST_CHECK_RC(USBFilterSetNumExact(&Dev, USBFILTERIDX_PORT, 2, true));
-- TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_MANUFACTURER_STR, "vendor", true));
-- TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_PRODUCT_STR, "product", true));
-- TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_SERIAL_NUMBER_STR, "serial", true));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_MANUFACTURER_STR, "vendor", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_PRODUCT_STR, "product", true, false ));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Dev, USBFILTERIDX_SERIAL_NUMBER_STR, "serial", true, false ));
-
- /* do some basic matching tests */
- USBFilterInit(&Flt1, USBFILTERTYPE_CAPTURE);
-@@ -166,9 +166,9 @@ int main()
- TST_CHECK_RC(USBFilterSetNumExact(&Flt1, USBFILTERIDX_BUS, 1, true));
- TST_CHECK_EXPR(USBFilterMatch(&Flt1, &Dev));
-
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "no match", true));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "no match", true, false ));
- TST_CHECK_EXPR(!USBFilterMatch(&Flt1, &Dev));
-- TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "product", true));
-+ TST_CHECK_RC(USBFilterSetStringExact(&Flt1, USBFILTERIDX_PRODUCT_STR, "product", true, false ));
- TST_CHECK_EXPR(USBFilterMatch(&Flt1, &Dev));
-
- /* string patterns */
-@@ -293,34 +293,34 @@ int main()
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-
- AssertCompileMemberSize(USBFILTER, achStrTab, 256);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[0], true ) == VERR_BUFFER_OVERFLOW);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[0], true, false ) == VERR_BUFFER_OVERFLOW);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[1], true ) == VERR_BUFFER_OVERFLOW);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[1], true, false ) == VERR_BUFFER_OVERFLOW);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[2], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[2], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[3], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString256[3], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
- /* 0 + 1 */
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, "", true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, "", true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString256[2], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString256[2], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString256[1], true ) == VERR_BUFFER_OVERFLOW);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString256[1], true, false ) == VERR_BUFFER_OVERFLOW);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
- /* 0 + 2 */
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString128[2], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString128[2], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString128[1], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString128[1], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
- /* 3 */
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString64[0], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_SERIAL_NUMBER_STR, &g_szString64[0], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString64[0], true ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_PRODUCT_STR, &g_szString64[0], true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[4], true ) == VINF_SUCCESS);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[4], true ) == VINF_SUCCESS);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[3], true ) == VERR_BUFFER_OVERFLOW);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[4], true, false ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[4], true, false ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&sOf.Flt, USBFILTERIDX_MANUFACTURER_STR, &g_szString128[3], true, false ) == VERR_BUFFER_OVERFLOW);
- TST_CHECK_EXPR(sOf.u64Pre == UINT64_C(0x1234567887654321)); TST_CHECK_EXPR(sOf.u64Post == UINT64_C(0x1234567887654321));
-
- /*
-@@ -335,9 +335,9 @@ int main()
- TST_CHECK_EXPR(USBFilterSetNumExact(&Dev2, USBFILTERIDX_DEVICE_SUB_CLASS, 0, true) == VINF_SUCCESS);
- TST_CHECK_EXPR(USBFilterSetNumExact(&Dev2, USBFILTERIDX_DEVICE_PROTOCOL, 0, true) == VINF_SUCCESS);
- TST_CHECK_EXPR(USBFilterSetNumExact(&Dev2, USBFILTERIDX_PORT, 0x1, true) == VINF_SUCCESS);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_MANUFACTURER_STR, "Generic", true) == VINF_SUCCESS);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_PRODUCT_STR, "Mass Storage Device", true) == VINF_SUCCESS);
-- TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_MANUFACTURER_STR, "YBU1PPRS", true) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_MANUFACTURER_STR, "Generic", true, false ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_PRODUCT_STR, "Mass Storage Device", true, false ) == VINF_SUCCESS);
-+ TST_CHECK_EXPR(USBFilterSetStringExact(&Dev2, USBFILTERIDX_MANUFACTURER_STR, "YBU1PPRS", true, false ) == VINF_SUCCESS);
- TST_CHECK_EXPR(USBFilterGetNum(&Dev2, USBFILTERIDX_VENDOR_ID) == 0x19b6);
- TST_CHECK_EXPR(USBFilterGetNum(&Dev2, USBFILTERIDX_PRODUCT_ID) == 0x1024);
- TST_CHECK_EXPR(USBFilterGetNum(&Dev2, USBFILTERIDX_DEVICE_REV) == 0x0141);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.cpp
-@@ -14,12 +14,15 @@
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-+
- #define INITGUID
- #include "VBoxUsbTool.h"
- #include <usbbusif.h>
-
- #include <iprt/assert.h>
-+#include <iprt/string.h>
- #include <VBox/log.h>
-+#include <VBox/usblib.h>
-
- #include "../../../win/VBoxDbgLog.h"
-
-@@ -134,15 +137,16 @@ VBOXUSBTOOL_DECL(VOID) VBoxUsbToolString
- pUnicode->Length = pUnicode->MaximumLength = pDr->bLength - RT_OFFSETOF(USB_STRING_DESCRIPTOR, bString);
- }
-
--VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetStringDescriptorA(PDEVICE_OBJECT pDevObj, char *pResult, ULONG cbResult, int iIndex, int LangId, ULONG dwTimeoutMs)
-+VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetStringDescriptor(PDEVICE_OBJECT pDevObj, char *pszResult, ULONG cbResult,
-+ int iIndex, int LangId, ULONG dwTimeoutMs)
- {
- char aBuf[MAXIMUM_USB_STRING_LENGTH];
- AssertCompile(sizeof (aBuf) <= UINT8_MAX);
- UCHAR cbBuf = (UCHAR)sizeof (aBuf);
- PUSB_STRING_DESCRIPTOR pDr = (PUSB_STRING_DESCRIPTOR)&aBuf;
-
-- Assert(pResult);
-- *pResult = 0;
-+ Assert(pszResult);
-+ *pszResult = 0;
-
- memset(pDr, 0, cbBuf);
- pDr->bLength = cbBuf;
-@@ -153,29 +157,18 @@ VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGe
- {
- if (pDr->bLength >= sizeof (USB_STRING_DESCRIPTOR))
- {
-- UNICODE_STRING Unicode;
-- ANSI_STRING Ansi;
-- /* for some reason the string dr sometimes contains a non-null terminated string
-- * although we zeroed up the complete descriptor buffer
-- * this is why RtlInitUnicodeString won't work*/
-- VBoxUsbToolStringDescriptorToUnicodeString(pDr, &Unicode);
-- Ansi.Buffer = pResult;
-- Ansi.Length = 0;
-- Ansi.MaximumLength = (USHORT)cbResult - 1;
-- memset(pResult, 0, cbResult);
-- Status = RtlUnicodeStringToAnsiString(&Ansi, &Unicode, FALSE);
-- Assert(Status == STATUS_SUCCESS);
-- if (NT_SUCCESS(Status))
-+ int rc = RTUtf16ToUtf8Ex(pDr->bString, (pDr->bLength - RT_OFFSETOF(USB_STRING_DESCRIPTOR, bString)) / sizeof(RTUTF16),
-+ &pszResult, cbResult, NULL /*pcch*/);
-+ if (RT_SUCCESS(rc))
- {
-- /* just to make sure the string is null-terminated */
-- Assert(pResult[cbResult-1] == 0);
-+ USBLibPurgeEncoding(pszResult);
- Status = STATUS_SUCCESS;
- }
-+ else
-+ Status = STATUS_UNSUCCESSFUL;
- }
- else
-- {
- Status = STATUS_INVALID_PARAMETER;
-- }
- }
- return Status;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/win/cmn/VBoxUsbTool.h
-@@ -48,7 +48,7 @@ VBOXUSBTOOL_DECL(PURB) VBoxUsbToolUrbRei
- VBOXUSBTOOL_DECL(VOID) VBoxUsbToolUrbFree(PURB pUrb);
- VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolUrbPost(PDEVICE_OBJECT pDevObj, PURB pUrb, ULONG dwTimeoutMs);
- VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetDescriptor(PDEVICE_OBJECT pDevObj, void *pvBuffer, int cbBuffer, int Type, int iIndex, int LangId, ULONG dwTimeoutMs);
--VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetStringDescriptorA(PDEVICE_OBJECT pDevObj, char *pResult, ULONG cbResult, int iIndex, int LangId, ULONG dwTimeoutMs);
-+VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetStringDescriptor(PDEVICE_OBJECT pDevObj, char *pszResult, ULONG cbResult, int iIndex, int LangId, ULONG dwTimeoutMs);
- VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetLangID(PDEVICE_OBJECT pDevObj, int *pLangId, ULONG dwTimeoutMs);
- VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolGetDeviceSpeed(PDEVICE_OBJECT pDevObj, BOOLEAN *pbIsHigh);
- VBOXUSBTOOL_DECL(NTSTATUS) VBoxUsbToolPipeClear(PDEVICE_OBJECT pDevObj, HANDLE hPipe, bool fReset);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
-@@ -437,7 +437,7 @@ static NTSTATUS vboxUsbRtGetDeviceDescri
-
- if (pDr->iSerialNumber
- #ifdef DEBUG
-- || pDr->iProduct || pDr->iManufacturer
-+ || pDr->iProduct || pDr->iManufacturer
- #endif
- )
- {
-@@ -445,7 +445,8 @@ static NTSTATUS vboxUsbRtGetDeviceDescri
- Status = VBoxUsbToolGetLangID(pDevExt->pLowerDO, &langId, RT_INDEFINITE_WAIT);
- if (NT_SUCCESS(Status))
- {
-- Status = VBoxUsbToolGetStringDescriptorA(pDevExt->pLowerDO, pDevExt->Rt.szSerial, sizeof (pDevExt->Rt.szSerial), pDr->iSerialNumber, langId, RT_INDEFINITE_WAIT);
-+ Status = VBoxUsbToolGetStringDescriptor(pDevExt->pLowerDO, pDevExt->Rt.szSerial, sizeof (pDevExt->Rt.szSerial),
-+ pDr->iSerialNumber, langId, RT_INDEFINITE_WAIT);
- }
- else
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
-@@ -130,8 +130,8 @@ int usbLibVuDeviceValidate(PVBOXUSB_DEV
- break;
- }
-
-- if (version.u32Major != USBDRV_MAJOR_VERSION
-- || version.u32Minor < USBDRV_MINOR_VERSION)
-+ if ( version.u32Major != USBDRV_MAJOR_VERSION
-+ || version.u32Minor < USBDRV_MINOR_VERSION)
- {
- AssertMsgFailed(("Invalid version %d:%d vs %d:%d\n", version.u32Major, version.u32Minor, USBDRV_MAJOR_VERSION, USBDRV_MINOR_VERSION));
- break;
-@@ -281,29 +281,6 @@ static int usbLibVuGetDevices(PVBOXUSB_D
- return VINF_SUCCESS;
- }
-
--static void usbLibDevFree(PUSBDEVICE pDevice)
--{
-- RTStrFree((char*)pDevice->pszAddress);
-- RTStrFree((char*)pDevice->pszHubName);
-- if (pDevice->pszManufacturer)
-- RTStrFree((char*)pDevice->pszManufacturer);
-- if (pDevice->pszProduct)
-- RTStrFree((char*)pDevice->pszProduct);
-- if (pDevice->pszSerialNumber)
-- RTStrFree((char*)pDevice->pszSerialNumber);
-- RTMemFree(pDevice);
--}
--
--static void usbLibDevFreeList(PUSBDEVICE pDevice)
--{
-- while (pDevice)
-- {
-- PUSBDEVICE pNext = pDevice->pNext;
-- usbLibDevFree(pDevice);
-- pDevice = pNext;
-- }
--}
--
- static int usbLibDevPopulate(PUSBDEVICE pDev, PUSB_NODE_CONNECTION_INFORMATION_EX pConInfo, ULONG iPort, LPCSTR lpszDrvKeyName, LPCSTR lpszHubName, PVBOXUSB_STRING_DR_ENTRY pDrList)
- {
- pDev->bcdUSB = pConInfo->DeviceDescriptor.bcdUSB;
-@@ -321,45 +298,40 @@ static int usbLibDevPopulate(PUSBDEVICE
- else
- pDev->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
- pDev->enmSpeed = USBDEVICESPEED_UNKNOWN;
-- pDev->pszAddress = RTStrDup(lpszDrvKeyName);
-+ int rc = RTStrAPrintf((char **)&pDev->pszAddress, "%s", lpszDrvKeyName);
-+ if (rc < 0)
-+ return VERR_NO_MEMORY;
- pDev->pszHubName = RTStrDup(lpszHubName);
- pDev->bNumConfigurations = 0;
- pDev->u64SerialHash = 0;
-
- for (; pDrList; pDrList = pDrList->pNext)
- {
-- char ** lppszString = NULL;
-- if (pConInfo->DeviceDescriptor.iManufacturer && pDrList->iDr == pConInfo->DeviceDescriptor.iManufacturer)
-- {
-- lppszString = (char**)&pDev->pszManufacturer;
-- }
-- else if (pConInfo->DeviceDescriptor.iProduct && pDrList->iDr == pConInfo->DeviceDescriptor.iProduct)
-+ char **ppszString = NULL;
-+ if ( pConInfo->DeviceDescriptor.iManufacturer
-+ && pDrList->iDr == pConInfo->DeviceDescriptor.iManufacturer)
-+ ppszString = (char **)&pDev->pszManufacturer;
-+ else if ( pConInfo->DeviceDescriptor.iProduct
-+ && pDrList->iDr == pConInfo->DeviceDescriptor.iProduct)
-+ ppszString = (char **)&pDev->pszProduct;
-+ else if ( pConInfo->DeviceDescriptor.iSerialNumber
-+ && pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber)
-+ ppszString = (char **)&pDev->pszSerialNumber;
-+ if (ppszString)
- {
-- lppszString = (char**)&pDev->pszProduct;
-- }
-- else if (pConInfo->DeviceDescriptor.iSerialNumber && pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber)
-- {
-- lppszString = (char**)&pDev->pszSerialNumber;
-- }
--
-- if (lppszString)
-- {
--/** @todo r=bird: This code is making bad asumptions that strings are sane and
-- * that stuff succeeds:
-- * http://vbox.innotek.de/pipermail/vbox-dev/2011-August/004516.html
-- *
-- * */
-- int rc = RTUtf16ToUtf8((PCRTUTF16)pDrList->StrDr.bString, lppszString);
-- if (RT_FAILURE(rc))
-+ rc = RTUtf16ToUtf8((PCRTUTF16)pDrList->StrDr.bString, ppszString);
-+ if (RT_SUCCESS(rc))
- {
-- AssertMsgFailed(("RTUtf16ToUtf8 failed, rc (%d), resuming\n", rc));
-- continue;
-- }
-+ Assert(*ppszString);
-+ USBLibPurgeEncoding(*ppszString);
-
-- Assert(lppszString);
-- if (pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber)
-+ if (pDrList->iDr == pConInfo->DeviceDescriptor.iSerialNumber)
-+ pDev->u64SerialHash = USBLibHashSerial(*ppszString);
-+ }
-+ else
- {
-- pDev->u64SerialHash = USBLibHashSerial(pDev->pszSerialNumber);
-+ AssertMsgFailed(("RTUtf16ToUtf8 failed, rc (%d), resuming\n", rc));
-+ *ppszString = NULL;
- }
- }
- }
-@@ -809,14 +781,20 @@ static int usbLibDevGetHubPortDevices(HA
- }
-
- PUSBDEVICE pDev = (PUSBDEVICE)RTMemAllocZ(sizeof (*pDev));
-- rc = usbLibDevPopulate(pDev, pConInfo, iPort, lpszName, lpcszHubName, pList);
-- AssertRC(rc);
-- if (RT_SUCCESS(rc))
-+ if (RT_LIKELY(pDev))
- {
-- pDev->pNext = *ppDevs;
-- *ppDevs = pDev;
-- ++*pcDevs;
-+ rc = usbLibDevPopulate(pDev, pConInfo, iPort, lpszName, lpcszHubName, pList);
-+ if (RT_SUCCESS(rc))
-+ {
-+ pDev->pNext = *ppDevs;
-+ *ppDevs = pDev;
-+ ++*pcDevs;
-+ }
-+ else
-+ RTMemFree(pDev);
- }
-+ else
-+ rc = VERR_NO_MEMORY;
-
- if (pCfgDr)
- usbLibDevCfgDrFree(pCfgDr);
-@@ -828,7 +806,7 @@ static int usbLibDevGetHubPortDevices(HA
- if (pList)
- usbLibDevStrDrEntryFreeList(pList);
-
-- return VINF_SUCCESS;
-+ return rc;
- }
-
- static int usbLibDevGetHubDevices(LPCSTR lpszName, PUSBDEVICE *ppDevs, uint32_t *pcDevs)
-@@ -868,6 +846,7 @@ static int usbLibDevGetHubDevices(LPCSTR
-
- for (ULONG i = 1; i <= NodeInfo.u.HubInformation.HubDescriptor.bNumberOfPorts; ++i)
- {
-+ /* Just skip devices for which we failed to create the device structure. */
- usbLibDevGetHubPortDevices(hDev, lpszName, i, ppDevs, pcDevs);
- }
- } while (0);
-@@ -1008,7 +987,7 @@ static int usbLibMonDevicesUpdate(PVBOXU
- else
- {
- /* dbg breakpoint */
-- Assert(0);
-+ AssertFailed();
- }
- #endif
-
-@@ -1259,7 +1238,7 @@ static DWORD WINAPI usbLibMsgThreadProc(
- g_VBoxUsbGlobal.hWnd = NULL;
-
- /*
-- * Register the Window Class and the hitten window create.
-+ * Register the Window Class and create the hidden window.
- */
- WNDCLASS wc;
- wc.style = 0;
-@@ -1465,7 +1444,7 @@ USBLIB_DECL(int) USBLibInit(void)
- /*
- * We're DONE!
- *
-- * Juse ensure that the event is set so the
-+ * Just ensure that the event is set so the
- * first "wait change" request is processed.
- */
- SetEvent(g_VBoxUsbGlobal.hNotifyEvent);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
-@@ -386,9 +386,9 @@ static PVBOXUSBFLTCTX vboxUsbFltDevMatch
- USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_CLASS, pDevice->bClass, true);
- USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_SUB_CLASS, pDevice->bSubClass, true);
- USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_PROTOCOL, pDevice->bProtocol, true);
-- USBFilterSetStringExact(&DevFlt, USBFILTERIDX_MANUFACTURER_STR, pDevice->szMfgName, true);
-- USBFilterSetStringExact(&DevFlt, USBFILTERIDX_PRODUCT_STR, pDevice->szProduct, true);
-- USBFilterSetStringExact(&DevFlt, USBFILTERIDX_SERIAL_NUMBER_STR, pDevice->szSerial, true);
-+ USBFilterSetStringExact(&DevFlt, USBFILTERIDX_MANUFACTURER_STR, pDevice->szMfgName, true /*fMustBePresent*/, true /*fPurge*/);
-+ USBFilterSetStringExact(&DevFlt, USBFILTERIDX_PRODUCT_STR, pDevice->szProduct, true /*fMustBePresent*/, true /*fPurge*/);
-+ USBFilterSetStringExact(&DevFlt, USBFILTERIDX_SERIAL_NUMBER_STR, pDevice->szSerial, true /*fMustBePresent*/, true /*fPurge*/);
-
- /* Run filters on the thing. */
- PVBOXUSBFLTCTX pOwner = VBoxUSBFilterMatchEx(&DevFlt, puId, fRemoveFltIfOneShot, pfFilter, pfIsOneShot);
-@@ -477,7 +477,7 @@ static NTSTATUS vboxUsbFltDevPopulate(PV
-
- if (pDevDr->iSerialNumber)
- {
-- Status = VBoxUsbToolGetStringDescriptorA(pDo, pDevice->szSerial, sizeof (pDevice->szSerial), pDevDr->iSerialNumber, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
-+ Status = VBoxUsbToolGetStringDescriptor(pDo, pDevice->szSerial, sizeof (pDevice->szSerial), pDevDr->iSerialNumber, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
- if (!NT_SUCCESS(Status))
- {
- WARN(("reading serial number failed"));
-@@ -496,7 +496,7 @@ static NTSTATUS vboxUsbFltDevPopulate(PV
-
- if (pDevDr->iManufacturer)
- {
-- Status = VBoxUsbToolGetStringDescriptorA(pDo, pDevice->szMfgName, sizeof (pDevice->szMfgName), pDevDr->iManufacturer, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
-+ Status = VBoxUsbToolGetStringDescriptor(pDo, pDevice->szMfgName, sizeof (pDevice->szMfgName), pDevDr->iManufacturer, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
- if (!NT_SUCCESS(Status))
- {
- WARN(("reading manufacturer name failed"));
-@@ -515,7 +515,7 @@ static NTSTATUS vboxUsbFltDevPopulate(PV
-
- if (pDevDr->iProduct)
- {
-- Status = VBoxUsbToolGetStringDescriptorA(pDo, pDevice->szProduct, sizeof (pDevice->szProduct), pDevDr->iProduct, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
-+ Status = VBoxUsbToolGetStringDescriptor(pDo, pDevice->szProduct, sizeof (pDevice->szProduct), pDevDr->iProduct, langId, VBOXUSBMON_POPULATE_REQUEST_TIMEOUT_MS);
- if (!NT_SUCCESS(Status))
- {
- WARN(("reading product name failed"));
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
-@@ -229,7 +229,7 @@ static HRESULT vboxDrvCfgInfQueryKeyValu
- NonStandardAssert(lpszValue);
- if (!lpszValue)
- {
-- NonStandardLogRelCrap((__FUNCTION__ ": SetCoTaskMemAlloc failed to alloc mem of size (%d), for iValue(%d)\n", cValue * sizeof (lpszValue[0]), dwErr, iValue));
-+ NonStandardLogRelCrap((__FUNCTION__ ": SetCoTaskMemAlloc failed to alloc mem of size (%d), for iValue(%d)\n", cValue * sizeof (lpszValue[0]), iValue));
- return E_FAIL;
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostServices/DragAndDrop/dndmanager.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostServices/DragAndDrop/dndmanager.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -40,125 +40,26 @@
-
- int DnDManager::addMessage(uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool fAppend /* = true */)
- {
-- int rc = VINF_SUCCESS;
--
-- LogFlowFunc(("uMsg=%RU32, cParms=%RU32, fAppend=%RTbool\n", uMsg, cParms, fAppend));
-+ int rc;
-
- try
- {
-- DnDMessage *pMessage = NULL;
--
-- switch (uMsg)
-- {
-- case DragAndDropSvc::HOST_DND_HG_EVT_ENTER:
-- {
-- clear();
-- LogFlowFunc(("HOST_DND_HG_EVT_ENTER\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_EVT_MOVE:
-- {
-- LogFlowFunc(("HOST_DND_HG_EVT_MOVE\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_EVT_LEAVE:
-- {
-- LogFlowFunc(("HOST_DND_HG_EVT_LEAVE\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_EVT_DROPPED:
-- {
-- LogFlowFunc(("HOST_DND_HG_EVT_DROPPED\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_EVT_CANCEL:
-- {
-- LogFlowFunc(("HOST_DND_HG_EVT_CANCEL\n"));
--
-- pMessage = new DnDHGCancelMessage();
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_SND_DATA:
-- {
-- LogFlowFunc(("HOST_DND_HG_SND_DATA\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_SND_DIR:
-- {
-- LogFlowFunc(("HOST_DND_HG_SND_DIR\n"));
-- break;
-- }
--
-- /* New since protocol version 2 (VBox 5.0). */
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR:
-- {
-- LogFlowFunc(("HOST_DND_HG_SND_FILE_HDR\n"));
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA:
-- {
-- LogFlowFunc(("HOST_DND_HG_SND_FILE\n"));
--
-- /* No parameter verification here as, depending on the protocol version
-- * being used, the parameter count + types might change. */
-- break;
-- }
--
--#ifdef VBOX_WITH_DRAG_AND_DROP_GH
-- case DragAndDropSvc::HOST_DND_GH_REQ_PENDING:
-- {
-- LogFlowFunc(("HOST_DND_GH_REQ_PENDING\n"));
--
-- /* Verify parameter count and types. */
-- if ( cParms != 1
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* screen id */)
-- {
-- rc = VERR_INVALID_PARAMETER;
-- }
-- break;
-- }
--
-- case DragAndDropSvc::HOST_DND_GH_EVT_DROPPED:
-- {
-- LogFlowFunc(("HOST_DND_GH_EVT_DROPPED\n"));
--
-- /* Verify parameter count and types. */
-- if ( cParms != 3
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* format */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* format size */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* action */)
-- {
-- rc = VERR_INVALID_PARAMETER;
-- }
-- break;
-- }
--#endif /* VBOX_WITH_DRAG_AND_DROP_GH */
--
-- default:
-- rc = VERR_NOT_IMPLEMENTED;
-- break;
-- }
--
-- if (!pMessage) /* Generic message needed? */
-- pMessage = new DnDGenericMessage(uMsg, cParms, paParms);
-+ LogFlowFunc(("uMsg=%RU32, cParms=%RU32, fAppend=%RTbool\n", uMsg, cParms, fAppend));
-
-+ DnDMessage *pMessage = new DnDGenericMessage(uMsg, cParms, paParms);
- if (fAppend)
- m_dndMessageQueue.append(pMessage);
- else
- m_dndMessageQueue.prepend(pMessage);
-+
-+ rc = VINF_SUCCESS;
- }
- catch(std::bad_alloc &)
- {
- rc = VERR_NO_MEMORY;
- }
-
-+ LogFlowFuncLeaveRC(rc);
- return rc;
- }
-
-@@ -260,6 +161,8 @@ int DnDManager::nextMessage(uint32_t uMs
-
- void DnDManager::clear(void)
- {
-+ LogFlowFuncEnter();
-+
- if (m_pCurMsg)
- {
- delete m_pCurMsg;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostServices/DragAndDrop/service.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostServices/DragAndDrop/service.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -15,40 +15,9 @@
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
--/** @page pg_svc_guest_control Guest Control HGCM Service
-+/** @page pg_svc_guest_control Drag and drop HGCM Service
- *
-- * This service acts as a proxy for handling and buffering host command requests
-- * and clients on the guest. It tries to be as transparent as possible to let
-- * the guest (client) and host side do their protocol handling as desired.
-- *
-- * The following terms are used:
-- * - Host: A host process (e.g. VBoxManage or another tool utilizing the Main API)
-- * which wants to control something on the guest.
-- * - Client: A client (e.g. VBoxService) running inside the guest OS waiting for
-- * new host commands to perform. There can be multiple clients connected
-- * to a service. A client is represented by its HGCM client ID.
-- * - Context ID: An (almost) unique ID automatically generated on the host (Main API)
-- * to not only distinguish clients but individual requests. Because
-- * the host does not know anything about connected clients it needs
-- * an indicator which it can refer to later. This context ID gets
-- * internally bound by the service to a client which actually processes
-- * the command in order to have a relationship between client<->context ID(s).
-- *
-- * The host can trigger commands which get buffered by the service (with full HGCM
-- * parameter info). As soon as a client connects (or is ready to do some new work)
-- * it gets a buffered host command to process it. This command then will be immediately
-- * removed from the command list. If there are ready clients but no new commands to be
-- * processed, these clients will be set into a deferred state (that is being blocked
-- * to return until a new command is available).
-- *
-- * If a client needs to inform the host that something happened, it can send a
-- * message to a low level HGCM callback registered in Main. This callback contains
-- * the actual data as well as the context ID to let the host do the next necessary
-- * steps for this context. This context ID makes it possible to wait for an event
-- * inside the host's Main API function (like starting a process on the guest and
-- * wait for getting its PID returned by the client) as well as cancelling blocking
-- * host calls in order the client terminated/crashed (HGCM detects disconnected
-- * clients and reports it to this service's callback).
-+ * TODO
- */
-
-
-@@ -60,17 +29,62 @@
- #endif
- #define LOG_GROUP LOG_GROUP_GUEST_DND
-
-+#include <algorithm>
-+#include <list>
- #include <map>
-
-+#include <VBox/GuestHost/DragAndDrop.h>
-+#include <VBox/HostServices/Service.h>
-+#include <VBox/HostServices/DragAndDropSvc.h>
-+
- #include "dndmanager.h"
-
-+using namespace DragAndDropSvc;
-
- /*********************************************************************************************************************************
- * Service class declaration *
- *********************************************************************************************************************************/
-
--/** Map holding pointers to HGCM clients. Key is the (unique) HGCM client ID. */
--typedef std::map<uint32_t, HGCM::Client*> DnDClientMap;
-+class DragAndDropClient : public HGCM::Client
-+{
-+public:
-+
-+ DragAndDropClient(uint32_t uClientId, VBOXHGCMCALLHANDLE hHandle = NULL,
-+ uint32_t uMsg = 0, uint32_t cParms = 0, VBOXHGCMSVCPARM aParms[] = NULL)
-+ : HGCM::Client(uClientId, hHandle, uMsg, cParms, aParms)
-+ , m_fDeferred(false)
-+ {
-+ RT_ZERO(m_SvcCtx);
-+ }
-+
-+ virtual ~DragAndDropClient(void)
-+ {
-+ disconnect();
-+ }
-+
-+public:
-+
-+ void complete(VBOXHGCMCALLHANDLE hHandle, int rcOp);
-+ void completeDeferred(int rcOp);
-+ void disconnect(void);
-+ bool isDeferred(void) const { return m_fDeferred; }
-+ void setDeferred(VBOXHGCMCALLHANDLE hHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
-+ void setSvcContext(const HGCM::VBOXHGCMSVCTX &SvcCtx) { m_SvcCtx = SvcCtx; }
-+
-+protected:
-+
-+ /** The HGCM service context this client is bound to. */
-+ HGCM::VBOXHGCMSVCTX m_SvcCtx;
-+ /** Flag indicating whether this client currently is deferred mode,
-+ * meaning that it did not return to the caller yet. */
-+ bool m_fDeferred;
-+};
-+
-+/** Map holding pointers to drag and drop clients. Key is the (unique) HGCM client ID. */
-+typedef std::map<uint32_t, DragAndDropClient*> DnDClientMap;
-+
-+/** Simple queue (list) which holds deferred (waiting) clients. */
-+typedef std::list<uint32_t> DnDClientQueue;
-
- /**
- * Specialized drag & drop service class.
-@@ -93,7 +107,7 @@ protected:
- int hostCall(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
-
- int modeSet(uint32_t u32Mode);
-- inline uint32_t modeGet() { return m_u32Mode; };
-+ inline uint32_t modeGet(void) const { return m_u32Mode; };
-
- protected:
-
-@@ -101,17 +115,103 @@ protected:
-
- protected:
-
-- DnDManager *m_pManager;
-- /** Map of all connected clients. */
-- DnDClientMap m_clientMap;
-+ /** Pointer to our DnD manager instance. */
-+ DnDManager *m_pManager;
-+ /** Map of all connected clients.
-+ * The primary key is the (unique) client ID, the secondary value
-+ * an allocated pointer to the DragAndDropClient class, managed
-+ * by this service class. */
-+ DnDClientMap m_clientMap;
- /** List of all clients which are queued up (deferred return) and ready
-- * to process new commands. */
-- RTCList<HGCM::Client*> m_clientQueue;
-- uint32_t m_u32Mode;
-+ * to process new commands. The key is the (unique) client ID. */
-+ DnDClientQueue m_clientQueue;
-+ /** Current drag and drop mode. */
-+ uint32_t m_u32Mode;
- };
-
-
- /*********************************************************************************************************************************
-+* Client implementation *
-+*********************************************************************************************************************************/
-+
-+/**
-+ * Completes the call by returning the control back to the guest
-+ * side code.
-+ */
-+void DragAndDropClient::complete(VBOXHGCMCALLHANDLE hHandle, int rcOp)
-+{
-+ LogFlowThisFunc(("uClientID=%RU32\n", m_uClientId));
-+
-+ if ( m_SvcCtx.pHelpers
-+ && m_SvcCtx.pHelpers->pfnCallComplete)
-+ {
-+ m_SvcCtx.pHelpers->pfnCallComplete(hHandle, rcOp);
-+ }
-+}
-+
-+/**
-+ * Completes a deferred call by returning the control back to the guest
-+ * side code.
-+ */
-+void DragAndDropClient::completeDeferred(int rcOp)
-+{
-+ AssertMsg(m_fDeferred, ("Client %RU32 is not in deferred mode\n", m_uClientId));
-+ Assert(m_hHandle != NULL);
-+
-+ LogFlowThisFunc(("uClientID=%RU32\n", m_uClientId));
-+
-+ complete(m_hHandle, rcOp);
-+ m_fDeferred = false;
-+}
-+
-+/**
-+ * Called when the HGCM client disconnected on the guest side.
-+ * This function takes care of the client's data cleanup and also lets the host
-+ * know that the client has been disconnected.
-+ *
-+ */
-+void DragAndDropClient::disconnect(void)
-+{
-+ LogFlowThisFunc(("uClient=%RU32\n", m_uClientId));
-+
-+ if (isDeferred())
-+ completeDeferred(VERR_INTERRUPTED);
-+
-+ /*
-+ * Let the host know.
-+ */
-+ VBOXDNDCBDISCONNECTMSGDATA data;
-+ RT_ZERO(data);
-+ /** @todo Magic needed? */
-+ /** @todo Add context ID. */
-+
-+ if (m_SvcCtx.pfnHostCallback)
-+ {
-+ int rc2 = m_SvcCtx.pfnHostCallback(m_SvcCtx.pvHostData, GUEST_DND_DISCONNECT, &data, sizeof(data));
-+ if (RT_FAILURE(rc2))
-+ LogFlowFunc(("Warning: Unable to notify host about client %RU32 disconnect, rc=%Rrc\n", m_uClientId, rc2));
-+ /* Not fatal. */
-+ }
-+}
-+
-+/**
-+ * Set the client's status to deferred, meaning that it does not return to the caller
-+ * on the guest side yet.
-+ */
-+void DragAndDropClient::setDeferred(VBOXHGCMCALLHANDLE hHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
-+{
-+ LogFlowThisFunc(("uClient=%RU32\n", m_uClientId));
-+
-+ AssertMsg(m_fDeferred == false, ("Client already in deferred mode\n"));
-+ m_fDeferred = true;
-+
-+ m_hHandle = hHandle;
-+ m_uMsg = u32Function;
-+ m_cParms = cParms;
-+ m_paParms = paParms;
-+}
-+
-+/*********************************************************************************************************************************
- * Service class implementation *
- *********************************************************************************************************************************/
-
-@@ -143,12 +243,23 @@ int DragAndDropService::init(VBOXHGCMSVC
-
- int DragAndDropService::uninit(void)
- {
-+ LogFlowFuncEnter();
-+
- if (m_pManager)
- {
- delete m_pManager;
- m_pManager = NULL;
- }
-
-+ DnDClientMap::iterator itClient = m_clientMap.begin();
-+ while (itClient != m_clientMap.end())
-+ {
-+ delete itClient->second;
-+ m_clientMap.erase(itClient);
-+ itClient = m_clientMap.begin();
-+ }
-+
-+ LogFlowFuncLeave();
- return VINF_SUCCESS;
- }
-
-@@ -157,7 +268,7 @@ int DragAndDropService::clientConnect(ui
- if (m_clientMap.size() >= UINT8_MAX) /* Don't allow too much clients at the same time. */
- {
- AssertMsgFailed(("Maximum number of clients reached\n"));
-- return VERR_BUFFER_OVERFLOW;
-+ return VERR_MAX_PROCS_REACHED;
- }
-
- int rc = VINF_SUCCESS;
-@@ -172,7 +283,9 @@ int DragAndDropService::clientConnect(ui
- {
- try
- {
-- m_clientMap[u32ClientID] = new HGCM::Client(u32ClientID);
-+ DragAndDropClient *pClient = new DragAndDropClient(u32ClientID);
-+ pClient->setSvcContext(m_SvcCtx);
-+ m_clientMap[u32ClientID] = pClient;
- }
- catch(std::bad_alloc &)
- {
-@@ -204,20 +317,7 @@ int DragAndDropService::clientDisconnect
- /*
- * Remove from waiters queue.
- */
-- for (size_t i = 0; i < m_clientQueue.size(); i++)
-- {
-- HGCM::Client *pClient = m_clientQueue.at(i);
-- if (pClient->clientId() == u32ClientID)
-- {
-- if (m_pHelpers)
-- m_pHelpers->pfnCallComplete(pClient->handle(), VERR_INTERRUPTED);
--
-- m_clientQueue.removeAt(i);
-- delete pClient;
--
-- break;
-- }
-- }
-+ m_clientQueue.remove(u32ClientID);
-
- /*
- * Remove from client map and deallocate.
-@@ -233,7 +333,15 @@ int DragAndDropService::clientDisconnect
-
- int DragAndDropService::modeSet(uint32_t u32Mode)
- {
-- /** @todo Validate mode. */
-+#ifndef VBOX_WITH_DRAG_AND_DROP_GH
-+ if ( u32Mode == VBOX_DRAG_AND_DROP_MODE_GUEST_TO_HOST
-+ || u32Mode == VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL)
-+ {
-+ m_u32Mode = VBOX_DRAG_AND_DROP_MODE_OFF;
-+ return VERR_NOT_SUPPORTED;
-+ }
-+#endif
-+
- switch (u32Mode)
- {
- case VBOX_DRAG_AND_DROP_MODE_OFF:
-@@ -262,7 +370,7 @@ void DragAndDropService::guestCall(VBOXH
- int rc = VERR_ACCESS_DENIED; /* Play safe. */
- switch (u32Function)
- {
-- case DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG:
-+ case GUEST_DND_GET_NEXT_HOST_MSG:
- {
- if (modeGet() != VBOX_DRAG_AND_DROP_MODE_OFF)
- {
-@@ -276,8 +384,8 @@ void DragAndDropService::guestCall(VBOXH
- break;
- }
-
-- /* Note: New since protocol version 2. */
-- case DragAndDropSvc::GUEST_DND_CONNECT:
-+ /* New since protocol v2. */
-+ case GUEST_DND_CONNECT:
- {
- /*
- * Never block the initial connect call, as the clients do this when
-@@ -287,11 +395,11 @@ void DragAndDropService::guestCall(VBOXH
- rc = VINF_SUCCESS;
- break;
- }
-- case DragAndDropSvc::GUEST_DND_HG_ACK_OP:
-+ case GUEST_DND_HG_ACK_OP:
- /* Fall through is intentional. */
-- case DragAndDropSvc::GUEST_DND_HG_REQ_DATA:
-+ case GUEST_DND_HG_REQ_DATA:
- /* Fall through is intentional. */
-- case DragAndDropSvc::GUEST_DND_HG_EVT_PROGRESS:
-+ case GUEST_DND_HG_EVT_PROGRESS:
- {
- if ( modeGet() == VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL
- || modeGet() == VBOX_DRAG_AND_DROP_MODE_HOST_TO_GUEST)
-@@ -303,12 +411,13 @@ void DragAndDropService::guestCall(VBOXH
- break;
- }
-
-- case DragAndDropSvc::GUEST_DND_GH_ACK_PENDING:
-- case DragAndDropSvc::GUEST_DND_GH_SND_DATA:
-- case DragAndDropSvc::GUEST_DND_GH_SND_DIR:
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR:
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA:
-- case DragAndDropSvc::GUEST_DND_GH_EVT_ERROR:
-+ case GUEST_DND_GH_ACK_PENDING:
-+ case GUEST_DND_GH_SND_DATA_HDR:
-+ case GUEST_DND_GH_SND_DATA:
-+ case GUEST_DND_GH_SND_DIR:
-+ case GUEST_DND_GH_SND_FILE_HDR:
-+ case GUEST_DND_GH_SND_FILE_DATA:
-+ case GUEST_DND_GH_EVT_ERROR:
- {
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
- if ( modeGet() == VBOX_DRAG_AND_DROP_MODE_BIDIRECTIONAL
-@@ -332,20 +441,35 @@ void DragAndDropService::guestCall(VBOXH
- LogFlowFunc(("Mode (%RU32) check rc=%Rrc\n", modeGet(), rc));
- #endif
-
--#define DO_HOST_CALLBACK(); \
-- if ( RT_SUCCESS(rc) \
-- && m_pfnHostCallback) \
-- { \
-- rc = m_pfnHostCallback(m_pvHostData, u32Function, &data, sizeof(data)); \
-+#define DO_HOST_CALLBACK(); \
-+ if ( RT_SUCCESS(rc) \
-+ && m_SvcCtx.pfnHostCallback) \
-+ { \
-+ rc = m_SvcCtx.pfnHostCallback(m_SvcCtx.pvHostData, u32Function, &data, sizeof(data)); \
-+ }
-+
-+ /*
-+ * Lookup client.
-+ */
-+ DragAndDropClient *pClient = NULL;
-+
-+ DnDClientMap::iterator itClient = m_clientMap.find(u32ClientID);
-+ if (itClient != m_clientMap.end())
-+ {
-+ pClient = itClient->second;
-+ AssertPtr(pClient);
-+ }
-+ else
-+ {
-+ LogFunc(("Client %RU32 was not found\n", u32ClientID));
-+ rc = VERR_NOT_FOUND;
- }
-
- if (rc == VINF_SUCCESS) /* Note: rc might be VINF_HGCM_ASYNC_EXECUTE! */
- {
-- DnDClientMap::iterator itClient = m_clientMap.find(u32ClientID);
-- Assert(itClient != m_clientMap.end());
-+ LogFlowFunc(("Client %RU32: Protocol v%RU32\n", pClient->clientId(), pClient->protocol()));
-
-- HGCM::Client *pClient = itClient->second;
-- AssertPtr(pClient);
-+ rc = VERR_INVALID_PARAMETER; /* Play safe. */
-
- switch (u32Function)
- {
-@@ -356,26 +480,20 @@ void DragAndDropService::guestCall(VBOXH
- * VERR_INVALID_PARAMETER when the guest wanted to actually
- * handle HOST_DND_GH_REQ_PENDING.
- */
-- case DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG:
-+ case GUEST_DND_GET_NEXT_HOST_MSG:
- {
- LogFlowFunc(("GUEST_DND_GET_NEXT_HOST_MSG\n"));
-- if ( cParms != 3
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* message */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* parameter count */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* blocking */)
-- {
-- rc = VERR_INVALID_PARAMETER;
-- }
-- else
-+ if (cParms == 3)
- {
- rc = m_pManager->nextMessageInfo(&paParms[0].u.uint32 /* uMsg */, &paParms[1].u.uint32 /* cParms */);
- if (RT_FAILURE(rc)) /* No queued messages available? */
- {
-- if (m_pfnHostCallback) /* Try asking the host. */
-+ if (m_SvcCtx.pfnHostCallback) /* Try asking the host. */
- {
-- DragAndDropSvc::VBOXDNDCBHGGETNEXTHOSTMSG data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG;
-- rc = m_pfnHostCallback(m_pvHostData, u32Function, &data, sizeof(data));
-+ VBOXDNDCBHGGETNEXTHOSTMSG data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG;
-+ rc = m_SvcCtx.pfnHostCallback(m_SvcCtx.pvHostData, u32Function, &data, sizeof(data));
- if (RT_SUCCESS(rc))
- {
- paParms[0].u.uint32 = data.uMsg; /* uMsg */
-@@ -392,11 +510,16 @@ void DragAndDropService::guestCall(VBOXH
- /* Some error occurred or no (new) messages available? */
- if (RT_FAILURE(rc))
- {
-- if (paParms[2].u.uint32) /* Blocking flag set? */
-+ uint32_t fFlags = 0;
-+ int rc2 = paParms[2].getUInt32(&fFlags);
-+ if ( RT_SUCCESS(rc2)
-+ && fFlags) /* Blocking flag set? */
- {
- /* Defer client returning. */
- rc = VINF_HGCM_ASYNC_EXECUTE;
- }
-+ else
-+ rc = VERR_INVALID_PARAMETER;
-
- LogFlowFunc(("Message queue is empty, returning %Rrc to guest\n", rc));
- }
-@@ -404,163 +527,330 @@ void DragAndDropService::guestCall(VBOXH
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_CONNECT:
-+ case GUEST_DND_CONNECT:
- {
- LogFlowFunc(("GUEST_DND_CONNECT\n"));
-- if ( cParms != 2
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* protocol version */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* additional connection flags */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+ if (cParms >= 2)
- {
-- uint32_t uProtocol;
-- rc = paParms[0].getUInt32(&uProtocol); /* Get protocol version. */
-+ const uint8_t idxProto = cParms >= 3 ? 1 : 0;
-+
-+ VBOXDNDCBCONNECTMSGDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_CONNECT;
-+ if (cParms >= 3)
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ else /* Older protocols don't have a context ID. */
-+ rc = VINF_SUCCESS;
- if (RT_SUCCESS(rc))
-- rc = pClient->setProtocol(uProtocol);
-+ rc = paParms[idxProto].getUInt32(&data.uProtocol);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[idxProto + 1].getUInt32(&data.uFlags);
-+ if (RT_SUCCESS(rc))
-+ rc = pClient->setProtocol(data.uProtocol);
- if (RT_SUCCESS(rc))
- {
-- /** @todo Handle connection flags (paParms[1]). */
-+ LogFlowFunc(("Client %RU32 is now using protocol v%RU32\n", pClient->clientId(), pClient->protocol()));
-+ DO_HOST_CALLBACK();
- }
--
-- /* Note: Does not reach the host; the client's protocol version
-- * is only kept in this service. */
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_HG_ACK_OP:
-+ case GUEST_DND_HG_ACK_OP:
- {
- LogFlowFunc(("GUEST_DND_HG_ACK_OP\n"));
-- if ( cParms != 1
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* action */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+
-+ VBOXDNDCBHGACKOPDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_HG_ACK_OP;
-+
-+ switch (pClient->protocol())
- {
-- DragAndDropSvc::VBOXDNDCBHGACKOPDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_ACK_OP;
-- rc = paParms[0].getUInt32(&data.uAction); /* Get drop action. */
-- DO_HOST_CALLBACK();
-+ case 3:
-+ {
-+ if (cParms == 2)
-+ {
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.uAction); /* Get drop action. */
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 1)
-+ rc = paParms[0].getUInt32(&data.uAction); /* Get drop action. */
-+ break;
-+ }
- }
-+
-+ DO_HOST_CALLBACK();
- break;
- }
-- case DragAndDropSvc::GUEST_DND_HG_REQ_DATA:
-+ case GUEST_DND_HG_REQ_DATA:
- {
- LogFlowFunc(("GUEST_DND_HG_REQ_DATA\n"));
-- if ( cParms != 1
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* format */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+
-+ VBOXDNDCBHGREQDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_HG_REQ_DATA;
-+
-+ switch (pClient->protocol())
- {
-- DragAndDropSvc::VBOXDNDCBHGREQDATADATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_REQ_DATA;
-- rc = paParms[0].getPointer((void**)&data.pszFormat, &data.cbFormat);
-- DO_HOST_CALLBACK();
-+ case 3:
-+ {
-+ if (cParms == 3)
-+ {
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void **)&data.pszFormat, &data.cbFormat);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.cbFormat);
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 1)
-+ rc = paParms[0].getPointer((void**)&data.pszFormat, &data.cbFormat);
-+ break;
-+ }
- }
-+
-+ DO_HOST_CALLBACK();
- break;
- }
-- case DragAndDropSvc::GUEST_DND_HG_EVT_PROGRESS:
-+ case GUEST_DND_HG_EVT_PROGRESS:
- {
- LogFlowFunc(("GUEST_DND_HG_EVT_PROGRESS\n"));
-- if ( cParms != 3
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* status */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* percent */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* rc */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+
-+ VBOXDNDCBHGEVTPROGRESSDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_HG_EVT_PROGRESS;
-+
-+ switch (pClient->protocol())
- {
-- DragAndDropSvc::VBOXDNDCBHGEVTPROGRESSDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_EVT_PROGRESS;
-- rc = paParms[0].getUInt32(&data.uStatus);
-- if (RT_SUCCESS(rc))
-- rc = paParms[1].getUInt32(&data.uPercentage);
-- if (RT_SUCCESS(rc))
-- rc = paParms[2].getUInt32(&data.rc);
-- DO_HOST_CALLBACK();
-+ case 3:
-+ {
-+ if (cParms == 4)
-+ {
-+ rc = paParms[0].getUInt32(&data.uStatus);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.uStatus);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.uPercentage);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getUInt32(&data.rc);
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 3)
-+ {
-+ rc = paParms[0].getUInt32(&data.uStatus);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.uPercentage);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.rc);
-+ }
-+ break;
-+ }
- }
-+
-+ DO_HOST_CALLBACK();
- break;
- }
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
-- case DragAndDropSvc::GUEST_DND_GH_ACK_PENDING:
-+ case GUEST_DND_GH_ACK_PENDING:
- {
- LogFlowFunc(("GUEST_DND_GH_ACK_PENDING\n"));
-- if ( cParms != 3
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* defaction */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* alloctions */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_PTR /* format */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+
-+ VBOXDNDCBGHACKPENDINGDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_ACK_PENDING;
-+
-+ switch (pClient->protocol())
-+ {
-+ case 3:
-+ {
-+ if (cParms == 5)
-+ {
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.uDefAction);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.uAllActions);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getPointer((void**)&data.pszFormat, &data.cbFormat);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[4].getUInt32(&data.cbFormat);
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 3)
-+ {
-+ rc = paParms[0].getUInt32(&data.uDefAction);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.uAllActions);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getPointer((void**)&data.pszFormat, &data.cbFormat);
-+ }
-+ break;
-+ }
-+ }
-+
-+ DO_HOST_CALLBACK();
-+ break;
-+ }
-+ /* New since protocol v3. */
-+ case GUEST_DND_GH_SND_DATA_HDR:
-+ {
-+ LogFlowFunc(("GUEST_DND_GH_SND_DATA_HDR\n"));
-+ if (cParms == 12)
- {
-- DragAndDropSvc::VBOXDNDCBGHACKPENDINGDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_ACK_PENDING;
-- rc = paParms[0].getUInt32(&data.uDefAction);
-+ VBOXDNDCBSNDDATAHDRDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA_HDR;
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.data.uFlags);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.data.uScreenId);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getUInt64(&data.data.cbTotal);
- if (RT_SUCCESS(rc))
-- rc = paParms[1].getUInt32(&data.uAllActions);
-+ rc = paParms[4].getUInt32(&data.data.cbMeta);
- if (RT_SUCCESS(rc))
-- rc = paParms[2].getPointer((void**)&data.pszFormat, &data.cbFormat);
-+ rc = paParms[5].getPointer(&data.data.pvMetaFmt, &data.data.cbMetaFmt);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[6].getUInt32(&data.data.cbMetaFmt);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[7].getUInt64(&data.data.cObjects);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[8].getUInt32(&data.data.enmCompression);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[9].getUInt32((uint32_t *)&data.data.enmChecksumType);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[10].getPointer(&data.data.pvChecksum, &data.data.cbChecksum);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[11].getUInt32(&data.data.cbChecksum);
-+
-+ LogFlowFunc(("fFlags=0x%x, cbTotalSize=%RU64, cObj=%RU64\n",
-+ data.data.uFlags, data.data.cbTotal, data.data.cObjects));
- DO_HOST_CALLBACK();
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_DATA:
-+ case GUEST_DND_GH_SND_DATA:
- {
- LogFlowFunc(("GUEST_DND_GH_SND_DATA\n"));
-- if ( cParms != 2
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* data */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* size */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+ switch (pClient->protocol())
- {
-- DragAndDropSvc::VBOXDNDCBSNDDATADATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_SND_DATA;
-- rc = paParms[0].getPointer((void**)&data.pvData, &data.cbData);
-- if (RT_SUCCESS(rc))
-- rc = paParms[1].getUInt32(&data.cbTotalSize);
-- DO_HOST_CALLBACK();
-+ case 3:
-+ {
-+ if (cParms == 5)
-+ {
-+ VBOXDNDCBSNDDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA;
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void**)&data.data.u.v3.pvData, &data.data.u.v3.cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.data.u.v3.cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getPointer((void**)&data.data.u.v3.pvChecksum, &data.data.u.v3.cbChecksum);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[4].getUInt32(&data.data.u.v3.cbChecksum);
-+ DO_HOST_CALLBACK();
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 2)
-+ {
-+ VBOXDNDCBSNDDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DATA;
-+ rc = paParms[0].getPointer((void**)&data.data.u.v1.pvData, &data.data.u.v1.cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.data.u.v1.cbTotalSize);
-+ DO_HOST_CALLBACK();
-+ }
-+ break;
-+ }
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_DIR:
-+ case GUEST_DND_GH_SND_DIR:
- {
- LogFlowFunc(("GUEST_DND_GH_SND_DIR\n"));
-- if ( cParms != 3
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* path */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* path length */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* creation mode */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+
-+ VBOXDNDCBSNDDIRDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_DIR;
-+
-+ switch (pClient->protocol())
- {
-- DragAndDropSvc::VBOXDNDCBSNDDIRDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_SND_DIR;
-- uint32_t cTmp;
-- rc = paParms[0].getPointer((void**)&data.pszPath, &cTmp);
-- if (RT_SUCCESS(rc))
-- rc = paParms[1].getUInt32(&data.cbPath);
-- if (RT_SUCCESS(rc))
-- rc = paParms[2].getUInt32(&data.fMode);
-+ case 3:
-+ {
-+ if (cParms == 4)
-+ {
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void**)&data.pszPath, &data.cbPath);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.cbPath);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getUInt32(&data.fMode);
-+ }
-+ break;
-+ }
-
-- LogFlowFunc(("pszPath=%s, cbPath=%RU32, fMode=0x%x\n", data.pszPath, data.cbPath, data.fMode));
-- DO_HOST_CALLBACK();
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 3)
-+ {
-+ rc = paParms[0].getPointer((void**)&data.pszPath, &data.cbPath);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getUInt32(&data.cbPath);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.fMode);
-+ }
-+ break;
-+ }
- }
-+
-+ DO_HOST_CALLBACK();
- break;
- }
-- /* Note: Since protocol v2 (>= VBox 5.0). */
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR:
-+ /* New since protocol v2 (>= VBox 5.0). */
-+ case GUEST_DND_GH_SND_FILE_HDR:
- {
- LogFlowFunc(("GUEST_DND_GH_SND_FILE_HDR\n"));
-- if ( cParms != 6
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* context ID */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR /* file path */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* file path length */
-- || paParms[3].type != VBOX_HGCM_SVC_PARM_32BIT /* flags */
-- || paParms[4].type != VBOX_HGCM_SVC_PARM_32BIT /* file mode */
-- || paParms[5].type != VBOX_HGCM_SVC_PARM_64BIT /* file size */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-+ if (cParms == 6)
- {
-- DragAndDropSvc::VBOXDNDCBSNDFILEHDRDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_SND_FILE_HDR;
-- uint32_t cTmp;
-- /* paParms[0] is context ID; unused yet. */
-- rc = paParms[1].getPointer((void**)&data.pszFilePath, &cTmp);
-+ VBOXDNDCBSNDFILEHDRDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_HDR;
-+
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void**)&data.pszFilePath, &data.cbFilePath);
- if (RT_SUCCESS(rc))
- rc = paParms[2].getUInt32(&data.cbFilePath);
- if (RT_SUCCESS(rc))
-@@ -576,27 +866,47 @@ void DragAndDropService::guestCall(VBOXH
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA:
-+ case GUEST_DND_GH_SND_FILE_DATA:
- {
- LogFlowFunc(("GUEST_DND_GH_SND_FILE_DATA\n"));
-
- switch (pClient->protocol())
- {
-- case 2: /* Protocol version 2 only sends the next data chunks to reduce traffic. */
-+ /* Protocol v3 adds (optional) checksums. */
-+ case 3:
- {
-- if ( cParms != 3
-- /* paParms[0] is context ID; unused yet. */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR /* file data */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT /* file data length */)
-+ if (cParms == 5)
- {
-- rc = VERR_INVALID_PARAMETER;
-+ VBOXDNDCBSNDFILEDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
-+
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void**)&data.pvData, &data.cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[2].getUInt32(&data.cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[3].getPointer((void**)&data.u.v3.pvChecksum, &data.u.v3.cbChecksum);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[4].getUInt32(&data.u.v3.cbChecksum);
-+
-+ LogFlowFunc(("pvData=0x%p, cbData=%RU32\n", data.pvData, data.cbData));
-+ DO_HOST_CALLBACK();
- }
-- else
-+ break;
-+ }
-+ /* Protocol v2 only sends the next data chunks to reduce traffic. */
-+ case 2:
-+ {
-+ if (cParms == 3)
- {
-- DragAndDropSvc::VBOXDNDCBSNDFILEDATADATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_SND_FILE_DATA;
-- /* paParms[0] is context ID; unused yet. */
-- rc = paParms[1].getPointer((void**)&data.pvData, &data.cbData);
-+ VBOXDNDCBSNDFILEDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ rc = paParms[1].getPointer((void**)&data.pvData, &data.cbData);
- if (RT_SUCCESS(rc))
- rc = paParms[2].getUInt32(&data.cbData);
-
-@@ -605,21 +915,14 @@ void DragAndDropService::guestCall(VBOXH
- }
- break;
- }
-+ /* Protocol v1 sends the file path and attributes for every file chunk (!). */
- default:
- {
-- if ( cParms != 5
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* file path */
-- || paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT /* file path length */
-- || paParms[2].type != VBOX_HGCM_SVC_PARM_PTR /* file data */
-- || paParms[3].type != VBOX_HGCM_SVC_PARM_32BIT /* file data length */
-- || paParms[4].type != VBOX_HGCM_SVC_PARM_32BIT /* creation mode */)
-- {
-- rc = VERR_INVALID_PARAMETER;
-- }
-- else
-+ if (cParms == 5)
- {
-- DragAndDropSvc::VBOXDNDCBSNDFILEDATADATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_SND_FILE_DATA;
-+ VBOXDNDCBSNDFILEDATADATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_SND_FILE_DATA;
- uint32_t cTmp;
- rc = paParms[0].getPointer((void**)&data.u.v1.pszFilePath, &cTmp);
- if (RT_SUCCESS(rc))
-@@ -640,47 +943,125 @@ void DragAndDropService::guestCall(VBOXH
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_EVT_ERROR:
-+ case GUEST_DND_GH_EVT_ERROR:
- {
- LogFlowFunc(("GUEST_DND_GH_EVT_ERROR\n"));
-- if ( cParms != 1
-- || paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT /* rc */)
-- rc = VERR_INVALID_PARAMETER;
-- else
-- {
-- DragAndDropSvc::VBOXDNDCBEVTERRORDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_GH_EVT_ERROR;
-
-- uint32_t rcOp;
-- rc = paParms[0].getUInt32(&rcOp);
-- if (RT_SUCCESS(rc))
-- data.rc = rcOp;
-+ VBOXDNDCBEVTERRORDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_EVT_ERROR;
-
-- DO_HOST_CALLBACK();
-+ switch (pClient->protocol())
-+ {
-+ case 3:
-+ {
-+ if (cParms == 2)
-+ {
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+ if (RT_SUCCESS(rc))
-+ {
-+ uint32_t rcOp;
-+ rc = paParms[1].getUInt32(&rcOp);
-+ if (RT_SUCCESS(rc))
-+ data.rc = rcOp;
-+ }
-+ }
-+ break;
-+ }
-+
-+ case 2:
-+ default:
-+ {
-+ if (cParms == 1)
-+ {
-+ uint32_t rcOp;
-+ rc = paParms[0].getUInt32(&rcOp);
-+ if (RT_SUCCESS(rc))
-+ data.rc = (int32_t)rcOp;
-+ }
-+ break;
-+ }
- }
-+
-+ DO_HOST_CALLBACK();
- break;
- }
- #endif /* VBOX_WITH_DRAG_AND_DROP_GH */
-+
-+ /*
-+ * Note: This is a fire-and-forget message, as the host should
-+ * not rely on an answer from the guest side in order to
-+ * properly cancel the operation.
-+ */
-+ case HOST_DND_HG_EVT_CANCEL:
-+ {
-+ LogFlowFunc(("HOST_DND_HG_EVT_CANCEL\n"));
-+
-+ VBOXDNDCBEVTERRORDATA data;
-+ RT_ZERO(data);
-+ data.hdr.uMagic = CB_MAGIC_DND_GH_EVT_ERROR;
-+
-+ switch (pClient->protocol())
-+ {
-+ case 3:
-+ {
-+ /* Protocol v3+ at least requires the context ID. */
-+ if (cParms == 1)
-+ rc = paParms[0].getUInt32(&data.hdr.uContextID);
-+
-+ break;
-+ }
-+
-+ default:
-+ break;
-+ }
-+
-+ /* Tell the host that the guest has cancelled the operation. */
-+ data.rc = VERR_CANCELLED;
-+
-+ DO_HOST_CALLBACK();
-+
-+ /* Note: If the host is not prepared for handling the cancelling reply
-+ * from the guest, don't report this back to the guest. */
-+ if (RT_FAILURE(rc))
-+ rc = VINF_SUCCESS;
-+ break;
-+ }
-+
- default:
- {
- /* All other messages are handled by the DnD manager. */
- rc = m_pManager->nextMessage(u32Function, cParms, paParms);
- if (rc == VERR_NO_DATA) /* Manager has no new messsages? Try asking the host. */
- {
-- if (m_pfnHostCallback)
-+ if (m_SvcCtx.pfnHostCallback)
- {
-- DragAndDropSvc::VBOXDNDCBHGGETNEXTHOSTMSGDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG_DATA;
-+ VBOXDNDCBHGGETNEXTHOSTMSGDATA data;
-+ RT_ZERO(data);
-+
-+ data.hdr.uMagic = VBOX_DND_CB_MAGIC_MAKE(0 /* uFn */, 0 /* uVer */);
-+
- data.uMsg = u32Function;
- data.cParms = cParms;
- data.paParms = paParms;
-
-- rc = m_pfnHostCallback(m_pvHostData, u32Function, &data, sizeof(data));
-+ rc = m_SvcCtx.pfnHostCallback(m_SvcCtx.pvHostData, u32Function,
-+ &data, sizeof(data));
- if (RT_SUCCESS(rc))
- {
- cParms = data.cParms;
- paParms = data.paParms;
- }
-+ else
-+ {
-+ /*
-+ * In case the guest is too fast asking for the next message
-+ * and the host did not supply it yet, just defer the client's
-+ * return until a response from the host available.
-+ */
-+ LogFlowFunc(("No new messages from the host (yet), deferring request: %Rrc\n", rc));
-+ rc = VINF_HGCM_ASYNC_EXECUTE;
-+ }
- }
- else /* No host callback in place, so drag and drop is not supported by the host. */
- rc = VERR_NOT_SUPPORTED;
-@@ -699,9 +1080,9 @@ void DragAndDropService::guestCall(VBOXH
- {
- try
- {
-- LogFlowFunc(("Deferring guest call completion of client ID=%RU32\n", u32ClientID));
-- m_clientQueue.append(new HGCM::Client(u32ClientID, callHandle,
-- u32Function, cParms, paParms));
-+ AssertPtr(pClient);
-+ pClient->setDeferred(callHandle, u32Function, cParms, paParms);
-+ m_clientQueue.push_back(u32ClientID);
- }
- catch (std::bad_alloc)
- {
-@@ -709,13 +1090,13 @@ void DragAndDropService::guestCall(VBOXH
- /* Don't report to guest. */
- }
- }
-- else if (m_pHelpers)
-- {
-- /* Complete call on guest side. */
-- m_pHelpers->pfnCallComplete(callHandle, rc);
-- }
-+ else if (pClient)
-+ pClient->complete(callHandle, rc);
- else
-+ {
-+ AssertMsgFailed(("Guest call failed with %Rrc\n", rc));
- rc = VERR_NOT_IMPLEMENTED;
-+ }
-
- LogFlowFunc(("Returning rc=%Rrc\n", rc));
- }
-@@ -727,83 +1108,165 @@ int DragAndDropService::hostCall(uint32_
- u32Function, cParms, m_clientMap.size(), m_clientQueue.size()));
-
- int rc;
-- if (u32Function == DragAndDropSvc::HOST_DND_SET_MODE)
-- {
-- if (cParms != 1)
-- rc = VERR_INVALID_PARAMETER;
-- else if (paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT)
-- rc = VERR_INVALID_PARAMETER;
-- else
-- rc = modeSet(paParms[0].u.uint32);
-- }
-- else if (modeGet() != VBOX_DRAG_AND_DROP_MODE_OFF)
-+
-+ do
- {
-- if (m_clientMap.size()) /* At least one client on the guest connected? */
-+ bool fSendToGuest = false; /* Whether to send the message down to the guest side or not. */
-+
-+ switch (u32Function)
- {
-- rc = m_pManager->addMessage(u32Function, cParms, paParms, true /* fAppend */);
-- if (RT_SUCCESS(rc))
-+ case HOST_DND_SET_MODE:
- {
-- if (m_clientQueue.size()) /* Any clients in our queue ready for processing the next command? */
-+ if (cParms != 1)
-+ rc = VERR_INVALID_PARAMETER;
-+ else if (paParms[0].type != VBOX_HGCM_SVC_PARM_32BIT)
-+ rc = VERR_INVALID_PARAMETER;
-+ else
-+ rc = modeSet(paParms[0].u.uint32);
-+ break;
-+ }
-+
-+ case HOST_DND_HG_EVT_ENTER:
-+ {
-+ /* Clear the message queue as a new DnD operation just began. */
-+ m_pManager->clear();
-+
-+ fSendToGuest = true;
-+ break;
-+ }
-+
-+ case HOST_DND_HG_EVT_CANCEL:
-+ {
-+ LogFlowFunc(("Cancelling all waiting clients ...\n"));
-+
-+ /* Clear the message queue as the host cancelled the whole operation. */
-+ m_pManager->clear();
-+
-+ /*
-+ * Wake up all deferred clients and tell them to process
-+ * the cancelling message next.
-+ */
-+ DnDClientQueue::iterator itQueue = m_clientQueue.begin();
-+ while (itQueue != m_clientQueue.end())
- {
-- HGCM::Client *pClient = m_clientQueue.first();
-- AssertPtr(pClient);
-+ DnDClientMap::iterator itClient = m_clientMap.find(*itQueue);
-+ Assert(itClient != m_clientMap.end());
-
-- /*
-- * Check if this was a request for getting the next host
-- * message. If so, return the message ID and the parameter
-- * count. The message itself has to be queued.
-- */
-- uint32_t uMsg = pClient->message();
-- if (uMsg == DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG)
-- {
-- LogFlowFunc(("Client %RU32 is waiting for next host msg\n", pClient->clientId()));
--
-- uint32_t uMsg1;
-- uint32_t cParms1;
-- rc = m_pManager->nextMessageInfo(&uMsg1, &cParms1);
-- if (RT_SUCCESS(rc))
-- {
-- pClient->addMessageInfo(uMsg1, cParms1);
-- if ( m_pHelpers
-- && m_pHelpers->pfnCallComplete)
-- {
-- m_pHelpers->pfnCallComplete(pClient->handle(), rc);
-- }
-+ DragAndDropClient *pClient = itClient->second;
-+ AssertPtr(pClient);
-
-- m_clientQueue.removeFirst();
-+ int rc2 = pClient->addMessageInfo(HOST_DND_HG_EVT_CANCEL,
-+ /* Protocol v3+ also contains the context ID. */
-+ pClient->protocol() >= 3 ? 1 : 0);
-+ pClient->completeDeferred(rc2);
-
-- delete pClient;
-- pClient = NULL;
-- }
-- else
-- AssertMsgFailed(("m_pManager::nextMessageInfo failed with rc=%Rrc\n", rc));
-- }
-- else
-- AssertMsgFailed(("Client ID=%RU32 in wrong state with uMsg=%RU32\n",
-- pClient->clientId(), uMsg));
-+ m_clientQueue.erase(itQueue);
-+ itQueue = m_clientQueue.begin();
- }
-- else
-- LogFlowFunc(("All clients busy; delaying execution\n"));
-+
-+ Assert(m_clientQueue.size() == 0);
-+
-+ /* Tell the host that everything went well. */
-+ rc = VINF_SUCCESS;
-+ break;
-+ }
-+
-+ default:
-+ {
-+ fSendToGuest = true;
-+ break;
- }
-- else
-- AssertMsgFailed(("Adding new message of type=%RU32 failed with rc=%Rrc\n",
-- u32Function, rc));
- }
-- else
-+
-+ if (fSendToGuest)
- {
-+ if (modeGet() == VBOX_DRAG_AND_DROP_MODE_OFF)
-+ {
-+ /* Tell the host that a wrong drag'n drop mode is set. */
-+ rc = VERR_ACCESS_DENIED;
-+ break;
-+ }
-+
-+ if (m_clientMap.size() == 0) /* At least one client on the guest connected? */
-+ {
-+ /*
-+ * Tell the host that the guest does not support drag'n drop.
-+ * This might happen due to not installed Guest Additions or
-+ * not running VBoxTray/VBoxClient.
-+ */
-+ rc = VERR_NOT_SUPPORTED;
-+ break;
-+ }
-+
-+ rc = m_pManager->addMessage(u32Function, cParms, paParms, true /* fAppend */);
-+ if (RT_FAILURE(rc))
-+ {
-+ AssertMsgFailed(("Adding new message of type=%RU32 failed with rc=%Rrc\n", u32Function, rc));
-+ break;
-+ }
-+
-+ /* Any clients in our queue ready for processing the next command? */
-+ if (m_clientQueue.size() == 0)
-+ {
-+ LogFlowFunc(("All clients (%zu) busy -- delaying execution\n", m_clientMap.size()));
-+ break;
-+ }
-+
-+ uint32_t uClientNext = m_clientQueue.front();
-+ DnDClientMap::iterator itClientNext = m_clientMap.find(uClientNext);
-+ Assert(itClientNext != m_clientMap.end());
-+
-+ DragAndDropClient *pClient = itClientNext->second;
-+ AssertPtr(pClient);
-+
- /*
-- * Tell the host that the guest does not support drag'n drop.
-- * This might happen due to not installed Guest Additions or
-- * not running VBoxTray/VBoxClient.
-+ * Check if this was a request for getting the next host
-+ * message. If so, return the message ID and the parameter
-+ * count. The message itself has to be queued.
- */
-- rc = VERR_NOT_SUPPORTED;
-- }
-- }
-- else
-- {
-- /* Tell the host that a wrong drag'n drop mode is set. */
-- rc = VERR_ACCESS_DENIED;
-- }
-+ uint32_t uMsgClient = pClient->message();
-+
-+ uint32_t uMsgNext = 0;
-+ uint32_t cParmsNext = 0;
-+ int rcNext = m_pManager->nextMessageInfo(&uMsgNext, &cParmsNext);
-+
-+ LogFlowFunc(("uMsgClient=%RU32, uMsgNext=%RU32, cParmsNext=%RU32, rcNext=%Rrc\n",
-+ uMsgClient, uMsgNext, cParmsNext, rcNext));
-+
-+ if (RT_SUCCESS(rcNext))
-+ {
-+ if (uMsgClient == GUEST_DND_GET_NEXT_HOST_MSG)
-+ {
-+ rc = pClient->addMessageInfo(uMsgNext, cParmsNext);
-+
-+ /* Note: Report the current rc back to the guest. */
-+ pClient->completeDeferred(rc);
-+ }
-+ /*
-+ * Does the message the client is waiting for match the message
-+ * next in the queue? Process it right away then.
-+ */
-+ else if (uMsgClient == uMsgNext)
-+ {
-+ rc = m_pManager->nextMessage(u32Function, cParms, paParms);
-+
-+ /* Note: Report the current rc back to the guest. */
-+ pClient->completeDeferred(rc);
-+ }
-+ else /* Should not happen; cancel the operation on the guest. */
-+ {
-+ LogFunc(("Client ID=%RU32 in wrong state with uMsg=%RU32 (next message in queue: %RU32), cancelling\n",
-+ pClient->clientId(), uMsgClient, uMsgNext));
-+
-+ pClient->completeDeferred(VERR_CANCELLED);
-+ }
-+
-+ m_clientQueue.pop_front();
-+ }
-+
-+ } /* fSendToGuest */
-+
-+ } while (0); /* To use breaks. */
-
- LogFlowFuncLeaveRC(rc);
- return rc;
-@@ -816,20 +1279,20 @@ DECLCALLBACK(int) DragAndDropService::pr
- DragAndDropService *pSelf = static_cast<DragAndDropService *>(pvUser);
- AssertPtr(pSelf);
-
-- if (pSelf->m_pfnHostCallback)
-+ if (pSelf->m_SvcCtx.pfnHostCallback)
- {
- LogFlowFunc(("GUEST_DND_HG_EVT_PROGRESS: uStatus=%RU32, uPercentage=%RU32, rc=%Rrc\n",
- uStatus, uPercentage, rc));
-
-- DragAndDropSvc::VBOXDNDCBHGEVTPROGRESSDATA data;
-- data.hdr.u32Magic = DragAndDropSvc::CB_MAGIC_DND_HG_EVT_PROGRESS;
-+ VBOXDNDCBHGEVTPROGRESSDATA data;
-+ data.hdr.uMagic = CB_MAGIC_DND_HG_EVT_PROGRESS;
- data.uPercentage = RT_MIN(uPercentage, 100);
- data.uStatus = uStatus;
- data.rc = rc; /** @todo uin32_t vs. int. */
-
-- return pSelf->m_pfnHostCallback(pSelf->m_pvHostData,
-- DragAndDropSvc::GUEST_DND_HG_EVT_PROGRESS,
-- &data, sizeof(data));
-+ return pSelf->m_SvcCtx.pfnHostCallback(pSelf->m_SvcCtx.pvHostData,
-+ GUEST_DND_HG_EVT_PROGRESS,
-+ &data, sizeof(data));
- }
-
- return VINF_SUCCESS;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
-@@ -3,7 +3,7 @@
- */
-
- /*
-- * Copyright (C) 2006-2011 Oracle Corporation
-+ * Copyright (C) 2006-2015 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -23,6 +23,7 @@
- #include <iprt/asm.h>
- #include <iprt/assert.h>
- #include <iprt/thread.h>
-+#include <iprt/ldr.h>
- #include <process.h>
-
- #include "VBoxClipboard.h"
-@@ -33,6 +34,17 @@ static char gachWindowClassName[] = "VBo
-
- enum { CBCHAIN_TIMEOUT = 5000 /* ms */ };
-
-+/* Dynamically load clipboard functions from User32.dll. */
-+typedef BOOL WINAPI FNADDCLIPBOARDFORMATLISTENER(HWND);
-+typedef FNADDCLIPBOARDFORMATLISTENER *PFNADDCLIPBOARDFORMATLISTENER;
-+
-+typedef BOOL WINAPI FNREMOVECLIPBOARDFORMATLISTENER(HWND);
-+typedef FNREMOVECLIPBOARDFORMATLISTENER *PFNREMOVECLIPBOARDFORMATLISTENER;
-+
-+#ifndef WM_CLIPBOARDUPDATE
-+#define WM_CLIPBOARDUPDATE 0x031D
-+#endif
-+
- struct _VBOXCLIPBOARDCONTEXT
- {
- HWND hwnd;
-@@ -48,6 +60,10 @@ struct _VBOXCLIPBOARDCONTEXT
- HANDLE hRenderEvent;
-
- VBOXCLIPBOARDCLIENTDATA *pClient;
-+
-+ PFNADDCLIPBOARDFORMATLISTENER pfnAddClipboardFormatListener;
-+ PFNREMOVECLIPBOARDFORMATLISTENER pfnRemoveClipboardFormatListener;
-+
- };
-
- /* Only one client is supported. There seems to be no need for more clients. */
-@@ -94,6 +110,38 @@ void vboxClipboardDump(const void *pv, s
- #define vboxClipboardDump(__pv, __cb, __format) do { NOREF(__pv); NOREF(__cb); NOREF(__format); } while (0)
- #endif /* LOG_ENABLED */
-
-+static void vboxClipboardInitNewAPI(VBOXCLIPBOARDCONTEXT *pCtx)
-+{
-+ RTLDRMOD hUser32 = NIL_RTLDRMOD;
-+ int rc = RTLdrLoadSystem("User32.dll", /* fNoUnload = */ true, &hUser32);
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = RTLdrGetSymbol(hUser32, "AddClipboardFormatListener", (void**)&pCtx->pfnAddClipboardFormatListener);
-+ if (RT_SUCCESS(rc))
-+ {
-+ rc = RTLdrGetSymbol(hUser32, "RemoveClipboardFormatListener", (void**)&pCtx->pfnRemoveClipboardFormatListener);
-+ }
-+
-+ RTLdrClose(hUser32);
-+ }
-+
-+ if (RT_SUCCESS(rc))
-+ {
-+ Log(("New Clipboard API is enabled\n"));
-+ }
-+ else
-+ {
-+ pCtx->pfnAddClipboardFormatListener = NULL;
-+ pCtx->pfnRemoveClipboardFormatListener = NULL;
-+ Log(("New Clipboard API is not available. rc = %Rrc\n", rc));
-+ }
-+}
-+
-+static bool vboxClipboardIsNewAPI(VBOXCLIPBOARDCONTEXT *pCtx)
-+{
-+ return pCtx->pfnAddClipboardFormatListener != NULL;
-+}
-+
- static void vboxClipboardGetData (uint32_t u32Format, const void *pvSrc, uint32_t cbSrc,
- void *pvDst, uint32_t cbDst, uint32_t *pcbActualDst)
- {
-@@ -119,6 +167,7 @@ static void vboxClipboardGetData (uint32
- static int vboxClipboardReadDataFromClient (VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format)
- {
- Assert(pCtx->pClient);
-+ Assert(pCtx->hRenderEvent);
- Assert(pCtx->pClient->data.pv == NULL && pCtx->pClient->data.cb == 0 && pCtx->pClient->data.u32Format == 0);
-
- LogFlow(("vboxClipboardReadDataFromClient u32Format = %02X\n", u32Format));
-@@ -127,9 +176,9 @@ static int vboxClipboardReadDataFromClie
-
- vboxSvcClipboardReportMsg (pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, u32Format);
-
-- WaitForSingleObject(pCtx->hRenderEvent, INFINITE);
--
-- LogFlow(("vboxClipboardReadDataFromClient wait completed\n"));
-+ DWORD ret = WaitForSingleObject(pCtx->hRenderEvent, INFINITE);
-+ LogFlow(("vboxClipboardReadDataFromClient wait completed, ret 0x%08X, err %d\n",
-+ ret, GetLastError())); NOREF(ret);
-
- return VINF_SUCCESS;
- }
-@@ -195,14 +244,24 @@ static void vboxClipboardChanged (VBOXCL
- /* Add ourselves into the chain of cliboard listeners */
- static void addToCBChain (VBOXCLIPBOARDCONTEXT *pCtx)
- {
-- pCtx->hwndNextInChain = SetClipboardViewer (pCtx->hwnd);
-+ if (vboxClipboardIsNewAPI(pCtx))
-+ pCtx->pfnAddClipboardFormatListener(pCtx->hwnd);
-+ else
-+ pCtx->hwndNextInChain = SetClipboardViewer(pCtx->hwnd);
- }
-
- /* Remove ourselves from the chain of cliboard listeners */
- static void removeFromCBChain (VBOXCLIPBOARDCONTEXT *pCtx)
- {
-- ChangeClipboardChain (pCtx->hwnd, pCtx->hwndNextInChain);
-- pCtx->hwndNextInChain = NULL;
-+ if (vboxClipboardIsNewAPI(pCtx))
-+ {
-+ pCtx->pfnRemoveClipboardFormatListener(pCtx->hwnd);
-+ }
-+ else
-+ {
-+ ChangeClipboardChain(pCtx->hwnd, pCtx->hwndNextInChain);
-+ pCtx->hwndNextInChain = NULL;
-+ }
- }
-
- /* Callback which is invoked when we have successfully pinged ourselves down the
-@@ -226,10 +285,27 @@ static LRESULT CALLBACK vboxClipboardWnd
-
- switch (msg)
- {
-+ case WM_CLIPBOARDUPDATE:
-+ {
-+ Log(("WM_CLIPBOARDUPDATE\n"));
-+
-+ if (GetClipboardOwner() != hwnd)
-+ {
-+ /* Clipboard was updated by another application. */
-+ vboxClipboardChanged(pCtx);
-+ }
-+ } break;
-+
- case WM_CHANGECBCHAIN:
- {
- Log(("WM_CHANGECBCHAIN\n"));
-
-+ if (vboxClipboardIsNewAPI(pCtx))
-+ {
-+ rc = DefWindowProc(hwnd, msg, wParam, lParam);
-+ break;
-+ }
-+
- HWND hwndRemoved = (HWND)wParam;
- HWND hwndNext = (HWND)lParam;
-
-@@ -255,7 +331,7 @@ static LRESULT CALLBACK vboxClipboardWnd
-
- case WM_DRAWCLIPBOARD:
- {
-- Log(("WM_DRAWCLIPBOARD next %p\n", pCtx->hwndNextInChain));
-+ Log(("WM_DRAWCLIPBOARD\n"));
-
- if (GetClipboardOwner () != hwnd)
- {
-@@ -265,6 +341,7 @@ static LRESULT CALLBACK vboxClipboardWnd
-
- if (pCtx->hwndNextInChain)
- {
-+ Log(("WM_DRAWCLIPBOARD next %p\n", pCtx->hwndNextInChain));
- /* Pass the message to next windows in the clipboard chain. */
- DWORD_PTR dwResult;
- rc = SendMessageTimeout(pCtx->hwndNextInChain, msg, wParam, lParam, 0, CBCHAIN_TIMEOUT, &dwResult);
-@@ -275,6 +352,9 @@ static LRESULT CALLBACK vboxClipboardWnd
-
- case WM_TIMER:
- {
-+ if (vboxClipboardIsNewAPI(pCtx))
-+ break;
-+
- HWND hViewer = GetClipboardViewer();
-
- /* Re-register ourselves in the clipboard chain if our last ping
-@@ -291,12 +371,7 @@ static LRESULT CALLBACK vboxClipboardWnd
- if (hViewer)
- SendMessageCallback(hViewer, WM_CHANGECBCHAIN, (WPARAM)pCtx->hwndNextInChain, (LPARAM)pCtx->hwndNextInChain, CBChainPingProc, (ULONG_PTR) pCtx);
- } break;
--
-- case WM_CLOSE:
-- {
-- /* Do nothing. Ignore the message. */
-- } break;
--
-+
- case WM_RENDERFORMAT:
- {
- /* Insert the requested clipboard format data into the clipboard. */
-@@ -343,8 +418,9 @@ static LRESULT CALLBACK vboxClipboardWnd
- else
- {
- int vboxrc = vboxClipboardReadDataFromClient (pCtx, u32Format);
--
-- dprintf(("vboxClipboardReadDataFromClient vboxrc = %d\n", vboxrc));
-+
-+ dprintf(("vboxClipboardReadDataFromClient vboxrc = %d, pv %p, cb %d, u32Format %d\n",
-+ vboxrc, pCtx->pClient->data.pv, pCtx->pClient->data.cb, pCtx->pClient->data.u32Format));
-
- if ( RT_SUCCESS (vboxrc)
- && pCtx->pClient->data.pv != NULL
-@@ -429,6 +505,7 @@ static LRESULT CALLBACK vboxClipboardWnd
- /* Host has pending formats message. Ignore the guest announcement,
- * because host clipboard has more priority.
- */
-+ Log(("WM_USER ignored\n"));
- break;
- }
-
-@@ -479,10 +556,15 @@ static LRESULT CALLBACK vboxClipboardWnd
- }
- } break;
-
-+ case WM_CLOSE:
-+ {
-+ /* Do nothing. Ignore the message. */
-+ } break;
-+
- default:
- {
- Log(("WM_ %p\n", msg));
-- rc = DefWindowProc (hwnd, msg, wParam, lParam);
-+ rc = DefWindowProc(hwnd, msg, wParam, lParam);
- }
- }
-
-@@ -499,23 +581,19 @@ DECLCALLBACK(int) VBoxClipboardThread (R
-
- VBOXCLIPBOARDCONTEXT *pCtx = &g_ctx;
-
-- HINSTANCE hInstance = (HINSTANCE)GetModuleHandle (NULL);
-+ HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
-
- /* Register the Window Class. */
- WNDCLASS wc;
-+ RT_ZERO(wc);
-
- wc.style = CS_NOCLOSE;
- wc.lpfnWndProc = vboxClipboardWndProc;
-- wc.cbClsExtra = 0;
-- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
-- wc.hIcon = NULL;
-- wc.hCursor = NULL;
- wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
-- wc.lpszMenuName = NULL;
- wc.lpszClassName = gachWindowClassName;
-
-- ATOM atomWindowClass = RegisterClass (&wc);
-+ ATOM atomWindowClass = RegisterClass(&wc);
-
- if (atomWindowClass == 0)
- {
-@@ -541,7 +619,8 @@ DECLCALLBACK(int) VBoxClipboardThread (R
- SWP_NOACTIVATE | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_NOSIZE);
-
- addToCBChain(pCtx);
-- pCtx->timerRefresh = SetTimer(pCtx->hwnd, 0, 10 * 1000, NULL);
-+ if (!vboxClipboardIsNewAPI(pCtx))
-+ pCtx->timerRefresh = SetTimer(pCtx->hwnd, 0, 10 * 1000, NULL);
-
- MSG msg;
- while (GetMessage(&msg, NULL, 0, 0) && !pCtx->fTerminate)
-@@ -578,6 +657,11 @@ int vboxClipboardInit (void)
- {
- int rc = VINF_SUCCESS;
-
-+ RT_ZERO(g_ctx);
-+
-+ /* Check that new Clipboard API is available */
-+ vboxClipboardInitNewAPI(&g_ctx);
-+
- g_ctx.hRenderEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
-
- rc = RTThreadCreate (&g_ctx.thread, VBoxClipboardThread, NULL, 65536,
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Installer/common/vboxapisetup.py
-+++ virtualbox-5.0.16-dfsg/src/VBox/Installer/common/vboxapisetup.py
-@@ -8,6 +8,15 @@ General Public License (GPL) as publishe
- Foundation, in version 2 as it comes in the "COPYING" file of the
- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+
-+The contents of this file may alternatively be used under the terms
-+of the Common Development and Distribution License Version 1.0
-+(CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+VirtualBox OSE distribution, in which case the provisions of the
-+CDDL are applicable instead of those of the GPL.
-+
-+You may elect to license modified versions of this file under the
-+terms and conditions of either the GPL or the CDDL or both.
- """
-
- import os,sys
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Installer/linux/distributions_rpm
-+++ virtualbox-5.0.16-dfsg/src/VBox/Installer/linux/distributions_rpm
-@@ -6,6 +6,7 @@ openSUSE113 = OPENSUSE_11_3
- sles11.0 = SLES_11_0
- sles10.1 = SLES_10_1
- mdv2011.0 = MANDRIVA_2011_0
-+fedora24 = FEDORA_24
- fedora22 = FEDORA_22
- fedora21 = FEDORA_21
- fedora20 = FEDORA_20
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Installer/linux/rpm/rules
-+++ virtualbox-5.0.16-dfsg/src/VBox/Installer/linux/rpm/rules
-@@ -106,7 +106,7 @@ ifneq ($(MAKECMDGOALS),clean)
- $(error Cannot detect package distribution (rpmrel=$(rpmrel)))
- endif
-
-- ifeq ($(filter-out el5 el6 ol5 ol6 el7 centos5 centos6 fedora17 fedora18 fedora19 fedora20 fedora21 fedora22,$(rpmrel)),)
-+ ifeq ($(filter-out el5 el6 ol5 ol6 el7 centos5 centos6 fedora18 fedora19 fedora20 fedora21 fedora22 fedora24,$(rpmrel)),)
- rpmspec := rpm_redhat
- endif
- ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114 openSUSE123 openSUSE131 openSUSE132 sles10.1 sles11.0,$(rpmrel)),)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Installer/linux/run-inst.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Installer/linux/run-inst.sh
-@@ -78,8 +78,6 @@ add_symlink()
- { echo 1>&2 "$self: no target specified"; return 1; }
- test -d "$link_dir" ||
- { echo 1>&2 "$self: link directory $link_dir does not exist"; return 1; }
-- test ! -e "$link" ||
-- { echo 1>&2 "$self: link file "$link" already exists"; return 1; }
- expr "$link" : "/.*" > /dev/null ||
- { echo 1>&2 "$self: link file name is not absolute"; return 1; }
- rm -f "$link"
-@@ -321,6 +319,11 @@ umask 022
- # Set installer modules directory
- INSTALLATION_MODULES_DIR="$INSTALLATION_DIR/installer/"
-
-+# install the new version
-+mkdir -p -m 755 "$CONFIG_DIR"
-+test ! -d "$INSTALLATION_DIR" && REMOVE_INSTALLATION_DIR=1
-+mkdir -p -m 755 "$INSTALLATION_DIR"
-+
- # install and load installer modules
- if [ -d installer ]; then
- info "Copying additional installer modules ..."
-@@ -336,10 +339,6 @@ if [ -d installer ]; then
- done
- fi
-
--# install the new version
--mkdir -p -m 755 "$CONFIG_DIR"
--test ! -d "$INSTALLATION_DIR" && REMOVE_INSTALLATION_DIR=1
--mkdir -p -m 755 "$INSTALLATION_DIR"
- # Create a list of the files in the archive, skipping any directories which
- # already exist in the filesystem.
- bzip2 -d -c "$ARCH_PACKAGE" | tar -tf - |
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Installer/linux/sh-utils.sh
-+++ virtualbox-5.0.16-dfsg/src/VBox/Installer/linux/sh-utils.sh
-@@ -29,8 +29,8 @@ mywhich() {
- # May clobber $gtx*
- # Calls mywhich
- getxterm() {
-- # gnome-terminal uses -e differently to other emulators
-- for gxti in "konsole --title -e" "gnome-terminal --title -x" "xterm -T -e"; do
-+ # gnome-terminal and mate-terminal use -e differently to other emulators
-+ for gxti in "konsole --title -e" "gnome-terminal --title -x" "mate-terminal --title -x" "xterm -T -e"; do
- set $gxti
- gxtpath="`mywhich $1`"
- case "$gxtpath" in ?*)
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/glue/constants-python.xsl
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/glue/constants-python.xsl
-@@ -8,7 +8,7 @@
- XSLT stylesheet that generates VirtualBox_constants.py from
- VirtualBox.xidl.
-
-- Copyright (C) 2009-2013 Oracle Corporation
-+ Copyright (C) 2009-2016 Oracle Corporation
-
- This file is part of VirtualBox Open Source Edition (OSE), as
- available from http://www.virtualbox.org. This file is free software;
-@@ -36,7 +36,7 @@ This file is autogenerated from VirtualB
-
- __copyright__ = \
- """
--Copyright (C) 2009-2013 Oracle Corporation
-+Copyright (C) 2009-2016 Oracle Corporation
-
- This file is part of VirtualBox Open Source Edition (OSE), as
- available from http://www.virtualbox.org. This file is free software;
-@@ -45,9 +45,18 @@ General Public License (GPL) as publishe
- Foundation, in version 2 as it comes in the "COPYING" file of the
- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+
-+The contents of this file may alternatively be used under the terms
-+of the Common Development and Distribution License Version 1.0
-+(CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+VirtualBox OSE distribution, in which case the provisions of the
-+CDDL are applicable instead of those of the GPL.
-+
-+You may elect to license modified versions of this file under the
-+terms and conditions of either the GPL or the CDDL or both.
- """
-
--__version__ = "$Revision: 97792 $";
-+__version__ = "$Revision: 106598 $";
-
-
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/glue/vboxapi.py
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/glue/vboxapi.py
-@@ -15,8 +15,17 @@ __copyright__ = \
- Foundation, in version 2 as it comes in the "COPYING" file of the
- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+
-+ The contents of this file may alternatively be used under the terms
-+ of the Common Development and Distribution License Version 1.0
-+ (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+ VirtualBox OSE distribution, in which case the provisions of the
-+ CDDL are applicable instead of those of the GPL.
-+
-+ You may elect to license modified versions of this file under the
-+ terms and conditions of either the GPL or the CDDL or both.
- """
--__version__ = "$Revision: 101311 $"
-+__version__ = "$Revision: 106598 $"
-
-
- # Note! To set Python bitness on OSX use 'export VERSIONER_PYTHON_PREFER_32_BIT=yes'
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/include/GuestDnDPrivate.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/include/GuestDnDPrivate.h
-@@ -21,9 +21,17 @@
-
- #include <iprt/dir.h>
- #include <iprt/file.h>
-+#include <iprt/path.h>
-
--#include "VBox/hgcmsvc.h" /* For PVBOXHGCMSVCPARM. */
--#include "VBox/GuestHost/DragAndDrop.h"
-+#include <VBox/hgcmsvc.h> /* For PVBOXHGCMSVCPARM. */
-+#include <VBox/GuestHost/DragAndDrop.h>
-+#include <VBox/HostServices/DragAndDropSvc.h>
-+
-+#ifdef LOG_GROUP
-+ #undef LOG_GROUP
-+#endif
-+#define LOG_GROUP LOG_GROUP_GUEST_DND
-+#include <VBox/log.h>
-
- /**
- * Forward prototype declarations.
-@@ -35,6 +43,17 @@ class GuestDnDSource;
- class GuestDnDTarget;
- class Progress;
-
-+/**
-+ * Type definitions.
-+ */
-+
-+/** List (vector) of MIME types. */
-+typedef std::vector<com::Utf8Str> GuestDnDMIMEList;
-+
-+/*
-+ ** @todo Put most of the implementations below in GuestDnDPrivate.cpp!
-+ */
-+
- class GuestDnDCallbackEvent
- {
- public:
-@@ -64,93 +83,432 @@ protected:
- };
-
- /**
-- * Structure for keeping the (URI) data to be sent/received.
-+ * Class for handling the (raw) meta data.
- */
--typedef struct GuestDnDData
-+class GuestDnDMetaData
- {
-+public:
-+
-+ GuestDnDMetaData(void)
-+ : pvData(NULL)
-+ , cbData(0)
-+ , cbDataUsed(0) { }
-+
-+ virtual ~GuestDnDMetaData(void)
-+ {
-+ reset();
-+ }
-+
-+public:
-+
-+ uint32_t add(const void *pvDataAdd, uint32_t cbDataAdd)
-+ {
-+ LogFlowThisFunc(("pvDataAdd=%p, cbDataAdd=%zu\n", pvDataAdd, cbDataAdd));
-+
-+ if (!cbDataAdd)
-+ return 0;
-+ AssertPtrReturn(pvDataAdd, 0);
-+
-+ int rc = resize(cbData + cbDataAdd);
-+ if (RT_FAILURE(rc))
-+ return 0;
-+
-+ Assert(cbData >= cbDataUsed + cbDataAdd);
-+ memcpy((uint8_t *)pvData + cbDataUsed, pvDataAdd, cbDataAdd);
-+
-+ cbDataUsed += cbDataAdd;
-+
-+ return cbDataAdd;
-+ }
-+
-+ uint32_t add(const std::vector<BYTE> &vecAdd)
-+ {
-+ if (!vecAdd.size())
-+ return 0;
-+
-+ if (vecAdd.size() > UINT32_MAX) /* Paranoia. */
-+ return 0;
-+
-+ return add(&vecAdd.front(), (uint32_t)vecAdd.size());
-+ }
-+
-+ void reset(void)
-+ {
-+ if (pvData)
-+ {
-+ Assert(cbData);
-+ RTMemFree(pvData);
-+ pvData = NULL;
-+ }
-+
-+ cbData = 0;
-+ cbDataUsed = 0;
-+ }
-+
-+ const void *getData(void) const { return pvData; }
-+
-+ void *getDataMutable(void) { return pvData; }
-+
-+ uint32_t getSize(void) const { return cbDataUsed; }
-+
-+public:
-+
-+ int fromString(const RTCString &strData)
-+ {
-+ int rc = VINF_SUCCESS;
-+
-+ if (strData.isNotEmpty())
-+ {
-+ const uint32_t cbStrData = (uint32_t)strData.length() + 1; /* Include terminating zero. */
-+ rc = resize(cbStrData);
-+ if (RT_SUCCESS(rc))
-+ memcpy(pvData, strData.c_str(), cbStrData);
-+ }
-+
-+ return rc;
-+ }
-+
-+ int fromURIList(const DnDURIList &lstURI)
-+ {
-+ return fromString(lstURI.RootToString());
-+ }
-+
-+protected:
-+
-+ int resize(uint32_t cbSize)
-+ {
-+ if (!cbSize)
-+ {
-+ reset();
-+ return VINF_SUCCESS;
-+ }
-+
-+ if (cbSize == cbData)
-+ return VINF_SUCCESS;
-+
-+ void *pvTmp = NULL;
-+ if (!cbData)
-+ {
-+ Assert(cbDataUsed == 0);
-+ pvTmp = RTMemAllocZ(cbSize);
-+ }
-+ else
-+ {
-+ AssertPtr(pvData);
-+ pvTmp = RTMemRealloc(pvData, cbSize);
-+ RT_BZERO(pvTmp, cbSize);
-+ }
-+
-+ if (pvTmp)
-+ {
-+ pvData = pvTmp;
-+ cbData = cbSize;
-+ return VINF_SUCCESS;
-+ }
-+
-+ return VERR_NO_MEMORY;
-+ }
-+
-+protected:
-+
-+ void *pvData;
-+ uint32_t cbData;
-+ uint32_t cbDataUsed;
-+};
-+
-+/**
-+ * Class for keeping drag and drop (meta) data
-+ * to be sent/received.
-+ */
-+class GuestDnDData
-+{
-+public:
-+
- GuestDnDData(void)
-- : cbToProcess(0)
-- , cbProcessed(0) { }
-+ : cbEstTotal(0)
-+ , cbEstMeta(0)
-+ , cbProcessed(0)
-+ {
-+ RT_ZERO(dataHdr);
-+ }
-+
-+ virtual ~GuestDnDData(void)
-+ {
-+ reset();
-+ }
-
-- void Reset(void)
-+public:
-+
-+ uint64_t addProcessed(uint32_t cbDataAdd)
-+ {
-+ const uint64_t cbTotal = getTotal();
-+ Assert(cbProcessed + cbDataAdd <= cbTotal);
-+ cbProcessed += cbDataAdd;
-+ return cbProcessed;
-+ }
-+
-+ bool isComplete(void) const
-+ {
-+ const uint64_t cbTotal = getTotal();
-+ LogFlowFunc(("cbProcessed=%RU64, cbTotal=%RU64\n", cbProcessed, cbTotal));
-+ Assert(cbProcessed <= cbTotal);
-+ return (cbProcessed == cbTotal);
-+ }
-+
-+ void *getChkSumMutable(void) { return dataHdr.pvChecksum; }
-+
-+ uint32_t getChkSumSize(void) const { return dataHdr.cbChecksum; }
-+
-+ void *getFmtMutable(void) { return dataHdr.pvMetaFmt; }
-+
-+ uint32_t getFmtSize(void) const { return dataHdr.cbMetaFmt; }
-+
-+ GuestDnDMetaData &getMeta(void) { return dataMeta; }
-+
-+ uint8_t getPercentComplete(void) const
-+ {
-+ int64_t cbTotal = RT_MAX(getTotal(), 1);
-+ return (uint8_t)(cbProcessed * 100 / cbTotal);
-+ }
-+
-+ uint64_t getProcessed(void) const { return cbProcessed; }
-+
-+ uint64_t getRemaining(void) const
-+ {
-+ const uint64_t cbTotal = getTotal();
-+ Assert(cbProcessed <= cbTotal);
-+ return cbTotal - cbProcessed;
-+ }
-+
-+ uint64_t getTotal(void) const { return cbEstTotal; }
-+
-+ void reset(void)
- {
-- vecData.clear();
-- cbToProcess = 0;
-+ clearFmt();
-+ clearChkSum();
-+
-+ RT_ZERO(dataHdr);
-+
-+ dataMeta.reset();
-+
-+ cbEstTotal = 0;
-+ cbEstMeta = 0;
- cbProcessed = 0;
- }
-
-- /** Array (vector) of guest DnD data. This might be an URI list, according
-- * to the format being set. */
-- std::vector<BYTE> vecData;
-- /** Overall size (in bytes) of data to send. */
-- uint64_t cbToProcess;
-- /** Overall size (in bytes) of processed file data. */
-- uint64_t cbProcessed;
-+ int setFmt(const void *pvFmt, uint32_t cbFmt)
-+ {
-+ if (cbFmt)
-+ {
-+ AssertPtrReturn(pvFmt, VERR_INVALID_POINTER);
-+ void *pvFmtTmp = RTMemAlloc(cbFmt);
-+ if (!pvFmtTmp)
-+ return VERR_NO_MEMORY;
-+
-+ clearFmt();
-+
-+ memcpy(pvFmtTmp, pvFmt, cbFmt);
-+
-+ dataHdr.pvMetaFmt = pvFmtTmp;
-+ dataHdr.cbMetaFmt = cbFmt;
-+ }
-+ else
-+ clearFmt();
-+
-+ return VINF_SUCCESS;
-+ }
-+
-+ void setEstimatedSize(uint64_t cbTotal, uint32_t cbMeta)
-+ {
-+ Assert(cbMeta <= cbTotal);
-+
-+ LogFlowFunc(("cbTotal=%RU64, cbMeta=%RU32\n", cbTotal, cbMeta));
-
--} GuestDnDData;
-+ cbEstTotal = cbTotal;
-+ cbEstMeta = cbMeta;
-+ }
-+
-+protected:
-+
-+ void clearChkSum(void)
-+ {
-+ if (dataHdr.pvChecksum)
-+ {
-+ Assert(dataHdr.cbChecksum);
-+ RTMemFree(dataHdr.pvChecksum);
-+ dataHdr.pvChecksum = NULL;
-+ }
-+
-+ dataHdr.cbChecksum = 0;
-+ }
-+
-+ void clearFmt(void)
-+ {
-+ if (dataHdr.pvMetaFmt)
-+ {
-+ Assert(dataHdr.cbMetaFmt);
-+ RTMemFree(dataHdr.pvMetaFmt);
-+ dataHdr.pvMetaFmt = NULL;
-+ }
-+
-+ dataHdr.cbMetaFmt = 0;
-+ }
-+
-+protected:
-+
-+ /** The data header. */
-+ VBOXDNDDATAHDR dataHdr;
-+ /** For storing the actual meta data.
-+ * This might be an URI list or just plain raw data,
-+ * according to the format being sent. */
-+ GuestDnDMetaData dataMeta;
-+ /** Estimated total data size when receiving data. */
-+ uint64_t cbEstTotal;
-+ /** Estimated meta data size when receiving data. */
-+ uint32_t cbEstMeta;
-+ /** Overall size (in bytes) of processed data. */
-+ uint64_t cbProcessed;
-+};
-+
-+/** Initial state. */
-+#define DND_OBJCTX_STATE_NONE 0
-+/** The header was received/sent. */
-+#define DND_OBJCTX_STATE_HAS_HDR RT_BIT(0)
-
- /**
-- * Structure for keeping an URI object's context around.
-+ * Structure for keeping a DnDURIObject context around.
- */
--typedef struct GuestDnDURIObjCtx
-+class GuestDnDURIObjCtx
- {
-+public:
-+
- GuestDnDURIObjCtx(void)
- : pObjURI(NULL)
-- , fAllocated(false)
-- , fHeaderSent(false) { }
-+ , fIntermediate(false)
-+ , fState(DND_OBJCTX_STATE_NONE) { }
-
- virtual ~GuestDnDURIObjCtx(void)
- {
-- Reset();
-+ destroy();
- }
-
- public:
-
-- void Reset(void)
-+ int createIntermediate(DnDURIObject::Type enmType = DnDURIObject::Unknown)
-+ {
-+ reset();
-+
-+ int rc;
-+
-+ try
-+ {
-+ pObjURI = new DnDURIObject(enmType);
-+ fIntermediate = true;
-+
-+ rc = VINF_SUCCESS;
-+ }
-+ catch (std::bad_alloc &)
-+ {
-+ rc = VERR_NO_MEMORY;
-+ }
-+
-+ LogThisFunc(("Returning %Rrc\n", rc));
-+ return rc;
-+ }
-+
-+ void destroy(void)
- {
-+ LogFlowThisFuncEnter();
-+
- if ( pObjURI
-- && fAllocated)
-+ && fIntermediate)
- {
- delete pObjURI;
- }
-
-- pObjURI = NULL;
-+ pObjURI = NULL;
-+ fIntermediate = false;
-+ }
-+
-+ DnDURIObject *getObj(void) const { return pObjURI; }
-+
-+ bool isIntermediate(void) { return fIntermediate; }
-+
-+ bool isValid(void) const { return (pObjURI != NULL); }
-+
-+ uint32_t getState(void) const { return fState; }
-+
-+ void reset(void)
-+ {
-+ LogFlowThisFuncEnter();
-+
-+ destroy();
-+
-+ fIntermediate = false;
-+ fState = 0;
-+ }
-+
-+ void setObj(DnDURIObject *pObj)
-+ {
-+ LogFlowThisFunc(("%p\n", pObj));
-+
-+ destroy();
-+
-+ pObjURI = pObj;
-+ }
-
-- fAllocated = false;
-- fHeaderSent = false;
-+ uint32_t setState(uint32_t fStateNew)
-+ {
-+ /** @todo Add validation. */
-+ fState = fStateNew;
-+ return fState;
- }
-
-+protected:
-
- /** Pointer to current object being handled. */
- DnDURIObject *pObjURI;
- /** Flag whether pObjURI needs deletion after use. */
-- bool fAllocated;
-- /** Flag whether the object's file header has been sent already. */
-- bool fHeaderSent;
-+ bool fIntermediate;
-+ /** Internal context state, corresponding to DND_OBJCTX_STATE_XXX. */
-+ uint32_t fState;
- /** @todo Add more statistics / information here. */
--
--} GuestDnDURIObjCtx;
-+};
-
- /**
-- * Structure for keeping around URI (list) data.
-+ * Structure for keeping around an URI (data) transfer.
- */
--typedef struct GuestDnDURIData
-+class GuestDnDURIData
- {
-+
-+public:
-+
- GuestDnDURIData(void)
-- : pvScratchBuf(NULL)
-- , cbScratchBuf(0)
-- {
-- RT_ZERO(mDropDir);
-- }
-+ : cObjToProcess(0)
-+ , cObjProcessed(0)
-+ , pvScratchBuf(NULL)
-+ , cbScratchBuf(0) { }
-
- virtual ~GuestDnDURIData(void)
- {
-- Reset();
-+ reset();
-+
-+ if (pvScratchBuf)
-+ {
-+ Assert(cbScratchBuf);
-+ RTMemFree(pvScratchBuf);
-+ pvScratchBuf = NULL;
-+ }
-+ cbScratchBuf = 0;
- }
-
-- int Init(size_t cbBuf = _64K)
-+ DnDDroppedFiles &getDroppedFiles(void) { return droppedFiles; }
-+
-+ DnDURIList &getURIList(void) { return lstURI; }
-+
-+ int init(size_t cbBuf = _64K)
- {
-- Reset();
-+ reset();
-
- pvScratchBuf = RTMemAlloc(cbBuf);
- if (!pvScratchBuf)
-@@ -160,47 +518,234 @@ typedef struct GuestDnDURIData
- return VINF_SUCCESS;
- }
-
-- void * GetBufferMutable(void) { return pvScratchBuf; }
-+ bool isComplete(void) const
-+ {
-+ LogFlowFunc(("cObjProcessed=%RU64, cObjToProcess=%RU64\n", cObjProcessed, cObjToProcess));
-+
-+ if (!cObjToProcess) /* Always return true if we don't have an object count. */
-+ return true;
-+
-+ Assert(cObjProcessed <= cObjToProcess);
-+ return (cObjProcessed == cObjToProcess);
-+ }
-+
-+ const void *getBuffer(void) const { return pvScratchBuf; }
-+
-+ void *getBufferMutable(void) { return pvScratchBuf; }
-+
-+ size_t getBufferSize(void) const { return cbScratchBuf; }
-+
-+ GuestDnDURIObjCtx &getObj(uint64_t uID = 0)
-+ {
-+ AssertMsg(uID == 0, ("Other objects than object 0 is not supported yet\n"));
-+ return objCtx;
-+ }
-+
-+ GuestDnDURIObjCtx &getObjCurrent(void)
-+ {
-+ DnDURIObject *pCurObj = lstURI.First();
-+ if ( !lstURI.IsEmpty()
-+ && pCurObj)
-+ {
-+ /* Point the context object to the current DnDURIObject to process. */
-+ objCtx.setObj(pCurObj);
-+ }
-+ else
-+ objCtx.reset();
-+
-+ return objCtx;
-+ }
-+
-+ uint64_t getObjToProcess(void) const { return cObjToProcess; }
-
-- size_t GetBufferSize(void) { return cbScratchBuf; }
-+ uint64_t getObjProcessed(void) const { return cObjProcessed; }
-
-- void Reset(void)
-+ int processObject(const DnDURIObject &Obj)
- {
-+ int rc;
-+
-+ /** @todo Find objct in lstURI first! */
-+ switch (Obj.GetType())
-+ {
-+ case DnDURIObject::Directory:
-+ case DnDURIObject::File:
-+ rc = VINF_SUCCESS;
-+ break;
-+
-+ default:
-+ rc = VERR_NOT_IMPLEMENTED;
-+ break;
-+ }
-+
-+ if (RT_SUCCESS(rc))
-+ {
-+ if (cObjToProcess)
-+ {
-+ cObjProcessed++;
-+ Assert(cObjProcessed <= cObjToProcess);
-+ }
-+ }
-+
-+ return rc;
-+ }
-+
-+ void removeObjCurrent(void)
-+ {
-+ if (cObjToProcess)
-+ {
-+ cObjProcessed++;
-+ Assert(cObjProcessed <= cObjToProcess);
-+ }
-+
-+ lstURI.RemoveFirst();
-+ objCtx.reset();
-+ }
-+
-+ void reset(void)
-+ {
-+ LogFlowFuncEnter();
-+
-+ cObjToProcess = 0;
-+ cObjProcessed = 0;
-+
-+ droppedFiles.Close();
-+
- lstURI.Clear();
-- objCtx.Reset();
-+ objCtx.reset();
-+ }
-
-- DnDDirDroppedFilesRollback(&mDropDir);
-- DnDDirDroppedFilesClose(&mDropDir, true /* fRemove */);
-+ void setEstimatedObjects(uint64_t cObjs)
-+ {
-+ Assert(cObjToProcess == 0);
-+ cObjToProcess = cObjs;
-+ LogFlowFunc(("cObjToProcess=%RU64\n", cObjs));
-+ }
-
-- if (pvScratchBuf)
-+public:
-+
-+ int fromLocalMetaData(const GuestDnDMetaData &Data)
-+ {
-+ reset();
-+
-+ if (!Data.getSize())
-+ return VINF_SUCCESS;
-+
-+ char *pszList;
-+ int rc = RTStrCurrentCPToUtf8(&pszList, (const char *)Data.getData());
-+ if (RT_FAILURE(rc))
- {
-- Assert(cbScratchBuf);
-- RTMemFree(pvScratchBuf);
-- pvScratchBuf = NULL;
-+ LogFlowThisFunc(("String conversion failed with rc=%Rrc\n", rc));
-+ return rc;
- }
-- cbScratchBuf = 0;
-+
-+ const size_t cbList = Data.getSize();
-+ LogFlowThisFunc(("metaData=%p, cbList=%zu\n", &Data, cbList));
-+
-+ if (cbList)
-+ {
-+ RTCList<RTCString> lstURIOrg = RTCString(pszList, cbList).split("\r\n");
-+ if (!lstURIOrg.isEmpty())
-+ {
-+ /* Note: All files to be transferred will be kept open during the entire DnD
-+ * operation, also to keep the accounting right. */
-+ rc = lstURI.AppendURIPathsFromList(lstURIOrg, DNDURILIST_FLAGS_KEEP_OPEN);
-+ if (RT_SUCCESS(rc))
-+ cObjToProcess = lstURI.TotalCount();
-+ }
-+ }
-+
-+ RTStrFree(pszList);
-+ return rc;
- }
-
-- DNDDIRDROPPEDFILES mDropDir;
-+ int fromRemoteMetaData(const GuestDnDMetaData &Data)
-+ {
-+ LogFlowFuncEnter();
-+
-+ int rc = lstURI.RootFromURIData(Data.getData(), Data.getSize(), 0 /* uFlags */);
-+ if (RT_SUCCESS(rc))
-+ {
-+ const size_t cRootCount = lstURI.RootCount();
-+ LogFlowFunc(("cRootCount=%zu, cObjToProcess=%RU64\n", cRootCount, cObjToProcess));
-+ if (cRootCount > cObjToProcess)
-+ rc = VERR_INVALID_PARAMETER;
-+ }
-+
-+ return rc;
-+ }
-+
-+ int toMetaData(std::vector<BYTE> &vecData)
-+ {
-+ const char *pszDroppedFilesDir = droppedFiles.GetDirAbs();
-+
-+ Utf8Str strURIs = lstURI.RootToString(RTCString(pszDroppedFilesDir));
-+ size_t cbData = strURIs.length();
-+
-+ LogFlowFunc(("%zu root URIs (%zu bytes)\n", lstURI.RootCount(), cbData));
-+
-+ int rc;
-+
-+ try
-+ {
-+ vecData.resize(cbData + 1 /* Include termination */);
-+ memcpy(&vecData.front(), strURIs.c_str(), cbData);
-+
-+ rc = VINF_SUCCESS;
-+ }
-+ catch (std::bad_alloc &)
-+ {
-+ rc = VERR_NO_MEMORY;
-+ }
-+
-+ return rc;
-+ }
-+
-+protected:
-+
-+ int processDirectory(const char *pszPath, uint32_t fMode)
-+ {
-+ /** @todo Find directory in lstURI first! */
-+ int rc;
-+
-+ const char *pszDroppedFilesDir = droppedFiles.GetDirAbs();
-+ char *pszDir = RTPathJoinA(pszDroppedFilesDir, pszPath);
-+ if (pszDir)
-+ {
-+ rc = RTDirCreateFullPath(pszDir, fMode);
-+ if (cObjToProcess)
-+ {
-+ cObjProcessed++;
-+ Assert(cObjProcessed <= cObjToProcess);
-+ }
-+
-+ RTStrFree(pszDir);
-+ }
-+ else
-+ rc = VERR_NO_MEMORY;
-+
-+ return rc;
-+ }
-+
-+protected:
-+
-+ /** Number of objects to process. */
-+ uint64_t cObjToProcess;
-+ /** Number of objects already processed. */
-+ uint64_t cObjProcessed;
-+ /** Handles all drop files for this operation. */
-+ DnDDroppedFiles droppedFiles;
- /** (Non-recursive) List of URI objects to handle. */
- DnDURIList lstURI;
- /** Context to current object being handled.
- * As we currently do all transfers one after another we
- * only have one context at a time. */
- GuestDnDURIObjCtx objCtx;
--
--protected:
--
- /** Pointer to an optional scratch buffer to use for
- * doing the actual chunk transfers. */
- void *pvScratchBuf;
- /** Size (in bytes) of scratch buffer. */
- size_t cbScratchBuf;
--
--} GuestDnDURIData;
--
--/** List (vector) of MIME types. */
--typedef std::vector<com::Utf8Str> GuestDnDMIMEList;
-+};
-
- /**
- * Context structure for sending data to the guest.
-@@ -224,7 +769,7 @@ typedef struct SENDDATACTX
- /** URI data structure. */
- GuestDnDURIData mURI;
- /** Callback event to use. */
-- GuestDnDCallbackEvent mCallback;
-+ GuestDnDCallbackEvent mCBEvent;
-
- } SENDDATACTX, *PSENDDATACTX;
-
-@@ -244,14 +789,14 @@ typedef struct RECVDATACTX
- GuestDnDMIMEList mFmtOffered;
- /** Original drop format requested to receive from the guest. */
- com::Utf8Str mFmtReq;
-- /** Intermediate drop format to be received from the host.
-+ /** Intermediate drop format to be received from the guest.
- * Some original drop formats require a different intermediate
- * drop format:
- *
- * Receiving a file link as "text/plain" requires still to
- * receive the file from the guest as "text/uri-list" first,
-- * then pointing to the file path on the host in the "text/plain"
-- * data returned. */
-+ * then pointing to the file path on the host with the data
-+ * in "text/plain" format returned. */
- com::Utf8Str mFmtRecv;
- /** Desired drop action to perform on the host.
- * Needed to tell the guest if data has to be
-@@ -263,7 +808,7 @@ typedef struct RECVDATACTX
- /** URI data structure. */
- GuestDnDURIData mURI;
- /** Callback event to use. */
-- GuestDnDCallbackEvent mCallback;
-+ GuestDnDCallbackEvent mCBEvent;
-
- } RECVDATACTX, *PRECVDATACTX;
-
-@@ -282,21 +827,7 @@ public:
-
- virtual ~GuestDnDMsg(void)
- {
-- if (paParms)
-- {
-- /* Remove deep copies. */
-- for (uint32_t i = 0; i < cParms; i++)
-- {
-- if ( paParms[i].type == VBOX_HGCM_SVC_PARM_PTR
-- && paParms[i].u.pointer.size)
-- {
-- AssertPtr(paParms[i].u.pointer.addr);
-- RTMemFree(paParms[i].u.pointer.addr);
-- }
-- }
--
-- RTMemFree(paParms);
-- }
-+ reset();
- }
-
- public:
-@@ -305,7 +836,10 @@ public:
- {
- if (cParms >= cParmsAlloc)
- {
-- paParms = (PVBOXHGCMSVCPARM)RTMemRealloc(paParms, (cParmsAlloc + 4) * sizeof(VBOXHGCMSVCPARM));
-+ if (!paParms)
-+ paParms = (PVBOXHGCMSVCPARM)RTMemAlloc(4 * sizeof(VBOXHGCMSVCPARM));
-+ else
-+ paParms = (PVBOXHGCMSVCPARM)RTMemRealloc(paParms, (cParmsAlloc + 4) * sizeof(VBOXHGCMSVCPARM));
- if (!paParms)
- throw VERR_NO_MEMORY;
- RT_BZERO(&paParms[cParmsAlloc], 4 * sizeof(VBOXHGCMSVCPARM));
-@@ -319,20 +853,41 @@ public:
- PVBOXHGCMSVCPARM getParms(void) const { return paParms; }
- uint32_t getType(void) const { return uMsg; }
-
-- int setNextPointer(void *pvBuf, uint32_t cbBuf)
-+ void reset(void)
- {
-- AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
-- AssertReturn(cbBuf, VERR_INVALID_PARAMETER);
-+ if (paParms)
-+ {
-+ /* Remove deep copies. */
-+ for (uint32_t i = 0; i < cParms; i++)
-+ {
-+ if ( paParms[i].type == VBOX_HGCM_SVC_PARM_PTR
-+ && paParms[i].u.pointer.size)
-+ {
-+ AssertPtr(paParms[i].u.pointer.addr);
-+ RTMemFree(paParms[i].u.pointer.addr);
-+ }
-+ }
-
-+ RTMemFree(paParms);
-+ paParms = NULL;
-+ }
-+
-+ uMsg = cParms = cParmsAlloc = 0;
-+ }
-+
-+ int setNextPointer(void *pvBuf, uint32_t cbBuf)
-+ {
- PVBOXHGCMSVCPARM pParm = getNextParam();
- if (!pParm)
- return VERR_NO_MEMORY;
-
-- void *pvTmp = RTMemDup(pvBuf, cbBuf);
-- if (!pvTmp)
-+ void *pvTmp = NULL;
-+ if (pvBuf)
- {
-- RTMemFree(pParm);
-- return VERR_NO_MEMORY;
-+ Assert(cbBuf);
-+ pvTmp = RTMemDup(pvBuf, cbBuf);
-+ if (!pvTmp)
-+ return VERR_NO_MEMORY;
- }
-
- pParm->setPointer(pvTmp, cbBuf);
-@@ -347,10 +902,7 @@ public:
-
- char *pszTemp = RTStrDup(pszString);
- if (!pszTemp)
-- {
-- RTMemFree(pParm);
- return VERR_NO_MEMORY;
-- }
-
- pParm->setString(pszTemp);
- return VINF_SUCCESS;
-@@ -422,6 +974,9 @@ typedef struct GuestDnDCallback
- /** Contains registered callback pointers for specific HGCM message types. */
- typedef std::map<uint32_t, GuestDnDCallback> GuestDnDCallbackMap;
-
-+/** @todo r=andy This class needs to go, as this now is too inflexible when it comes to all
-+ * the callback handling/dispatching. It's part of the initial code and only adds
-+ * unnecessary complexity. */
- class GuestDnDResponse
- {
-
-@@ -474,9 +1029,9 @@ protected:
- /** Format(s) requested/supported from the guest. */
- GuestDnDMIMEList m_lstFormats;
- /** Pointer to IGuest parent object. */
-- ComObjPtr<Guest> m_parent;
-+ ComObjPtr<Guest> m_pParent;
- /** Pointer to associated progress object. Optional. */
-- ComObjPtr<Progress> m_progress;
-+ ComObjPtr<Progress> m_pProgress;
- /** Callback map. */
- GuestDnDCallbackMap m_mapCallbacks;
- };
-@@ -485,6 +1040,8 @@ protected:
- * Private singleton class for the guest's DnD
- * implementation. Can't be instanciated directly, only via
- * the factory pattern.
-+ *
-+ ** @todo Move this into GuestDnDBase.
- */
- class GuestDnD
- {
-@@ -521,10 +1078,10 @@ public:
-
- /** @name Public helper functions.
- * @{ */
-- HRESULT adjustScreenCoordinates(ULONG uScreenId, ULONG *puX, ULONG *puY) const;
-- int hostCall(uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms) const;
-- GuestDnDResponse *response(void) { return m_pResponse; }
-- std::vector<com::Utf8Str> defaultFormats(void) const { return m_strDefaultFormats; }
-+ HRESULT adjustScreenCoordinates(ULONG uScreenId, ULONG *puX, ULONG *puY) const;
-+ int hostCall(uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms) const;
-+ GuestDnDResponse *response(void) { return m_pResponse; }
-+ GuestDnDMIMEList defaultFormats(void) const { return m_strDefaultFormats; }
- /** @} */
-
- public:
-@@ -552,7 +1109,7 @@ protected:
- /** @name Singleton properties.
- * @{ */
- /** List of supported default MIME/Content-type formats. */
-- std::vector<com::Utf8Str> m_strDefaultFormats;
-+ GuestDnDMIMEList m_strDefaultFormats;
- /** Pointer to guest implementation. */
- const ComObjPtr<Guest> m_pGuest;
- /** The current (last) response from the guest. At the
-@@ -607,7 +1164,8 @@ protected:
- /** @} */
-
- int sendCancel(void);
-- int waitForEvent(RTMSINTERVAL msTimeout, GuestDnDCallbackEvent &Event, GuestDnDResponse *pResp);
-+ int updateProgress(GuestDnDData *pData, GuestDnDResponse *pResp, uint32_t cbDataAdd = 0);
-+ int waitForEvent(GuestDnDCallbackEvent *pEvent, GuestDnDResponse *pResp, RTMSINTERVAL msTimeout);
-
- protected:
-
-@@ -621,16 +1179,19 @@ protected:
- GuestDnDMIMEList m_lstFmtOffered;
- /** @} */
-
-+ /**
-+ * Internal stuff.
-+ */
- struct
- {
-- /** Flag indicating whether a drop operation currently
-- * is in progress or not. */
-- bool mfTransferIsPending;
-+ /** Number of active transfers (guest->host or host->guest). */
-+ uint32_t m_cTransfersPending;
- /** The DnD protocol version to use, depending on the
-- * installed Guest Additions. */
-- uint32_t mProtocolVersion;
-- /** Outgoing message queue. */
-- GuestDnDMsgList mListOutgoing;
-+ * installed Guest Additions. See DragAndDropSvc.h for
-+ * a protocol changelog. */
-+ uint32_t m_uProtocolVersion;
-+ /** Outgoing message queue (FIFO). */
-+ GuestDnDMsgList m_lstMsgOut;
- } mDataBase;
- };
- #endif /* ____H_GUESTDNDPRIVATE */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/include/GuestDnDSourceImpl.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/include/GuestDnDSourceImpl.h
-@@ -18,6 +18,11 @@
- #ifndef ____H_GUESTDNDSOURCEIMPL
- #define ____H_GUESTDNDSOURCEIMPL
-
-+#include <VBox/GuestHost/DragAndDrop.h>
-+#include <VBox/HostServices/DragAndDropSvc.h>
-+
-+using namespace DragAndDropSvc;
-+
- #include "GuestDnDSourceWrap.h"
- #include "GuestDnDPrivate.h"
-
-@@ -64,10 +69,11 @@ protected:
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
- /** @name Dispatch handlers for the HGCM callbacks.
- * @{ */
-- int i_onReceiveData(PRECVDATACTX pCtx, const void *pvData, uint32_t cbData, uint64_t cbTotalSize);
-+ int i_onReceiveDataHdr(PRECVDATACTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr);
-+ int i_onReceiveData(PRECVDATACTX pCtx, PVBOXDNDSNDDATA pSndData);
- int i_onReceiveDir(PRECVDATACTX pCtx, const char *pszPath, uint32_t cbPath, uint32_t fMode);
-- int i_onReceiveFileHdr(PRECVDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, const char *pszPath, uint32_t cbPath, uint64_t cbSize, uint32_t fMode, uint32_t fFlags);
-- int i_onReceiveFileData(PRECVDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, const void *pvData, uint32_t cbData);
-+ int i_onReceiveFileHdr(PRECVDATACTX pCtx, const char *pszPath, uint32_t cbPath, uint64_t cbSize, uint32_t fMode, uint32_t fFlags);
-+ int i_onReceiveFileData(PRECVDATACTX pCtx,const void *pvData, uint32_t cbData);
- /** @} */
- #endif
-
-@@ -92,7 +98,6 @@ protected:
- int i_receiveData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout);
- int i_receiveRawData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout);
- int i_receiveURIData(PRECVDATACTX pCtx, RTMSINTERVAL msTimeout);
-- int i_updateProcess(PRECVDATACTX pCtx, uint64_t cbDataAdd);
-
- protected:
-
-@@ -100,7 +105,8 @@ protected:
- {
- /** Maximum data block size (in bytes) the source can handle. */
- uint32_t mcbBlockSize;
-- /** The context for receiving data from the guest. */
-+ /** The context for receiving data from the guest.
-+ * At the moment only one transfer at a time is supported. */
- RECVDATACTX mRecvCtx;
- } mData;
- };
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/include/GuestDnDTargetImpl.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/include/GuestDnDTargetImpl.h
-@@ -84,11 +84,13 @@ protected:
-
- int i_cancelOperation(void);
- int i_sendData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout);
-+ int i_sendDataBody(PSENDDATACTX pCtx, GuestDnDData *pData);
-+ int i_sendDataHeader(PSENDDATACTX pCtx, GuestDnDData *pData, GuestDnDURIData *pURIData /* = NULL */);
- int i_sendDirectory(PSENDDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, GuestDnDMsg *pMsg);
- int i_sendFile(PSENDDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, GuestDnDMsg *pMsg);
- int i_sendFileData(PSENDDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, GuestDnDMsg *pMsg);
-- int i_sendURIData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout);
- int i_sendRawData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout);
-+ int i_sendURIData(PSENDDATACTX pCtx, RTMSINTERVAL msTimeout);
- int i_sendURIDataLoop(PSENDDATACTX pCtx, GuestDnDMsg *pMsg);
-
- protected:
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/include/GuestImpl.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/include/GuestImpl.h
-@@ -99,6 +99,7 @@ public:
- {
- return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
- }
-+ uint32_t i_getAdditionsRevision(void) { return mData.mAdditionsRevision; }
- uint32_t i_getAdditionsVersion(void) { return mData.mAdditionsVersionFull; }
- VBOXOSTYPE i_getGuestOSType(void) { return mData.mOSType; }
- #ifdef VBOX_WITH_GUEST_CONTROL
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/ConsoleImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/ConsoleImpl.cpp
-@@ -8548,8 +8548,10 @@ int Console::i_changeDnDMode(DnDMode_T a
- }
-
- int rc = pVMMDev->hgcmHostCall("VBoxDragAndDropSvc",
-- DragAndDropSvc::HOST_DND_SET_MODE, 1, &parm);
-- LogFlowFunc(("rc=%Rrc\n", rc));
-+ DragAndDropSvc::HOST_DND_SET_MODE, 1 /* cParms */, &parm);
-+ if (RT_FAILURE(rc))
-+ LogRel(("Error changing drag and drop mode: %Rrc\n", rc));
-+
- return rc;
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/ConsoleImpl2.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/ConsoleImpl2.cpp
-@@ -491,20 +491,7 @@ static int SetBiosDiskInfo(ComPtr<IMachi
- lPortUsed[u32HDCount++] = lPortNum;
- LogFlowFunc(("HD port Count=%d\n", u32HDCount));
- }
--
-- /* Configure the hotpluggable flag for the port. */
-- BOOL fHotPluggable = FALSE;
-- hrc = pMediumAtt->COMGETTER(HotPluggable)(&fHotPluggable); H();
-- if (SUCCEEDED(hrc))
-- {
-- PCFGMNODE pPortCfg;
-- char szName[24];
-- RTStrPrintf(szName, sizeof(szName), "Port%d", lPortNum);
--
-- InsertConfigNode(pCfg, szName, &pPortCfg);
-- InsertConfigInteger(pPortCfg, "Hotpluggable", fHotPluggable ? 1 : 0);
-- }
-- }
-+ }
- }
-
-
-@@ -2039,6 +2026,31 @@ int Console::i_configConstructorInner(PU
- InsertConfigInteger(pCfg, "PortCount", cPorts);
- InsertConfigInteger(pCfg, "Bootable", fBootable);
-
-+ com::SafeIfaceArray<IMediumAttachment> atts;
-+ hrc = pMachine->GetMediumAttachmentsOfController(controllerName.raw(),
-+ ComSafeArrayAsOutParam(atts)); H();
-+
-+ /* Configure the hotpluggable flag for the port. */
-+ for (unsigned idxAtt = 0; idxAtt < atts.size(); ++idxAtt)
-+ {
-+ IMediumAttachment *pMediumAtt = atts[idxAtt];
-+
-+ LONG lPortNum = 0;
-+ hrc = pMediumAtt->COMGETTER(Port)(&lPortNum); H();
-+
-+ BOOL fHotPluggable = FALSE;
-+ hrc = pMediumAtt->COMGETTER(HotPluggable)(&fHotPluggable); H();
-+ if (SUCCEEDED(hrc))
-+ {
-+ PCFGMNODE pPortCfg;
-+ char szName[24];
-+ RTStrPrintf(szName, sizeof(szName), "Port%d", lPortNum);
-+
-+ InsertConfigNode(pCfg, szName, &pPortCfg);
-+ InsertConfigInteger(pPortCfg, "Hotpluggable", fHotPluggable ? 1 : 0);
-+ }
-+ }
-+
- /* BIOS configuration values, first AHCI controller only. */
- if ( !pBusMgr->hasPCIDevice("ahci", 1)
- && pBiosCfg)
-@@ -2424,7 +2436,9 @@ int Console::i_configConstructorInner(PU
- hrc = pMachine->GetSerialPort(ulInstance, serialPort.asOutParam()); H();
- BOOL fEnabledSerPort = FALSE;
- if (serialPort)
-+ {
- hrc = serialPort->COMGETTER(Enabled)(&fEnabledSerPort); H();
-+ }
- if (!fEnabledSerPort)
- continue;
-
-@@ -2561,7 +2575,9 @@ int Console::i_configConstructorInner(PU
- ComPtr<IAudioAdapter> audioAdapter;
- hrc = pMachine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam()); H();
- if (audioAdapter)
-+ {
- hrc = audioAdapter->COMGETTER(Enabled)(&fAudioEnabled); H();
-+ }
-
- if (fAudioEnabled)
- {
-@@ -3383,6 +3399,8 @@ int Console::i_configGraphicsController(
- BOOL f3DEnabled;
- hrc = ptrMachine->COMGETTER(Accelerate3DEnabled)(&f3DEnabled); H();
- InsertConfigInteger(pCfg, "VMSVGA3dEnabled", f3DEnabled);
-+#else
-+ LogRel(("VMSVGA3d not available in this build!\n"));
- #endif
- }
- #endif
-@@ -4554,7 +4572,7 @@ int Console::i_configNetwork(const char
- size_t pos, ppos;
- pos = ppos = 0;
- #define ITERATE_TO_NEXT_TERM(res, str, pos, ppos) \
-- do { \
-+ { \
- pos = str.find(",", ppos); \
- if (pos == Utf8Str::npos) \
- { \
-@@ -4564,7 +4582,7 @@ int Console::i_configNetwork(const char
- res = str.substr(ppos, pos - ppos); \
- Log2((#res " %s pos:%d, ppos:%d\n", res.c_str(), pos, ppos)); \
- ppos = pos + 1; \
-- } while (0)
-+ } /* no do { ... } while because of 'continue' */
- ITERATE_TO_NEXT_TERM(strName, utf, pos, ppos);
- ITERATE_TO_NEXT_TERM(strProto, utf, pos, ppos);
- ITERATE_TO_NEXT_TERM(strHostIP, utf, pos, ppos);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/GuestDnDPrivate.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/GuestDnDPrivate.cpp
-@@ -5,7 +5,7 @@
- */
-
- /*
-- * Copyright (C) 2011-2015 Oracle Corporation
-+ * Copyright (C) 2011-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -193,7 +193,7 @@ GuestDnDResponse::GuestDnDResponse(const
- : m_EventSem(NIL_RTSEMEVENT)
- , m_defAction(0)
- , m_allActions(0)
-- , m_parent(pGuest)
-+ , m_pParent(pGuest)
- {
- int rc = RTSemEventCreate(&m_EventSem);
- if (RT_FAILURE(rc))
-@@ -225,14 +225,14 @@ void GuestDnDResponse::reset(void)
-
- HRESULT GuestDnDResponse::resetProgress(const ComObjPtr<Guest>& pParent)
- {
-- m_progress.setNull();
-+ m_pProgress.setNull();
-
-- HRESULT hr = m_progress.createObject();
-+ HRESULT hr = m_pProgress.createObject();
- if (SUCCEEDED(hr))
- {
-- hr = m_progress->init(static_cast<IGuest *>(pParent),
-- Bstr(pParent->tr("Dropping data")).raw(),
-- TRUE /* aCancelable */);
-+ hr = m_pProgress->init(static_cast<IGuest *>(pParent),
-+ Bstr(pParent->tr("Dropping data")).raw(),
-+ TRUE /* aCancelable */);
- }
-
- return hr;
-@@ -241,9 +241,9 @@ HRESULT GuestDnDResponse::resetProgress(
- bool GuestDnDResponse::isProgressCanceled(void) const
- {
- BOOL fCanceled;
-- if (!m_progress.isNull())
-+ if (!m_pProgress.isNull())
- {
-- HRESULT hr = m_progress->COMGETTER(Canceled)(&fCanceled);
-+ HRESULT hr = m_pProgress->COMGETTER(Canceled)(&fCanceled);
- AssertComRC(hr);
- }
- else
-@@ -284,14 +284,14 @@ int GuestDnDResponse::setProgress(unsign
- uStatus, uPercentage, rcOp, strMsg.c_str()));
-
- int rc = VINF_SUCCESS;
-- if (!m_progress.isNull())
-+ if (!m_pProgress.isNull())
- {
- BOOL fCompleted;
-- HRESULT hr = m_progress->COMGETTER(Completed)(&fCompleted);
-+ HRESULT hr = m_pProgress->COMGETTER(Completed)(&fCompleted);
- AssertComRC(hr);
-
- BOOL fCanceled;
-- hr = m_progress->COMGETTER(Canceled)(&fCanceled);
-+ hr = m_pProgress->COMGETTER(Canceled)(&fCanceled);
- AssertComRC(hr);
-
- LogFlowFunc(("Current: fCompleted=%RTbool, fCanceled=%RTbool\n", fCompleted, fCanceled));
-@@ -302,16 +302,18 @@ int GuestDnDResponse::setProgress(unsign
- {
- case DragAndDropSvc::DND_PROGRESS_ERROR:
- {
-- hr = m_progress->i_notifyComplete(VBOX_E_IPRT_ERROR,
-- COM_IIDOF(IGuest),
-- m_parent->getComponentName(), strMsg.c_str());
-+ hr = m_pProgress->i_notifyComplete(VBOX_E_IPRT_ERROR,
-+ COM_IIDOF(IGuest),
-+ m_pParent->getComponentName(), strMsg.c_str());
- reset();
- break;
- }
-
- case DragAndDropSvc::DND_PROGRESS_CANCELLED:
- {
-- hr = m_progress->i_notifyComplete(S_OK);
-+ hr = m_pProgress->Cancel();
-+ AssertComRC(hr);
-+ hr = m_pProgress->i_notifyComplete(S_OK);
- AssertComRC(hr);
-
- reset();
-@@ -323,12 +325,12 @@ int GuestDnDResponse::setProgress(unsign
- {
- if (!fCanceled)
- {
-- hr = m_progress->SetCurrentOperationProgress(uPercentage);
-+ hr = m_pProgress->SetCurrentOperationProgress(uPercentage);
- AssertComRC(hr);
- if ( uStatus == DragAndDropSvc::DND_PROGRESS_COMPLETE
- || uPercentage >= 100)
- {
-- hr = m_progress->i_notifyComplete(S_OK);
-+ hr = m_pProgress->i_notifyComplete(S_OK);
- AssertComRC(hr);
- }
- }
-@@ -340,9 +342,9 @@ int GuestDnDResponse::setProgress(unsign
- }
- }
-
-- hr = m_progress->COMGETTER(Completed)(&fCompleted);
-+ hr = m_pProgress->COMGETTER(Completed)(&fCompleted);
- AssertComRC(hr);
-- hr = m_progress->COMGETTER(Canceled)(&fCanceled);
-+ hr = m_pProgress->COMGETTER(Canceled)(&fCanceled);
- AssertComRC(hr);
-
- LogFlowFunc(("New: fCompleted=%RTbool, fCanceled=%RTbool\n", fCompleted, fCanceled));
-@@ -361,12 +363,28 @@ int GuestDnDResponse::onDispatch(uint32_
-
- switch (u32Function)
- {
-+ case DragAndDropSvc::GUEST_DND_CONNECT:
-+ {
-+ LogThisFunc(("Client connected\n"));
-+
-+ /* Nothing to do here (yet). */
-+ rc = VINF_SUCCESS;
-+ break;
-+ }
-+
-+ case DragAndDropSvc::GUEST_DND_DISCONNECT:
-+ {
-+ LogThisFunc(("Client disconnected\n"));
-+ rc = setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS);
-+ break;
-+ }
-+
- case DragAndDropSvc::GUEST_DND_HG_ACK_OP:
- {
- DragAndDropSvc::PVBOXDNDCBHGACKOPDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBHGACKOPDATA>(pvParms);
- AssertPtr(pCBData);
- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBHGACKOPDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_ACK_OP == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_ACK_OP == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- setDefAction(pCBData->uAction);
- rc = notifyAboutGuestResponse();
-@@ -378,10 +396,15 @@ int GuestDnDResponse::onDispatch(uint32_
- DragAndDropSvc::PVBOXDNDCBHGREQDATADATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBHGREQDATADATA>(pvParms);
- AssertPtr(pCBData);
- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBHGREQDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_REQ_DATA == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_REQ_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- if ( pCBData->cbFormat == 0
-- || pCBData->cbFormat > _64K)
-+ if ( pCBData->cbFormat == 0
-+ || pCBData->cbFormat > _64K /** @todo Make this configurable? */
-+ || pCBData->pszFormat == NULL)
-+ {
-+ rc = VERR_INVALID_PARAMETER;
-+ }
-+ else if (!RTStrIsValidEncoding(pCBData->pszFormat))
- {
- rc = VERR_INVALID_PARAMETER;
- }
-@@ -403,7 +426,7 @@ int GuestDnDResponse::onDispatch(uint32_
- reinterpret_cast<DragAndDropSvc::PVBOXDNDCBHGEVTPROGRESSDATA>(pvParms);
- AssertPtr(pCBData);
- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBHGEVTPROGRESSDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_EVT_PROGRESS == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_EVT_PROGRESS == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- rc = setProgress(pCBData->uPercentage, pCBData->uStatus, pCBData->rc);
- if (RT_SUCCESS(rc))
-@@ -417,10 +440,15 @@ int GuestDnDResponse::onDispatch(uint32_
- reinterpret_cast<DragAndDropSvc::PVBOXDNDCBGHACKPENDINGDATA>(pvParms);
- AssertPtr(pCBData);
- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBGHACKPENDINGDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_ACK_PENDING == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_ACK_PENDING == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- if ( pCBData->cbFormat == 0
-- || pCBData->cbFormat > _64K) /** @todo Make the maximum size configurable? */
-+ if ( pCBData->cbFormat == 0
-+ || pCBData->cbFormat > _64K /** @todo Make the maximum size configurable? */
-+ || pCBData->pszFormat == NULL)
-+ {
-+ rc = VERR_INVALID_PARAMETER;
-+ }
-+ else if (!RTStrIsValidEncoding(pCBData->pszFormat))
- {
- rc = VERR_INVALID_PARAMETER;
- }
-@@ -469,7 +497,7 @@ int GuestDnDResponse::onDispatch(uint32_
-
- HRESULT GuestDnDResponse::queryProgressTo(IProgress **ppProgress)
- {
-- return m_progress.queryInterfaceTo(ppProgress);
-+ return m_pProgress.queryInterfaceTo(ppProgress);
- }
-
- int GuestDnDResponse::waitForGuestResponse(RTMSINTERVAL msTimeout /*= 500 */) const
-@@ -612,7 +640,7 @@ GuestDnDMIMEList GuestDnD::toFilteredFor
-
- for (size_t i = 0; i < lstFormatsWanted.size(); i++)
- {
-- /* Only keep allowed format types. */
-+ /* Only keep supported format types. */
- if (std::find(lstFormatsSupported.begin(),
- lstFormatsSupported.end(), lstFormatsWanted.at(i)) != lstFormatsSupported.end())
- {
-@@ -737,12 +765,12 @@ std::vector<DnDAction_T> GuestDnD::toMai
-
- GuestDnDBase::GuestDnDBase(void)
- {
-- mDataBase.mfTransferIsPending = false;
--
-- /*
-- * Initialize public attributes.
-- */
-+ /* Initialize public attributes. */
- m_lstFmtSupported = GuestDnDInst()->defaultFormats();
-+
-+ /* Initialzie private stuff. */
-+ mDataBase.m_cTransfersPending = 0;
-+ mDataBase.m_uProtocolVersion = 0;
- }
-
- HRESULT GuestDnDBase::i_isFormatSupported(const com::Utf8Str &aFormat, BOOL *aSupported)
-@@ -795,103 +823,150 @@ HRESULT GuestDnDBase::i_getProtocolVersi
- return RT_SUCCESS(rc) ? S_OK : E_FAIL;
- }
-
--int GuestDnDBase::getProtocolVersion(uint32_t *puVersion)
-+/**
-+ * Tries to guess the DnD protocol version to use on the guest, based on the
-+ * installed Guest Additions version + revision.
-+ *
-+ * If unable to retrieve the protocol version, VERR_NOT_FOUND is returned along
-+ * with protocol version 1.
-+ *
-+ * @return IPRT status code.
-+ * @param puProto Where to store the protocol version.
-+ */
-+int GuestDnDBase::getProtocolVersion(uint32_t *puProto)
- {
-- AssertPtrReturn(puVersion, VERR_INVALID_POINTER);
-+ AssertPtrReturn(puProto, VERR_INVALID_POINTER);
-
- int rc;
-
-- uint32_t uVer, uVerAdditions = 0;
-+ uint32_t uProto = 0;
-+ uint32_t uVerAdditions = 0;
-+ uint32_t uRevAdditions = 0;
- if ( m_pGuest
-- && (uVerAdditions = m_pGuest->i_getAdditionsVersion()) > 0)
-+ && (uVerAdditions = m_pGuest->i_getAdditionsVersion()) > 0
-+ && (uRevAdditions = m_pGuest->i_getAdditionsRevision()) > 0)
- {
-- uint32_t uVBoxMajor = VBOX_FULL_VERSION_GET_MAJOR(uVerAdditions);
-- uint32_t uVBoxMinor = VBOX_FULL_VERSION_GET_MINOR(uVerAdditions);
--
--#if 0 /*def DEBUG_andy*/
-+#ifdef DEBUG
-+# if 0
- /* Hardcode the to-used protocol version; nice for testing side effects. */
-- uVer = 2;
--#else
-- uVer = ( uVBoxMajor >= 5)
-- ? 2 /* VBox 5.0 and up: Protocol version 2. */
-- : 1; /* VBox <= 4.3: Protocol version 1. */
-- /* Build revision is ignored. */
-+ uProto = 3;
-+ rc = VINF_SUCCESS;
-+# endif
- #endif
-+ if (!uProto) /* Protocol not set yet? */
-+ {
-+ if (uVerAdditions >= VBOX_FULL_VERSION_MAKE(5, 0, 0))
-+ {
-+ if (uRevAdditions >= 103344) /* Since r103344: Protocol v3. */
-+ {
-+ uProto = 3;
-+ }
-+ else
-+ uProto = 2; /* VBox 5.0.0 - 5.0.8: Protocol v2. */
-+ }
-
-- LogFlowThisFunc(("uVerAdditions=%RU32 (%RU32.%RU32)\n", uVerAdditions, uVBoxMajor, uVBoxMinor));
-- rc = VINF_SUCCESS;
-+ LogFlowFunc(("uVerAdditions=%RU32 (%RU32.%RU32.%RU32), r%RU32\n",
-+ uVerAdditions, VBOX_FULL_VERSION_GET_MAJOR(uVerAdditions), VBOX_FULL_VERSION_GET_MINOR(uVerAdditions),
-+ VBOX_FULL_VERSION_GET_BUILD(uVerAdditions), uRevAdditions));
-+ rc = VINF_SUCCESS;
-+ }
- }
- else
- {
-- uVer = 1; /* Fallback. */
-+ uProto = 1; /* Fallback. */
- rc = VERR_NOT_FOUND;
- }
-
-- LogFlowThisFunc(("uVer=%RU32, uVerAdditions=%RU32, rc=%Rrc\n", uVer, uVerAdditions, rc));
-+ LogRel2(("DnD: Guest is using protocol v%RU32, rc=%Rrc\n", uProto, rc));
-
-- *puVersion = uVer;
-+ *puProto = uProto;
- return rc;
- }
-
- int GuestDnDBase::msgQueueAdd(GuestDnDMsg *pMsg)
- {
-- mDataBase.mListOutgoing.push_back(pMsg);
-+ mDataBase.m_lstMsgOut.push_back(pMsg);
- return VINF_SUCCESS;
- }
-
- GuestDnDMsg *GuestDnDBase::msgQueueGetNext(void)
- {
-- if (mDataBase.mListOutgoing.empty())
-+ if (mDataBase.m_lstMsgOut.empty())
- return NULL;
-- return mDataBase.mListOutgoing.front();
-+ return mDataBase.m_lstMsgOut.front();
- }
-
- void GuestDnDBase::msgQueueRemoveNext(void)
- {
-- if (!mDataBase.mListOutgoing.empty())
-+ if (!mDataBase.m_lstMsgOut.empty())
- {
-- GuestDnDMsg *pMsg = mDataBase.mListOutgoing.front();
-+ GuestDnDMsg *pMsg = mDataBase.m_lstMsgOut.front();
- if (pMsg)
- delete pMsg;
-- mDataBase.mListOutgoing.pop_front();
-+ mDataBase.m_lstMsgOut.pop_front();
- }
- }
-
- void GuestDnDBase::msgQueueClear(void)
- {
-- GuestDnDMsgList::iterator itMsg = mDataBase.mListOutgoing.begin();
-- while (itMsg != mDataBase.mListOutgoing.end())
-+ LogFlowFunc(("cMsg=%zu\n", mDataBase.m_lstMsgOut.size()));
-+
-+ GuestDnDMsgList::iterator itMsg = mDataBase.m_lstMsgOut.begin();
-+ while (itMsg != mDataBase.m_lstMsgOut.end())
- {
-- delete *itMsg;
-+ GuestDnDMsg *pMsg = *itMsg;
-+ if (pMsg)
-+ delete pMsg;
-+
-+ itMsg++;
- }
-
-- mDataBase.mListOutgoing.clear();
-+ mDataBase.m_lstMsgOut.clear();
- }
-
- int GuestDnDBase::sendCancel(void)
- {
-- int rc;
-- try
-- {
-- GuestDnDMsg *pMsgCancel = new GuestDnDMsg();
-- pMsgCancel->setType(DragAndDropSvc::HOST_DND_HG_EVT_CANCEL);
--
-- rc = msgQueueAdd(pMsgCancel);
-- }
-- catch(std::bad_alloc & /*e*/)
-- {
-- rc = VERR_NO_MEMORY;
-- }
-+ int rc = GuestDnDInst()->hostCall(HOST_DND_HG_EVT_CANCEL,
-+ 0 /* cParms */, NULL /* paParms */);
-
- LogFlowFunc(("Generated cancelling request, rc=%Rrc\n", rc));
- return rc;
- }
-
-+int GuestDnDBase::updateProgress(GuestDnDData *pData, GuestDnDResponse *pResp,
-+ uint32_t cbDataAdd /* = 0 */)
-+{
-+ AssertPtrReturn(pData, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pResp, VERR_INVALID_POINTER);
-+ /* cbDataAdd is optional. */
-+
-+ LogFlowFunc(("cbTotal=%RU64, cbProcessed=%RU64, cbRemaining=%RU64, cbDataAdd=%RU32\n",
-+ pData->getTotal(), pData->getProcessed(), pData->getRemaining(), cbDataAdd));
-+
-+ if (!pResp)
-+ return VINF_SUCCESS;
-+
-+ if (cbDataAdd)
-+ pData->addProcessed(cbDataAdd);
-+
-+ int rc = pResp->setProgress(pData->getPercentComplete(),
-+ pData->isComplete()
-+ ? DND_PROGRESS_COMPLETE
-+ : DND_PROGRESS_RUNNING);
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
- /** @todo GuestDnDResponse *pResp needs to go. */
--int GuestDnDBase::waitForEvent(RTMSINTERVAL msTimeout, GuestDnDCallbackEvent &Event, GuestDnDResponse *pResp)
-+int GuestDnDBase::waitForEvent(GuestDnDCallbackEvent *pEvent, GuestDnDResponse *pResp, RTMSINTERVAL msTimeout)
- {
-+ AssertPtrReturn(pEvent, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pResp, VERR_INVALID_POINTER);
-+
- int rc;
-
-+ LogFlowFunc(("msTimeout=%RU32\n", msTimeout));
-+
- uint64_t tsStart = RTTimeMilliTS();
- do
- {
-@@ -900,10 +975,10 @@ int GuestDnDBase::waitForEvent(RTMSINTER
- * wait event. As we don't want to block if the guest does not
- * respond, do busy waiting here.
- */
-- rc = Event.Wait(500 /* ms */);
-+ rc = pEvent->Wait(500 /* ms */);
- if (RT_SUCCESS(rc))
- {
-- rc = Event.Result();
-+ rc = pEvent->Result();
- LogFlowFunc(("Callback done, result is %Rrc\n", rc));
- break;
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2014-2015 Oracle Corporation
-+ * Copyright (C) 2014-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -36,8 +36,6 @@
- #include <iprt/cpp/utils.h> /* For unconst(). */
-
- #include <VBox/com/array.h>
--#include <VBox/GuestHost/DragAndDrop.h>
--#include <VBox/HostServices/DragAndDropSvc.h>
-
- #ifdef LOG_GROUP
- #undef LOG_GROUP
-@@ -245,15 +243,18 @@ HRESULT GuestDnDSource::dragIsPending(UL
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
- /* Determine guest DnD protocol to use. */
-- GuestDnDBase::getProtocolVersion(&mDataBase.mProtocolVersion);
-+ GuestDnDBase::getProtocolVersion(&mDataBase.m_uProtocolVersion);
-
- /* Default is ignoring the action. */
-- DnDAction_T defaultAction = DnDAction_Ignore;
-+ if (aDefaultAction)
-+ *aDefaultAction = DnDAction_Ignore;
-
- HRESULT hr = S_OK;
-
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_GH_REQ_PENDING);
-+ Msg.setType(HOST_DND_GH_REQ_PENDING);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextUInt32(uScreenId);
-
- int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-@@ -264,7 +265,7 @@ HRESULT GuestDnDSource::dragIsPending(UL
-
- bool fFetchResult = true;
-
-- rc = pResp->waitForGuestResponse(5000 /* Timeout in ms */);
-+ rc = pResp->waitForGuestResponse(100 /* Timeout in ms */);
- if (RT_FAILURE(rc))
- fFetchResult = false;
-
-@@ -275,35 +276,32 @@ HRESULT GuestDnDSource::dragIsPending(UL
- /* Fetch the default action to use. */
- if (fFetchResult)
- {
-- defaultAction = GuestDnD::toMainAction(pResp->defAction());
-- aAllowedActions = GuestDnD::toMainActions(pResp->allActions());
--
- /*
- * In the GuestDnDSource case the source formats are from the guest,
- * as GuestDnDSource acts as a target for the guest. The host always
- * dictates what's supported and what's not, so filter out all formats
- * which are not supported by the host.
- */
-- aFormats = GuestDnD::toFilteredFormatList(m_lstFmtSupported, pResp->formats());
--
-- /* Save the (filtered) formats. */
-- m_lstFmtOffered = aFormats;
--
-- if (m_lstFmtOffered.size())
-+ GuestDnDMIMEList lstFiltered = GuestDnD::toFilteredFormatList(m_lstFmtSupported, pResp->formats());
-+ if (lstFiltered.size())
- {
-- LogRelMax(3, ("DnD: Offered formats:\n"));
-- for (size_t i = 0; i < m_lstFmtOffered.size(); i++)
-- LogRelMax(3, ("DnD:\tFormat #%zu: %s\n", i, m_lstFmtOffered.at(i).c_str()));
-+ LogRel3(("DnD: Host offered the following formats:\n"));
-+ for (size_t i = 0; i < lstFiltered.size(); i++)
-+ LogRel3(("DnD:\tFormat #%zu: %s\n", i, lstFiltered.at(i).c_str()));
-+
-+ aFormats = lstFiltered;
-+ aAllowedActions = GuestDnD::toMainActions(pResp->allActions());
-+ if (aDefaultAction)
-+ *aDefaultAction = GuestDnD::toMainAction(pResp->defAction());
-+
-+ /* Apply the (filtered) formats list. */
-+ m_lstFmtOffered = lstFiltered;
- }
- else
-- LogRelMax(3, ("DnD: No compatible format between guest and host found, drag and drop to host not possible\n"));
-+ LogRel2(("DnD: Negotiation of formats between guest and host failed, drag and drop to host not possible\n"));
- }
-
-- LogFlowFunc(("fFetchResult=%RTbool, defaultAction=0x%x, allActions=0x%x\n",
-- fFetchResult, defaultAction, pResp->allActions()));
--
-- if (aDefaultAction)
-- *aDefaultAction = defaultAction;
-+ LogFlowFunc(("fFetchResult=%RTbool, allActions=0x%x\n", fFetchResult, pResp->allActions()));
- }
-
- LogFlowFunc(("hr=%Rhrc\n", hr));
-@@ -320,6 +318,8 @@ HRESULT GuestDnDSource::drop(const com::
- AutoCaller autoCaller(this);
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-+ LogFunc(("aFormat=%s, aAction=%RU32\n", aFormat.c_str(), aAction));
-+
- /* Input validation. */
- if (RT_UNLIKELY((aFormat.c_str()) == NULL || *(aFormat.c_str()) == '\0'))
- return setError(E_INVALIDARG, tr("No drop format specified"));
-@@ -332,12 +332,11 @@ HRESULT GuestDnDSource::drop(const com::
- if (isDnDIgnoreAction(uAction)) /* If there is no usable action, ignore this request. */
- return S_OK;
-
-- /* Note: At the moment we only support one transfer at a time. */
-- if (ASMAtomicReadBool(&mDataBase.mfTransferIsPending))
-- return setError(E_INVALIDARG, tr("Another drop operation already is in progress"));
-+ AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-- /* Gets reset when the thread is finished. */
-- ASMAtomicWriteBool(&mDataBase.mfTransferIsPending, true);
-+ /* At the moment we only support one transfer at a time. */
-+ if (mDataBase.m_cTransfersPending)
-+ return setError(E_INVALIDARG, tr("Another drop operation already is in progress"));
-
- /* Dito. */
- GuestDnDResponse *pResp = GuestDnDInst()->response();
-@@ -362,25 +361,35 @@ HRESULT GuestDnDSource::drop(const com::
-
- LogFlowFunc(("Starting thread ...\n"));
-
-- int rc = RTThreadCreate(NULL, GuestDnDSource::i_receiveDataThread,
-+ RTTHREAD threadRcv;
-+ int rc = RTThreadCreate(&threadRcv, GuestDnDSource::i_receiveDataThread,
- (void *)pTask, 0, RTTHREADTYPE_MAIN_WORKER, 0, "dndSrcRcvData");
- if (RT_SUCCESS(rc))
- {
-- hr = pResp->queryProgressTo(aProgress.asOutParam());
-- ComAssertComRC(hr);
-+ rc = RTThreadUserWait(threadRcv, 30 * 1000 /* 30s timeout */);
-+ if (RT_SUCCESS(rc))
-+ {
-+ mDataBase.m_cTransfersPending++;
-+
-+ hr = pResp->queryProgressTo(aProgress.asOutParam());
-+ ComAssertComRC(hr);
-
-- /* Note: pTask is now owned by the worker thread. */
-+ /* Note: pTask is now owned by the worker thread. */
-+ }
-+ else
-+ hr = setError(VBOX_E_IPRT_ERROR, tr("Waiting for receiving thread failed (%Rrc)"), rc);
- }
- else
- hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread failed (%Rrc)"), rc);
-+
-+ if (FAILED(hr))
-+ delete pTask;
- }
- catch(std::bad_alloc &)
- {
- hr = setError(E_OUTOFMEMORY);
- }
-
-- /* Note: mDataBase.mfTransferIsPending will be set to false again by i_receiveDataThread. */
--
- LogFlowFunc(("Returning hr=%Rhrc\n", hr));
- return hr;
- #endif /* VBOX_WITH_DRAG_AND_DROP */
-@@ -392,47 +401,42 @@ HRESULT GuestDnDSource::receiveData(std:
- ReturnComNotImplemented();
- #else /* VBOX_WITH_DRAG_AND_DROP */
-
-- /* Input validation. */
--
- AutoCaller autoCaller(this);
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-- /* Don't allow receiving the actual data until our transfer
-- * actually is complete. */
-- if (ASMAtomicReadBool(&mDataBase.mfTransferIsPending))
-- return setError(E_INVALIDARG, tr("Current drop operation still in progress"));
-+ AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-- PRECVDATACTX pCtx = &mData.mRecvCtx;
-+ LogFlowThisFunc(("cTransfersPending=%RU32\n", mDataBase.m_cTransfersPending));
-
-- if (pCtx->mData.vecData.empty())
-- {
-- aData.resize(0);
-- return S_OK;
-- }
-+ /* Don't allow receiving the actual data until our transfer actually is complete. */
-+ if (mDataBase.m_cTransfersPending)
-+ return setError(E_FAIL, tr("Current drop operation still in progress"));
-
-+ PRECVDATACTX pCtx = &mData.mRecvCtx;
- HRESULT hr = S_OK;
-- size_t cbData;
-
- try
- {
- bool fHasURIList = DnDMIMENeedsDropDir(pCtx->mFmtRecv.c_str(), pCtx->mFmtRecv.length());
- if (fHasURIList)
- {
-- Utf8Str strURIs = pCtx->mURI.lstURI.RootToString(RTCString(DnDDirDroppedFilesGetDirAbs(&pCtx->mURI.mDropDir)));
-- cbData = strURIs.length();
--
-- LogFlowFunc(("Found %zu root URIs (%zu bytes)\n", pCtx->mURI.lstURI.RootCount(), cbData));
--
-- aData.resize(cbData + 1 /* Include termination */);
-- memcpy(&aData.front(), strURIs.c_str(), cbData);
-+ LogRel2(("DnD: Drop directory is: %s\n", pCtx->mURI.getDroppedFiles().GetDirAbs()));
-+ int rc2 = pCtx->mURI.toMetaData(aData);
-+ if (RT_FAILURE(rc2))
-+ hr = E_OUTOFMEMORY;
- }
- else
- {
-- cbData = pCtx->mData.vecData.size();
--
-- /* Copy the data into a safe array of bytes. */
-- aData.resize(cbData);
-- memcpy(&aData.front(), &pCtx->mData.vecData[0], cbData);
-+ const size_t cbData = pCtx->mData.getMeta().getSize();
-+ LogFlowFunc(("cbData=%zu\n", cbData));
-+ if (cbData)
-+ {
-+ /* Copy the data into a safe array of bytes. */
-+ aData.resize(cbData);
-+ memcpy(&aData.front(), pCtx->mData.getMeta().getData(), cbData);
-+ }
-+ else
-+ aData.resize(0);
- }
- }
- catch (std::bad_alloc &)
-@@ -440,7 +444,7 @@ HRESULT GuestDnDSource::receiveData(std:
- hr = E_OUTOFMEMORY;
- }
-
-- LogFlowFunc(("Returning cbData=%zu, hr=%Rhrc\n", cbData, hr));
-+ LogFlowFunc(("Returning hr=%Rhrc\n", hr));
- return hr;
- #endif /* VBOX_WITH_DRAG_AND_DROP */
- }
-@@ -499,6 +503,10 @@ Utf8Str GuestDnDSource::i_hostErrorToStr
- "elements can be accessed and that your host user has the appropriate rights."));
- break;
-
-+ case VERR_DISK_FULL:
-+ strError += Utf8StrFmt(tr("Host disk ran out of space (disk is full)."));
-+ break;
-+
- case VERR_NOT_FOUND:
- /* Should not happen due to file locking on the host, but anyway ... */
- strError += Utf8StrFmt(tr("One or more host files or directories selected for transferring to the host were not"
-@@ -521,67 +529,112 @@ Utf8Str GuestDnDSource::i_hostErrorToStr
- }
-
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
--int GuestDnDSource::i_onReceiveData(PRECVDATACTX pCtx, const void *pvData, uint32_t cbData, uint64_t cbTotalSize)
-+int GuestDnDSource::i_onReceiveDataHdr(PRECVDATACTX pCtx, PVBOXDNDSNDDATAHDR pDataHdr)
- {
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
-- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-- AssertReturn(cbTotalSize, VERR_INVALID_PARAMETER);
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertReturn(pDataHdr, VERR_INVALID_POINTER);
-+
-+ pCtx->mData.setEstimatedSize(pDataHdr->cbTotal, pDataHdr->cbMeta);
-
-- LogFlowFunc(("cbData=%RU32, cbTotalSize=%RU64\n", cbData, cbTotalSize));
-+ Assert(pCtx->mURI.getObjToProcess() == 0);
-+ pCtx->mURI.reset();
-+ pCtx->mURI.setEstimatedObjects(pDataHdr->cObjects);
-+
-+ /** @todo Handle compression type. */
-+ /** @todo Handle checksum type. */
-+
-+ LogFlowFuncLeave();
-+ return VINF_SUCCESS;
-+}
-+
-+int GuestDnDSource::i_onReceiveData(PRECVDATACTX pCtx, PVBOXDNDSNDDATA pSndData)
-+{
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pSndData, VERR_INVALID_POINTER);
-
- int rc = VINF_SUCCESS;
-
- try
- {
-- if ( cbData > cbTotalSize
-- || cbData > mData.mcbBlockSize)
-+ GuestDnDData *pData = &pCtx->mData;
-+ GuestDnDURIData *pURI = &pCtx->mURI;
-+
-+ uint32_t cbData;
-+ void *pvData;
-+ uint64_t cbTotal;
-+ uint32_t cbMeta;
-+
-+ if (mDataBase.m_uProtocolVersion < 3)
-+ {
-+ cbData = pSndData->u.v1.cbData;
-+ pvData = pSndData->u.v1.pvData;
-+
-+ /* Sends the total data size to receive for every data chunk. */
-+ cbTotal = pSndData->u.v1.cbTotalSize;
-+
-+ /* Meta data size always is cbData, meaning there cannot be an
-+ * extended data chunk transfer by sending further data. */
-+ cbMeta = cbData;
-+ }
-+ else
-+ {
-+ cbData = pSndData->u.v3.cbData;
-+ pvData = pSndData->u.v3.pvData;
-+
-+ /* Note: Data sizes get updated in i_onReceiveDataHdr(). */
-+ cbTotal = pData->getTotal();
-+ cbMeta = pData->getMeta().getSize();
-+ }
-+ Assert(cbTotal);
-+
-+ if ( cbData == 0
-+ || cbData > cbTotal /* Paranoia */)
- {
-- LogFlowFunc(("Data sizes invalid: cbData=%RU32, cbTotalSize=%RU64\n", cbData, cbTotalSize));
-+ LogFlowFunc(("Incoming data size invalid: cbData=%RU32, cbToProcess=%RU64\n", cbData, pData->getTotal()));
- rc = VERR_INVALID_PARAMETER;
- }
-- else if (cbData < pCtx->mData.vecData.size())
-+ else if (cbTotal < cbMeta)
- {
-- AssertMsgFailed(("New size (%RU64) is smaller than current size (%zu)\n", cbTotalSize, pCtx->mData.vecData.size()));
-+ AssertMsgFailed(("cbTotal (%RU64) is smaller than cbMeta (%RU32)\n", cbTotal, cbMeta));
- rc = VERR_INVALID_PARAMETER;
- }
-
- if (RT_SUCCESS(rc))
- {
-- pCtx->mData.vecData.insert(pCtx->mData.vecData.begin(), (BYTE *)pvData, (BYTE *)pvData + cbData);
--
-- LogFlowFunc(("vecDataSize=%zu, cbData=%RU32, cbTotalSize=%RU64\n", pCtx->mData.vecData.size(), cbData, cbTotalSize));
-+ cbMeta = pData->getMeta().add(pvData, cbData);
-+ LogFlowThisFunc(("cbMetaSize=%zu, cbData=%RU32, cbMeta=%RU32, cbTotal=%RU64\n",
-+ pData->getMeta().getSize(), cbData, cbMeta, cbTotal));
-+ }
-
-- /* Data transfer complete? */
-- Assert(cbData <= pCtx->mData.vecData.size());
-- if (cbData == pCtx->mData.vecData.size())
-+ if (RT_SUCCESS(rc))
-+ {
-+ /*
-+ * (Meta) Data transfer complete?
-+ */
-+ Assert(cbMeta <= pData->getMeta().getSize());
-+ if (cbMeta == pData->getMeta().getSize())
- {
- bool fHasURIList = DnDMIMENeedsDropDir(pCtx->mFmtRecv.c_str(), pCtx->mFmtRecv.length());
-- LogFlowFunc(("fHasURIList=%RTbool, cbTotalSize=%RU32\n", fHasURIList, cbTotalSize));
-+ LogFlowThisFunc(("fHasURIList=%RTbool\n", fHasURIList));
- if (fHasURIList)
- {
- /* Try parsing the data as URI list. */
-- rc = pCtx->mURI.lstURI.RootFromURIData(&pCtx->mData.vecData[0], pCtx->mData.vecData.size(), 0 /* uFlags */);
-+ rc = pURI->fromRemoteMetaData(pData->getMeta());
- if (RT_SUCCESS(rc))
- {
-- /* Reset processed bytes. */
-- pCtx->mData.cbProcessed = 0;
-+ if (mDataBase.m_uProtocolVersion < 3)
-+ pData->setEstimatedSize(cbTotal, cbMeta);
-
- /*
-- * Assign new total size which also includes all file data to receive
-- * from the guest.
-+ * Update our process with the data we already received.
-+ * Note: The total size will consist of the meta data (in pVecData) and
-+ * the actual accumulated file/directory data from the guest.
- */
-- pCtx->mData.cbToProcess = cbTotalSize;
--
-- /* Update our process with the data we already received.
-- * Note: The total size will consist of the meta data (in vecData) and
-- * the actual accumulated file/directory data from the guest. */
-- rc = i_updateProcess(pCtx, (uint64_t)pCtx->mData.vecData.size());
--
-- LogFlowFunc(("URI data => cbProcessed=%RU64, cbToProcess=%RU64, rc=%Rrc\n",
-- pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, rc));
-+ rc = updateProgress(pData, pCtx->mpResp, (uint32_t)pData->getMeta().getSize());
- }
- }
-+ else /* Raw data. */
-+ rc = updateProgress(pData, pCtx->mpResp, cbData);
- }
- }
- }
-@@ -602,13 +655,61 @@ int GuestDnDSource::i_onReceiveDir(PRECV
-
- LogFlowFunc(("pszPath=%s, cbPath=%RU32, fMode=0x%x\n", pszPath, cbPath, fMode));
-
-- int rc;
-- char *pszDir = RTPathJoinA(DnDDirDroppedFilesGetDirAbs(&pCtx->mURI.mDropDir), pszPath);
-+ /*
-+ * Sanity checking.
-+ */
-+ if ( !cbPath
-+ || cbPath > RTPATH_MAX)
-+ {
-+ LogFlowFunc(("Path length invalid, bailing out\n"));
-+ return VERR_INVALID_PARAMETER;
-+ }
-+
-+ int rc = RTStrValidateEncodingEx(pszPath, RTSTR_MAX, 0);
-+ if (RT_FAILURE(rc))
-+ {
-+ LogFlowFunc(("Path validation failed with %Rrc, bailing out\n", rc));
-+ return VERR_INVALID_PARAMETER;
-+ }
-+
-+ if (pCtx->mURI.isComplete())
-+ {
-+ LogFlowFunc(("Data transfer already complete, bailing out\n"));
-+ return VERR_INVALID_PARAMETER;
-+ }
-+
-+ GuestDnDURIObjCtx &objCtx = pCtx->mURI.getObj(0); /** @todo Fill in context ID. */
-+
-+ rc = objCtx.createIntermediate(DnDURIObject::Directory);
-+ if (RT_FAILURE(rc))
-+ return rc;
-+
-+ DnDURIObject *pObj = objCtx.getObj();
-+ AssertPtr(pObj);
-+
-+ const char *pszDroppedFilesDir = pCtx->mURI.getDroppedFiles().GetDirAbs();
-+ char *pszDir = RTPathJoinA(pszDroppedFilesDir, pszPath);
- if (pszDir)
- {
-+#ifdef RT_OS_WINDOWS
-+ RTPathChangeToDosSlashes(pszDir, true /* fForce */);
-+#else
-+ RTPathChangeToDosSlashes(pszDir, true /* fForce */);
-+#endif
- rc = RTDirCreateFullPath(pszDir, fMode);
-- if (RT_FAILURE(rc))
-- LogRel2(("DnD: Error creating guest directory '%s' on the host, rc=%Rrc\n", pszDir, rc));
-+ if (RT_SUCCESS(rc))
-+ {
-+ pCtx->mURI.processObject(*pObj);
-+
-+ /* Add for having a proper rollback. */
-+ int rc2 = pCtx->mURI.getDroppedFiles().AddDir(pszDir);
-+ AssertRC(rc2);
-+
-+ objCtx.reset();
-+ LogRel2(("DnD: Created guest directory on host: %s\n", pszDir));
-+ }
-+ else
-+ LogRel(("DnD: Error creating guest directory '%s' on host, rc=%Rrc\n", pszDir, rc));
-
- RTStrFree(pszDir);
- }
-@@ -619,11 +720,10 @@ int GuestDnDSource::i_onReceiveDir(PRECV
- return rc;
- }
-
--int GuestDnDSource::i_onReceiveFileHdr(PRECVDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, const char *pszPath, uint32_t cbPath,
-+int GuestDnDSource::i_onReceiveFileHdr(PRECVDATACTX pCtx, const char *pszPath, uint32_t cbPath,
- uint64_t cbSize, uint32_t fMode, uint32_t fFlags)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
- AssertReturn(cbPath, VERR_INVALID_PARAMETER);
- AssertReturn(fMode, VERR_INVALID_PARAMETER);
-@@ -631,84 +731,103 @@ int GuestDnDSource::i_onReceiveFileHdr(P
-
- LogFlowFunc(("pszPath=%s, cbPath=%RU32, cbSize=%RU64, fMode=0x%x, fFlags=0x%x\n", pszPath, cbPath, cbSize, fMode, fFlags));
-
-+ /*
-+ * Sanity checking.
-+ */
-+ if ( !cbPath
-+ || cbPath > RTPATH_MAX)
-+ {
-+ return VERR_INVALID_PARAMETER;
-+ }
-+
-+ if (!RTStrIsValidEncoding(pszPath))
-+ return VERR_INVALID_PARAMETER;
-+
-+ if (cbSize > pCtx->mData.getTotal())
-+ {
-+ AssertMsgFailed(("File size (%RU64) exceeds total size to transfer (%RU64)\n", cbSize, pCtx->mData.getTotal()));
-+ return VERR_INVALID_PARAMETER;
-+ }
-+
-+ if (pCtx->mURI.getObjToProcess() && pCtx->mURI.isComplete())
-+ return VERR_INVALID_PARAMETER;
-+
- int rc = VINF_SUCCESS;
-
- do
- {
-- DnDURIObject *pObj = pObjCtx->pObjURI;
--
-- if ( pObj
-- && pObj->IsOpen()
-- && !pObj->IsComplete())
-- {
-- AssertMsgFailed(("Object '%s' not complete yet\n", pObj->GetDestPath().c_str()));
-- rc = VERR_WRONG_ORDER;
-- break;
-- }
-+ GuestDnDURIObjCtx &objCtx = pCtx->mURI.getObj(0); /** @todo Fill in context ID. */
-+ DnDURIObject *pObj = objCtx.getObj();
-
-- if ( pObj
-- && pObj->IsOpen()) /* File already opened? */
-+ /*
-+ * Sanity checking.
-+ */
-+ if (pObj)
- {
-- AssertMsgFailed(("Current opened object is '%s', close this first\n", pObj->GetDestPath().c_str()));
-- rc = VERR_WRONG_ORDER;
-- break;
-- }
-+ if ( pObj->IsOpen()
-+ && !pObj->IsComplete())
-+ {
-+ AssertMsgFailed(("Object '%s' not complete yet\n", pObj->GetDestPath().c_str()));
-+ rc = VERR_WRONG_ORDER;
-+ break;
-+ }
-
-- if (cbSize > pCtx->mData.cbToProcess)
-- {
-- AssertMsgFailed(("File size (%RU64) exceeds total size to transfer (%RU64)\n", cbSize, pCtx->mData.cbToProcess));
-- rc = VERR_INVALID_PARAMETER;
-- break;
-+ if (pObj->IsOpen()) /* File already opened? */
-+ {
-+ AssertMsgFailed(("Current opened object is '%s', close this first\n", pObj->GetDestPath().c_str()));
-+ rc = VERR_WRONG_ORDER;
-+ break;
-+ }
- }
--
-- char pszPathAbs[RTPATH_MAX];
-- rc = RTPathJoin(pszPathAbs, sizeof(pszPathAbs), DnDDirDroppedFilesGetDirAbs(&pCtx->mURI.mDropDir), pszPath);
-- if (RT_FAILURE(rc))
-+ else
- {
-- LogFlowFunc(("Warning: Rebasing current file failed with rc=%Rrc\n", rc));
-- break;
-+ /*
-+ * Create new intermediate object to work with.
-+ */
-+ rc = objCtx.createIntermediate();
- }
-
-- rc = DnDPathSanitize(pszPathAbs, sizeof(pszPathAbs));
-- if (RT_FAILURE(rc))
-+ if (RT_SUCCESS(rc))
- {
-- LogFlowFunc(("Warning: Rebasing current file failed with rc=%Rrc\n", rc));
-- break;
-- }
-+ pObj = objCtx.getObj();
-+ AssertPtr(pObj);
-
-- LogFunc(("Rebased to: %s\n", pszPathAbs));
-+ const char *pszDroppedFilesDir = pCtx->mURI.getDroppedFiles().GetDirAbs();
-+ AssertPtr(pszDroppedFilesDir);
-
-- if ( pObj
-- && pObjCtx->fAllocated)
-- {
-- delete pObj;
-- pObj = NULL;
-- }
-+ char pszPathAbs[RTPATH_MAX];
-+ rc = RTPathJoin(pszPathAbs, sizeof(pszPathAbs), pszDroppedFilesDir, pszPath);
-+ if (RT_FAILURE(rc))
-+ {
-+ LogFlowFunc(("Warning: Rebasing current file failed with rc=%Rrc\n", rc));
-+ break;
-+ }
-
-- try
-- {
-- pObj = new DnDURIObject();
-+ rc = DnDPathSanitize(pszPathAbs, sizeof(pszPathAbs));
-+ if (RT_FAILURE(rc))
-+ {
-+ LogFlowFunc(("Warning: Rebasing current file failed with rc=%Rrc\n", rc));
-+ break;
-+ }
-
-- pObjCtx->pObjURI = pObj;
-- pObjCtx->fAllocated = true;
-- }
-- catch (std::bad_alloc &)
-- {
-- rc = VERR_NO_MEMORY;
-- }
-+ LogFunc(("Rebased to: %s\n", pszPathAbs));
-
-- if (RT_SUCCESS(rc))
-- {
- /** @todo Add sparse file support based on fFlags? (Use Open(..., fFlags | SPARSE). */
- rc = pObj->OpenEx(pszPathAbs, DnDURIObject::File, DnDURIObject::Target,
- RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE,
- (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR);
-+ if (RT_SUCCESS(rc))
-+ {
-+ /* Add for having a proper rollback. */
-+ int rc2 = pCtx->mURI.getDroppedFiles().AddFile(pszPathAbs);
-+ AssertRC(rc2);
-+ }
- }
-
- if (RT_SUCCESS(rc))
- {
- /* Note: Protocol v1 does not send any file sizes, so always 0. */
-- if (mDataBase.mProtocolVersion >= 2)
-+ if (mDataBase.m_uProtocolVersion >= 2)
- rc = pObj->SetSize(cbSize);
-
- /** @todo Unescpae path before printing. */
-@@ -734,21 +853,31 @@ int GuestDnDSource::i_onReceiveFileHdr(P
- return rc;
- }
-
--int GuestDnDSource::i_onReceiveFileData(PRECVDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, const void *pvData, uint32_t cbData)
-+int GuestDnDSource::i_onReceiveFileData(PRECVDATACTX pCtx, const void *pvData, uint32_t cbData)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-- AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pvData, VERR_INVALID_POINTER);
- AssertReturn(cbData, VERR_INVALID_PARAMETER);
-
- int rc = VINF_SUCCESS;
-
-+ LogFlowFunc(("pvData=%p, cbData=%RU32, cbBlockSize=%RU32\n", pvData, cbData, mData.mcbBlockSize));
-+
-+ /*
-+ * Sanity checking.
-+ */
-+ if (cbData > mData.mcbBlockSize)
-+ return VERR_INVALID_PARAMETER;
-+
- do
- {
-- DnDURIObject *pObj = pObjCtx->pObjURI;
-+ GuestDnDURIObjCtx &objCtx = pCtx->mURI.getObj(0); /** @todo Fill in context ID. */
-+ DnDURIObject *pObj = objCtx.getObj();
-+
- if (!pObj)
- {
-- rc = VERR_INVALID_PARAMETER;
-+ LogFlowFunc(("Warning: No current object set\n"));
-+ rc = VERR_WRONG_ORDER;
- break;
- }
-
-@@ -778,8 +907,10 @@ int GuestDnDSource::i_onReceiveFileData(
- }
-
- if (RT_SUCCESS(rc))
-- rc = i_updateProcess(pCtx, cbWritten);
-+ rc = updateProgress(&pCtx->mData, pCtx->mpResp, cbWritten);
- }
-+ else /* Something went wrong; close the object. */
-+ pObj->Close();
-
- if (RT_SUCCESS(rc))
- {
-@@ -787,16 +918,8 @@ int GuestDnDSource::i_onReceiveFileData(
- {
- /** @todo Sanitize path. */
- LogRel2(("DnD: File transfer to host complete: %s\n", pObj->GetDestPath().c_str()));
-- rc = VINF_EOF;
--
-- /* Deletion needed? */
-- if (pObjCtx->fAllocated)
-- {
-- delete pObj;
-- pObj = NULL;
--
-- pObjCtx->fAllocated = false;
-- }
-+ pCtx->mURI.processObject(*pObj);
-+ objCtx.reset();
- }
- }
- else
-@@ -816,6 +939,11 @@ int GuestDnDSource::i_receiveData(PRECVD
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-
-+ /* Is this context already in receiving state? */
-+ if (ASMAtomicReadBool(&pCtx->mIsActive))
-+ return VERR_WRONG_ORDER;
-+ ASMAtomicWriteBool(&pCtx->mIsActive, true);
-+
- GuestDnD *pInst = GuestDnDInst();
- if (!pInst)
- return VERR_INVALID_POINTER;
-@@ -823,62 +951,81 @@ int GuestDnDSource::i_receiveData(PRECVD
- GuestDnDResponse *pResp = pCtx->mpResp;
- AssertPtr(pCtx->mpResp);
-
-- /* Is this context already in receiving state? */
-- if (ASMAtomicReadBool(&pCtx->mIsActive))
-- return VERR_WRONG_ORDER;
--
-- ASMAtomicWriteBool(&pCtx->mIsActive, true);
--
-- int rc = pCtx->mCallback.Reset();
-+ int rc = pCtx->mCBEvent.Reset();
- if (RT_FAILURE(rc))
- return rc;
-
- /*
- * Reset any old data.
- */
-- pCtx->mData.Reset();
-- pCtx->mURI.Reset();
-+ pCtx->mData.reset();
-+ pCtx->mURI.reset();
- pResp->reset();
-
- /*
- * Do we need to receive a different format than initially requested?
- *
-- * For example, receiving a file link as "text/plain" requires still to receive
-+ * For example, receiving a file link as "text/plain" requires still to receive
- * the file from the guest as "text/uri-list" first, then pointing to
- * the file path on the host in the "text/plain" data returned.
- */
-
-- /* Plain text needed? */
-- if (pCtx->mFmtReq.equalsIgnoreCase("text/plain"))
-+ bool fFoundFormat = true; /* Whether we've found a common format between host + guest. */
-+
-+ LogFlowFunc(("mFmtReq=%s, mFmtRecv=%s, mAction=0x%x\n",
-+ pCtx->mFmtReq.c_str(), pCtx->mFmtRecv.c_str(), pCtx->mAction));
-+
-+ /* Plain text wanted? */
-+ if ( pCtx->mFmtReq.equalsIgnoreCase("text/plain")
-+ || pCtx->mFmtReq.equalsIgnoreCase("text/plain;charset=utf-8"))
- {
- /* Did the guest offer a file? Receive a file instead. */
- if (GuestDnD::isFormatInFormatList("text/uri-list", pCtx->mFmtOffered))
- pCtx->mFmtRecv = "text/uri-list";
-+ /* Guest only offers (plain) text. */
-+ else
-+ pCtx->mFmtRecv = "text/plain;charset=utf-8";
-
- /** @todo Add more conversions here. */
- }
-+ /* File(s) wanted? */
-+ else if (pCtx->mFmtReq.equalsIgnoreCase("text/uri-list"))
-+ {
-+ /* Does the guest support sending files? */
-+ if (GuestDnD::isFormatInFormatList("text/uri-list", pCtx->mFmtOffered))
-+ pCtx->mFmtRecv = "text/uri-list";
-+ else /* Bail out. */
-+ fFoundFormat = false;
-+ }
-
-- if (pCtx->mFmtRecv.isEmpty())
-- pCtx->mFmtRecv = pCtx->mFmtReq;
--
-- if (!pCtx->mFmtRecv.equals(pCtx->mFmtReq))
-- LogRel3(("DnD: Requested data in format '%s', receiving in intermediate format '%s' now\n",
-- pCtx->mFmtReq.c_str(), pCtx->mFmtRecv.c_str()));
-+ if (fFoundFormat)
-+ {
-+ Assert(!pCtx->mFmtReq.isEmpty());
-+ Assert(!pCtx->mFmtRecv.isEmpty());
-
-- /*
-- * Call the appropriate receive handler based on the data format to handle.
-- */
-- bool fHasURIList = DnDMIMENeedsDropDir(pCtx->mFmtRecv.c_str(), pCtx->mFmtRecv.length());
-- LogFlowFunc(("strFormatReq=%s, strFormatRecv=%s, uAction=0x%x, fHasURIList=%RTbool\n",
-- pCtx->mFmtReq.c_str(), pCtx->mFmtRecv.c_str(), pCtx->mAction, fHasURIList));
-+ if (!pCtx->mFmtRecv.equals(pCtx->mFmtReq))
-+ LogRel3(("DnD: Requested data in format '%s', receiving in intermediate format '%s' now\n",
-+ pCtx->mFmtReq.c_str(), pCtx->mFmtRecv.c_str()));
-
-- if (fHasURIList)
-- {
-- rc = i_receiveURIData(pCtx, msTimeout);
-+ /*
-+ * Call the appropriate receive handler based on the data format to handle.
-+ */
-+ bool fURIData = DnDMIMENeedsDropDir(pCtx->mFmtRecv.c_str(), pCtx->mFmtRecv.length());
-+ if (fURIData)
-+ {
-+ rc = i_receiveURIData(pCtx, msTimeout);
-+ }
-+ else
-+ {
-+ rc = i_receiveRawData(pCtx, msTimeout);
-+ }
- }
-- else
-+ else /* Just inform the user (if verbose release logging is enabled). */
- {
-- rc = i_receiveRawData(pCtx, msTimeout);
-+ LogRel2(("DnD: The guest does not support format '%s':\n", pCtx->mFmtReq.c_str()));
-+ LogRel2(("DnD: Guest offered the following formats:\n"));
-+ for (size_t i = 0; i < pCtx->mFmtOffered.size(); i++)
-+ LogRel2(("DnD:\tFormat #%zu: %s\n", i, pCtx->mFmtOffered.at(i).c_str()));
- }
-
- ASMAtomicWriteBool(&pCtx->mIsActive, false);
-@@ -895,25 +1042,26 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- RecvDataTask *pTask = (RecvDataTask *)pvUser;
- AssertPtrReturn(pTask, VERR_INVALID_POINTER);
-
-- const ComObjPtr<GuestDnDSource> pSource(pTask->getSource());
-- Assert(!pSource.isNull());
-+ const ComObjPtr<GuestDnDSource> pThis(pTask->getSource());
-+ Assert(!pThis.isNull());
-
-- int rc;
-+ AutoCaller autoCaller(pThis);
-+ if (FAILED(autoCaller.rc())) return VERR_COM_INVALID_OBJECT_STATE;
-
-- AutoCaller autoCaller(pSource);
-- if (SUCCEEDED(autoCaller.rc()))
-- {
-- rc = pSource->i_receiveData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
-- }
-- else
-- rc = VERR_COM_INVALID_OBJECT_STATE;
-+ int rc = RTThreadUserSignal(Thread);
-+ AssertRC(rc);
-
-- ASMAtomicWriteBool(&pSource->mDataBase.mfTransferIsPending, false);
-+ rc = pThis->i_receiveData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
-
- if (pTask)
- delete pTask;
-
-- LogFlowFunc(("pSource=%p returning rc=%Rrc\n", (GuestDnDSource *)pSource, rc));
-+ AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS);
-+
-+ Assert(pThis->mDataBase.m_cTransfersPending);
-+ pThis->mDataBase.m_cTransfersPending--;
-+
-+ LogFlowFunc(("pSource=%p returning rc=%Rrc\n", (GuestDnDSource *)pThis, rc));
- return rc;
- }
-
-@@ -923,6 +1071,8 @@ int GuestDnDSource::i_receiveRawData(PRE
-
- int rc;
-
-+ LogFlowFuncEnter();
-+
- GuestDnDResponse *pResp = pCtx->mpResp;
- AssertPtr(pCtx->mpResp);
-
-@@ -931,19 +1081,27 @@ int GuestDnDSource::i_receiveRawData(PRE
- return VERR_INVALID_POINTER;
-
- #define REGISTER_CALLBACK(x) \
-- rc = pResp->setCallback(x, i_receiveRawDataCallback, pCtx); \
-- if (RT_FAILURE(rc)) \
-- return rc;
--
--#define UNREGISTER_CALLBACK(x) \
-- rc = pCtx->mpResp->setCallback(x, NULL); \
-- AssertRC(rc);
-+ do { \
-+ rc = pResp->setCallback(x, i_receiveRawDataCallback, pCtx); \
-+ if (RT_FAILURE(rc)) \
-+ return rc; \
-+ } while (0)
-+
-+#define UNREGISTER_CALLBACK(x) \
-+ do { \
-+ int rc2 = pResp->setCallback(x, NULL); \
-+ AssertRC(rc2); \
-+ } while (0)
-
- /*
- * Register callbacks.
- */
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DATA);
-+ REGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_DATA_HDR);
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_DATA);
-
- do
- {
-@@ -951,7 +1109,9 @@ int GuestDnDSource::i_receiveRawData(PRE
- * Receive the raw data.
- */
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_GH_EVT_DROPPED);
-+ Msg.setType(HOST_DND_GH_EVT_DROPPED);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextPointer((void*)pCtx->mFmtRecv.c_str(), (uint32_t)pCtx->mFmtRecv.length() + 1);
- Msg.setNextUInt32((uint32_t)pCtx->mFmtRecv.length() + 1);
- Msg.setNextUInt32(pCtx->mAction);
-@@ -961,9 +1121,9 @@ int GuestDnDSource::i_receiveRawData(PRE
- rc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
- if (RT_SUCCESS(rc))
- {
-- rc = waitForEvent(msTimeout, pCtx->mCallback, pCtx->mpResp);
-+ rc = waitForEvent(&pCtx->mCBEvent, pCtx->mpResp, msTimeout);
- if (RT_SUCCESS(rc))
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_COMPLETE, VINF_SUCCESS);
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
- }
-
- } while (0);
-@@ -971,8 +1131,12 @@ int GuestDnDSource::i_receiveRawData(PRE
- /*
- * Unregister callbacks.
- */
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DATA);
-+ UNREGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_DATA_HDR);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_DATA);
-
- #undef REGISTER_CALLBACK
- #undef UNREGISTER_CALLBACK
-@@ -981,7 +1145,7 @@ int GuestDnDSource::i_receiveRawData(PRE
- {
- if (rc == VERR_CANCELLED)
- {
-- int rc2 = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_CANCELLED, VINF_SUCCESS);
-+ int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
- AssertRC(rc2);
-
- rc2 = sendCancel();
-@@ -989,8 +1153,9 @@ int GuestDnDSource::i_receiveRawData(PRE
- }
- else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
- {
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR,
-- rc, GuestDnDSource::i_hostErrorToString(rc));
-+ int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
-+ rc, GuestDnDSource::i_hostErrorToString(rc));
-+ AssertRC(rc2);
- }
- }
-
-@@ -1004,6 +1169,8 @@ int GuestDnDSource::i_receiveURIData(PRE
-
- int rc;
-
-+ LogFlowFuncEnter();
-+
- GuestDnDResponse *pResp = pCtx->mpResp;
- AssertPtr(pCtx->mpResp);
-
-@@ -1011,34 +1178,42 @@ int GuestDnDSource::i_receiveURIData(PRE
- if (!pInst)
- return VERR_INVALID_POINTER;
-
--#define REGISTER_CALLBACK(x) \
-- rc = pResp->setCallback(x, i_receiveURIDataCallback, pCtx); \
-- if (RT_FAILURE(rc)) \
-- return rc;
--
--#define UNREGISTER_CALLBACK(x) \
-- { \
-- int rc2 = pResp->setCallback(x, NULL); \
-- AssertRC(rc2); \
-- }
-+#define REGISTER_CALLBACK(x) \
-+ do { \
-+ rc = pResp->setCallback(x, i_receiveURIDataCallback, pCtx); \
-+ if (RT_FAILURE(rc)) \
-+ return rc; \
-+ } while (0)
-+
-+#define UNREGISTER_CALLBACK(x) \
-+ do { \
-+ int rc2 = pResp->setCallback(x, NULL); \
-+ AssertRC(rc2); \
-+ } while (0)
-
- /*
- * Register callbacks.
- */
- /* Guest callbacks. */
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DATA);
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DIR);
-- if (mDataBase.mProtocolVersion >= 2)
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR);
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA);
-+ REGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_DATA_HDR);
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_DATA);
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_DIR);
-+ if (mDataBase.m_uProtocolVersion >= 2)
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_FILE_HDR);
-+ REGISTER_CALLBACK(GUEST_DND_GH_SND_FILE_DATA);
-+
-+ DnDDroppedFiles &droppedFiles = pCtx->mURI.getDroppedFiles();
-
- do
- {
-- rc = DnDDirDroppedFilesCreateAndOpenTemp(&pCtx->mURI.mDropDir);
-+ rc = droppedFiles.OpenTemp(0 /* fFlags */);
- if (RT_FAILURE(rc))
- break;
-- LogFlowFunc(("rc=%Rrc, strDropDir=%s\n", rc, DnDDirDroppedFilesGetDirAbs(&pCtx->mURI.mDropDir)));
-+ LogFlowFunc(("rc=%Rrc, strDropDir=%s\n", rc, droppedFiles.GetDirAbs()));
- if (RT_FAILURE(rc))
- break;
-
-@@ -1046,7 +1221,9 @@ int GuestDnDSource::i_receiveURIData(PRE
- * Receive the URI list.
- */
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_GH_EVT_DROPPED);
-+ Msg.setType(HOST_DND_GH_EVT_DROPPED);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextPointer((void*)pCtx->mFmtRecv.c_str(), (uint32_t)pCtx->mFmtRecv.length() + 1);
- Msg.setNextUInt32((uint32_t)pCtx->mFmtRecv.length() + 1);
- Msg.setNextUInt32(pCtx->mAction);
-@@ -1058,9 +1235,9 @@ int GuestDnDSource::i_receiveURIData(PRE
- {
- LogFlowFunc(("Waiting ...\n"));
-
-- rc = waitForEvent(msTimeout, pCtx->mCallback, pCtx->mpResp);
-+ rc = waitForEvent(&pCtx->mCBEvent, pCtx->mpResp, msTimeout);
- if (RT_SUCCESS(rc))
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_COMPLETE, VINF_SUCCESS);
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
-
- LogFlowFunc(("Waiting ended with rc=%Rrc\n", rc));
- }
-@@ -1070,23 +1247,23 @@ int GuestDnDSource::i_receiveURIData(PRE
- /*
- * Unregister callbacks.
- */
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DATA);
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_DIR);
-- if (mDataBase.mProtocolVersion >= 2)
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR);
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA);
-+ UNREGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_DATA_HDR);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_DATA);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_DIR);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_FILE_HDR);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_SND_FILE_DATA);
-
- #undef REGISTER_CALLBACK
- #undef UNREGISTER_CALLBACK
-
-- int rc2;
--
- if (RT_FAILURE(rc))
- {
- if (rc == VERR_CANCELLED)
- {
-- rc2 = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_CANCELLED, VINF_SUCCESS);
-+ int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
- AssertRC(rc2);
-
- rc2 = sendCancel();
-@@ -1094,20 +1271,21 @@ int GuestDnDSource::i_receiveURIData(PRE
- }
- else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
- {
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR,
-- rc, GuestDnDSource::i_hostErrorToString(rc));
-+ int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
-+ rc, GuestDnDSource::i_hostErrorToString(rc));
-+ AssertRC(rc2);
- }
- }
-
- if (RT_FAILURE(rc))
- {
-- rc2 = DnDDirDroppedFilesRollback(&pCtx->mURI.mDropDir); /** @todo Inform user on rollback failure? */
-- LogFlowFunc(("Rolling back ended with rc=%Rrc\n", rc2));
-+ int rc2 = droppedFiles.Rollback();
-+ if (RT_FAILURE(rc2))
-+ LogRel(("DnD: Deleting left over temporary files failed (%Rrc). Please remove directory manually: %s\n",
-+ rc2, droppedFiles.GetDirAbs()));
- }
-
-- rc2 = DnDDirDroppedFilesClose(&pCtx->mURI.mDropDir, RT_FAILURE(rc) ? true : false /* fRemove */);
-- if (RT_SUCCESS(rc))
-- rc = rc2;
-+ droppedFiles.Close();
-
- LogFlowFuncLeaveRC(rc);
- return rc;
-@@ -1127,35 +1305,63 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- int rc = VINF_SUCCESS;
-
- int rcCallback = VINF_SUCCESS; /* rc for the callback. */
-- bool fNotify = false;
-+ bool fNotify = false;
-
- switch (uMsg)
- {
-+ case GUEST_DND_CONNECT:
-+ /* Nothing to do here (yet). */
-+ break;
-+
-+ case GUEST_DND_DISCONNECT:
-+ rc = VERR_CANCELLED;
-+ break;
-+
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
-- case DragAndDropSvc::GUEST_DND_GH_SND_DATA:
-+ case GUEST_DND_GH_SND_DATA_HDR:
- {
-- DragAndDropSvc::PVBOXDNDCBSNDDATADATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBSNDDATADATA>(pvParms);
-+ PVBOXDNDCBSNDDATAHDRDATA pCBData = reinterpret_cast<PVBOXDNDCBSNDDATAHDRDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBSNDDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDDATAHDRDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_DATA_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- rc = pThis->i_onReceiveData(pCtx, pCBData->pvData, pCBData->cbData, pCBData->cbTotalSize);
-+ rc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_EVT_ERROR:
-+ case GUEST_DND_GH_SND_DATA:
- {
-- DragAndDropSvc::PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBEVTERRORDATA>(pvParms);
-+ PVBOXDNDCBSNDDATADATA pCBData = reinterpret_cast<PVBOXDNDCBSNDDATADATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-+
-+ rc = pThis->i_onReceiveData(pCtx, &pCBData->data);
-+ break;
-+ }
-+ case GUEST_DND_GH_EVT_ERROR:
-+ {
-+ PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<PVBOXDNDCBEVTERRORDATA>(pvParms);
-+ AssertPtr(pCBData);
-+ AssertReturn(sizeof(VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- pCtx->mpResp->reset();
-
- if (RT_SUCCESS(pCBData->rc))
-+ {
-+ AssertMsgFailed(("Received guest error with no error code set\n"));
- pCBData->rc = VERR_GENERAL_FAILURE; /* Make sure some error is set. */
-+ }
-+ else if (pCBData->rc == VERR_WRONG_ORDER)
-+ {
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
-+ }
-+ else
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
-+ GuestDnDSource::i_guestErrorToString(pCBData->rc));
-+
-+ LogRel3(("DnD: Guest reported data transfer error: %Rrc\n", pCBData->rc));
-
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, pCBData->rc,
-- GuestDnDSource::i_guestErrorToString(pCBData->rc));
- if (RT_SUCCESS(rc))
- rcCallback = VERR_GSTDND_GUEST_ERROR;
- break;
-@@ -1166,9 +1372,47 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- break;
- }
-
-+ if ( RT_FAILURE(rc)
-+ || RT_FAILURE(rcCallback))
-+ {
-+ fNotify = true;
-+ if (RT_SUCCESS(rcCallback))
-+ rcCallback = rc;
-+ }
-+
- if (RT_FAILURE(rc))
- {
-- int rc2 = pCtx->mCallback.Notify(rc);
-+ switch (rc)
-+ {
-+ case VERR_NO_DATA:
-+ LogRel2(("DnD: Data transfer to host complete\n"));
-+ break;
-+
-+ case VERR_CANCELLED:
-+ LogRel2(("DnD: Data transfer to host canceled\n"));
-+ break;
-+
-+ default:
-+ LogRel(("DnD: Error %Rrc occurred, aborting data transfer to host\n", rc));
-+ break;
-+ }
-+
-+ /* Unregister this callback. */
-+ AssertPtr(pCtx->mpResp);
-+ int rc2 = pCtx->mpResp->setCallback(uMsg, NULL /* PFNGUESTDNDCALLBACK */);
-+ AssertRC(rc2);
-+ }
-+
-+ /* All data processed? */
-+ if (pCtx->mData.isComplete())
-+ fNotify = true;
-+
-+ LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool, rcCallback=%Rrc, rc=%Rrc\n",
-+ pCtx->mData.getProcessed(), pCtx->mData.getTotal(), fNotify, rcCallback, rc));
-+
-+ if (fNotify)
-+ {
-+ int rc2 = pCtx->mCBEvent.Notify(rcCallback);
- AssertRC(rc2);
- }
-
-@@ -1194,46 +1438,64 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
-
- switch (uMsg)
- {
-+ case GUEST_DND_CONNECT:
-+ /* Nothing to do here (yet). */
-+ break;
-+
-+ case GUEST_DND_DISCONNECT:
-+ rc = VERR_CANCELLED;
-+ break;
-+
- #ifdef VBOX_WITH_DRAG_AND_DROP_GH
-- case DragAndDropSvc::GUEST_DND_GH_SND_DATA:
-+ case GUEST_DND_GH_SND_DATA_HDR:
-+ {
-+ PVBOXDNDCBSNDDATAHDRDATA pCBData = reinterpret_cast<PVBOXDNDCBSNDDATAHDRDATA>(pvParms);
-+ AssertPtr(pCBData);
-+ AssertReturn(sizeof(VBOXDNDCBSNDDATAHDRDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_DATA_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-+
-+ rc = pThis->i_onReceiveDataHdr(pCtx, &pCBData->data);
-+ break;
-+ }
-+ case GUEST_DND_GH_SND_DATA:
- {
-- DragAndDropSvc::PVBOXDNDCBSNDDATADATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBSNDDATADATA>(pvParms);
-+ PVBOXDNDCBSNDDATADATA pCBData = reinterpret_cast<PVBOXDNDCBSNDDATADATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBSNDDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- rc = pThis->i_onReceiveData(pCtx, pCBData->pvData, pCBData->cbData, pCBData->cbTotalSize);
-+ rc = pThis->i_onReceiveData(pCtx, &pCBData->data);
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_DIR:
-+ case GUEST_DND_GH_SND_DIR:
- {
-- DragAndDropSvc::PVBOXDNDCBSNDDIRDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBSNDDIRDATA>(pvParms);
-+ PVBOXDNDCBSNDDIRDATA pCBData = reinterpret_cast<PVBOXDNDCBSNDDIRDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBSNDDIRDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_SND_DIR == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDDIRDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_DIR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- rc = pThis->i_onReceiveDir(pCtx, pCBData->pszPath, pCBData->cbPath, pCBData->fMode);
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_HDR:
-+ case GUEST_DND_GH_SND_FILE_HDR:
- {
-- DragAndDropSvc::PVBOXDNDCBSNDFILEHDRDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBSNDFILEHDRDATA>(pvParms);
-+ PVBOXDNDCBSNDFILEHDRDATA pCBData = reinterpret_cast<PVBOXDNDCBSNDFILEHDRDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBSNDFILEHDRDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_SND_FILE_HDR == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDFILEHDRDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_FILE_HDR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- rc = pThis->i_onReceiveFileHdr(pCtx, &pCtx->mURI.objCtx, pCBData->pszFilePath, pCBData->cbFilePath,
-+ rc = pThis->i_onReceiveFileHdr(pCtx, pCBData->pszFilePath, pCBData->cbFilePath,
- pCBData->cbSize, pCBData->fMode, pCBData->fFlags);
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_SND_FILE_DATA:
-+ case GUEST_DND_GH_SND_FILE_DATA:
- {
-- DragAndDropSvc::PVBOXDNDCBSNDFILEDATADATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBSNDFILEDATADATA>(pvParms);
-+ PVBOXDNDCBSNDFILEDATADATA pCBData = reinterpret_cast<PVBOXDNDCBSNDFILEDATADATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBSNDFILEDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_SND_FILE_DATA == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBSNDFILEDATADATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_SND_FILE_DATA == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
-- if (pThis->mDataBase.mProtocolVersion <= 1)
-+ if (pThis->mDataBase.m_uProtocolVersion <= 1)
- {
- /**
- * Notes for protocol v1 (< VBox 5.0):
-@@ -1242,30 +1504,39 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- * - There was no information whatsoever about the total file size; the old code only
- * appended data to the desired file. So just pass 0 as cbSize.
- */
-- rc = pThis->i_onReceiveFileHdr(pCtx, &pCtx->mURI.objCtx,
-- pCBData->u.v1.pszFilePath, pCBData->u.v1.cbFilePath,
-+ rc = pThis->i_onReceiveFileHdr(pCtx, pCBData->u.v1.pszFilePath, pCBData->u.v1.cbFilePath,
- 0 /* cbSize */, pCBData->u.v1.fMode, 0 /* fFlags */);
- if (RT_SUCCESS(rc))
-- rc = pThis->i_onReceiveFileData(pCtx, &pCtx->mURI.objCtx, pCBData->pvData, pCBData->cbData);
-+ rc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
- }
- else /* Protocol v2 and up. */
-- rc = pThis->i_onReceiveFileData(pCtx, &pCtx->mURI.objCtx, pCBData->pvData, pCBData->cbData);
-+ rc = pThis->i_onReceiveFileData(pCtx, pCBData->pvData, pCBData->cbData);
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_EVT_ERROR:
-+ case GUEST_DND_GH_EVT_ERROR:
- {
-- DragAndDropSvc::PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBEVTERRORDATA>(pvParms);
-+ PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<PVBOXDNDCBEVTERRORDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- pCtx->mpResp->reset();
-
- if (RT_SUCCESS(pCBData->rc))
-+ {
-+ AssertMsgFailed(("Received guest error with no error code set\n"));
- pCBData->rc = VERR_GENERAL_FAILURE; /* Make sure some error is set. */
-+ }
-+ else if (pCBData->rc == VERR_WRONG_ORDER)
-+ {
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
-+ }
-+ else
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
-+ GuestDnDSource::i_guestErrorToString(pCBData->rc));
-+
-+ LogRel3(("DnD: Guest reported file transfer error: %Rrc\n", pCBData->rc));
-
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, pCBData->rc,
-- GuestDnDSource::i_guestErrorToString(pCBData->rc));
- if (RT_SUCCESS(rc))
- rcCallback = VERR_GSTDND_GUEST_ERROR;
- break;
-@@ -1289,15 +1560,15 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- switch (rc)
- {
- case VERR_NO_DATA:
-- LogRel2(("DnD: Transfer to host complete\n"));
-+ LogRel2(("DnD: File transfer to host complete\n"));
- break;
-
- case VERR_CANCELLED:
-- LogRel2(("DnD: Transfer to host canceled\n"));
-+ LogRel2(("DnD: File transfer to host canceled\n"));
- break;
-
- default:
-- LogRel(("DnD: Error %Rrc occurred, aborting transfer to host\n", rc));
-+ LogRel(("DnD: Error %Rrc occurred, aborting file transfer to host\n", rc));
- break;
- }
-
-@@ -1307,19 +1578,19 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- AssertRC(rc2);
- }
-
-- /* All URI data processed? */
-- if (pCtx->mData.cbProcessed >= pCtx->mData.cbToProcess)
-+ /* All data processed? */
-+ if ( pCtx->mURI.isComplete()
-+ && pCtx->mData.isComplete())
- {
-- Assert(pCtx->mData.cbProcessed == pCtx->mData.cbToProcess);
- fNotify = true;
- }
-
- LogFlowFunc(("cbProcessed=%RU64, cbToProcess=%RU64, fNotify=%RTbool, rcCallback=%Rrc, rc=%Rrc\n",
-- pCtx->mData.cbProcessed, pCtx->mData.cbToProcess, fNotify, rcCallback, rc));
-+ pCtx->mData.getProcessed(), pCtx->mData.getTotal(), fNotify, rcCallback, rc));
-
- if (fNotify)
- {
-- int rc2 = pCtx->mCallback.Notify(rcCallback);
-+ int rc2 = pCtx->mCBEvent.Notify(rcCallback);
- AssertRC(rc2);
- }
-
-@@ -1327,22 +1598,3 @@ DECLCALLBACK(int) GuestDnDSource::i_rece
- return rc; /* Tell the guest. */
- }
-
--int GuestDnDSource::i_updateProcess(PRECVDATACTX pCtx, uint64_t cbDataAdd)
--{
-- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
--
-- LogFlowFunc(("cbProcessed=%RU64 (+ %RU64 = %RU64), cbToProcess=%RU64\n",
-- pCtx->mData.cbProcessed, cbDataAdd, pCtx->mData.cbProcessed + cbDataAdd, pCtx->mData.cbToProcess));
--
-- pCtx->mData.cbProcessed += cbDataAdd;
-- Assert(pCtx->mData.cbProcessed <= pCtx->mData.cbToProcess);
--
-- int64_t cbTotal = pCtx->mData.cbToProcess;
-- uint8_t uPercent = pCtx->mData.cbProcessed * 100 / (cbTotal ? cbTotal : 1);
--
-- int rc = pCtx->mpResp->setProgress(uPercent,
-- uPercent >= 100
-- ? DragAndDropSvc::DND_PROGRESS_COMPLETE
-- : DragAndDropSvc::DND_PROGRESS_RUNNING);
-- return rc;
--}
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
-@@ -242,7 +242,7 @@ HRESULT GuestDnDTarget::getProtocolVersi
- HRESULT GuestDnDTarget::enter(ULONG aScreenId, ULONG aX, ULONG aY,
- DnDAction_T aDefaultAction,
- const std::vector<DnDAction_T> &aAllowedActions,
-- const GuestDnDMIMEList &aFormats,
-+ const GuestDnDMIMEList &aFormats,
- DnDAction_T *aResultAction)
- {
- #if !defined(VBOX_WITH_DRAG_AND_DROP)
-@@ -261,7 +261,7 @@ HRESULT GuestDnDTarget::enter(ULONG aScr
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
- /* Determine guest DnD protocol to use. */
-- GuestDnDBase::getProtocolVersion(&mDataBase.mProtocolVersion);
-+ GuestDnDBase::getProtocolVersion(&mDataBase.m_uProtocolVersion);
-
- /* Default action is ignoring. */
- DnDAction_T resAction = DnDAction_Ignore;
-@@ -280,9 +280,10 @@ HRESULT GuestDnDTarget::enter(ULONG aScr
- * In the GuestDnDTarget case the source formats are from the host,
- * as GuestDnDTarget acts as a source for the guest.
- */
-- Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
-+ Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
- if (strFormats.isEmpty())
- return setError(E_INVALIDARG, tr("No or not supported format(s) specified"));
-+ const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */
-
- LogRel2(("DnD: Offered formats to guest:\n"));
- RTCList<RTCString> lstFormats = strFormats.split("\r\n");
-@@ -301,14 +302,16 @@ HRESULT GuestDnDTarget::enter(ULONG aScr
- if (RT_SUCCESS(rc))
- {
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_HG_EVT_ENTER);
-+ Msg.setType(HOST_DND_HG_EVT_ENTER);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextUInt32(aScreenId);
- Msg.setNextUInt32(aX);
- Msg.setNextUInt32(aY);
- Msg.setNextUInt32(uDefAction);
- Msg.setNextUInt32(uAllowedActions);
-- Msg.setNextPointer((void*)strFormats.c_str(), strFormats.length() + 1);
-- Msg.setNextUInt32(strFormats.length() + 1);
-+ Msg.setNextPointer((void *)strFormats.c_str(), cbFormats);
-+ Msg.setNextUInt32(cbFormats);
-
- rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
- if (RT_SUCCESS(rc))
-@@ -365,9 +368,10 @@ HRESULT GuestDnDTarget::move(ULONG aScre
- * In the GuestDnDTarget case the source formats are from the host,
- * as GuestDnDTarget acts as a source for the guest.
- */
-- Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
-+ Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
- if (strFormats.isEmpty())
- return setError(E_INVALIDARG, tr("No or not supported format(s) specified"));
-+ const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */
-
- HRESULT hr = S_OK;
-
-@@ -375,14 +379,16 @@ HRESULT GuestDnDTarget::move(ULONG aScre
- if (RT_SUCCESS(rc))
- {
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_HG_EVT_MOVE);
-+ Msg.setType(HOST_DND_HG_EVT_MOVE);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextUInt32(aScreenId);
- Msg.setNextUInt32(aX);
- Msg.setNextUInt32(aY);
- Msg.setNextUInt32(uDefAction);
- Msg.setNextUInt32(uAllowedActions);
-- Msg.setNextPointer((void*)strFormats.c_str(), strFormats.length() + 1);
-- Msg.setNextUInt32(strFormats.length() + 1);
-+ Msg.setNextPointer((void *)strFormats.c_str(), cbFormats);
-+ Msg.setNextUInt32(cbFormats);
-
- rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
- if (RT_SUCCESS(rc))
-@@ -417,7 +423,7 @@ HRESULT GuestDnDTarget::leave(ULONG uScr
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
- HRESULT hr = S_OK;
-- int rc = GuestDnDInst()->hostCall(DragAndDropSvc::HOST_DND_HG_EVT_LEAVE,
-+ int rc = GuestDnDInst()->hostCall(HOST_DND_HG_EVT_LEAVE,
- 0 /* cParms */, NULL /* paParms */);
- if (RT_SUCCESS(rc))
- {
-@@ -478,23 +484,26 @@ HRESULT GuestDnDTarget::drop(ULONG aScre
- * In the GuestDnDTarget case the source formats are from the host,
- * as GuestDnDTarget acts as a source for the guest.
- */
-- Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
-+ Utf8Str strFormats = GuestDnD::toFormatString(GuestDnD::toFilteredFormatList(m_lstFmtSupported, aFormats));
- if (strFormats.isEmpty())
- return setError(E_INVALIDARG, tr("No or not supported format(s) specified"));
-+ const uint32_t cbFormats = (uint32_t)strFormats.length() + 1; /* Include terminating zero. */
-
- /* Adjust the coordinates in a multi-monitor setup. */
- HRESULT hr = GuestDnDInst()->adjustScreenCoordinates(aScreenId, &aX, &aY);
- if (SUCCEEDED(hr))
- {
- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_HG_EVT_DROPPED);
-+ Msg.setType(HOST_DND_HG_EVT_DROPPED);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
- Msg.setNextUInt32(aScreenId);
- Msg.setNextUInt32(aX);
- Msg.setNextUInt32(aY);
- Msg.setNextUInt32(uDefAction);
- Msg.setNextUInt32(uAllowedActions);
-- Msg.setNextPointer((void*)strFormats.c_str(), strFormats.length() + 1);
-- Msg.setNextUInt32(strFormats.length() + 1);
-+ Msg.setNextPointer((void*)strFormats.c_str(), cbFormats);
-+ Msg.setNextUInt32(cbFormats);
-
- int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
- if (RT_SUCCESS(rc))
-@@ -544,26 +553,26 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- SendDataTask *pTask = (SendDataTask *)pvUser;
- AssertPtrReturn(pTask, VERR_INVALID_POINTER);
-
-- const ComObjPtr<GuestDnDTarget> pTarget(pTask->getTarget());
-- Assert(!pTarget.isNull());
-+ const ComObjPtr<GuestDnDTarget> pThis(pTask->getTarget());
-+ Assert(!pThis.isNull());
-
-- int rc;
-+ AutoCaller autoCaller(pThis);
-+ if (FAILED(autoCaller.rc())) return VERR_COM_INVALID_OBJECT_STATE;
-
-- AutoCaller autoCaller(pTarget);
-- if (SUCCEEDED(autoCaller.rc()))
-- {
-- rc = pTarget->i_sendData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
-- /* Nothing to do here anymore. */
-- }
-- else
-- rc = VERR_COM_INVALID_OBJECT_STATE;
-+ int rc = RTThreadUserSignal(Thread);
-+ AssertRC(rc);
-
-- ASMAtomicWriteBool(&pTarget->mDataBase.mfTransferIsPending, false);
-+ rc = pThis->i_sendData(pTask->getCtx(), RT_INDEFINITE_WAIT /* msTimeout */);
-
- if (pTask)
- delete pTask;
-
-- LogFlowFunc(("pTarget=%p returning rc=%Rrc\n", (GuestDnDTarget *)pTarget, rc));
-+ AutoWriteLock alock(pThis COMMA_LOCKVAL_SRC_POS);
-+
-+ Assert(pThis->mDataBase.m_cTransfersPending);
-+ pThis->mDataBase.m_cTransfersPending--;
-+
-+ LogFlowFunc(("pTarget=%p returning rc=%Rrc\n", (GuestDnDTarget *)pThis, rc));
- return rc;
- }
-
-@@ -593,11 +602,11 @@ HRESULT GuestDnDTarget::sendData(ULONG a
- if (RT_UNLIKELY(!aData.size()))
- return setError(E_INVALIDARG, tr("No data to send specified"));
-
-- /* Note: At the moment we only support one transfer at a time. */
-- if (ASMAtomicReadBool(&mDataBase.mfTransferIsPending))
-- return setError(E_INVALIDARG, tr("Another send operation already is in progress"));
-+ AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-- ASMAtomicWriteBool(&mDataBase.mfTransferIsPending, true);
-+ /* At the moment we only support one transfer at a time. */
-+ if (mDataBase.m_cTransfersPending)
-+ return setError(E_INVALIDARG, tr("Another drop operation already is in progress"));
-
- /* Dito. */
- GuestDnDResponse *pResp = GuestDnDInst()->response();
-@@ -616,26 +625,36 @@ HRESULT GuestDnDTarget::sendData(ULONG a
- pSendCtx->mpResp = pResp;
- pSendCtx->mScreenID = aScreenId;
- pSendCtx->mFmtReq = aFormat;
-- pSendCtx->mData.vecData = aData;
-+
-+ pSendCtx->mData.getMeta().add(aData);
-
- SendDataTask *pTask = new SendDataTask(this, pSendCtx);
- AssertReturn(pTask->isOk(), pTask->getRC());
-
- LogFlowFunc(("Starting thread ...\n"));
-
-- int rc = RTThreadCreate(NULL, GuestDnDTarget::i_sendDataThread,
-+ RTTHREAD threadSnd;
-+ int rc = RTThreadCreate(&threadSnd, GuestDnDTarget::i_sendDataThread,
- (void *)pTask, 0, RTTHREADTYPE_MAIN_WORKER, 0, "dndTgtSndData");
- if (RT_SUCCESS(rc))
- {
-- hr = pResp->queryProgressTo(aProgress.asOutParam());
-- ComAssertComRC(hr);
-+ rc = RTThreadUserWait(threadSnd, 30 * 1000 /* 30s timeout */);
-+ if (RT_SUCCESS(rc))
-+ {
-+ mDataBase.m_cTransfersPending++;
-
-- /* Note: pTask is now owned by the worker thread. */
-+ hr = pResp->queryProgressTo(aProgress.asOutParam());
-+ ComAssertComRC(hr);
-+
-+ /* Note: pTask is now owned by the worker thread. */
-+ }
-+ else
-+ hr = setError(VBOX_E_IPRT_ERROR, tr("Waiting for sending thread failed (%Rrc)"), rc);
- }
- else
- hr = setError(VBOX_E_IPRT_ERROR, tr("Starting thread failed (%Rrc)"), rc);
-
-- if (RT_FAILURE(rc))
-+ if (FAILED(hr))
- delete pSendCtx;
- }
- catch(std::bad_alloc &)
-@@ -643,8 +662,6 @@ HRESULT GuestDnDTarget::sendData(ULONG a
- hr = setError(E_OUTOFMEMORY);
- }
-
-- /* Note: mDataBase.mfTransferIsPending will be set to false again by i_sendDataThread. */
--
- LogFlowFunc(("Returning hr=%Rhrc\n", hr));
- return hr;
- #endif /* VBOX_WITH_DRAG_AND_DROP */
-@@ -661,7 +678,7 @@ int GuestDnDTarget::i_cancelOperation(vo
- #endif
-
- LogFlowFunc(("Cancelling operation, telling guest ...\n"));
-- return GuestDnDInst()->hostCall(DragAndDropSvc::HOST_DND_HG_EVT_CANCEL, 0 /* cParms */, NULL /*paParms*/);
-+ return GuestDnDInst()->hostCall(HOST_DND_HG_EVT_CANCEL, 0 /* cParms */, NULL /*paParms*/);
- }
-
- /* static */
-@@ -745,7 +762,7 @@ int GuestDnDTarget::i_sendData(PSENDDATA
- ASMAtomicWriteBool(&pCtx->mIsActive, true);
-
- /* Clear all remaining outgoing messages. */
-- mDataBase.mListOutgoing.clear();
-+ mDataBase.m_lstMsgOut.clear();
-
- /**
- * Do we need to build up a file tree?
-@@ -774,13 +791,84 @@ int GuestDnDTarget::i_sendData(PSENDDATA
- return rc;
- }
-
-+int GuestDnDTarget::i_sendDataBody(PSENDDATACTX pCtx, GuestDnDData *pData)
-+{
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pData, VERR_INVALID_POINTER);
-+
-+ /** @todo Add support for multiple HOST_DND_HG_SND_DATA messages in case of more than 64K data! */
-+ if (pData->getMeta().getSize() > _64K)
-+ return VERR_NOT_IMPLEMENTED;
-+
-+ GuestDnDMsg Msg;
-+
-+ LogFlowFunc(("cbFmt=%RU32, cbMeta=%RU32, cbChksum=%RU32\n",
-+ pData->getFmtSize(), pData->getMeta().getSize(), pData->getChkSumSize()));
-+
-+ Msg.setType(HOST_DND_HG_SND_DATA);
-+ if (mDataBase.m_uProtocolVersion < 3)
-+ {
-+ Msg.setNextUInt32(pCtx->mScreenID); /* uScreenId */
-+ Msg.setNextPointer(pData->getFmtMutable(), pData->getFmtSize()); /* pvFormat */
-+ Msg.setNextUInt32(pData->getFmtSize()); /* cbFormat */
-+ Msg.setNextPointer(pData->getMeta().getDataMutable(), pData->getMeta().getSize()); /* pvData */
-+ /* Fill in the current data block size to send.
-+ * Note: Only supports uint32_t. */
-+ Msg.setNextUInt32((uint32_t)pData->getMeta().getSize()); /* cbData */
-+ }
-+ else
-+ {
-+ Msg.setNextUInt32(0); /** @todo ContextID not used yet. */
-+ Msg.setNextPointer(pData->getMeta().getDataMutable(), pData->getMeta().getSize()); /* pvData */
-+ Msg.setNextUInt32(pData->getMeta().getSize()); /* cbData */
-+ Msg.setNextPointer(pData->getChkSumMutable(), pData->getChkSumSize()); /** @todo pvChecksum; not used yet. */
-+ Msg.setNextUInt32(pData->getChkSumSize()); /** @todo cbChecksum; not used yet. */
-+ }
-+
-+ int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-+ if (RT_SUCCESS(rc))
-+ rc = updateProgress(pData, pCtx->mpResp, pData->getMeta().getSize());
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
-+int GuestDnDTarget::i_sendDataHeader(PSENDDATACTX pCtx, GuestDnDData *pData, GuestDnDURIData *pURIData /* = NULL */)
-+{
-+ AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pData, VERR_INVALID_POINTER);
-+ /* pURIData is optional. */
-+
-+ GuestDnDMsg Msg;
-+
-+ Msg.setType(HOST_DND_HG_SND_DATA_HDR);
-+
-+ Msg.setNextUInt32(0); /** @todo uContext; not used yet. */
-+ Msg.setNextUInt32(0); /** @todo uFlags; not used yet. */
-+ Msg.setNextUInt32(pCtx->mScreenID); /* uScreen */
-+ Msg.setNextUInt64(pData->getTotal()); /* cbTotal */
-+ Msg.setNextUInt32(pData->getMeta().getSize()); /* cbMeta*/
-+ Msg.setNextPointer(pData->getFmtMutable(), pData->getFmtSize()); /* pvMetaFmt */
-+ Msg.setNextUInt32(pData->getFmtSize()); /* cbMetaFmt */
-+ Msg.setNextUInt64(pURIData ? pURIData->getObjToProcess() : 0); /* cObjects */
-+ Msg.setNextUInt32(0); /** @todo enmCompression; not used yet. */
-+ Msg.setNextUInt32(0); /** @todo enmChecksumType; not used yet. */
-+ Msg.setNextPointer(NULL, 0); /** @todo pvChecksum; not used yet. */
-+ Msg.setNextUInt32(0); /** @todo cbChecksum; not used yet. */
-+
-+ int rc = GuestDnDInst()->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-+
-+ LogFlowFuncLeaveRC(rc);
-+ return rc;
-+}
-+
- int GuestDnDTarget::i_sendDirectory(PSENDDATACTX pCtx, GuestDnDURIObjCtx *pObjCtx, GuestDnDMsg *pMsg)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pMsg, VERR_INVALID_POINTER);
-
-- DnDURIObject *pObj = pObjCtx->pObjURI;
-+ DnDURIObject *pObj = pObjCtx->getObj();
- AssertPtr(pObj);
-
- RTCString strPath = pObj->GetDestPath();
-@@ -789,11 +877,13 @@ int GuestDnDTarget::i_sendDirectory(PSEN
- if (strPath.length() >= RTPATH_MAX) /* Note: Maximum is RTPATH_MAX on guest side. */
- return VERR_BUFFER_OVERFLOW;
-
-- LogFlowFunc(("Sending directory \"%s\" using protocol v%RU32 ...\n", strPath.c_str(), mDataBase.mProtocolVersion));
-+ LogRel2(("DnD: Transferring host directory to guest: %s\n", strPath.c_str()));
-
-- pMsg->setType(DragAndDropSvc::HOST_DND_HG_SND_DIR);
-+ pMsg->setType(HOST_DND_HG_SND_DIR);
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ pMsg->setNextUInt32(0); /** @todo ContextID not used yet. */
- pMsg->setNextString(strPath.c_str()); /* path */
-- pMsg->setNextUInt32((uint32_t)(strPath.length() + 1)); /* path length - note: Maximum is RTPATH_MAX on guest side. */
-+ pMsg->setNextUInt32((uint32_t)(strPath.length() + 1)); /* path length (maximum is RTPATH_MAX on guest side). */
- pMsg->setNextUInt32(pObj->GetMode()); /* mode */
-
- return VINF_SUCCESS;
-@@ -805,7 +895,7 @@ int GuestDnDTarget::i_sendFile(PSENDDATA
- AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pMsg, VERR_INVALID_POINTER);
-
-- DnDURIObject *pObj = pObjCtx->pObjURI;
-+ DnDURIObject *pObj = pObjCtx->getObj();
- AssertPtr(pObj);
-
- RTCString strPathSrc = pObj->GetSourcePath();
-@@ -815,7 +905,7 @@ int GuestDnDTarget::i_sendFile(PSENDDATA
- int rc = VINF_SUCCESS;
-
- LogFlowFunc(("Sending file with %RU32 bytes buffer, using protocol v%RU32 ...\n",
-- mData.mcbBlockSize, mDataBase.mProtocolVersion));
-+ mData.mcbBlockSize, mDataBase.m_uProtocolVersion));
- LogFlowFunc(("strPathSrc=%s, fIsOpen=%RTbool, cbSize=%RU64\n", strPathSrc.c_str(), pObj->IsOpen(), pObj->GetSize()));
-
- if (!pObj->IsOpen())
-@@ -830,19 +920,19 @@ int GuestDnDTarget::i_sendFile(PSENDDATA
- bool fSendData = false;
- if (RT_SUCCESS(rc))
- {
-- if (mDataBase.mProtocolVersion >= 2)
-+ if (mDataBase.m_uProtocolVersion >= 2)
- {
-- if (!pObjCtx->fHeaderSent)
-+ uint32_t fState = pObjCtx->getState();
-+ if (!(fState & DND_OBJCTX_STATE_HAS_HDR))
- {
- /*
- * Since protocol v2 the file header and the actual file contents are
- * separate messages, so send the file header first.
- * The just registered callback will be called by the guest afterwards.
- */
-- pMsg->setType(DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR);
-- pMsg->setNextUInt32(0); /* uContextID */
-- rc = pMsg->setNextString(pObj->GetDestPath().c_str()); /* pvName */
-- AssertRC(rc);
-+ pMsg->setType(HOST_DND_HG_SND_FILE_HDR);
-+ pMsg->setNextUInt32(0); /** @todo ContextID not used yet. */
-+ pMsg->setNextString(pObj->GetDestPath().c_str()); /* pvName */
- pMsg->setNextUInt32((uint32_t)(pObj->GetDestPath().length() + 1)); /* cbName */
- pMsg->setNextUInt32(0); /* uFlags */
- pMsg->setNextUInt32(pObj->GetMode()); /* fMode */
-@@ -854,7 +944,7 @@ int GuestDnDTarget::i_sendFile(PSENDDATA
-
- /** @todo Set progress object title to current file being transferred? */
-
-- pObjCtx->fHeaderSent = true;
-+ pObjCtx->setState(fState | DND_OBJCTX_STATE_HAS_HDR);
- }
- else
- {
-@@ -885,7 +975,7 @@ int GuestDnDTarget::i_sendFileData(PSEND
- AssertPtrReturn(pObjCtx, VERR_INVALID_POINTER);
- AssertPtrReturn(pMsg, VERR_INVALID_POINTER);
-
-- DnDURIObject *pObj = pObjCtx->pObjURI;
-+ DnDURIObject *pObj = pObjCtx->getObj();
- AssertPtr(pObj);
-
- GuestDnDResponse *pResp = pCtx->mpResp;
-@@ -898,40 +988,45 @@ int GuestDnDTarget::i_sendFileData(PSEND
- */
-
- /* Set the message type. */
-- pMsg->setType(DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA);
-+ pMsg->setType(HOST_DND_HG_SND_FILE_DATA);
-
- /* Protocol version 1 sends the file path *every* time with a new file chunk.
- * In protocol version 2 we only do this once with HOST_DND_HG_SND_FILE_HDR. */
-- if (mDataBase.mProtocolVersion <= 1)
-+ if (mDataBase.m_uProtocolVersion <= 1)
- {
- pMsg->setNextString(pObj->GetDestPath().c_str()); /* pvName */
- pMsg->setNextUInt32((uint32_t)(pObj->GetDestPath().length() + 1)); /* cbName */
- }
-- else
-+ else if (mDataBase.m_uProtocolVersion >= 2)
- {
-- /* Protocol version 2 also sends the context ID. Currently unused. */
-- pMsg->setNextUInt32(0); /* context ID */
-+ pMsg->setNextUInt32(0); /** @todo ContextID not used yet. */
- }
-
- uint32_t cbRead = 0;
-
-- int rc = pObj->Read(pCtx->mURI.GetBufferMutable(), pCtx->mURI.GetBufferSize(), &cbRead);
-+ int rc = pObj->Read(pCtx->mURI.getBufferMutable(), pCtx->mURI.getBufferSize(), &cbRead);
- if (RT_SUCCESS(rc))
- {
-- pCtx->mData.cbProcessed += cbRead;
-- LogFlowFunc(("cbBufSize=%zu, cbRead=%RU32, cbProcessed=%RU64, rc=%Rrc\n",
-- pCtx->mURI.GetBufferSize(), cbRead, pCtx->mData.cbProcessed, rc));
-+ pCtx->mData.addProcessed(cbRead);
-+ LogFlowFunc(("cbBufSize=%zu, cbRead=%RU32\n", pCtx->mURI.getBufferSize(), cbRead));
-
-- if (mDataBase.mProtocolVersion <= 1)
-+ if (mDataBase.m_uProtocolVersion <= 1)
- {
-- pMsg->setNextPointer(pCtx->mURI.GetBufferMutable(), cbRead); /* pvData */
-- pMsg->setNextUInt32(cbRead); /* cbData */
-- pMsg->setNextUInt32(pObj->GetMode()); /* fMode */
-+ pMsg->setNextPointer(pCtx->mURI.getBufferMutable(), cbRead); /* pvData */
-+ pMsg->setNextUInt32(cbRead); /* cbData */
-+ pMsg->setNextUInt32(pObj->GetMode()); /* fMode */
- }
-- else
-+ else /* Protocol v2 and up. */
- {
-- pMsg->setNextPointer(pCtx->mURI.GetBufferMutable(), cbRead); /* pvData */
-- pMsg->setNextUInt32(cbRead); /* cbData */
-+ pMsg->setNextPointer(pCtx->mURI.getBufferMutable(), cbRead); /* pvData */
-+ pMsg->setNextUInt32(cbRead); /* cbData */
-+
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ {
-+ /** @todo Calculate checksum. */
-+ pMsg->setNextPointer(NULL, 0); /* pvChecksum */
-+ pMsg->setNextUInt32(0); /* cbChecksum */
-+ }
- }
-
- if (pObj->IsComplete()) /* Done reading? */
-@@ -960,18 +1055,26 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
-
- LogFlowFunc(("pThis=%p, uMsg=%RU32\n", pThis, uMsg));
-
-- int rc = VINF_SUCCESS; /* Will be reported back to guest. */
-- int rcGuest = VINF_SUCCESS; /* Contains error code from guest in case of VERR_GSTDND_GUEST_ERROR. */
-+ int rc = VINF_SUCCESS;
-+ int rcGuest = VINF_SUCCESS; /* Contains error code from guest in case of VERR_GSTDND_GUEST_ERROR. */
- bool fNotify = false;
-
- switch (uMsg)
- {
-- case DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG:
-+ case GUEST_DND_CONNECT:
-+ /* Nothing to do here (yet). */
-+ break;
-+
-+ case GUEST_DND_DISCONNECT:
-+ rc = VERR_CANCELLED;
-+ break;
-+
-+ case GUEST_DND_GET_NEXT_HOST_MSG:
- {
-- DragAndDropSvc::PVBOXDNDCBHGGETNEXTHOSTMSG pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBHGGETNEXTHOSTMSG>(pvParms);
-+ PVBOXDNDCBHGGETNEXTHOSTMSG pCBData = reinterpret_cast<PVBOXDNDCBHGGETNEXTHOSTMSG>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBHGGETNEXTHOSTMSG) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBHGGETNEXTHOSTMSG) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- try
- {
-@@ -1006,12 +1109,12 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- }
- break;
- }
-- case DragAndDropSvc::GUEST_DND_GH_EVT_ERROR:
-+ case GUEST_DND_GH_EVT_ERROR:
- {
-- DragAndDropSvc::PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBEVTERRORDATA>(pvParms);
-+ PVBOXDNDCBEVTERRORDATA pCBData = reinterpret_cast<PVBOXDNDCBEVTERRORDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBEVTERRORDATA) == cbParms, VERR_INVALID_PARAMETER);
-+ AssertReturn(CB_MAGIC_DND_GH_EVT_ERROR == pCBData->hdr.uMagic, VERR_INVALID_PARAMETER);
-
- pCtx->mpResp->reset();
-
-@@ -1021,7 +1124,7 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- pCBData->rc = VERR_GENERAL_FAILURE; /* Make sure some error is set. */
- }
-
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, pCBData->rc,
-+ rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, pCBData->rc,
- GuestDnDTarget::i_guestErrorToString(pCBData->rc));
- if (RT_SUCCESS(rc))
- {
-@@ -1030,15 +1133,14 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- }
- break;
- }
-- case DragAndDropSvc::HOST_DND_HG_SND_DIR:
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR:
-- case DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA:
-+ case HOST_DND_HG_SND_DIR:
-+ case HOST_DND_HG_SND_FILE_HDR:
-+ case HOST_DND_HG_SND_FILE_DATA:
- {
-- DragAndDropSvc::PVBOXDNDCBHGGETNEXTHOSTMSGDATA pCBData
-- = reinterpret_cast<DragAndDropSvc::PVBOXDNDCBHGGETNEXTHOSTMSGDATA>(pvParms);
-+ PVBOXDNDCBHGGETNEXTHOSTMSGDATA pCBData
-+ = reinterpret_cast<PVBOXDNDCBHGGETNEXTHOSTMSGDATA>(pvParms);
- AssertPtr(pCBData);
-- AssertReturn(sizeof(DragAndDropSvc::VBOXDNDCBHGGETNEXTHOSTMSGDATA) == cbParms, VERR_INVALID_PARAMETER);
-- AssertReturn(DragAndDropSvc::CB_MAGIC_DND_HG_GET_NEXT_HOST_MSG_DATA == pCBData->hdr.u32Magic, VERR_INVALID_PARAMETER);
-+ AssertReturn(sizeof(VBOXDNDCBHGGETNEXTHOSTMSGDATA) == cbParms, VERR_INVALID_PARAMETER);
-
- LogFlowFunc(("pCBData->uMsg=%RU32, paParms=%p, cParms=%RU32\n", pCBData->uMsg, pCBData->paParms, pCBData->cParms));
-
-@@ -1052,6 +1154,11 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- || pCBData->paParms == NULL
- || pCBData->cParms != pMsg->getCount())
- {
-+ LogFlowFunc(("Current message does not match:\n"));
-+ LogFlowFunc(("\tCallback: uMsg=%RU32, cParms=%RU32, paParms=%p\n",
-+ pCBData->uMsg, pCBData->cParms, pCBData->paParms));
-+ LogFlowFunc(("\t Next: uMsg=%RU32, cParms=%RU32\n", pMsg->getType(), pMsg->getCount()));
-+
- /* Start over. */
- pThis->msgQueueClear();
-
-@@ -1061,7 +1168,7 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
- if (RT_SUCCESS(rc))
- {
- LogFlowFunc(("Returning uMsg=%RU32\n", uMsg));
-- rc = HGCM::Message::copyParms(pMsg->getCount(), pMsg->getParms(), pCBData->paParms);
-+ rc = HGCM::Message::copyParms(pCBData->paParms, pCBData->cParms, pMsg->getParms(), pMsg->getCount());
- if (RT_SUCCESS(rc))
- {
- pCBData->cParms = pMsg->getCount();
-@@ -1140,7 +1247,7 @@ DECLCALLBACK(int) GuestDnDTarget::i_send
-
- if (fNotify)
- {
-- int rc2 = pCtx->mCallback.Notify(rc); /** @todo Also pass guest error back? */
-+ int rc2 = pCtx->mCBEvent.Notify(rc); /** @todo Also pass guest error back? */
- AssertRC(rc2);
- }
-
-@@ -1153,30 +1260,24 @@ int GuestDnDTarget::i_sendURIData(PSENDD
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
- AssertPtr(pCtx->mpResp);
-
--#define URI_DATA_IS_VALID_BREAK(x) \
-- if (!x) \
-- { \
-- LogFlowFunc(("Invalid URI data value for \"" #x "\"\n")); \
-- rc = VERR_INVALID_PARAMETER; \
-- break; \
-- }
--
--#define REGISTER_CALLBACK(x) \
-- rc = pCtx->mpResp->setCallback(x, i_sendURIDataCallback, pCtx); \
-- if (RT_FAILURE(rc)) \
-- return rc;
-+#define REGISTER_CALLBACK(x) \
-+ do { \
-+ rc = pCtx->mpResp->setCallback(x, i_sendURIDataCallback, pCtx); \
-+ if (RT_FAILURE(rc)) \
-+ return rc; \
-+ } while (0)
-
- #define UNREGISTER_CALLBACK(x) \
-- { \
-+ do { \
- int rc2 = pCtx->mpResp->setCallback(x, NULL); \
- AssertRC(rc2); \
-- }
-+ } while (0)
-
-- int rc = pCtx->mURI.Init(mData.mcbBlockSize);
-+ int rc = pCtx->mURI.init(mData.mcbBlockSize);
- if (RT_FAILURE(rc))
- return rc;
-
-- rc = pCtx->mCallback.Reset();
-+ rc = pCtx->mCBEvent.Reset();
- if (RT_FAILURE(rc))
- return rc;
-
-@@ -1184,74 +1285,82 @@ int GuestDnDTarget::i_sendURIData(PSENDD
- * Register callbacks.
- */
- /* Guest callbacks. */
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG);
-- REGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-+ REGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ REGISTER_CALLBACK(GUEST_DND_GET_NEXT_HOST_MSG);
-+ REGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
- /* Host callbacks. */
-- REGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_DIR);
-- if (mDataBase.mProtocolVersion >= 2)
-- REGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR);
-- REGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA);
-+ REGISTER_CALLBACK(HOST_DND_HG_SND_DIR);
-+ if (mDataBase.m_uProtocolVersion >= 2)
-+ REGISTER_CALLBACK(HOST_DND_HG_SND_FILE_HDR);
-+ REGISTER_CALLBACK(HOST_DND_HG_SND_FILE_DATA);
-
- do
- {
- /*
-- * Extract URI list from byte data.
-+ * Extract URI list from current meta data.
- */
-- DnDURIList &lstURI = pCtx->mURI.lstURI; /* Use the URI list from the context. */
--
-- const char *pszList = (const char *)&pCtx->mData.vecData.front();
-- URI_DATA_IS_VALID_BREAK(pszList);
-+ GuestDnDData *pData = &pCtx->mData;
-+ GuestDnDURIData *pURI = &pCtx->mURI;
-
-- uint32_t cbList = pCtx->mData.vecData.size();
-- URI_DATA_IS_VALID_BREAK(cbList);
-+ rc = pURI->fromLocalMetaData(pData->getMeta());
-+ if (RT_FAILURE(rc))
-+ break;
-
-- RTCList<RTCString> lstURIOrg = RTCString(pszList, cbList).split("\r\n");
-- URI_DATA_IS_VALID_BREAK(!lstURIOrg.isEmpty());
-+ LogFlowFunc(("URI root objects: %zu, total bytes (raw data to transfer): %zu\n",
-+ pURI->getURIList().RootCount(), pURI->getURIList().TotalBytes()));
-
-- /* Note: All files to be transferred will be kept open during the entire DnD
-- * operation, also to keep the accounting right. */
-- rc = lstURI.AppendURIPathsFromList(lstURIOrg, DNDURILIST_FLAGS_KEEP_OPEN);
-- if (RT_SUCCESS(rc))
-- LogFlowFunc(("URI root objects: %zu, total bytes (raw data to transfer): %zu\n",
-- lstURI.RootCount(), lstURI.TotalBytes()));
-- else
-+ /*
-+ * Set the new meta data with the URI list in it.
-+ */
-+ rc = pData->getMeta().fromURIList(pURI->getURIList());
-+ if (RT_FAILURE(rc))
- break;
-
-- pCtx->mData.cbProcessed = 0;
-- pCtx->mData.cbToProcess = lstURI.TotalBytes();
-+ /*
-+ * Set the estimated data sizes we are going to send.
-+ * The total size also contains the meta data size.
-+ */
-+ const uint32_t cbMeta = pData->getMeta().getSize();
-+ pData->setEstimatedSize(pURI->getURIList().TotalBytes() + cbMeta /* cbTotal */,
-+ cbMeta /* cbMeta */);
-+
-+ /*
-+ * Set the meta format.
-+ */
-+ void *pvFmt = (void *)pCtx->mFmtReq.c_str();
-+ uint32_t cbFmt = (uint32_t)pCtx->mFmtReq.length() + 1; /* Include terminating zero. */
-+
-+ pData->setFmt(pvFmt, cbFmt);
-
- /*
-- * The first message always is the meta info for the data. The meta
-- * info *only* contains the root elements of an URI list.
-+ * The first message always is the data header. The meta data itself then follows
-+ * and *only* contains the root elements of an URI list.
-+ *
-+ * After the meta data we generate the messages required to send the
-+ * file/directory data itself.
- *
-- * After the meta data we generate the messages required to send the data itself.
-+ * Note: Protocol < v3 use the first data message to tell what's being sent.
-+ */
-+ GuestDnDMsg Msg;
-+
-+ /*
-+ * Send the data header first.
-+ */
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ rc = i_sendDataHeader(pCtx, pData, &pCtx->mURI);
-+
-+ /*
-+ * Send the (meta) data body.
- */
-- Assert(!lstURI.IsEmpty());
-- RTCString strData = lstURI.RootToString().c_str();
-- size_t cbData = strData.length() + 1; /* Include terminating zero. */
--
-- GuestDnDMsg MsgSndData;
-- MsgSndData.setType(DragAndDropSvc::HOST_DND_HG_SND_DATA);
-- MsgSndData.setNextUInt32(pCtx->mScreenID);
-- MsgSndData.setNextPointer((void *)pCtx->mFmtReq.c_str(), (uint32_t)pCtx->mFmtReq.length() + 1);
-- MsgSndData.setNextUInt32((uint32_t)pCtx->mFmtReq.length() + 1);
-- MsgSndData.setNextPointer((void*)strData.c_str(), (uint32_t)cbData);
-- MsgSndData.setNextUInt32((uint32_t)cbData);
-+ if (RT_SUCCESS(rc))
-+ rc = i_sendDataBody(pCtx, pData);
-
-- rc = GuestDnDInst()->hostCall(MsgSndData.getType(), MsgSndData.getCount(), MsgSndData.getParms());
- if (RT_SUCCESS(rc))
- {
-- rc = waitForEvent(msTimeout, pCtx->mCallback, pCtx->mpResp);
-- if (RT_FAILURE(rc))
-- {
-- if (rc == VERR_CANCELLED)
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_CANCELLED, VINF_SUCCESS);
-- else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, rc,
-- GuestDnDTarget::i_hostErrorToString(rc));
-- }
-- else
-- rc = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_COMPLETE, VINF_SUCCESS);
-+ rc = waitForEvent(&pCtx->mCBEvent, pCtx->mpResp, msTimeout);
-+ if (RT_SUCCESS(rc))
-+ pCtx->mpResp->setProgress(100, DND_PROGRESS_COMPLETE, VINF_SUCCESS);
- }
-
- } while (0);
-@@ -1260,17 +1369,28 @@ int GuestDnDTarget::i_sendURIData(PSENDD
- * Unregister callbacks.
- */
- /* Guest callbacks. */
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GET_NEXT_HOST_MSG);
-- UNREGISTER_CALLBACK(DragAndDropSvc::GUEST_DND_GH_EVT_ERROR);
-+ UNREGISTER_CALLBACK(GUEST_DND_CONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_DISCONNECT);
-+ UNREGISTER_CALLBACK(GUEST_DND_GET_NEXT_HOST_MSG);
-+ UNREGISTER_CALLBACK(GUEST_DND_GH_EVT_ERROR);
- /* Host callbacks. */
-- UNREGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_DIR);
-- if (mDataBase.mProtocolVersion >= 2)
-- UNREGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR);
-- UNREGISTER_CALLBACK(DragAndDropSvc::HOST_DND_HG_SND_FILE_DATA);
-+ UNREGISTER_CALLBACK(HOST_DND_HG_SND_DIR);
-+ if (mDataBase.m_uProtocolVersion >= 2)
-+ UNREGISTER_CALLBACK(HOST_DND_HG_SND_FILE_HDR);
-+ UNREGISTER_CALLBACK(HOST_DND_HG_SND_FILE_DATA);
-
- #undef REGISTER_CALLBACK
- #undef UNREGISTER_CALLBACK
-
-+ if (RT_FAILURE(rc))
-+ {
-+ if (rc == VERR_CANCELLED)
-+ pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED, VINF_SUCCESS);
-+ else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
-+ pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, rc,
-+ GuestDnDTarget::i_hostErrorToString(rc));
-+ }
-+
- /*
- * Now that we've cleaned up tell the guest side to cancel.
- * This does not imply we're waiting for the guest to react, as the
-@@ -1282,8 +1402,6 @@ int GuestDnDTarget::i_sendURIData(PSENDD
- AssertRC(rc2);
- }
-
--#undef URI_DATA_IS_VALID_BREAK
--
- LogFlowFuncLeaveRC(rc);
- return rc;
- }
-@@ -1291,51 +1409,37 @@ int GuestDnDTarget::i_sendURIData(PSENDD
- int GuestDnDTarget::i_sendURIDataLoop(PSENDDATACTX pCtx, GuestDnDMsg *pMsg)
- {
- AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
-+ AssertPtrReturn(pMsg, VERR_INVALID_POINTER);
-
-- DnDURIList &lstURI = pCtx->mURI.lstURI;
--
-- uint64_t cbTotal = pCtx->mData.cbToProcess;
-- uint8_t uPercent = pCtx->mData.cbProcessed * 100 / (cbTotal ? cbTotal : 1);
--
-- LogFlowFunc(("%RU64 / %RU64 -- %RU8%%\n", pCtx->mData.cbProcessed, cbTotal, uPercent));
-+ int rc = updateProgress(&pCtx->mData, pCtx->mpResp);
-+ AssertRC(rc);
-
-- bool fComplete = (uPercent >= 100) || lstURI.IsEmpty();
--
-- if (pCtx->mpResp)
-+ if ( pCtx->mData.isComplete()
-+ && pCtx->mURI.isComplete())
- {
-- int rc2 = pCtx->mpResp->setProgress(uPercent,
-- fComplete
-- ? DragAndDropSvc::DND_PROGRESS_COMPLETE
-- : DragAndDropSvc::DND_PROGRESS_RUNNING);
-- AssertRC(rc2);
-- }
--
-- if (fComplete)
- return VINF_EOF;
-+ }
-
-- Assert(!lstURI.IsEmpty());
-- DnDURIObject *pCurObj = lstURI.First();
--
-- /* As we transfer all objects one after another at a time at the moment,
-- * we only need one object context at the moment. */
-- GuestDnDURIObjCtx *pObjCtx = &pCtx->mURI.objCtx;
-+ GuestDnDURIObjCtx &objCtx = pCtx->mURI.getObjCurrent();
-+ if (!objCtx.isValid())
-+ return VERR_WRONG_ORDER;
-
-- /* Assign the pointer of the current object to our context. */
-- pObjCtx->pObjURI = pCurObj;
-+ DnDURIObject *pCurObj = objCtx.getObj();
-+ AssertPtr(pCurObj);
-
- uint32_t fMode = pCurObj->GetMode();
-- LogFlowFunc(("Processing srcPath=%s, dstPath=%s, fMode=0x%x, cbSize=%RU32, fIsDir=%RTbool, fIsFile=%RTbool\n",
-- pCurObj->GetSourcePath().c_str(), pCurObj->GetDestPath().c_str(),
-- fMode, pCurObj->GetSize(),
-- RTFS_IS_DIRECTORY(fMode), RTFS_IS_FILE(fMode)));
-- int rc;
-+ LogRel3(("DnD: Processing: srcPath=%s, dstPath=%s, fMode=0x%x, cbSize=%RU32, fIsDir=%RTbool, fIsFile=%RTbool\n",
-+ pCurObj->GetSourcePath().c_str(), pCurObj->GetDestPath().c_str(),
-+ fMode, pCurObj->GetSize(),
-+ RTFS_IS_DIRECTORY(fMode), RTFS_IS_FILE(fMode)));
-+
- if (RTFS_IS_DIRECTORY(fMode))
- {
-- rc = i_sendDirectory(pCtx, pObjCtx, pMsg);
-+ rc = i_sendDirectory(pCtx, &objCtx, pMsg);
- }
- else if (RTFS_IS_FILE(fMode))
- {
-- rc = i_sendFile(pCtx, pObjCtx, pMsg);
-+ rc = i_sendFile(pCtx, &objCtx, pMsg);
- }
- else
- {
-@@ -1354,7 +1458,7 @@ int GuestDnDTarget::i_sendURIDataLoop(PS
- if (fRemove)
- {
- LogFlowFunc(("Removing \"%s\" from list, rc=%Rrc\n", pCurObj->GetSourcePath().c_str(), rc));
-- lstURI.RemoveFirst();
-+ pCtx->mURI.removeObjCurrent();
- }
-
- LogFlowFuncLeaveRC(rc);
-@@ -1369,34 +1473,34 @@ int GuestDnDTarget::i_sendRawData(PSENDD
- GuestDnD *pInst = GuestDnDInst();
- AssertPtr(pInst);
-
-- /** @todo At the moment we only allow sending up to 64K raw data. Fix this by
-- * using HOST_DND_HG_SND_MORE_DATA. */
-- size_t cbDataTotal = pCtx->mData.vecData.size();
-- if ( !cbDataTotal
-- || cbDataTotal > _64K)
-- {
-- return VERR_INVALID_PARAMETER;
-- }
-+ GuestDnDData *pData = &pCtx->mData;
-
-- /* Just copy over the raw data. */
-- GuestDnDMsg Msg;
-- Msg.setType(DragAndDropSvc::HOST_DND_HG_SND_DATA);
-- Msg.setNextUInt32(pCtx->mScreenID);
-- Msg.setNextPointer((void *)pCtx->mFmtReq.c_str(), (uint32_t)pCtx->mFmtReq.length() + 1);
-- Msg.setNextUInt32((uint32_t)pCtx->mFmtReq.length() + 1);
-- Msg.setNextPointer((void*)&pCtx->mData.vecData.front(), (uint32_t)cbDataTotal);
-- Msg.setNextUInt32(cbDataTotal);
-+ /** @todo At the moment we only allow sending up to 64K raw data.
-+ * For protocol v1+v2: Fix this by using HOST_DND_HG_SND_MORE_DATA.
-+ * For protocol v3 : Send another HOST_DND_HG_SND_DATA message. */
-+ if (!pData->getMeta().getSize())
-+ return VINF_SUCCESS;
-
-- LogFlowFunc(("Transferring %zu total bytes of raw data ('%s')\n", cbDataTotal, pCtx->mFmtReq.c_str()));
-+ int rc = VINF_SUCCESS;
-
-- int rc2;
-+ /*
-+ * Send the data header first.
-+ */
-+ if (mDataBase.m_uProtocolVersion >= 3)
-+ rc = i_sendDataHeader(pCtx, pData, NULL /* URI list */);
-
-- int rc = pInst->hostCall(Msg.getType(), Msg.getCount(), Msg.getParms());
-+ /*
-+ * Send the (meta) data body.
-+ */
-+ if (RT_SUCCESS(rc))
-+ rc = i_sendDataBody(pCtx, pData);
-+
-+ int rc2;
- if (RT_FAILURE(rc))
-- rc2 = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_ERROR, rc,
-+ rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, rc,
- GuestDnDTarget::i_hostErrorToString(rc));
- else
-- rc2 = pCtx->mpResp->setProgress(100, DragAndDropSvc::DND_PROGRESS_COMPLETE, rc);
-+ rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_COMPLETE, rc);
- AssertRC(rc2);
-
- LogFlowFuncLeaveRC(rc);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/GuestSessionImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/GuestSessionImpl.cpp
-@@ -4,7 +4,7 @@
- */
-
- /*
-- * Copyright (C) 2012-2015 Oracle Corporation
-+ * Copyright (C) 2012-2016 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
-@@ -1445,6 +1445,10 @@ Utf8Str GuestSession::i_guestErrorToStri
- strError += Utf8StrFmt(tr("The guest execution service is not available"));
- break;
-
-+ case VERR_ACCOUNT_RESTRICTED:
-+ strError += Utf8StrFmt(tr("The specified user account on the guest is restricted and can't be used to logon"));
-+ break;
-+
- case VERR_AUTHENTICATION_FAILURE:
- strError += Utf8StrFmt(tr("The specified user was not able to logon on guest"));
- break;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-client/MouseImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-client/MouseImpl.cpp
-@@ -1256,7 +1256,7 @@ DECLCALLBACK(int) Mouse::i_drvConstruct(
- pThis->pMouse = (Mouse *)pv; /** @todo Check this cast! */
- unsigned cDev;
- {
-- AutoReadLock mouseLock(pThis->pMouse COMMA_LOCKVAL_SRC_POS);
-+ AutoWriteLock mouseLock(pThis->pMouse COMMA_LOCKVAL_SRC_POS);
-
- for (cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev)
- if (!pThis->pMouse->mpDrv[cDev])
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/MachineImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/MachineImpl.cpp
-@@ -9586,7 +9586,7 @@ HRESULT Machine::i_getMediumAttachmentsO
- {
- const ComObjPtr<MediumAttachment> &pAtt = *it;
- // should never happen, but deal with NULL pointers in the list.
-- AssertStmt(!pAtt.isNull(), continue);
-+ AssertContinue(!pAtt.isNull());
-
- // getControllerName() needs caller+read lock
- AutoCaller autoAttCaller(pAtt);
-@@ -12106,7 +12106,7 @@ void Machine::i_getDiskList(MediaList &l
- {
- MediumAttachment* pAttach = *it;
- /* just in case */
-- AssertStmt(pAttach, continue);
-+ AssertContinue(pAttach);
-
- AutoCaller localAutoCallerA(pAttach);
- if (FAILED(localAutoCallerA.rc())) continue;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
-@@ -1383,7 +1383,8 @@ HRESULT NetworkAdapter::i_checkAndSwitch
- if (FAILED(hrc))
- return hrc;
-
-- if (state == MachineState_Running)
-+ if ( state == MachineState_Running
-+ || state == MachineState_Paused)
- {
- Bstr bstrName;
- hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
-@@ -1406,7 +1407,8 @@ HRESULT NetworkAdapter::i_switchToNatNet
- if (FAILED(hrc))
- return hrc;
-
-- if (state == MachineState_Running)
-+ if ( state == MachineState_Running
-+ || state == MachineState_Paused)
- {
- Bstr bstrName;
- hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/Performance.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/Performance.cpp
-@@ -1074,7 +1074,7 @@ void MachineDiskUsage::collect()
- ComObjPtr<Medium> pMedium = *it;
-
- /* just in case */
-- AssertStmt(!pMedium.isNull(), continue);
-+ AssertContinue(!pMedium.isNull());
-
- AutoCaller localAutoCaller(pMedium);
- if (FAILED(localAutoCaller.rc())) continue;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/SerialPortImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/SerialPortImpl.cpp
-@@ -620,11 +620,15 @@ void SerialPort::i_applyDefaults(GuestOS
-
- AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-- /* Set some more defaults.
-- * Note that the default value for COM1 (slot 0) is set in the constructor
-- * of bd. So slot 0 is correct already. */
-+ /* Set some more defaults. */
- switch (m->bd->ulSlot)
- {
-+ case 0:
-+ {
-+ m->bd->ulIOBase = 0x3f8;
-+ m->bd->ulIRQ = 4;
-+ break;
-+ }
- case 1:
- {
- m->bd->ulIOBase = 0x2f8;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
-@@ -140,9 +140,9 @@ const char* USBDeviceFilter::i_describeU
- || strchr(pcszValue, '?')
- /* || strchr (psz, '[') - later */
- )
-- vrc = USBFilterSetStringPattern(aFilter, aIdx, pcszValue, true /* fMustBePresent */);
-+ vrc = USBFilterSetStringPattern(aFilter, aIdx, pcszValue, true /*fMustBePresent*/);
- else
-- vrc = USBFilterSetStringExact(aFilter, aIdx, pcszValue, true /* fMustBePresent */);
-+ vrc = USBFilterSetStringExact(aFilter, aIdx, pcszValue, true /*fMustBePresent*/, false /*fPurge*/);
- }
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
-@@ -952,19 +952,22 @@ bool USBDeviceFilters::i_hasMatchingFilt
- rc = aUSBDevice->COMGETTER(Manufacturer)(manufacturer.asOutParam());
- ComAssertComRCRet(rc, false);
- if (!manufacturer.isEmpty())
-- USBFilterSetStringExact(&dev, USBFILTERIDX_MANUFACTURER_STR, Utf8Str(manufacturer).c_str(), true);
-+ USBFilterSetStringExact(&dev, USBFILTERIDX_MANUFACTURER_STR, Utf8Str(manufacturer).c_str(),
-+ true /*fMustBePresent*/, false /*fPurge*/);
-
- Bstr product;
- rc = aUSBDevice->COMGETTER(Product)(product.asOutParam());
- ComAssertComRCRet(rc, false);
- if (!product.isEmpty())
-- USBFilterSetStringExact(&dev, USBFILTERIDX_PRODUCT_STR, Utf8Str(product).c_str(), true);
-+ USBFilterSetStringExact(&dev, USBFILTERIDX_PRODUCT_STR, Utf8Str(product).c_str(),
-+ true /*fMustBePresent*/, false /*fPurge*/);
-
- Bstr serialNumber;
- rc = aUSBDevice->COMGETTER(SerialNumber)(serialNumber.asOutParam());
- ComAssertComRCRet(rc, false);
- if (!serialNumber.isEmpty())
-- USBFilterSetStringExact(&dev, USBFILTERIDX_SERIAL_NUMBER_STR, Utf8Str(serialNumber).c_str(), true);
-+ USBFilterSetStringExact(&dev, USBFILTERIDX_SERIAL_NUMBER_STR, Utf8Str(serialNumber).c_str(),
-+ true /*fMustBePresent*/, false /*fPurge*/);
-
- Bstr address;
- rc = aUSBDevice->COMGETTER(Address)(address.asOutParam());
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/USBProxyService.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/USBProxyService.cpp
-@@ -1224,17 +1224,20 @@ USBProxyService::initFilterFromDevice(PU
- vrc = USBFilterSetNumExact(aFilter, USBFILTERIDX_BUS, pDev->bBus, false); AssertRC(vrc);
- if (pDev->pszSerialNumber)
- {
-- vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_SERIAL_NUMBER_STR, pDev->pszSerialNumber, true);
-+ vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_SERIAL_NUMBER_STR, pDev->pszSerialNumber,
-+ true /*fMustBePresent*/, false /*fPurge*/);
- AssertRC(vrc);
- }
- if (pDev->pszProduct)
- {
-- vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_PRODUCT_STR, pDev->pszProduct, true);
-+ vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_PRODUCT_STR, pDev->pszProduct,
-+ true /*fMustBePresent*/, false /*fPurge*/);
- AssertRC(vrc);
- }
- if (pDev->pszManufacturer)
- {
-- vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_MANUFACTURER_STR, pDev->pszManufacturer, true);
-+ vrc = USBFilterSetStringExact(aFilter, USBFILTERIDX_MANUFACTURER_STR, pDev->pszManufacturer,
-+ true /*fMustBePresent*/, false /*fPurge*/);
- AssertRC(vrc);
- }
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/darwin/iokit.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/darwin/iokit.cpp
-@@ -43,6 +43,7 @@
-
- #include <VBox/log.h>
- #include <VBox/err.h>
-+#include <VBox/usblib.h>
- #include <iprt/mem.h>
- #include <iprt/string.h>
- #include <iprt/process.h>
-@@ -300,6 +301,7 @@ static bool darwinDictDupString(CFDictio
- char szBuf[512];
- if (darwinDictGetString(DictRef, KeyStrRef, szBuf, sizeof(szBuf)))
- {
-+ USBLibPurgeEncoding(szBuf);
- *ppsz = RTStrDup(szBuf);
- if (*ppsz)
- return true;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/freebsd/USBProxyServiceFreeBSD.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/freebsd/USBProxyServiceFreeBSD.cpp
-@@ -321,14 +321,21 @@ PUSBDEVICE USBProxyServiceFreeBSD::getDe
- }
-
- if (UsbDevInfo.udi_vendor[0] != '\0')
-+ {
- pDevice->pszManufacturer = RTStrDupN(UsbDevInfo.udi_vendor, sizeof(UsbDevInfo.udi_vendor));
-+ USBLibPurgeEncoding(pDevice->pszManufacturer);
-+ }
-
- if (UsbDevInfo.udi_product[0] != '\0')
-+ {
- pDevice->pszProduct = RTStrDupN(UsbDevInfo.udi_product, sizeof(UsbDevInfo.udi_product));
-+ USBLibPurgeEncoding(pDevice->pszProduct);
-+ }
-
- if (UsbDevInfo.udi_serial[0] != '\0')
- {
- pDevice->pszSerialNumber = RTStrDupN(UsbDevInfo.udi_serial, sizeof(UsbDevInfo.udi_serial));
-+ USBLibPurgeEncoding(pDevice->pszSerialNumber);
- pDevice->u64SerialHash = USBLibHashSerial(pDevice->pszSerialNumber);
- }
- rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/linux/USBGetDevices.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/linux/USBGetDevices.cpp
-@@ -327,7 +327,7 @@ static int usbReadStr(const char *pszVal
- psz = RTStrDup(pszValue);
- if (psz)
- {
-- RTStrPurgeEncoding(psz);
-+ USBLibPurgeEncoding(psz);
- *ppsz = psz;
- return VINF_SUCCESS;
- }
-@@ -1304,7 +1304,7 @@ static void fillInDeviceFromSysfs(USBDEV
- pszSysfsPath);
- if (cchRead > 0 && (size_t) cchRead < sizeof(szBuf))
- {
-- RTStrPurgeEncoding(szBuf);
-+ USBLibPurgeEncoding(szBuf);
- Dev->pszProduct = RTStrDup(szBuf);
- }
-
-@@ -1312,7 +1312,7 @@ static void fillInDeviceFromSysfs(USBDEV
- pszSysfsPath);
- if (cchRead > 0 && (size_t) cchRead < sizeof(szBuf))
- {
-- RTStrPurgeEncoding(szBuf);
-+ USBLibPurgeEncoding(szBuf);
- Dev->pszSerialNumber = RTStrDup(szBuf);
- Dev->u64SerialHash = USBLibHashSerial(szBuf);
- }
-@@ -1321,7 +1321,7 @@ static void fillInDeviceFromSysfs(USBDEV
- pszSysfsPath);
- if (cchRead > 0 && (size_t) cchRead < sizeof(szBuf))
- {
-- RTStrPurgeEncoding(szBuf);
-+ USBLibPurgeEncoding(szBuf);
- Dev->pszManufacturer = RTStrDup(szBuf);
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/solaris/USBProxyServiceSolaris.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/solaris/USBProxyServiceSolaris.cpp
-@@ -276,13 +276,22 @@ static int solarisWalkDeviceNode(di_node
- * Optional (some devices don't have all these)
- */
- if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-product-name", &pStr) > 0)
-+ {
- pCur->pszProduct = RTStrDup(pStr);
-+ USBLibPurgeEncoding(pCur->pszProduct);
-+ }
-
- if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-vendor-name", &pStr) > 0)
-+ {
- pCur->pszManufacturer = RTStrDup(pStr);
-+ USBLibPurgeEncoding(pCur->pszManufacturer);
-+ }
-
- if (di_prop_lookup_strings(DDI_DEV_T_ANY, Node, "usb-serialno", &pStr) > 0)
-+ {
- pCur->pszSerialNumber = RTStrDup(pStr);
-+ USBLibPurgeEncoding(pCur->pszSerialNumber);
-+ }
-
- if (pCur->bcdUSB == 0x300)
- pCur->enmSpeed = USBDEVICESPEED_SUPER;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Main/src-server/win/HostPowerWin.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Main/src-server/win/HostPowerWin.cpp
-@@ -196,10 +196,9 @@ LRESULT CALLBACK HostPowerServiceWin::Wn
- pPowerObj->notify(Reason_HostBatteryLow);
- }
- }
-- else
- /* If the machine has less than 5% battery left (and is not connected
- * to the AC), then we should save the state. */
-- if (SystemPowerStatus.BatteryFlag == 4 /* critical battery status; less than 5% */)
-+ else if (SystemPowerStatus.BatteryFlag == 4 /* critical battery status; less than 5% */)
- {
- pPowerObj->notify(Reason_HostBatteryLow);
- }
---- virtualbox-5.0.16-dfsg.orig/src/VBox/NetworkServices/NAT/proxy.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/NetworkServices/NAT/proxy.h
-@@ -114,4 +114,13 @@ err_t pxping_init(struct netif *, SOCKET
- #define DPRINTF1(a) Log2(a)
- #define DPRINTF2(a) Log3(a)
-
-+#if 1 /* XXX: temporary enable it as optional verbose logging */
-+#undef DPRINTF0
-+#define DPRINTF0(a) LogRel2(a)
-+#undef DPRINTF1
-+#define DPRINTF1(a) LogRel3(a)
-+#undef DPRINTF2
-+#define DPRINTF2(a) LogRel4(a)
-+#endif
-+
- #endif /* _nat_proxy_h_ */
---- virtualbox-5.0.16-dfsg.orig/src/VBox/NetworkServices/NAT/pxtcp.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/NetworkServices/NAT/pxtcp.c
-@@ -1689,11 +1689,11 @@ pxtcp_pmgr_pump(struct pollmgr_handler *
- status = getsockopt(pxtcp->sock, SOL_SOCKET, SO_ERROR,
- (char *)&sockerr, &optlen);
- if (status == SOCKET_ERROR) { /* should not happen */
-- DPRINTF(("sock %d: SO_ERROR failed: %R[sockerr]\n",
-+ DPRINTF(("sock %d: POLLERR: SO_ERROR failed: %R[sockerr]\n",
- fd, SOCKERRNO()));
- }
- else {
-- DPRINTF0(("sock %d: %R[sockerr]\n", fd, sockerr));
-+ DPRINTF0(("sock %d: POLLERR: %R[sockerr]\n", fd, sockerr));
- }
- return pxtcp_schedule_reset(pxtcp);
- }
-@@ -1710,7 +1710,7 @@ pxtcp_pmgr_pump(struct pollmgr_handler *
- nread = pxtcp_sock_read(pxtcp, &stop_pollin);
- if (nread < 0) {
- sockerr = -(int)nread;
-- DPRINTF0(("sock %d: %R[sockerr]\n", fd, sockerr));
-+ DPRINTF0(("sock %d: POLLIN: %R[sockerr]\n", fd, sockerr));
- return pxtcp_schedule_reset(pxtcp);
- }
-
-@@ -1738,8 +1738,41 @@ pxtcp_pmgr_pump(struct pollmgr_handler *
- #else
- if (revents & POLLHUP) {
- DPRINTF(("sock %d: HUP\n", fd));
-+
- #if HAVE_TCP_POLLHUP == POLLIN
- /*
-+ * XXX: OSX reports POLLHUP once more when inbound is already
-+ * half-closed (which has already been reported as a "normal"
-+ * POLLHUP, handled below), the socket is polled for POLLOUT
-+ * (guest sends a lot of data that we can't push out fast
-+ * enough), and remote sends a reset - e.g. an http client
-+ * that half-closes after request and then aborts the transfer.
-+ *
-+ * It really should have been reported as POLLERR, but it
-+ * seems OSX never reports POLLERR for sockets.
-+ */
-+#if defined(RT_OS_DARWIN)
-+ {
-+ socklen_t optlen = (socklen_t)sizeof(sockerr);
-+
-+ status = getsockopt(pxtcp->sock, SOL_SOCKET, SO_ERROR,
-+ (char *)&sockerr, &optlen);
-+ if (status == SOCKET_ERROR) { /* should not happen */
-+ DPRINTF(("sock %d: POLLHUP: SO_ERROR failed: %R[sockerr]\n",
-+ fd, SOCKERRNO()));
-+ sockerr = ECONNRESET;
-+ }
-+ else if (sockerr != 0) {
-+ DPRINTF0(("sock %d: POLLHUP: %R[sockerr]\n", fd, sockerr));
-+ }
-+
-+ if (sockerr != 0) { /* XXX: should have been POLLERR */
-+ return pxtcp_schedule_reset(pxtcp);
-+ }
-+ }
-+#endif /* RT_OS_DARWIN */
-+
-+ /*
- * Remote closed inbound.
- */
- if (!pxtcp->outbound_close_done) {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/Makefile.kmk
-@@ -735,6 +735,8 @@ RuntimeR3_SOURCES.win = \
- generic/RTProcIsRunningByName-generic.cpp \
- generic/RTThreadGetNativeState-generic.cpp \
- nt/RTErrConvertFromNtStatus.cpp \
-+ nt/RTNtPathExpand8dot3Path.cpp \
-+ nt/RTNtPathFindPossible8dot3Name.cpp \
- r3/nt/fs-nt.cpp \
- r3/nt/pathint-nt.cpp \
- r3/nt/RTProcQueryParent-r3-nt.cpp \
-@@ -2096,6 +2098,8 @@ RuntimeR0Drv_SOURCES.win = \
- generic/mppresent-generic.cpp \
- generic/RTMpGetCoreCount-generic.cpp \
- nt/RTErrConvertFromNtStatus.cpp \
-+ nt/RTNtPathExpand8dot3Path.cpp \
-+ nt/RTNtPathFindPossible8dot3Name.cpp \
- r0drv/generic/threadctxhooks-r0drv-generic.cpp \
- r0drv/memobj-r0drv.cpp \
- r0drv/mpnotification-r0drv.c \
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/ldr/ldrPE.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/ldr/ldrPE.cpp
-@@ -2930,32 +2930,36 @@ static void rtldrPEConvert32BitLoadConfi
- /*
- * volatile everywhere! Trying to prevent the compiler being a smarta$$ and reorder stuff.
- */
-- IMAGE_LOAD_CONFIG_DIRECTORY32_V4 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V4 volatile *)pLoadCfg;
-- IMAGE_LOAD_CONFIG_DIRECTORY64_V4 volatile *pLoadCfg64 = pLoadCfg;
-+ IMAGE_LOAD_CONFIG_DIRECTORY32_V5 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V5 volatile *)pLoadCfg;
-+ IMAGE_LOAD_CONFIG_DIRECTORY64_V5 volatile *pLoadCfg64 = pLoadCfg;
-
-- pLoadCfg64->CodeIntegrity.Reserved = pLoadCfg32->CodeIntegrity.Reserved;
-- pLoadCfg64->CodeIntegrity.CatalogOffset = pLoadCfg32->CodeIntegrity.CatalogOffset;
-- pLoadCfg64->CodeIntegrity.Catalog = pLoadCfg32->CodeIntegrity.Catalog;
-- pLoadCfg64->CodeIntegrity.Flags = pLoadCfg32->CodeIntegrity.Flags;
-- pLoadCfg64->GuardFlags = pLoadCfg32->GuardFlags;
-- pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount;
-- pLoadCfg64->GuardCFFunctionTable = pLoadCfg32->GuardCFFunctionTable;
-- pLoadCfg64->Reserved2 = pLoadCfg32->Reserved2;
-- pLoadCfg64->GuardCFCCheckFunctionPointer= pLoadCfg32->GuardCFCCheckFunctionPointer;
-- pLoadCfg64->SEHandlerCount = pLoadCfg32->SEHandlerCount;
-- pLoadCfg64->SEHandlerTable = pLoadCfg32->SEHandlerTable;
-- pLoadCfg64->SecurityCookie = pLoadCfg32->SecurityCookie;
-- pLoadCfg64->EditList = pLoadCfg32->EditList;
-- pLoadCfg64->Reserved1 = pLoadCfg32->Reserved1;
-- pLoadCfg64->CSDVersion = pLoadCfg32->CSDVersion;
-- pLoadCfg64->ProcessHeapFlags = pLoadCfg32->ProcessHeapFlags; /* switched place with ProcessAffinityMask, but we're more than 16 byte off by now so it doesn't matter. */
-- pLoadCfg64->ProcessAffinityMask = pLoadCfg32->ProcessAffinityMask;
-- pLoadCfg64->VirtualMemoryThreshold = pLoadCfg32->VirtualMemoryThreshold;
-- pLoadCfg64->MaximumAllocationSize = pLoadCfg32->MaximumAllocationSize;
-- pLoadCfg64->LockPrefixTable = pLoadCfg32->LockPrefixTable;
-- pLoadCfg64->DeCommitTotalFreeThreshold = pLoadCfg32->DeCommitTotalFreeThreshold;
-- uint32_t u32DeCommitFreeBlockThreshold = pLoadCfg32->DeCommitFreeBlockThreshold;
-- pLoadCfg64->DeCommitFreeBlockThreshold = u32DeCommitFreeBlockThreshold;
-+ pLoadCfg64->GuardAddressTakenIatEntryTable = pLoadCfg32->GuardAddressTakenIatEntryTable;
-+ pLoadCfg64->GuardAddressTakenIatEntryCount = pLoadCfg32->GuardAddressTakenIatEntryCount;
-+ pLoadCfg64->GuardLongJumpTargetTable = pLoadCfg32->GuardLongJumpTargetTable;
-+ pLoadCfg64->GuardLongJumpTargetCount = pLoadCfg32->GuardLongJumpTargetCount;
-+ pLoadCfg64->CodeIntegrity.Reserved = pLoadCfg32->CodeIntegrity.Reserved;
-+ pLoadCfg64->CodeIntegrity.CatalogOffset = pLoadCfg32->CodeIntegrity.CatalogOffset;
-+ pLoadCfg64->CodeIntegrity.Catalog = pLoadCfg32->CodeIntegrity.Catalog;
-+ pLoadCfg64->CodeIntegrity.Flags = pLoadCfg32->CodeIntegrity.Flags;
-+ pLoadCfg64->GuardFlags = pLoadCfg32->GuardFlags;
-+ pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount;
-+ pLoadCfg64->GuardCFFunctionTable = pLoadCfg32->GuardCFFunctionTable;
-+ pLoadCfg64->Reserved2 = pLoadCfg32->Reserved2;
-+ pLoadCfg64->GuardCFCCheckFunctionPointer = pLoadCfg32->GuardCFCCheckFunctionPointer;
-+ pLoadCfg64->SEHandlerCount = pLoadCfg32->SEHandlerCount;
-+ pLoadCfg64->SEHandlerTable = pLoadCfg32->SEHandlerTable;
-+ pLoadCfg64->SecurityCookie = pLoadCfg32->SecurityCookie;
-+ pLoadCfg64->EditList = pLoadCfg32->EditList;
-+ pLoadCfg64->Reserved1 = pLoadCfg32->Reserved1;
-+ pLoadCfg64->CSDVersion = pLoadCfg32->CSDVersion;
-+ pLoadCfg64->ProcessHeapFlags = pLoadCfg32->ProcessHeapFlags; /* switched place with ProcessAffinityMask, but we're more than 16 byte off by now so it doesn't matter. */
-+ pLoadCfg64->ProcessAffinityMask = pLoadCfg32->ProcessAffinityMask;
-+ pLoadCfg64->VirtualMemoryThreshold = pLoadCfg32->VirtualMemoryThreshold;
-+ pLoadCfg64->MaximumAllocationSize = pLoadCfg32->MaximumAllocationSize;
-+ pLoadCfg64->LockPrefixTable = pLoadCfg32->LockPrefixTable;
-+ pLoadCfg64->DeCommitTotalFreeThreshold = pLoadCfg32->DeCommitTotalFreeThreshold;
-+ uint32_t u32DeCommitFreeBlockThreshold = pLoadCfg32->DeCommitFreeBlockThreshold;
-+ pLoadCfg64->DeCommitFreeBlockThreshold = u32DeCommitFreeBlockThreshold;
- /* the rest is equal. */
- Assert( RT_OFFSETOF(IMAGE_LOAD_CONFIG_DIRECTORY32, DeCommitFreeBlockThreshold)
- == RT_OFFSETOF(IMAGE_LOAD_CONFIG_DIRECTORY64, DeCommitFreeBlockThreshold));
-@@ -3419,8 +3423,10 @@ static int rtldrPEReadRVA(PRTLDRMODPE pM
- * @param pModPe The PE module instance.
- * @param pOptHdr Pointer to the optional header (valid).
- * @param fFlags Loader flags, RTLDR_O_XXX.
-+ * @param pErrInfo Where to return extended error information. Optional.
- */
--static int rtldrPEValidateDirectoriesAndRememberStuff(PRTLDRMODPE pModPe, const IMAGE_OPTIONAL_HEADER64 *pOptHdr, uint32_t fFlags)
-+static int rtldrPEValidateDirectoriesAndRememberStuff(PRTLDRMODPE pModPe, const IMAGE_OPTIONAL_HEADER64 *pOptHdr, uint32_t fFlags,
-+ PRTERRINFO pErrInfo)
- {
- const char *pszLogName = pModPe->Core.pReader->pfnLogName(pModPe->Core.pReader); NOREF(pszLogName);
- union /* combine stuff we're reading to help reduce stack usage. */
-@@ -3436,6 +3442,9 @@ static int rtldrPEValidateDirectoriesAnd
- IMAGE_DATA_DIRECTORY Dir = pOptHdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG];
- if (Dir.Size)
- {
-+ const size_t cbExpectV5 = !pModPe->f64Bit
-+ ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V5)
-+ : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V5);
- const size_t cbExpectV4 = !pModPe->f64Bit
- ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V4)
- : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V4);
-@@ -3449,14 +3458,17 @@ static int rtldrPEValidateDirectoriesAnd
- ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V1)
- : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V2) /*No V1*/;
-
-- if ( Dir.Size != cbExpectV4
-+ if ( Dir.Size != cbExpectV5
-+ && Dir.Size != cbExpectV4
- && Dir.Size != cbExpectV3
- && Dir.Size != cbExpectV2
- && Dir.Size != cbExpectV1)
- {
-- Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %d bytes, expected %d, %d, %d, or %d.\n",
-- pszLogName, Dir.Size, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1));
-- return VERR_LDRPE_LOAD_CONFIG_SIZE;
-+ Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %u bytes, expected %zu, %zu, %zu, %zu, or %zu.\n",
-+ pszLogName, Dir.Size, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1));
-+ return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE,
-+ "Unexpected load config dir size of %u bytes; supported sized: %zu, %zu, %zu, %zu, or %zu",
-+ Dir.Size, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1);
- }
-
- /*
-@@ -3470,35 +3482,22 @@ static int rtldrPEValidateDirectoriesAnd
-
- if (u.Cfg64.Size != Dir.Size)
- {
-- /* Kludge #1, seen ati shipping 32-bit DLLs and EXEs with Dir.Size=0x40
-- and Cfg64.Size=0x5c or 0x48. Windows seems to deal with it, so
-- lets do so as well. */
-- if ( Dir.Size < u.Cfg64.Size
-- && ( u.Cfg64.Size == cbExpectV3
-- || u.Cfg64.Size == cbExpectV2) )
-- {
-- Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the ATI kludge\n",
-- pszLogName, u.Cfg64.Size, Dir.Size));
-- Dir.Size = u.Cfg64.Size;
-- RT_ZERO(u.Cfg64);
-- rc = rtldrPEReadRVA(pModPe, &u.Cfg64, Dir.Size, Dir.VirtualAddress);
-- if (RT_FAILURE(rc))
-- return rc;
-- rtldrPEConvert32BitLoadConfigTo64Bit(&u.Cfg64);
-- }
--
-- /* Kludge #2, ntdll.dll from XP seen with Dir.Size=0x40 and Cfg64.Size=0x00. */
-+ /* Kludge #1: ntdll.dll from XP seen with Dir.Size=0x40 and Cfg64.Size=0x00. */
- if (Dir.Size == 0x40 && u.Cfg64.Size == 0x00 && !pModPe->f64Bit)
- {
-- Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the XP kludge\n",
-+ Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the XP kludge.\n",
- pszLogName, u.Cfg64.Size, Dir.Size));
-- u.Cfg64.Size = 0x40;
-+ u.Cfg64.Size = Dir.Size;
- }
--
-- /* Kludge #3, imagehlp.dll from W10/32 seen with Dir.Size=0x40 (V1) and Cfg64.Size=0x68 (V3). */
-- if (Dir.Size == 0x40 && u.Cfg64.Size == 0x68 && !pModPe->f64Bit)
-+ /* Kludge #2: This happens a lot. Structure changes, but the linker doesn't get
-+ it updated and stores some old size in the directory. Use the header size. */
-+ else if ( u.Cfg64.Size == cbExpectV5
-+ || u.Cfg64.Size == cbExpectV4
-+ || u.Cfg64.Size == cbExpectV3
-+ || u.Cfg64.Size == cbExpectV2
-+ || u.Cfg64.Size == cbExpectV1)
- {
-- Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the W10/32 kludge\n",
-+ Log(("rtldrPEOpen: %s: load cfg dir: Header (%d) and directory (%d) size mismatch, applying the old linker kludge.\n",
- pszLogName, u.Cfg64.Size, Dir.Size));
- Dir.Size = u.Cfg64.Size;
- RT_ZERO(u.Cfg64);
-@@ -3506,20 +3505,25 @@ static int rtldrPEValidateDirectoriesAnd
- if (RT_FAILURE(rc))
- return rc;
- rtldrPEConvert32BitLoadConfigTo64Bit(&u.Cfg64);
-+ AssertReturn(u.Cfg64.Size == Dir.Size,
-+ RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE, "Data changed while reading! (%d vs %d)\n",
-+ u.Cfg64.Size, Dir.Size));
- }
--
-- if (u.Cfg64.Size != Dir.Size)
-+ else
- {
-- Log(("rtldrPEOpen: %s: load cfg dir: unexpected header size of %d bytes, expected %d.\n",
-- pszLogName, u.Cfg64.Size, Dir.Size));
-- return VERR_LDRPE_LOAD_CONFIG_SIZE;
-+ Log(("rtldrPEOpen: %s: load cfg hdr: unexpected hdr size of %u bytes (dir %u), expected %zu, %zu, %zu, %zu, or %zu.\n",
-+ pszLogName, u.Cfg64.Size, Dir.Size, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1));
-+ return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOAD_CONFIG_SIZE,
-+ "Unexpected load config dir size of %u bytes (dir %u); supported sized: %zu, %zu, %zu, %zu, or %zu",
-+ u.Cfg64.Size, Dir.Size, cbExpectV5, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1);
- }
- }
- if (u.Cfg64.LockPrefixTable && !(fFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION)))
- {
- Log(("rtldrPEOpen: %s: load cfg dir: lock prefix table at %RX64. We don't support lock prefix tables!\n",
- pszLogName, u.Cfg64.LockPrefixTable));
-- return VERR_LDRPE_LOCK_PREFIX_TABLE;
-+ return RTErrInfoSetF(pErrInfo, VERR_LDRPE_LOCK_PREFIX_TABLE,
-+ "Lock prefix table not supported: %RX64", u.Cfg64.LockPrefixTable);
- }
- #if 0/* this seems to be safe to ignore. */
- if ( u.Cfg64.SEHandlerTable
-@@ -3534,7 +3538,7 @@ static int rtldrPEValidateDirectoriesAnd
- {
- Log(("rtldrPEOpen: %s: load cfg dir: EditList=%RX64 is unsupported!\n",
- pszLogName, u.Cfg64.EditList));
-- return VERR_BAD_EXE_FORMAT;
-+ return RTErrInfoSetF(pErrInfo, VERR_BAD_EXE_FORMAT, "Load config EditList=%RX64 is not supported", u.Cfg64.EditList);
- }
- /** @todo GuardCFC? Possibly related to:
- * http://research.microsoft.com/pubs/69217/ccs05-cfi.pdf
-@@ -3544,13 +3548,24 @@ static int rtldrPEValidateDirectoriesAnd
- || u.Cfg64.Reserved2
- || u.Cfg64.GuardCFFunctionTable
- || u.Cfg64.GuardCFFunctionCount
-- || u.Cfg64.GuardFlags)
-- && !(fFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION)))
-+ || u.Cfg64.GuardFlags
-+ || u.Cfg64.GuardAddressTakenIatEntryTable
-+ || u.Cfg64.GuardAddressTakenIatEntryCount
-+ || u.Cfg64.GuardLongJumpTargetTable
-+ || u.Cfg64.GuardLongJumpTargetCount)
-+ && !(fFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION)) )
- {
-- Log(("rtldrPEOpen: %s: load cfg dir: Guard stuff: %RX64,%RX64,%RX64,%RX64,%RX32!\n",
-+ Log(("rtldrPEOpen: %s: load cfg dir: Guard stuff: %RX64,%RX64,%RX64,%RX64,%RX32,%RX64,%RX64,%RX64,%RX64!\n",
- pszLogName, u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64.Reserved2,
-- u.Cfg64.GuardCFFunctionTable, u.Cfg64.GuardCFFunctionCount, u.Cfg64.GuardFlags));
-- return VERR_BAD_EXE_FORMAT;
-+ u.Cfg64.GuardCFFunctionTable, u.Cfg64.GuardCFFunctionCount, u.Cfg64.GuardFlags,
-+ u.Cfg64.GuardAddressTakenIatEntryTable, u.Cfg64.GuardAddressTakenIatEntryCount,
-+ u.Cfg64.GuardLongJumpTargetTable, u.Cfg64.GuardLongJumpTargetCount ));
-+ return RTErrInfoSetF(pErrInfo, VERR_LDRPE_GUARD_CF_STUFF,
-+ "Guard bits in load config: %RX64,%RX64,%RX64,%RX64,%RX32,%RX64,%RX64,%RX64,%RX64!",
-+ u.Cfg64.GuardCFCCheckFunctionPointer, u.Cfg64.Reserved2,
-+ u.Cfg64.GuardCFFunctionTable, u.Cfg64.GuardCFFunctionCount, u.Cfg64.GuardFlags,
-+ u.Cfg64.GuardAddressTakenIatEntryTable, u.Cfg64.GuardAddressTakenIatEntryCount,
-+ u.Cfg64.GuardLongJumpTargetTable, u.Cfg64.GuardLongJumpTargetCount);
- }
- }
-
-@@ -3577,14 +3592,20 @@ static int rtldrPEValidateDirectoriesAnd
- || pCur->dwLength + off > Dir.Size)
- {
- Log(("rtldrPEOpen: %s: cert at %#x/%#x: dwLength=%#x\n", pszLogName, off, Dir.Size, pCur->dwLength));
-- rc = VERR_LDRPE_CERT_MALFORMED;
-+ rc = RTErrInfoSetF(pErrInfo, VERR_LDRPE_CERT_MALFORMED,
-+ "Cert at %#x LB %#x: Bad header length value: %#x", off, Dir.Size, pCur->dwLength);
- break;
- }
- if ( pCur->wRevision != WIN_CERT_REVISION_2_0
- && pCur->wRevision != WIN_CERT_REVISION_1_0)
- {
- Log(("rtldrPEOpen: %s: cert at %#x/%#x: wRevision=%#x\n", pszLogName, off, Dir.Size, pCur->wRevision));
-- rc = pCur->wRevision >= WIN_CERT_REVISION_1_0 ? VERR_LDRPE_CERT_UNSUPPORTED : VERR_LDRPE_CERT_MALFORMED;
-+ if (pCur->wRevision >= WIN_CERT_REVISION_1_0)
-+ rc = RTErrInfoSetF(pErrInfo, VERR_LDRPE_CERT_UNSUPPORTED,
-+ "Cert at %#x LB %#x: Unsupported revision: %#x", off, Dir.Size, pCur->wRevision);
-+ else
-+ rc = RTErrInfoSetF(pErrInfo, VERR_LDRPE_CERT_MALFORMED,
-+ "Cert at %#x LB %#x: Malformed revision: %#x", off, Dir.Size, pCur->wRevision);
- break;
- }
- if ( pCur->wCertificateType != WIN_CERT_TYPE_PKCS_SIGNED_DATA
-@@ -3595,8 +3616,15 @@ static int rtldrPEValidateDirectoriesAnd
- && pCur->wCertificateType != WIN_CERT_TYPE_EFI_GUID
- )
- {
-- Log(("rtldrPEOpen: %s: cert at %#x/%#x: wRevision=%#x\n", pszLogName, off, Dir.Size, pCur->wRevision));
-- rc = pCur->wCertificateType ? VERR_LDRPE_CERT_UNSUPPORTED : VERR_LDRPE_CERT_MALFORMED;
-+ Log(("rtldrPEOpen: %s: cert at %#x/%#x: wCertificateType=%#x\n", pszLogName, off, Dir.Size, pCur->wCertificateType));
-+ if (pCur->wCertificateType)
-+ rc = RTErrInfoSetF(pErrInfo, VERR_LDRPE_CERT_UNSUPPORTED,
-+ "Cert at %#x LB %#x: Unsupported certificate type: %#x",
-+ off, Dir.Size, pCur->wCertificateType);
-+ else
-+ rc = RTErrInfoSetF(pErrInfo, VERR_LDRPE_CERT_MALFORMED,
-+ "Cert at %#x LB %#x: Malformed certificate type: %#x",
-+ off, Dir.Size, pCur->wCertificateType);
- break;
- }
-
-@@ -3760,7 +3788,7 @@ int rtldrPEOpen(PRTLDRREADER pReader, ui
- * inspection of the actual data. This also saves some certificate
- * information.
- */
-- rc = rtldrPEValidateDirectoriesAndRememberStuff(pModPe, &OptHdr, fFlags);
-+ rc = rtldrPEValidateDirectoriesAndRememberStuff(pModPe, &OptHdr, fFlags, pErrInfo);
- if (RT_SUCCESS(rc))
- {
- *phLdrMod = &pModPe->Core;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/misc/req.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/misc/req.cpp
-@@ -283,9 +283,9 @@ RTDECL(int) RTReqWait(PRTREQ hReq, RTMSI
- PRTREQINT pReq = hReq;
- AssertPtrReturn(pReq, VERR_INVALID_HANDLE);
- AssertReturn(pReq->u32Magic == RTREQ_MAGIC, VERR_INVALID_HANDLE);
-- AssertMsgReturn( pReq->enmState != RTREQSTATE_QUEUED
-- || pReq->enmState != RTREQSTATE_PROCESSING
-- || pReq->enmState != RTREQSTATE_COMPLETED,
-+ AssertMsgReturn( pReq->enmState == RTREQSTATE_QUEUED
-+ || pReq->enmState == RTREQSTATE_PROCESSING
-+ || pReq->enmState == RTREQSTATE_COMPLETED,
- ("Invalid state %d\n", pReq->enmState),
- VERR_RT_REQUEST_STATE);
- AssertMsgReturn(pReq->uOwner.hQueue && pReq->EventSem != NIL_RTSEMEVENT,
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/misc/reqqueue.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/misc/reqqueue.cpp
-@@ -108,47 +108,50 @@ RTDECL(int) RTReqQueueProcess(RTREQQUEUE
- AssertReturn(pQueue->u32Magic == RTREQQUEUE_MAGIC, VERR_INVALID_HANDLE);
-
- /*
-- * Process loop.
-- *
-- * We do not repeat the outer loop if we've got an informational status code
-- * since that code needs processing by our caller.
-+ * Process loop. Stop (break) after the first non-VINF_SUCCESS status code.
- */
- int rc = VINF_SUCCESS;
-- while (rc <= VINF_SUCCESS)
-+ for (;;)
- {
- /*
- * Get pending requests.
- */
-- PRTREQ pReqs = ASMAtomicXchgPtrT(&pQueue->pReqs, NULL, PRTREQ);
-- if (!pReqs)
-+ PRTREQ pReqs = ASMAtomicXchgPtrT(&pQueue->pAlreadyPendingReqs, NULL, PRTREQ);
-+ if (RT_LIKELY(!pReqs))
- {
-- ASMAtomicWriteBool(&pQueue->fBusy, false); /* this aint 100% perfect, but it's good enough for now... */
-- /** @todo We currently don't care if the entire time wasted here is larger than
-- * cMillies */
-- rc = RTSemEventWait(pQueue->EventSem, cMillies);
-- if (rc != VINF_SUCCESS)
-- break;
-- continue;
-- }
-- ASMAtomicWriteBool(&pQueue->fBusy, true);
-+ pReqs = ASMAtomicXchgPtrT(&pQueue->pReqs, NULL, PRTREQ);
-+ if (!pReqs)
-+ {
-+ /* We do not adjust cMillies (documented behavior). */
-+ ASMAtomicWriteBool(&pQueue->fBusy, false); /* this aint 100% perfect, but it's good enough for now... */
-+ rc = RTSemEventWait(pQueue->EventSem, cMillies);
-+ if (rc != VINF_SUCCESS)
-+ break;
-+ continue;
-+ }
-+
-+ ASMAtomicWriteBool(&pQueue->fBusy, true);
-+
-+ /*
-+ * Reverse the list to process it in FIFO order.
-+ */
-+ PRTREQ pReq = pReqs;
-+ if (pReq->pNext)
-+ Log2(("RTReqQueueProcess: 2+ requests: %p %p %p\n", pReq, pReq->pNext, pReq->pNext->pNext));
-+ pReqs = NULL;
-+ while (pReq)
-+ {
-+ Assert(pReq->enmState == RTREQSTATE_QUEUED);
-+ Assert(pReq->uOwner.hQueue == pQueue);
-+ PRTREQ pCur = pReq;
-+ pReq = pReq->pNext;
-+ pCur->pNext = pReqs;
-+ pReqs = pCur;
-+ }
-
-- /*
-- * Reverse the list to process it in FIFO order.
-- */
-- PRTREQ pReq = pReqs;
-- if (pReq->pNext)
-- Log2(("RTReqQueueProcess: 2+ requests: %p %p %p\n", pReq, pReq->pNext, pReq->pNext->pNext));
-- pReqs = NULL;
-- while (pReq)
-- {
-- Assert(pReq->enmState == RTREQSTATE_QUEUED);
-- Assert(pReq->uOwner.hQueue == pQueue);
-- PRTREQ pCur = pReq;
-- pReq = pReq->pNext;
-- pCur->pNext = pReqs;
-- pReqs = pCur;
- }
--
-+ else
-+ ASMAtomicWriteBool(&pQueue->fBusy, true);
-
- /*
- * Process the requests.
-@@ -156,16 +159,26 @@ RTDECL(int) RTReqQueueProcess(RTREQQUEUE
- while (pReqs)
- {
- /* Unchain the first request and advance the list. */
-- pReq = pReqs;
-+ PRTREQ pReq = pReqs;
- pReqs = pReqs->pNext;
- pReq->pNext = NULL;
-
-- /* Process the request */
-+ /* Process the request. */
- rc = rtReqProcessOne(pReq);
- AssertRC(rc);
- if (rc != VINF_SUCCESS)
-- break; /** @todo r=bird: we're dropping requests here! Add 2nd queue that can hold them. (will fix when writing a testcase) */
-+ {
-+ /* Propagate the return code to caller. If more requests pending, queue them for later. */
-+ if (pReqs)
-+ {
-+ pReqs = ASMAtomicXchgPtrT(&pQueue->pAlreadyPendingReqs, pReqs, PRTREQ);
-+ Assert(!pReqs);
-+ }
-+ break;
-+ }
- }
-+ if (rc != VINF_SUCCESS)
-+ break;
- }
-
- LogFlow(("RTReqQueueProcess: returns %Rrc\n", rc));
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/misc/sg.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/misc/sg.cpp
-@@ -83,15 +83,23 @@ static void *sgBufGet(PRTSGBUF pSgBuf, s
- RTDECL(void) RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, size_t cSegs)
- {
- AssertPtr(pSgBuf);
-- AssertPtr(paSegs);
-- Assert(cSegs > 0);
-+ Assert( (cSegs > 0 && VALID_PTR(paSegs))
-+ || (!cSegs && !paSegs));
- Assert(cSegs < (~(unsigned)0 >> 1));
-
- pSgBuf->paSegs = paSegs;
- pSgBuf->cSegs = (unsigned)cSegs;
- pSgBuf->idxSeg = 0;
-- pSgBuf->pvSegCur = paSegs[0].pvSeg;
-- pSgBuf->cbSegLeft = paSegs[0].cbSeg;
-+ if (cSegs && paSegs)
-+ {
-+ pSgBuf->pvSegCur = paSegs[0].pvSeg;
-+ pSgBuf->cbSegLeft = paSegs[0].cbSeg;
-+ }
-+ else
-+ {
-+ pSgBuf->pvSegCur = NULL;
-+ pSgBuf->cbSegLeft = 0;
-+ }
- }
-
-
-@@ -99,9 +107,17 @@ RTDECL(void) RTSgBufReset(PRTSGBUF pSgBu
- {
- AssertPtrReturnVoid(pSgBuf);
-
-- pSgBuf->idxSeg = 0;
-- pSgBuf->pvSegCur = pSgBuf->paSegs[0].pvSeg;
-- pSgBuf->cbSegLeft = pSgBuf->paSegs[0].cbSeg;
-+ pSgBuf->idxSeg = 0;
-+ if (pSgBuf->cSegs)
-+ {
-+ pSgBuf->pvSegCur = pSgBuf->paSegs[0].pvSeg;
-+ pSgBuf->cbSegLeft = pSgBuf->paSegs[0].cbSeg;
-+ }
-+ else
-+ {
-+ pSgBuf->pvSegCur = NULL;
-+ pSgBuf->cbSegLeft = 0;
-+ }
- }
-
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/string/utf-16-case.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/string/utf-16-case.cpp
-@@ -105,6 +105,45 @@ RTDECL(int) RTUtf16ICmp(register PCRTUTF
- RT_EXPORT_SYMBOL(RTUtf16ICmp);
-
-
-+RTDECL(int) RTUtf16ICmpUtf8(PCRTUTF16 pwsz1, const char *psz2)
-+{
-+ /*
-+ * NULL and empty strings are all the same.
-+ */
-+ if (!pwsz1)
-+ return !psz2 || !*psz2 ? 0 : -1;
-+ if (!psz2)
-+ return !*pwsz1 ? 0 : 1;
-+
-+ /*
-+ * Compare with a UTF-8 string by enumerating them char by char.
-+ */
-+ for (;;)
-+ {
-+ RTUNICP uc1;
-+ int rc = RTUtf16GetCpEx(&pwsz1, &uc1);
-+ AssertRCReturn(rc, 1);
-+
-+ RTUNICP uc2;
-+ rc = RTStrGetCpEx(&psz2, &uc2);
-+ AssertRCReturn(rc, -1);
-+ if (uc1 == uc2)
-+ {
-+ if (uc1)
-+ continue;
-+ return 0;
-+ }
-+
-+ if (RTUniCpToUpper(uc1) == RTUniCpToUpper(uc2))
-+ continue;
-+ if (RTUniCpToLower(uc1) == RTUniCpToLower(uc2))
-+ continue;
-+ return uc1 < uc2 ? -1 : 1;
-+ }
-+}
-+RT_EXPORT_SYMBOL(RTUtf16CmpIUtf8);
-+
-+
- RTDECL(PRTUTF16) RTUtf16ToLower(PRTUTF16 pwsz)
- {
- PRTUTF16 pwc = pwsz;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/string/utf-16.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/string/utf-16.cpp
-@@ -113,6 +113,37 @@ RTDECL(PRTUTF16) RTUtf16AllocTag(size_t
- RT_EXPORT_SYMBOL(RTUtf16AllocTag);
-
-
-+RTDECL(int) RTUtf16ReallocTag(PRTUTF16 *ppwsz, size_t cbNew, const char *pszTag)
-+{
-+ PRTUTF16 pwszOld = *ppwsz;
-+ cbNew = RT_ALIGN_Z(cbNew, sizeof(RTUTF16));
-+ if (!cbNew)
-+ {
-+ RTMemFree(pwszOld);
-+ *ppwsz = NULL;
-+ }
-+ else if (pwszOld)
-+ {
-+ PRTUTF16 pwszNew = (PRTUTF16)RTMemReallocTag(pwszOld, cbNew, pszTag);
-+ if (!pwszNew)
-+ return VERR_NO_STR_MEMORY;
-+ pwszNew[cbNew / sizeof(RTUTF16) - 1] = '\0';
-+ *ppwsz = pwszNew;
-+ }
-+ else
-+ {
-+ PRTUTF16 pwszNew = (PRTUTF16)RTMemAllocTag(cbNew, pszTag);
-+ if (!pwszNew)
-+ return VERR_NO_UTF16_MEMORY;
-+ pwszNew[0] = '\0';
-+ pwszNew[cbNew / sizeof(RTUTF16) - 1] = '\0';
-+ *ppwsz = pwszNew;
-+ }
-+ return VINF_SUCCESS;
-+}
-+RT_EXPORT_SYMBOL(RTUtf16ReallocTag);
-+
-+
- RTDECL(void) RTUtf16Free(PRTUTF16 pwszString)
- {
- if (pwszString)
-@@ -184,6 +215,40 @@ RTDECL(int) RTUtf16Cmp(register PCRTUTF1
- RT_EXPORT_SYMBOL(RTUtf16Cmp);
-
-
-+RTDECL(int) RTUtf16CmpUtf8(PCRTUTF16 pwsz1, const char *psz2)
-+{
-+ /*
-+ * NULL and empty strings are all the same.
-+ */
-+ if (!pwsz1)
-+ return !psz2 || !*psz2 ? 0 : -1;
-+ if (!psz2)
-+ return !*pwsz1 ? 0 : 1;
-+
-+ /*
-+ * Compare with a UTF-8 string by enumerating them char by char.
-+ */
-+ for (;;)
-+ {
-+ RTUNICP uc1;
-+ int rc = RTUtf16GetCpEx(&pwsz1, &uc1);
-+ AssertRCReturn(rc, 1);
-+
-+ RTUNICP uc2;
-+ rc = RTStrGetCpEx(&psz2, &uc2);
-+ AssertRCReturn(rc, -1);
-+ if (uc1 == uc2)
-+ {
-+ if (uc1)
-+ continue;
-+ return 0;
-+ }
-+ return uc1 < uc2 ? -1 : 1;
-+ }
-+}
-+RT_EXPORT_SYMBOL(RTUtf16CmpUtf8);
-+
-+
- RTDECL(int) RTUtf16ValidateEncoding(PCRTUTF16 pwsz)
- {
- return RTUtf16ValidateEncodingEx(pwsz, RTSTR_MAX, 0);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/common/zip/zip.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/common/zip/zip.cpp
-@@ -1100,7 +1100,7 @@ static bool rtZipLZFValidHeader(PCRTZIPL
- || pHdr->cbUncompressed > RTZIPLZF_MAX_UNCOMPRESSED_DATA_SIZE
- )
- {
-- AssertMsgFailed(("Invalid LZF header! %.*Rhxs\n", sizeof(pHdr), pHdr));
-+ AssertMsgFailed(("Invalid LZF header! %.*Rhxs\n", sizeof(*pHdr), pHdr));
- return false;
- }
- return true;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/generic/http-curl.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/generic/http-curl.cpp
-@@ -1048,7 +1048,7 @@ static CFArrayRef rtHttpDarwinExecutePro
- static int rtHttpDarwinTryConfigProxy(PRTHTTPINTERNAL pThis, CFDictionaryRef hDictProxy, CFURLRef hUrlTarget, bool fIgnorePacType)
- {
- CFStringRef hStrProxyType = (CFStringRef)CFDictionaryGetValue(hDictProxy, kCFProxyTypeKey);
-- AssertStmt(hStrProxyType, continue);
-+ AssertReturn(hStrProxyType, VINF_NOT_SUPPORTED);
-
- /*
- * No proxy is fairly simple and common.
-@@ -1159,7 +1159,7 @@ static int rtHttpDarwinTryConfigProxies(
- for (CFIndex i = 0; i < cEntries; i++)
- {
- CFDictionaryRef hDictProxy = (CFDictionaryRef)CFArrayGetValueAtIndex(hArrayProxies, i);
-- AssertStmt(hDictProxy, continue);
-+ AssertContinue(hDictProxy);
-
- rcRet = rtHttpDarwinTryConfigProxy(pThis, hDictProxy, hUrlTarget, fIgnorePacType);
- if (rcRet != VINF_NOT_SUPPORTED)
-@@ -1207,8 +1207,8 @@ static int rtHttpDarwinConfigureProxyFor
- for (CFIndex i = 0; i < cEntries; i++)
- {
- CFStringRef hStr = (CFStringRef)CFArrayGetValueAtIndex(hArray, i);
-- AssertStmt(hStr, continue);
-- AssertStmt(CFStringGetCString(hStr, szTmp, sizeof(szTmp), kCFStringEncodingUTF8), continue);
-+ AssertContinue(hStr);
-+ AssertContinue(CFStringGetCString(hStr, szTmp, sizeof(szTmp), kCFStringEncodingUTF8));
- RTStrToLower(szTmp);
-
- bool fRet;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/include/internal/ldrPE.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/include/internal/ldrPE.h
-@@ -669,9 +669,48 @@ AssertCompileSize(IMAGE_LOAD_CONFIG_DIRE
- typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V4;
- typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4;
-
--typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 IMAGE_LOAD_CONFIG_DIRECTORY32;
--typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V4 PIMAGE_LOAD_CONFIG_DIRECTORY32;
--typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY32;
-+/** @since Windows 10 build 10286 (or maybe earlier). */
-+typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V5
-+{
-+ uint32_t Size;
-+ uint32_t TimeDateStamp;
-+ uint16_t MajorVersion;
-+ uint16_t MinorVersion;
-+ uint32_t GlobalFlagsClear;
-+ uint32_t GlobalFlagsSet;
-+ uint32_t CriticalSectionDefaultTimeout;
-+ uint32_t DeCommitFreeBlockThreshold;
-+ uint32_t DeCommitTotalFreeThreshold;
-+ uint32_t LockPrefixTable;
-+ uint32_t MaximumAllocationSize;
-+ uint32_t VirtualMemoryThreshold;
-+ uint32_t ProcessHeapFlags;
-+ uint32_t ProcessAffinityMask;
-+ uint16_t CSDVersion;
-+ uint16_t Reserved1;
-+ uint32_t EditList;
-+ uint32_t SecurityCookie;
-+ uint32_t SEHandlerTable;
-+ uint32_t SEHandlerCount;
-+ uint32_t GuardCFCCheckFunctionPointer;
-+ uint32_t Reserved2;
-+ uint32_t GuardCFFunctionTable;
-+ uint32_t GuardCFFunctionCount;
-+ uint32_t GuardFlags;
-+ IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;
-+ uint32_t GuardAddressTakenIatEntryTable;
-+ uint32_t GuardAddressTakenIatEntryCount;
-+ uint32_t GuardLongJumpTargetTable;
-+ uint32_t GuardLongJumpTargetCount;
-+} IMAGE_LOAD_CONFIG_DIRECTORY32_V5;
-+AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V5, 0x78);
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V5;
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5;
-+
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V5 IMAGE_LOAD_CONFIG_DIRECTORY32;
-+typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V5 PIMAGE_LOAD_CONFIG_DIRECTORY32;
-+typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY32;
-+
-
- /* No _IMAGE_LOAD_CONFIG_DIRECTORY64_V1 exists. */
-
-@@ -770,9 +809,47 @@ AssertCompileSize(IMAGE_LOAD_CONFIG_DIRE
- typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V4;
- typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4;
-
--typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 IMAGE_LOAD_CONFIG_DIRECTORY64;
--typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V4 PIMAGE_LOAD_CONFIG_DIRECTORY64;
--typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY64;
-+/** @since Windows 10 build 10286 (or maybe earlier). */
-+typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V5
-+{
-+ uint32_t Size;
-+ uint32_t TimeDateStamp;
-+ uint16_t MajorVersion;
-+ uint16_t MinorVersion;
-+ uint32_t GlobalFlagsClear;
-+ uint32_t GlobalFlagsSet;
-+ uint32_t CriticalSectionDefaultTimeout;
-+ uint64_t DeCommitFreeBlockThreshold;
-+ uint64_t DeCommitTotalFreeThreshold;
-+ uint64_t LockPrefixTable;
-+ uint64_t MaximumAllocationSize;
-+ uint64_t VirtualMemoryThreshold;
-+ uint64_t ProcessAffinityMask;
-+ uint32_t ProcessHeapFlags;
-+ uint16_t CSDVersion;
-+ uint16_t Reserved1;
-+ uint64_t EditList;
-+ uint64_t SecurityCookie;
-+ uint64_t SEHandlerTable;
-+ uint64_t SEHandlerCount;
-+ uint64_t GuardCFCCheckFunctionPointer;
-+ uint64_t Reserved2;
-+ uint64_t GuardCFFunctionTable;
-+ uint64_t GuardCFFunctionCount;
-+ uint32_t GuardFlags;
-+ IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;
-+ uint64_t GuardAddressTakenIatEntryTable;
-+ uint64_t GuardAddressTakenIatEntryCount;
-+ uint64_t GuardLongJumpTargetTable;
-+ uint64_t GuardLongJumpTargetCount;
-+} IMAGE_LOAD_CONFIG_DIRECTORY64_V5;
-+AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V5, 0xc0);
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V5;
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5;
-+
-+typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V5 IMAGE_LOAD_CONFIG_DIRECTORY64;
-+typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V5 PIMAGE_LOAD_CONFIG_DIRECTORY64;
-+typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V5 PCIMAGE_LOAD_CONFIG_DIRECTORY64;
-
-
- typedef struct _IMAGE_DEBUG_DIRECTORY
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/include/internal/req.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/include/internal/req.h
-@@ -129,8 +129,11 @@ typedef struct RTREQQUEUEINT
- uint32_t u32Magic;
- /** Set if busy (pending or processing requests). */
- bool volatile fBusy;
-- /** Head of the request queue. Atomic. */
-+ /** Head of the request queue (LIFO). Atomic. */
- volatile PRTREQ pReqs;
-+ /** List of requests pending after a non-VINF_SUCCESS status code forced
-+ * RTReqQueueProcess to stop processing requestins. This is in FIFO order. */
-+ volatile PRTREQ pAlreadyPendingReqs;
- /** The last index used during alloc/free. */
- volatile uint32_t iReqFree;
- /** Number of free request packets. */
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/nt/RTNtPathExpand8dot3Path.cpp
-@@ -0,0 +1,190 @@
-+/* $Id: RTNtPathExpand8dot3Path.cpp $ */
-+/** @file
-+ * IPRT - Native NT, RTNtPathExpand8dot3Path.
-+ */
-+
-+/*
-+ * Copyright (C) 2006-2016 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ *
-+ * The contents of this file may alternatively be used under the terms
-+ * of the Common Development and Distribution License Version 1.0
-+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+ * VirtualBox OSE distribution, in which case the provisions of the
-+ * CDDL are applicable instead of those of the GPL.
-+ *
-+ * You may elect to license modified versions of this file under the
-+ * terms and conditions of either the GPL or the CDDL or both.
-+ */
-+
-+
-+/*********************************************************************************************************************************
-+* Header Files *
-+*********************************************************************************************************************************/
-+#define LOG_GROUP RTLOGGROUP_FS
-+#ifdef IN_SUP_HARDENED_R3
-+# include <iprt/nt/nt-and-windows.h>
-+#else
-+# include <iprt/nt/nt.h>
-+#endif
-+
-+#include <iprt/mem.h>
-+#include <iprt/string.h>
-+
-+
-+
-+/**
-+ * Fixes up a path possibly containing one or more alternative 8-dot-3 style
-+ * components.
-+ *
-+ * The path is fixed up in place. Errors are ignored.
-+ *
-+ * @returns VINF_SUCCESS if it all went smoothly, informational status codes
-+ * indicating the nature of last problem we ran into.
-+ *
-+ * @param pUniStr The path to fix up. MaximumLength is the max buffer
-+ * length.
-+ * @param fPathOnly Whether to only process the path and leave the filename
-+ * as passed in.
-+ */
-+RTDECL(int) RTNtPathExpand8dot3Path(PUNICODE_STRING pUniStr, bool fPathOnly)
-+{
-+ int rc = VINF_SUCCESS;
-+
-+ /*
-+ * We could use FileNormalizedNameInformation here and slap the volume device
-+ * path in front of the result, but it's only supported since windows 8.0
-+ * according to some docs... So we expand all supicious names.
-+ */
-+ union fix8dot3tmp
-+ {
-+ FILE_BOTH_DIR_INFORMATION Info;
-+ uint8_t abBuffer[sizeof(FILE_BOTH_DIR_INFORMATION) + 2048 * sizeof(WCHAR)];
-+ } *puBuf = NULL;
-+
-+
-+ PRTUTF16 pwszFix = pUniStr->Buffer;
-+ while (*pwszFix)
-+ {
-+ pwszFix = RTNtPathFindPossible8dot3Name(pwszFix);
-+ if (pwszFix == NULL)
-+ break;
-+
-+ RTUTF16 wc;
-+ PRTUTF16 pwszFixEnd = pwszFix;
-+ while ((wc = *pwszFixEnd) != '\0' && wc != '\\' && wc != '/')
-+ pwszFixEnd++;
-+ if (wc == '\0' && fPathOnly)
-+ break;
-+
-+ if (!puBuf)
-+ {
-+ puBuf = (union fix8dot3tmp *)RTMemAlloc(sizeof(*puBuf));
-+ if (!puBuf)
-+ break;
-+ }
-+
-+ RTUTF16 const wcSaved = *pwszFix;
-+ *pwszFix = '\0'; /* paranoia. */
-+
-+ UNICODE_STRING NtDir;
-+ NtDir.Buffer = pUniStr->Buffer;
-+ NtDir.Length = NtDir.MaximumLength = (USHORT)((pwszFix - pUniStr->Buffer) * sizeof(WCHAR));
-+
-+ HANDLE hDir = RTNT_INVALID_HANDLE_VALUE;
-+ IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
-+
-+ OBJECT_ATTRIBUTES ObjAttr;
-+ InitializeObjectAttributes(&ObjAttr, &NtDir, OBJ_CASE_INSENSITIVE, NULL /*hRootDir*/, NULL /*pSecDesc*/);
-+#ifdef IN_RING0
-+ ObjAttr.Attributes |= OBJ_KERNEL_HANDLE;
-+#endif
-+
-+ NTSTATUS rcNt = NtCreateFile(&hDir,
-+ FILE_READ_DATA | SYNCHRONIZE,
-+ &ObjAttr,
-+ &Ios,
-+ NULL /* Allocation Size*/,
-+ FILE_ATTRIBUTE_NORMAL,
-+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
-+ FILE_OPEN,
-+ FILE_DIRECTORY_FILE | FILE_OPEN_FOR_BACKUP_INTENT | FILE_SYNCHRONOUS_IO_NONALERT,
-+ NULL /*EaBuffer*/,
-+ 0 /*EaLength*/);
-+ *pwszFix = wcSaved;
-+ if (NT_SUCCESS(rcNt))
-+ {
-+ RT_ZERO(*puBuf);
-+
-+ IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
-+ UNICODE_STRING NtFilterStr;
-+ NtFilterStr.Buffer = pwszFix;
-+ NtFilterStr.Length = (USHORT)((uintptr_t)pwszFixEnd - (uintptr_t)pwszFix);
-+ NtFilterStr.MaximumLength = NtFilterStr.Length;
-+ rcNt = NtQueryDirectoryFile(hDir,
-+ NULL /* Event */,
-+ NULL /* ApcRoutine */,
-+ NULL /* ApcContext */,
-+ &Ios,
-+ puBuf,
-+ sizeof(*puBuf) - sizeof(WCHAR),
-+ FileBothDirectoryInformation,
-+ FALSE /*ReturnSingleEntry*/,
-+ &NtFilterStr,
-+ FALSE /*RestartScan */);
-+ if (NT_SUCCESS(rcNt) && puBuf->Info.NextEntryOffset == 0) /* There shall only be one entry matching... */
-+ {
-+ uint32_t offName = puBuf->Info.FileNameLength / sizeof(WCHAR);
-+ while (offName > 0 && puBuf->Info.FileName[offName - 1] != '\\' && puBuf->Info.FileName[offName - 1] != '/')
-+ offName--;
-+ uint32_t cwcNameNew = (puBuf->Info.FileNameLength / sizeof(WCHAR)) - offName;
-+ uint32_t cwcNameOld = (uint32_t)(pwszFixEnd - pwszFix);
-+
-+ if (cwcNameOld == cwcNameNew)
-+ memcpy(pwszFix, &puBuf->Info.FileName[offName], cwcNameNew * sizeof(WCHAR));
-+ else if ( pUniStr->Length + cwcNameNew * sizeof(WCHAR) - cwcNameOld * sizeof(WCHAR) + sizeof(WCHAR)
-+ <= pUniStr->MaximumLength)
-+ {
-+ size_t cwcLeft = pUniStr->Length - (pwszFixEnd - pUniStr->Buffer) * sizeof(WCHAR) + sizeof(WCHAR);
-+ memmove(&pwszFix[cwcNameNew], pwszFixEnd, cwcLeft * sizeof(WCHAR));
-+ pUniStr->Length -= (USHORT)(cwcNameOld * sizeof(WCHAR));
-+ pUniStr->Length += (USHORT)(cwcNameNew * sizeof(WCHAR));
-+ pwszFixEnd -= cwcNameOld;
-+ pwszFixEnd += cwcNameNew;
-+ memcpy(pwszFix, &puBuf->Info.FileName[offName], cwcNameNew * sizeof(WCHAR));
-+ }
-+ else
-+ rc = VINF_BUFFER_OVERFLOW;
-+ }
-+ else if (NT_SUCCESS(rcNt))
-+ rc = -VERR_DUPLICATE;
-+ else
-+ {
-+ rc = -RTErrConvertFromNtStatus(rcNt);
-+ if (rc < 0)
-+ rc = -rc;
-+ }
-+
-+ NtClose(hDir);
-+ }
-+
-+ /* Advance */
-+ pwszFix = pwszFixEnd;
-+ }
-+
-+ if (puBuf)
-+ RTMemFree(puBuf);
-+
-+ if (pUniStr->Length < pUniStr->MaximumLength)
-+ pUniStr->Buffer[pUniStr->Length / sizeof(WCHAR)] = '\0';
-+
-+ return rc;
-+}
-+
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/nt/RTNtPathFindPossible8dot3Name.cpp
-@@ -0,0 +1,72 @@
-+/* $Id: RTNtPathFindPossible8dot3Name.cpp $ */
-+/** @file
-+ * IPRT - Native NT, RTNtPathFindPossible8dot3Name.
-+ */
-+
-+/*
-+ * Copyright (C) 2006-2016 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ *
-+ * The contents of this file may alternatively be used under the terms
-+ * of the Common Development and Distribution License Version 1.0
-+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+ * VirtualBox OSE distribution, in which case the provisions of the
-+ * CDDL are applicable instead of those of the GPL.
-+ *
-+ * You may elect to license modified versions of this file under the
-+ * terms and conditions of either the GPL or the CDDL or both.
-+ */
-+
-+
-+/*********************************************************************************************************************************
-+* Header Files *
-+*********************************************************************************************************************************/
-+#define LOG_GROUP RTLOGGROUP_FS
-+#ifdef IN_SUP_HARDENED_R3
-+# include <iprt/nt/nt-and-windows.h>
-+#else
-+# include <iprt/nt/nt.h>
-+#endif
-+
-+
-+
-+/**
-+ * Checks whether the path could be containing alternative 8.3 names generated
-+ * by NTFS, FAT, or other similar file systems.
-+ *
-+ * @returns Pointer to the first component that might be an 8.3 name, NULL if
-+ * not 8.3 path.
-+ * @param pwszPath The path to check.
-+ *
-+ * @remarks This is making bad ASSUMPTION wrt to the naming scheme of 8.3 names,
-+ * however, non-tilde 8.3 aliases are probably rare enough to not be
-+ * worth all the extra code necessary to open each path component and
-+ * check if we've got the short name or not.
-+ */
-+RTDECL(PRTUTF16) RTNtPathFindPossible8dot3Name(PCRTUTF16 pwszPath)
-+{
-+ PCRTUTF16 pwszName = pwszPath;
-+ for (;;)
-+ {
-+ RTUTF16 wc = *pwszPath++;
-+ if (wc == '~')
-+ {
-+ /* Could check more here before jumping to conclusions... */
-+ if (pwszPath - pwszName <= 8+1+3)
-+ return (PRTUTF16)pwszName;
-+ }
-+ else if (wc == '\\' || wc == '/' || wc == ':')
-+ pwszName = pwszPath;
-+ else if (wc == 0)
-+ break;
-+ }
-+ return NULL;
-+}
-+
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
-@@ -372,11 +372,17 @@ static int rtR0MemObjLinuxAllocPages(PRT
- #endif /* < 2.4.22 */
- pMemLnx->fContiguous = fContiguous;
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
- /*
- * Reserve the pages.
-+ *
-+ * Linux >= 4.5 with CONFIG_DEBUG_VM panics when setting PG_reserved on compound
-+ * pages. According to Michal Hocko this shouldn't be necessary anyway because
-+ * as pages which are not on the LRU list are never evictable.
- */
- for (iPage = 0; iPage < cPages; iPage++)
- SetPageReserved(pMemLnx->apPages[iPage]);
-+#endif
-
- /*
- * Note that the physical address of memory allocated with alloc_pages(flags, order)
-@@ -423,7 +429,12 @@ static void rtR0MemObjLinuxFreePages(PRT
- */
- while (iPage-- > 0)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
-+ /*
-+ * See SetPageReserved() in rtR0MemObjLinuxAllocPages()
-+ */
- ClearPageReserved(pMemLnx->apPages[iPage]);
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
- #else
- MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1);
-@@ -578,7 +589,11 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR
- {
- if (!PageReserved(pMemLnx->apPages[iPage]))
- SetPageDirty(pMemLnx->apPages[iPage]);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+ put_page(pMemLnx->apPages[iPage]);
-+#else
- page_cache_release(pMemLnx->apPages[iPage]);
-+#endif
- }
-
- if (pTask && pTask->mm)
-@@ -1029,14 +1044,38 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
- /*
- * Get user pages.
- */
-- rc = get_user_pages(pTask, /* Task for fault accounting. */
-- pTask->mm, /* Whose pages. */
-- R3Ptr, /* Where from. */
-- cPages, /* How many pages. */
-- fWrite, /* Write to memory. */
-- fWrite, /* force write access. */
-- &pMemLnx->apPages[0], /* Page array. */
-- papVMAs); /* vmas */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+ if (R0Process == RTR0ProcHandleSelf())
-+ rc = get_user_pages(R3Ptr, /* Where from. */
-+ cPages, /* How many pages. */
-+ fWrite, /* Write to memory. */
-+ fWrite, /* force write access. */
-+ &pMemLnx->apPages[0], /* Page array. */
-+ papVMAs); /* vmas */
-+ /*
-+ * Actually this should not happen at the moment as call this function
-+ * only for our own process.
-+ */
-+ else
-+ rc = get_user_pages_remote(
-+ pTask, /* Task for fault accounting. */
-+ pTask->mm, /* Whose pages. */
-+ R3Ptr, /* Where from. */
-+ cPages, /* How many pages. */
-+ fWrite, /* Write to memory. */
-+ fWrite, /* force write access. */
-+ &pMemLnx->apPages[0], /* Page array. */
-+ papVMAs); /* vmas */
-+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) */
-+ rc = get_user_pages(pTask, /* Task for fault accounting. */
-+ pTask->mm, /* Whose pages. */
-+ R3Ptr, /* Where from. */
-+ cPages, /* How many pages. */
-+ fWrite, /* Write to memory. */
-+ fWrite, /* force write access. */
-+ &pMemLnx->apPages[0], /* Page array. */
-+ papVMAs); /* vmas */
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) */
- if (rc == cPages)
- {
- /*
-@@ -1081,7 +1120,11 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
- {
- if (!PageReserved(pMemLnx->apPages[rc]))
- SetPageDirty(pMemLnx->apPages[rc]);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
-+ put_page(pMemLnx->apPages[rc]);
-+#else
- page_cache_release(pMemLnx->apPages[rc]);
-+#endif
- }
-
- up_read(&pTask->mm->mmap_sem);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
-@@ -76,11 +76,11 @@ extern uint32_t
- extern uint32_t g_offrtNtPbDpcQueueDepth;
-
-
--int rtMpPokeCpuUsingDpc(RTCPUID idCpu);
--int rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu);
--int rtMpPokeCpuUsingHalSendSoftwareInterrupt(RTCPUID idCpu);
--int rtMpPokeCpuUsingHalReqestIpiW7Plus(RTCPUID idCpu);
--int rtMpPokeCpuUsingHalReqestIpiPreW7(RTCPUID idCpu);
-+int __stdcall rtMpPokeCpuUsingDpc(RTCPUID idCpu);
-+int __stdcall rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu);
-+int __stdcall rtMpPokeCpuUsingHalSendSoftwareInterrupt(RTCPUID idCpu);
-+int __stdcall rtMpPokeCpuUsingHalReqestIpiW7Plus(RTCPUID idCpu);
-+int __stdcall rtMpPokeCpuUsingHalReqestIpiPreW7(RTCPUID idCpu);
-
- RT_C_DECLS_END
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
-@@ -231,7 +231,7 @@ RTDECL(bool) RTMpIsCpuWorkPending(void)
- *
- * @param uUserCtx The user context argument (PRTMPARGS).
- */
--static ULONG_PTR __stdcall rtmpNtOnAllBroadcastIpiWrapper(ULONG_PTR uUserCtx)
-+static ULONG_PTR rtmpNtOnAllBroadcastIpiWrapper(ULONG_PTR uUserCtx)
- {
- PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
- /*ASMAtomicIncU32(&pArgs->cHits); - not needed */
-@@ -246,7 +246,7 @@ static ULONG_PTR __stdcall rtmpNtOnAllBr
- *
- * @param uUserCtx The user context argument (PRTMPARGS).
- */
--static ULONG_PTR __stdcall rtmpNtOnOthersBroadcastIpiWrapper(ULONG_PTR uUserCtx)
-+static ULONG_PTR rtmpNtOnOthersBroadcastIpiWrapper(ULONG_PTR uUserCtx)
- {
- PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
- RTCPUID idCpu = KeGetCurrentProcessorNumber();
-@@ -265,7 +265,7 @@ static ULONG_PTR __stdcall rtmpNtOnOther
- *
- * @param uUserCtx The user context argument (PRTMPARGS).
- */
--static ULONG_PTR __stdcall rtmpNtOnPairBroadcastIpiWrapper(ULONG_PTR uUserCtx)
-+static ULONG_PTR rtmpNtOnPairBroadcastIpiWrapper(ULONG_PTR uUserCtx)
- {
- PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
- RTCPUID idCpu = KeGetCurrentProcessorNumber();
-@@ -285,7 +285,7 @@ static ULONG_PTR __stdcall rtmpNtOnPairB
- *
- * @param uUserCtx The user context argument (PRTMPARGS).
- */
--static ULONG_PTR __stdcall rtmpNtOnSpecificBroadcastIpiWrapper(ULONG_PTR uUserCtx)
-+static ULONG_PTR rtmpNtOnSpecificBroadcastIpiWrapper(ULONG_PTR uUserCtx)
- {
- PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
- RTCPUID idCpu = KeGetCurrentProcessorNumber();
-@@ -341,7 +341,7 @@ static int rtMpCallUsingBroadcastIpi(PFN
- * @param SystemArgument1 Argument specified by KeInsertQueueDpc
- * @param SystemArgument2 Argument specified by KeInsertQueueDpc
- */
--static VOID __stdcall rtmpNtDPCWrapper(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
-+static VOID rtmpNtDPCWrapper(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
- {
- PRTMPARGS pArgs = (PRTMPARGS)DeferredContext;
-
-@@ -600,8 +600,8 @@ DECLINLINE(void) rtMpNtOnSpecificRelease
- * @param SystemArgument1 Argument specified by KeInsertQueueDpc
- * @param SystemArgument2 Argument specified by KeInsertQueueDpc
- */
--static VOID __stdcall rtMpNtOnSpecificDpcWrapper(IN PKDPC Dpc, IN PVOID DeferredContext,
-- IN PVOID SystemArgument1, IN PVOID SystemArgument2)
-+static VOID rtMpNtOnSpecificDpcWrapper(IN PKDPC Dpc, IN PVOID DeferredContext,
-+ IN PVOID SystemArgument1, IN PVOID SystemArgument2)
- {
- PRTMPNTONSPECIFICARGS pArgs = (PRTMPNTONSPECIFICARGS)DeferredContext;
- ASMAtomicWriteBool(&pArgs->fExecuting, true);
-@@ -798,7 +798,7 @@ static VOID rtMpNtPokeCpuDummy(IN PKDPC
- #ifndef IPRT_TARGET_NT4
-
- /** Callback used by rtMpPokeCpuUsingBroadcastIpi. */
--static ULONG_PTR __stdcall rtMpIpiGenericCall(ULONG_PTR Argument)
-+static ULONG_PTR rtMpIpiGenericCall(ULONG_PTR Argument)
- {
- NOREF(Argument);
- return 0;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r0drv/nt/thread2-r0drv-nt.cpp
-@@ -109,7 +109,7 @@ DECLHIDDEN(void) rtThreadNativeDestroy(P
- *
- * @param pvArg Pointer to the argument package.
- */
--static VOID __stdcall rtThreadNativeMain(PVOID pvArg)
-+static VOID rtThreadNativeMain(PVOID pvArg)
- {
- PETHREAD Self = PsGetCurrentThread();
- PRTTHREADINT pThread = (PRTTHREADINT)pvArg;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r3/alloc-ef-cpp.cpp
-@@ -94,6 +94,16 @@ void RT_EF_CDECL operator delete(void *p
- }
-
-
-+#ifdef __cpp_sized_deallocation
-+void RT_EF_CDECL operator delete(void *pv, RT_EF_SIZE_T cb) RT_EF_NOTHROW
-+{
-+ NOREF(cb);
-+ AssertMsgFailed(("cb ignored!\n"));
-+ rtR3MemFree("delete", RTMEMTYPE_DELETE, pv, ASMReturnAddress(), NULL, 0, NULL);
-+}
-+#endif
-+
-+
- void RT_EF_CDECL operator delete(void * pv, const std::nothrow_t &) RT_EF_NOTHROW
- {
- rtR3MemFree("delete nothrow", RTMEMTYPE_DELETE, pv, ASMReturnAddress(), NULL, 0, NULL);
-@@ -130,6 +140,16 @@ void RT_EF_CDECL operator delete[](void
- }
-
-
-+#ifdef __cpp_sized_deallocation
-+void RT_EF_CDECL operator delete[](void * pv, RT_EF_SIZE_T cb) RT_EF_NOTHROW
-+{
-+ NOREF(cb);
-+ AssertMsgFailed(("cb ignored!\n"));
-+ rtR3MemFree("delete[]", RTMEMTYPE_DELETE_ARRAY, pv, ASMReturnAddress(), NULL, 0, NULL);
-+}
-+#endif
-+
-+
- void RT_EF_CDECL operator delete[](void *pv, const std::nothrow_t &) RT_EF_NOTHROW
- {
- rtR3MemFree("delete[] nothrow", RTMEMTYPE_DELETE_ARRAY, pv, ASMReturnAddress(), NULL, 0, NULL);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
-@@ -61,12 +61,12 @@ static bool rtCrStoreIsDarwinCertTrustwo
- for (CFIndex i = 0; i < cTrustSettings; i++)
- {
- CFDictionaryRef hDict = (CFDictionaryRef)CFArrayGetValueAtIndex(hTrustSettings, i);
-- AssertStmt(CFGetTypeID(hDict) == CFDictionaryGetTypeID(), continue);
-+ AssertContinue(CFGetTypeID(hDict) == CFDictionaryGetTypeID());
-
- CFNumberRef hNum = (CFNumberRef)CFDictionaryGetValue(hDict, kSecTrustSettingsResult);
- if (hNum)
- {
-- AssertStmt(CFGetTypeID(hNum) == CFNumberGetTypeID(), continue);
-+ AssertContinue(CFGetTypeID(hNum) == CFNumberGetTypeID());
- SInt32 iNum;
- if (CFNumberGetValue(hNum, kCFNumberSInt32Type, &iNum))
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r3/nt/pathint-nt.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r3/nt/pathint-nt.cpp
-@@ -161,10 +161,11 @@ static int rtNtPathUtf8ToUniStr(struct _
-
-
- /**
-- * Converts a path to NT format and encoding.
-+ * Converts a windows-style path to NT format and encoding.
- *
- * @returns IPRT status code.
-- * @param pNtName Where to return the NT name.
-+ * @param pNtName Where to return the NT name. Free using
-+ * rtTNtPathToNative.
- * @param phRootDir Where to return the root handle, if applicable.
- * @param pszPath The UTF-8 path.
- */
-@@ -228,6 +229,21 @@ static int rtNtPathToNative(struct _UNIC
-
-
- /**
-+ * Converts a windows-style path to NT format and encoding.
-+ *
-+ * @returns IPRT status code.
-+ * @param pNtName Where to return the NT name. Free using
-+ * RTNtPathToNative.
-+ * @param phRootDir Where to return the root handle, if applicable.
-+ * @param pszPath The UTF-8 path.
-+ */
-+RTDECL(int) RTNtPathFromWinUtf8(struct _UNICODE_STRING *pNtName, PHANDLE phRootDir, const char *pszPath)
-+{
-+ return rtNtPathToNative(pNtName, phRootDir, pszPath);
-+}
-+
-+
-+/**
- * Converts a UTF-16 windows-style path to NT format.
- *
- * @returns IPRT status code.
-@@ -340,12 +356,38 @@ RTDECL(int) RTNtPathFromWinUtf16Ex(struc
-
-
- /**
-+ * Ensures that the NT string has sufficient storage to hold @a cwcMin RTUTF16
-+ * chars plus a terminator.
-+ *
-+ * The NT string must have been returned by RTNtPathFromWinUtf8 or
-+ * RTNtPathFromWinUtf16Ex.
-+ *
-+ * @returns IPRT status code.
-+ * @param pNtName The NT path string.
-+ * @param cwcMin The minimum number of RTUTF16 chars. Max 32767.
-+ * @sa RTNtPathFree
-+ */
-+RTDECL(int) RTNtPathEnsureSpace(struct _UNICODE_STRING *pNtName, size_t cwcMin)
-+{
-+ if (pNtName->MaximumLength / sizeof(RTUTF16) > cwcMin)
-+ return VINF_SUCCESS;
-+
-+ AssertReturn(cwcMin < _64K / sizeof(RTUTF16), VERR_OUT_OF_RANGE);
-+
-+ size_t const cbMin = (cwcMin + 1) * sizeof(RTUTF16);
-+ int rc = RTUtf16Realloc(&pNtName->Buffer, cbMin);
-+ if (RT_SUCCESS(rc))
-+ pNtName->MaximumLength = (uint16_t)cbMin;
-+ return rc;
-+}
-+
-+
-+/**
- * Frees the native path and root handle.
- *
- * @param pNtName The NT path after a successful rtNtPathToNative
- * call.
-- * @param phRootDir The root handle variable after a
-- * rtNtPathToNative.
-+ * @param phRootDir The root handle variable from the same call.
- */
- static void rtNtPathFreeNative(struct _UNICODE_STRING *pNtName, PHANDLE phRootDir)
- {
-@@ -357,10 +399,9 @@ static void rtNtPathFreeNative(struct _U
- /**
- * Frees the native path and root handle.
- *
-- * @param pNtName The NT path after a successful
-- * RTNtPathFromWinUtf16Ex call.
-- * @param phRootDir The root handle variable after a successfull
-- * RTNtPathFromWinUtf16Ex call.
-+ * @param pNtName The NT path from a successful RTNtPathToNative
-+ * or RTNtPathFromWinUtf16Ex call.
-+ * @param phRootDir The root handle variable from the same call.
- */
- RTDECL(void) RTNtPathFree(struct _UNICODE_STRING *pNtName, HANDLE *phRootDir)
- {
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r3/win/process-win.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r3/win/process-win.cpp
-@@ -776,7 +776,7 @@ static int rtProcWinFigureWhichPrivilege
- } uNew, uOld;
- uNew.TokPriv.PrivilegeCount = 1;
- uNew.TokPriv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
-- AssertStmt(LookupPrivilegeValue(NULL, s_aPrivileges[i].pszName, &uNew.TokPriv.Privileges[0].Luid), continue);
-+ AssertContinue(LookupPrivilegeValue(NULL, s_aPrivileges[i].pszName, &uNew.TokPriv.Privileges[0].Luid));
- uOld = uNew;
- SetLastError(NO_ERROR);
- DWORD cbActual = RT_OFFSETOF(TOKEN_PRIVILEGES, Privileges[1]);
-@@ -1085,7 +1085,7 @@ static bool rtProcWinAddAccessAllowedAce
- while (i-- > 0)
- {
- PACE_HEADER pAceHdr;
-- AssertStmt(GetAce(pDstAcl, i, (PVOID *)&pAceHdr), continue);
-+ AssertContinue(GetAce(pDstAcl, i, (PVOID *)&pAceHdr));
- if ( pAceHdr->AceSize == cbAllowedAce
- && memcmp(pAceHdr, &AceBuf.Core, cbAllowedAce) == 0)
- return true;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/r3/win/vcc100-kernel32-fakes.cpp
-@@ -412,7 +412,7 @@ ULONGLONG WINAPI VerSetConditionMask(ULO
- for (unsigned i = 0; i < 8; i++)
- if (fTypeMask & RT_BIT_32(i))
- {
-- uint64_t fMask = 0xff << (i*8);
-+ uint64_t fMask = UINT64_C(0xff) << (i*8);
- fConditionMask &= ~fMask;
- fConditionMask |= (uint64_t)bOperator << (i*8);
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/testcase/Makefile.kmk
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/testcase/Makefile.kmk
-@@ -148,6 +148,7 @@ PROGRAMS.win += \
- tstRTLocalIpc \
- tstRTProcWait \
- tstFileAppendWin-1 \
-+ tstRTNtPath-1 \
- ntGetTimerResolution
- PROGRAMS.linux += \
- tstRTProcWait \
-@@ -486,6 +487,9 @@ tstNoCrt-1_SOURCES = \
- ../common/string/strcpy.asm \
- ../common/string/strlen.asm
-
-+tstRTNtPath-1_TEMPLATE = VBOXR3TSTEXE
-+tstRTNtPath-1_SOURCES = tstRTNtPath-1.cpp
-+
- tstOnce_TEMPLATE = VBOXR3TSTEXE
- tstOnce_SOURCES = tstOnce.cpp
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/testcase/tstRTFileAio.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/testcase/tstRTFileAio.cpp
-@@ -58,7 +58,7 @@ void tstFileAioTestReadWriteBasic(RTFILE
- RTFILEAIOREQ *paReqs;
- paReqs = (PRTFILEAIOREQ)RTTestGuardedAllocHead(g_hTest, cMaxReqsInFlight * sizeof(RTFILEAIOREQ));
- RTTESTI_CHECK_RETV(paReqs);
-- RT_BZERO(paReqs, sizeof(cMaxReqsInFlight) * sizeof(RTFILEAIOREQ));
-+ RT_BZERO(paReqs, cMaxReqsInFlight * sizeof(RTFILEAIOREQ));
-
- /* Allocate array holding pointer to data buffers. */
- void **papvBuf = (void **)RTTestGuardedAllocHead(g_hTest, cMaxReqsInFlight * sizeof(void *));
---- /dev/null
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/testcase/tstRTNtPath-1.cpp
-@@ -0,0 +1,212 @@
-+/* $Id: tstRTNtPath-1.cpp $ */
-+/** @file
-+ * IPRT Testcase - RTNtPath*.
-+ */
-+
-+/*
-+ * Copyright (C) 2010-2016 Oracle Corporation
-+ *
-+ * This file is part of VirtualBox Open Source Edition (OSE), as
-+ * available from http://www.virtualbox.org. This file is free software;
-+ * you can redistribute it and/or modify it under the terms of the GNU
-+ * General Public License (GPL) as published by the Free Software
-+ * Foundation, in version 2 as it comes in the "COPYING" file of the
-+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+ *
-+ * The contents of this file may alternatively be used under the terms
-+ * of the Common Development and Distribution License Version 1.0
-+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+ * VirtualBox OSE distribution, in which case the provisions of the
-+ * CDDL are applicable instead of those of the GPL.
-+ *
-+ * You may elect to license modified versions of this file under the
-+ * terms and conditions of either the GPL or the CDDL or both.
-+ */
-+
-+
-+/*********************************************************************************************************************************
-+* Header Files *
-+*********************************************************************************************************************************/
-+#include <iprt/nt/nt-and-windows.h>
-+
-+#include <iprt/err.h>
-+#include <iprt/dir.h>
-+#include <iprt/env.h>
-+#include <iprt/path.h>
-+#include <iprt/string.h>
-+#include <iprt/test.h>
-+
-+
-+/*********************************************************************************************************************************
-+* Structures and Typedefs *
-+*********************************************************************************************************************************/
-+typedef struct TSTRAVERSE
-+{
-+ uint32_t cHits;
-+ uint32_t cFirstClassHits;
-+ uint32_t cEntries;
-+ uint32_t cDirs;
-+ UNICODE_STRING UniStr;
-+ char szLongPath[RTPATH_MAX];
-+ char szLongPathNt[RTPATH_MAX];
-+ char szShortPath[RTPATH_MAX];
-+ union
-+ {
-+ RTDIRENTRYEX EntryEx;
-+ uint8_t abBuf[RTPATH_MAX + sizeof(RTDIRENTRYEX)];
-+ } u;
-+ size_t cbDirEntry;
-+} TSTRAVERSE;
-+
-+
-+void tstTraverse8dot3(TSTRAVERSE *pThis, size_t cchLong, size_t cchShort, uint32_t cShortNames)
-+{
-+ pThis->cDirs++;
-+
-+ uint32_t cLeftToTest = 2;
-+ PRTDIR hDir;
-+ int rc = RTDirOpen(&hDir, pThis->szLongPath);
-+ if (RT_FAILURE(rc))
-+ return;
-+ while (pThis->cFirstClassHits < 256)
-+ {
-+ pThis->cbDirEntry = sizeof(pThis->u);
-+ rc = RTDirReadEx(hDir, &pThis->u.EntryEx, &pThis->cbDirEntry, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
-+ if (RT_FAILURE(rc))
-+ break;
-+ pThis->cEntries++;
-+
-+ if (RTDirEntryExIsStdDotLink(&pThis->u.EntryEx))
-+ continue;
-+
-+ if ( cchLong + pThis->u.EntryEx.cbName + 1 >= sizeof(pThis->szLongPath)
-+ || cchShort + RT_MAX(pThis->u.EntryEx.cbName, pThis->u.EntryEx.cwcShortName * 3) + 1 >= sizeof(pThis->szShortPath) )
-+ continue; /* ignore obvious overflows */
-+
-+ bool fHave8Dot3 = pThis->u.EntryEx.cwcShortName
-+ && RTUtf16ICmpUtf8(pThis->u.EntryEx.wszShortName, pThis->u.EntryEx.szName) != 0;
-+ if ( fHave8Dot3
-+ || RTFS_IS_DIRECTORY(pThis->u.EntryEx.Info.Attr.fMode)
-+ || cLeftToTest > 0)
-+ {
-+ if (!fHave8Dot3)
-+ memcpy(&pThis->szShortPath[cchShort], pThis->u.EntryEx.szName, pThis->u.EntryEx.cbName + 1);
-+ else
-+ {
-+ char *pszDst = &pThis->szShortPath[cchShort];
-+ rc = RTUtf16ToUtf8Ex(pThis->u.EntryEx.wszShortName, pThis->u.EntryEx.cwcShortName, &pszDst,
-+ sizeof(pThis->szShortPath) - cchShort, NULL);
-+ if (RT_FAILURE(rc))
-+ continue;
-+ }
-+ memcpy(&pThis->szLongPath[cchLong], pThis->u.EntryEx.szName, pThis->u.EntryEx.cbName + 1);
-+
-+ /*
-+ * Check it out.
-+ */
-+ HANDLE hRoot;
-+ RTTESTI_CHECK_RC(rc = RTNtPathFromWinUtf8(&pThis->UniStr, &hRoot, pThis->szShortPath), VINF_SUCCESS);
-+ if (RT_SUCCESS(rc))
-+ {
-+ RTTESTI_CHECK(pThis->UniStr.MaximumLength > pThis->UniStr.Length);
-+ RTTESTI_CHECK(pThis->UniStr.Length == RTUtf16Len(pThis->UniStr.Buffer) * sizeof(RTUTF16));
-+
-+ RTTESTI_CHECK_RC(rc = RTNtPathEnsureSpace(&pThis->UniStr, RTPATH_MAX + 256), VINF_SUCCESS);
-+ if (RT_SUCCESS(rc))
-+ {
-+ RTTESTI_CHECK_RC(rc = RTNtPathExpand8dot3Path(&pThis->UniStr, false /*fPathOnly*/), VINF_SUCCESS);
-+ if (RT_SUCCESS(rc))
-+ {
-+ RTTESTI_CHECK(pThis->UniStr.Length == RTUtf16Len(pThis->UniStr.Buffer) * sizeof(RTUTF16));
-+
-+ /* Skip the win32 path prefix (it is usually \??\) so we can compare. Crude but works */
-+ size_t offPrefix = 0;
-+ while ( pThis->UniStr.Buffer[offPrefix] != pThis->szLongPath[0]
-+ && pThis->UniStr.Buffer[offPrefix] != '\0')
-+ offPrefix++;
-+ if (!pThis->UniStr.Buffer[offPrefix])
-+ offPrefix = 0;
-+
-+ if (RTUtf16CmpUtf8(&pThis->UniStr.Buffer[offPrefix], pThis->szLongPath) == 0)
-+ { /* ok */ }
-+ else if (RTUtf16ICmpUtf8(&pThis->UniStr.Buffer[offPrefix], pThis->szLongPath) == 0)
-+ RTTestIFailed("case mismatch: '%ls' vs '%s'", pThis->UniStr.Buffer, pThis->szLongPath);
-+ else
-+ RTTestIFailed("mismatch: '%ls' vs '%s'", pThis->UniStr.Buffer, pThis->szLongPath);
-+
-+ /*
-+ * Update test efficiency hits.
-+ */
-+ if ( cLeftToTest > 0
-+ && !pThis->u.EntryEx.cwcShortName
-+ && !RTFS_IS_DIRECTORY(pThis->u.EntryEx.Info.Attr.fMode))
-+ {
-+ cLeftToTest--;
-+ if (cShortNames >= 3)
-+ pThis->cFirstClassHits++;
-+ }
-+ pThis->cHits++;
-+ }
-+ }
-+ RTNtPathFree(&pThis->UniStr, &hRoot);
-+ }
-+ //RTTestIPrintf(RTTESTLVL_ALWAYS, "debug: %u %u/%u %u/%u %s\n",
-+ // cShortNames, pThis->cFirstClassHits, pThis->cHits, pThis->cDirs, pThis->cEntries, pThis->szShortPath);
-+
-+ /*
-+ * Decend into sub-directories. Must add slash first.
-+ */
-+ if (RTFS_IS_DIRECTORY(pThis->u.EntryEx.Info.Attr.fMode))
-+ {
-+ pThis->szLongPath[cchLong + pThis->u.EntryEx.cbName] = '\\';
-+ pThis->szLongPath[cchLong + pThis->u.EntryEx.cbName + 1] = '\0';
-+ strcat(&pThis->szShortPath[cchShort], "\\");
-+
-+ tstTraverse8dot3(pThis,
-+ cchLong + pThis->u.EntryEx.cbName + 1,
-+ cchShort + strlen(&pThis->szShortPath[cchShort]),
-+ cShortNames + (pThis->u.EntryEx.cwcShortName != 0));
-+ }
-+ }
-+ }
-+ RTDirClose(hDir);
-+}
-+
-+
-+int main()
-+{
-+ RTTEST hTest;
-+ int rc = RTTestInitAndCreate("tstRTNtPath-1", &hTest);
-+ if (rc)
-+ return rc;
-+ RTTestBanner(hTest);
-+
-+ /*
-+ * Traverse the boot file system looking for short named and try locate an instance
-+ * where we have at least 3 in a row.
-+ */
-+ RTTestSub(hTest, "8dot3");
-+
-+ TSTRAVERSE This;
-+ RT_ZERO(This);
-+ rc = RTEnvGetEx(RTENV_DEFAULT, "SystemDrive", This.szLongPath, 64, NULL);
-+ if (RT_SUCCESS(rc))
-+ {
-+ RTStrCat(This.szLongPath, sizeof(This.szLongPath), "\\");
-+ size_t cch = strlen(This.szLongPath);
-+ memcpy(This.szShortPath, This.szLongPath, cch + 1);
-+
-+ tstTraverse8dot3(&This, cch, cch, 0);
-+
-+
-+ }
-+ else
-+ RTTestSkipped(hTest, "failed to resolve %SystemDrive%: %Rrc", rc);
-+
-+ /*
-+ * Summary.
-+ */
-+ return RTTestSummaryAndDestroy(hTest);
-+}
-+
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Runtime/testcase/tstRTPath.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Runtime/testcase/tstRTPath.cpp
-@@ -174,7 +174,7 @@ static void testParserAndSplitter(RTTEST
- RTTESTI_CHECK(pSplit->cbNeeded == u.Split.cbNeeded);
- RTTESTI_CHECK(!strcmp(pSplit->pszSuffix, u.Split.pszSuffix));
- for (uint32_t idxComp = 0; idxComp < u.Split.cComps; idxComp++)
-- RTTESTI_CHECK(!strcmp(pSplit->apszComps[idxComp], pSplit->apszComps[idxComp]));
-+ RTTESTI_CHECK(!strcmp(pSplit->apszComps[idxComp], u.Split.apszComps[idxComp]));
- RTPathSplitFree(pSplit);
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Storage/VD.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Storage/VD.cpp
-@@ -10799,8 +10799,7 @@ VBOXDDU_DECL(int) VDAsyncRead(PVBOXHDD p
-
- } while (0);
-
-- if (RT_UNLIKELY(fLockRead) && ( rc == VINF_VD_ASYNC_IO_FINISHED
-- || rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
-+ if (RT_UNLIKELY(fLockRead) && (rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
- {
- rc2 = vdThreadFinishRead(pDisk);
- AssertRC(rc2);
-@@ -10870,8 +10869,7 @@ VBOXDDU_DECL(int) VDAsyncWrite(PVBOXHDD
- vdIoCtxFree(pDisk, pIoCtx);
- } while (0);
-
-- if (RT_UNLIKELY(fLockWrite) && ( rc == VINF_VD_ASYNC_IO_FINISHED
-- || rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
-+ if (RT_UNLIKELY(fLockWrite) && (rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
- {
- rc2 = vdThreadFinishWrite(pDisk);
- AssertRC(rc2);
-@@ -10927,8 +10925,7 @@ VBOXDDU_DECL(int) VDAsyncFlush(PVBOXHDD
- vdIoCtxFree(pDisk, pIoCtx);
- } while (0);
-
-- if (RT_UNLIKELY(fLockWrite) && ( rc == VINF_VD_ASYNC_IO_FINISHED
-- || rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
-+ if (RT_UNLIKELY(fLockWrite) && (rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
- {
- rc2 = vdThreadFinishWrite(pDisk);
- AssertRC(rc2);
-@@ -10983,8 +10980,7 @@ VBOXDDU_DECL(int) VDAsyncDiscardRanges(P
- vdIoCtxFree(pDisk, pIoCtx);
- } while (0);
-
-- if (RT_UNLIKELY(fLockWrite) && ( rc == VINF_VD_ASYNC_IO_FINISHED
-- || rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
-+ if (RT_UNLIKELY(fLockWrite) && (rc != VERR_VD_ASYNC_IO_IN_PROGRESS))
- {
- rc2 = vdThreadFinishWrite(pDisk);
- AssertRC(rc2);
---- virtualbox-5.0.16-dfsg.orig/src/VBox/Storage/VMDK.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/Storage/VMDK.cpp
-@@ -3499,7 +3499,7 @@ static int vmdkCreateRawImage(PVMDKIMAGE
- RTPathStripFilename(pszDirname);
- char *pszFullname = RTPathJoinA(pszDirname, pExtent->pszBasename);
- RTStrFree(pszDirname);
-- if (!pszDirname)
-+ if (!pszFullname)
- return VERR_NO_STR_MEMORY;
- pExtent->pszFullname = pszFullname;
- pExtent->enmType = VMDKETYPE_FLAT;
---- virtualbox-5.0.16-dfsg.orig/src/VBox/VMM/VMMAll/GIMAllHv.cpp
-+++ virtualbox-5.0.16-dfsg/src/VBox/VMM/VMMAll/GIMAllHv.cpp
-@@ -144,9 +144,6 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(
- case MSR_GIM_HV_TPR:
- return PDMApicReadMSR(pVM, pVCpu->idCpu, MSR_IA32_X2APIC_TPR, puValue);
-
-- case MSR_GIM_HV_EOI:
-- return PDMApicReadMSR(pVM, pVCpu->idCpu, MSR_IA32_X2APIC_EOI, puValue);
--
- case MSR_GIM_HV_ICR:
- return PDMApicReadMSR(pVM, pVCpu->idCpu, MSR_IA32_X2APIC_ICR, puValue);
-
-@@ -188,6 +185,9 @@ VMM_INT_DECL(VBOXSTRICTRC) gimHvReadMsr(
- case MSR_GIM_HV_CRASH_P3: *puValue = pHv->uCrashP3; return VINF_SUCCESS;
- case MSR_GIM_HV_CRASH_P4: *puValue = pHv->uCrashP4; return VINF_SUCCESS;
-
-+ /* Write-only MSRs: */
-+ case MSR_GIM_HV_EOI:
-+ /* Reserved/unknown MSRs: */
- default:
- {
- #ifdef IN_RING3
---- virtualbox-5.0.16-dfsg.orig/src/bldprogs/VBoxCheckImports.cpp
-+++ virtualbox-5.0.16-dfsg/src/bldprogs/VBoxCheckImports.cpp
-@@ -290,7 +290,7 @@ static bool ParseAndCheckImports(MYIMAGE
-
- static int usage(const char *argv0)
- {
-- printf("usage: %s --image <image> [allowed-dll [..]]\n");
-+ printf("usage: %s --image <image> [allowed-dll [..]]\n", argv0);
- return RTEXITCODE_SUCCESS;
- }
-
-@@ -326,7 +326,7 @@ int main(int argc, char **argv)
- else if ( !strcmp(psz, "--version")
- || !strcmp(psz, "-V"))
- {
-- printf("$Revision: 104941 $\n");
-+ printf("$Revision: 106040 $\n");
- return RTEXITCODE_SUCCESS;
- }
- else
---- virtualbox-5.0.16-dfsg.orig/src/libs/xpcom18a4/python/vboxxpcom.py
-+++ virtualbox-5.0.16-dfsg/src/libs/xpcom18a4/python/vboxxpcom.py
-@@ -8,6 +8,15 @@ General Public License (GPL) as publishe
- Foundation, in version 2 as it comes in the "COPYING" file of the
- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-+
-+The contents of this file may alternatively be used under the terms
-+of the Common Development and Distribution License Version 1.0
-+(CDDL) only, as it comes in the "COPYING.CDDL" file of the
-+VirtualBox OSE distribution, in which case the provisions of the
-+CDDL are applicable instead of those of the GPL.
-+
-+You may elect to license modified versions of this file under the
-+terms and conditions of either the GPL or the CDDL or both.
- """
-
- import xpcom
---- virtualbox-5.0.16-dfsg.orig/src/recompiler/Sun/testmath.c
-+++ virtualbox-5.0.16-dfsg/src/recompiler/Sun/testmath.c
-@@ -69,7 +69,7 @@ static __inline__ void set_cw(unsigned c
- static __inline__ unsigned get_cw(void)
- {
- unsigned cw;
-- __asm __volatile("fstcw %0" : : "m" (cw));
-+ __asm __volatile("fstcw %0" : "=m" (cw));
- return cw & 0xffff;
- }
-
---- virtualbox-5.0.16-dfsg.orig/src/recompiler/exec.c
-+++ virtualbox-5.0.16-dfsg/src/recompiler/exec.c
-@@ -304,7 +304,7 @@ static void page_init(void)
- /* NOTE: we can always suppose that qemu_host_page_size >=
- TARGET_PAGE_SIZE */
- #ifdef VBOX
-- RTMemProtect(code_gen_buffer, sizeof(code_gen_buffer),
-+ RTMemProtect(code_gen_buffer, code_gen_buffer_size,
- RTMEM_PROT_EXEC | RTMEM_PROT_READ | RTMEM_PROT_WRITE);
- qemu_real_host_page_size = PAGE_SIZE;
- #else /* !VBOX */
---- virtualbox-5.0.16-dfsg.orig/src/recompiler/target-i386/translate.c
-+++ virtualbox-5.0.16-dfsg/src/recompiler/target-i386/translate.c
-@@ -2705,7 +2705,7 @@ static void gen_push_T1(DisasContext *s)
- if (s->ss32 && !s->addseg)
- gen_op_mov_reg_A0(1, R_ESP);
- else
-- gen_stack_update(s, (-2) << s->dflag);
-+ gen_stack_update(s, -(2 << s->dflag));
- }
- }
-
-@@ -2758,7 +2758,7 @@ static void gen_pusha(DisasContext *s)
- {
- int i;
- gen_op_movl_A0_reg(R_ESP);
-- gen_op_addl_A0_im(-16 << s->dflag);
-+ gen_op_addl_A0_im(-(16 << s->dflag));
- if (!s->ss32)
- gen_op_andl_A0_ffff();
- tcg_gen_mov_tl(cpu_T[1], cpu_A0);
diff --git a/debian/patches/series b/debian/patches/series
index 8161803..5b32c83 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,4 +14,3 @@
32-disable-guest-version-check.patch
35-libvdeplug-soname.patch
36-fix-vnc-version-string.patch
-fix-graphics-backport.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-virtualbox/virtualbox.git
More information about the Pkg-virtualbox-commits
mailing list