diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
 library for creating windows with OpenGL contexts and managing input and
 events.
 
-The binding is to [GLFW 3.2.1 released 2016-08-18][3].
+The binding is to [GLFW 3.3.0 released 2019-04-15][3].
 
 *These bindings are a lot lower level than intended for normal use.*
 For higher-level GLFW bindings, see [GLFW-b][4].
@@ -24,5 +24,5 @@
 
 [1]: http://www.haskell.org/
 [2]: http://www.glfw.org/
-[3]: http://www.glfw.org/Version-3.2.1-released.html
+[3]: http://www.glfw.org/Version-3.3-released.html
 [4]: https://github.com/bsl/GLFW-b
diff --git a/Test.hs b/Test.hs
--- a/Test.hs
+++ b/Test.hs
@@ -61,7 +61,7 @@
 versionMajor, versionMinor, versionRevision :: Int
 versionMajor    = 3
 versionMinor    = 3
-versionRevision = 0
+versionRevision = 1
 
 giveItTime :: IO ()
 giveItTime = threadDelay 500000
diff --git a/bindings-GLFW.cabal b/bindings-GLFW.cabal
--- a/bindings-GLFW.cabal
+++ b/bindings-GLFW.cabal
@@ -1,5 +1,5 @@
 name:         bindings-GLFW
-version:      3.3.0.0
+version:      3.3.1.0
 category:     Graphics
 
 author:       Brian Lewis <brian@lorf.org>
diff --git a/glfw/deps/glad/gl.h b/glfw/deps/glad/gl.h
--- a/glfw/deps/glad/gl.h
+++ b/glfw/deps/glad/gl.h
@@ -1458,7 +1458,7 @@
 #define GL_ZOOM_Y 0x0D17
 
 
-#include "glad/khrplatform.h"
+#include <glad/khrplatform.h>
 typedef unsigned int GLenum;
 typedef unsigned char GLboolean;
 typedef unsigned int GLbitfield;
diff --git a/glfw/deps/glad/khrplatform.h b/glfw/deps/glad/khrplatform.h
--- a/glfw/deps/glad/khrplatform.h
+++ b/glfw/deps/glad/khrplatform.h
@@ -1,282 +1,282 @@
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2018 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.
- *
- * The master copy of khrplatform.h is maintained in the Khronos EGL
- * Registry repository at https://github.com/KhronosGroup/EGL-Registry
- * The last semantic modification to khrplatform.h was at commit ID:
- *      67a3e0864c2d75ea5287b9f3d2eb74a745936692
- *
- * 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 filing pull requests or issues on
- * the EGL Registry repository linked above.
- *
- *
- * 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__)
-#   define KHRONOS_APICALL __declspec(dllimport)
-#elif defined (__SYMBIAN32__)
-#   define KHRONOS_APICALL IMPORT_C
-#elif defined(__ANDROID__)
-#   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_ */
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2018 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.
+ *
+ * The master copy of khrplatform.h is maintained in the Khronos EGL
+ * Registry repository at https://github.com/KhronosGroup/EGL-Registry
+ * The last semantic modification to khrplatform.h was at commit ID:
+ *      67a3e0864c2d75ea5287b9f3d2eb74a745936692
+ *
+ * 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 filing pull requests or issues on
+ * the EGL Registry repository linked above.
+ *
+ *
+ * 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__)
+#   define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+#   define KHRONOS_APICALL IMPORT_C
+#elif defined(__ANDROID__)
+#   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_ */
diff --git a/glfw/deps/glad/vk_platform.h b/glfw/deps/glad/vk_platform.h
--- a/glfw/deps/glad/vk_platform.h
+++ b/glfw/deps/glad/vk_platform.h
@@ -1,92 +1,92 @@
-/* */
-/* File: vk_platform.h */
-/* */
-/*
-** Copyright (c) 2014-2017 The Khronos Group Inc.
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
-
-
-#ifndef VK_PLATFORM_H_
-#define VK_PLATFORM_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/*
-***************************************************************************************************
-*   Platform-specific directives and type declarations
-***************************************************************************************************
-*/
-
-/* Platform-specific calling convention macros.
- *
- * Platforms should define these so that Vulkan clients call Vulkan commands
- * with the same calling conventions that the Vulkan implementation expects.
- *
- * VKAPI_ATTR - Placed before the return type in function declarations.
- *              Useful for C++11 and GCC/Clang-style function attribute syntax.
- * VKAPI_CALL - Placed after the return type in function declarations.
- *              Useful for MSVC-style calling convention syntax.
- * VKAPI_PTR  - Placed between the '(' and '*' in function pointer types.
- *
- * Function declaration:  VKAPI_ATTR void VKAPI_CALL vkCommand(void);
- * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
- */
-#if defined(_WIN32)
-    /* On Windows, Vulkan commands use the stdcall convention */
-    #define VKAPI_ATTR
-    #define VKAPI_CALL __stdcall
-    #define VKAPI_PTR  VKAPI_CALL
-#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
-    #error "Vulkan isn't supported for the 'armeabi' NDK ABI"
-#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
-    /* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */
-    /* calling convention, i.e. float parameters are passed in registers. This */
-    /* is true even if the rest of the application passes floats on the stack, */
-    /* as it does by default when compiling for the armeabi-v7a NDK ABI. */
-    #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
-    #define VKAPI_CALL
-    #define VKAPI_PTR  VKAPI_ATTR
-#else
-    /* On other platforms, use the default calling convention */
-    #define VKAPI_ATTR
-    #define VKAPI_CALL
-    #define VKAPI_PTR
-#endif
-
-#include <stddef.h>
-
-#if !defined(VK_NO_STDINT_H)
-    #if defined(_MSC_VER) && (_MSC_VER < 1600)
-        typedef signed   __int8  int8_t;
-        typedef unsigned __int8  uint8_t;
-        typedef signed   __int16 int16_t;
-        typedef unsigned __int16 uint16_t;
-        typedef signed   __int32 int32_t;
-        typedef unsigned __int32 uint32_t;
-        typedef signed   __int64 int64_t;
-        typedef unsigned __int64 uint64_t;
-    #else
-        #include <stdint.h>
-    #endif
-#endif /* !defined(VK_NO_STDINT_H) */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif
+/* */
+/* File: vk_platform.h */
+/* */
+/*
+** Copyright (c) 2014-2017 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+
+#ifndef VK_PLATFORM_H_
+#define VK_PLATFORM_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/*
+***************************************************************************************************
+*   Platform-specific directives and type declarations
+***************************************************************************************************
+*/
+
+/* Platform-specific calling convention macros.
+ *
+ * Platforms should define these so that Vulkan clients call Vulkan commands
+ * with the same calling conventions that the Vulkan implementation expects.
+ *
+ * VKAPI_ATTR - Placed before the return type in function declarations.
+ *              Useful for C++11 and GCC/Clang-style function attribute syntax.
+ * VKAPI_CALL - Placed after the return type in function declarations.
+ *              Useful for MSVC-style calling convention syntax.
+ * VKAPI_PTR  - Placed between the '(' and '*' in function pointer types.
+ *
+ * Function declaration:  VKAPI_ATTR void VKAPI_CALL vkCommand(void);
+ * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
+ */
+#if defined(_WIN32)
+    /* On Windows, Vulkan commands use the stdcall convention */
+    #define VKAPI_ATTR
+    #define VKAPI_CALL __stdcall
+    #define VKAPI_PTR  VKAPI_CALL
+#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
+    #error "Vulkan isn't supported for the 'armeabi' NDK ABI"
+#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
+    /* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */
+    /* calling convention, i.e. float parameters are passed in registers. This */
+    /* is true even if the rest of the application passes floats on the stack, */
+    /* as it does by default when compiling for the armeabi-v7a NDK ABI. */
+    #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
+    #define VKAPI_CALL
+    #define VKAPI_PTR  VKAPI_ATTR
+#else
+    /* On other platforms, use the default calling convention */
+    #define VKAPI_ATTR
+    #define VKAPI_CALL
+    #define VKAPI_PTR
+#endif
+
+#include <stddef.h>
+
+#if !defined(VK_NO_STDINT_H)
+    #if defined(_MSC_VER) && (_MSC_VER < 1600)
+        typedef signed   __int8  int8_t;
+        typedef unsigned __int8  uint8_t;
+        typedef signed   __int16 int16_t;
+        typedef unsigned __int16 uint16_t;
+        typedef signed   __int32 int32_t;
+        typedef unsigned __int32 uint32_t;
+        typedef signed   __int64 int64_t;
+        typedef unsigned __int64 uint64_t;
+    #else
+        #include <stdint.h>
+    #endif
+#endif /* !defined(VK_NO_STDINT_H) */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif
diff --git a/glfw/deps/glad/vulkan.h b/glfw/deps/glad/vulkan.h
--- a/glfw/deps/glad/vulkan.h
+++ b/glfw/deps/glad/vulkan.h
@@ -1,3480 +1,3480 @@
-/**
- * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:38 2019
- *
- * Generator: C/C++
- * Specification: vk
- * Extensions: 3
- *
- * APIs:
- *  - vulkan=1.1
- *
- * Options:
- *  - MX_GLOBAL = False
- *  - LOADER = False
- *  - ALIAS = False
- *  - HEADER_ONLY = False
- *  - DEBUG = False
- *  - MX = False
- *
- * Commandline:
- *    --api='vulkan=1.1' --extensions='VK_EXT_debug_report,VK_KHR_surface,VK_KHR_swapchain' c
- *
- * Online:
- *    http://glad.sh/#api=vulkan%3D1.1&extensions=VK_EXT_debug_report%2CVK_KHR_surface%2CVK_KHR_swapchain&generator=c&options=
- *
- */
-
-#ifndef GLAD_VULKAN_H_
-#define GLAD_VULKAN_H_
-
-#ifdef VULKAN_H_
-    #error  header already included (API: vulkan), remove previous include!
-#endif
-#define VULKAN_H_ 1
-
-#ifdef VULKAN_CORE_H_
-    #error  header already included (API: vulkan), remove previous include!
-#endif
-#define VULKAN_CORE_H_ 1
-
-
-#define GLAD_VULKAN
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef GLAD_PLATFORM_H_
-#define GLAD_PLATFORM_H_
-
-#ifndef GLAD_PLATFORM_WIN32
-  #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
-    #define GLAD_PLATFORM_WIN32 1
-  #else
-    #define GLAD_PLATFORM_WIN32 0
-  #endif
-#endif
-
-#ifndef GLAD_PLATFORM_APPLE
-  #ifdef __APPLE__
-    #define GLAD_PLATFORM_APPLE 1
-  #else
-    #define GLAD_PLATFORM_APPLE 0
-  #endif
-#endif
-
-#ifndef GLAD_PLATFORM_EMSCRIPTEN
-  #ifdef __EMSCRIPTEN__
-    #define GLAD_PLATFORM_EMSCRIPTEN 1
-  #else
-    #define GLAD_PLATFORM_EMSCRIPTEN 0
-  #endif
-#endif
-
-#ifndef GLAD_PLATFORM_UWP
-  #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
-    #ifdef __has_include
-      #if __has_include(<winapifamily.h>)
-        #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
-      #endif
-    #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
-      #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
-    #endif
-  #endif
-
-  #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
-    #include <winapifamily.h>
-    #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-      #define GLAD_PLATFORM_UWP 1
-    #endif
-  #endif
-
-  #ifndef GLAD_PLATFORM_UWP
-    #define GLAD_PLATFORM_UWP 0
-  #endif
-#endif
-
-#ifdef __GNUC__
-  #define GLAD_GNUC_EXTENSION __extension__
-#else
-  #define GLAD_GNUC_EXTENSION
-#endif
-
-#ifndef GLAD_API_CALL
-  #if defined(GLAD_API_CALL_EXPORT)
-    #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
-      #if defined(GLAD_API_CALL_EXPORT_BUILD)
-        #if defined(__GNUC__)
-          #define GLAD_API_CALL __attribute__ ((dllexport)) extern
-        #else
-          #define GLAD_API_CALL __declspec(dllexport) extern
-        #endif
-      #else
-        #if defined(__GNUC__)
-          #define GLAD_API_CALL __attribute__ ((dllimport)) extern
-        #else
-          #define GLAD_API_CALL __declspec(dllimport) extern
-        #endif
-      #endif
-    #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
-      #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
-    #else
-      #define GLAD_API_CALL extern
-    #endif
-  #else
-    #define GLAD_API_CALL extern
-  #endif
-#endif
-
-#ifdef APIENTRY
-  #define GLAD_API_PTR APIENTRY
-#elif GLAD_PLATFORM_WIN32
-  #define GLAD_API_PTR __stdcall
-#else
-  #define GLAD_API_PTR
-#endif
-
-#ifndef GLAPI
-#define GLAPI GLAD_API_CALL
-#endif
-
-#ifndef GLAPIENTRY
-#define GLAPIENTRY GLAD_API_PTR
-#endif
-
-
-#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
-#define GLAD_VERSION_MAJOR(version) (version / 10000)
-#define GLAD_VERSION_MINOR(version) (version % 10000)
-
-typedef void (*GLADapiproc)(void);
-
-typedef GLADapiproc (*GLADloadfunc)(const char *name);
-typedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);
-
-typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
-typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
-
-#endif /* GLAD_PLATFORM_H_ */
-
-#define VK_ATTACHMENT_UNUSED (~0U)
-#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
-#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
-#define VK_FALSE 0
-#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
-#define VK_KHR_SURFACE_SPEC_VERSION 25
-#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
-#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
-#define VK_LOD_CLAMP_NONE 1000.0f
-#define VK_LUID_SIZE 8
-#define VK_MAX_DESCRIPTION_SIZE 256
-#define VK_MAX_DEVICE_GROUP_SIZE 32
-#define VK_MAX_EXTENSION_NAME_SIZE 256
-#define VK_MAX_MEMORY_HEAPS 16
-#define VK_MAX_MEMORY_TYPES 32
-#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
-#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
-#define VK_QUEUE_FAMILY_IGNORED (~0U)
-#define VK_REMAINING_ARRAY_LAYERS (~0U)
-#define VK_REMAINING_MIP_LEVELS (~0U)
-#define VK_SUBPASS_EXTERNAL (~0U)
-#define VK_TRUE 1
-#define VK_UUID_SIZE 16
-#define VK_WHOLE_SIZE (~0ULL)
-
-
-#include <glad/vk_platform.h>
-#define VK_MAKE_VERSION(major, minor, patch) \
-    (((major) << 22) | ((minor) << 12) | (patch))
-#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
-#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
-#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
-/* DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. */
-/*#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 */
-/* Vulkan 1.0 version number */
-#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)/* Patch version should always be set to 0 */
-/* Vulkan 1.1 version number */
-#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)/* Patch version should always be set to 0 */
-/* Version of this file */
-#define VK_HEADER_VERSION 106
-#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
-#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
-        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
-        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
-#endif
-#endif
-#define VK_NULL_HANDLE 0
-
-
-
-
-
-
-
-
-VK_DEFINE_HANDLE(VkInstance)
-VK_DEFINE_HANDLE(VkPhysicalDevice)
-VK_DEFINE_HANDLE(VkDevice)
-VK_DEFINE_HANDLE(VkQueue)
-VK_DEFINE_HANDLE(VkCommandBuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
-typedef enum VkAttachmentLoadOp {
-    VK_ATTACHMENT_LOAD_OP_LOAD = 0,
-    VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
-    VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2
-} VkAttachmentLoadOp;
-typedef enum VkAttachmentStoreOp {
-    VK_ATTACHMENT_STORE_OP_STORE = 0,
-    VK_ATTACHMENT_STORE_OP_DONT_CARE = 1
-} VkAttachmentStoreOp;
-typedef enum VkBlendFactor {
-    VK_BLEND_FACTOR_ZERO = 0,
-    VK_BLEND_FACTOR_ONE = 1,
-    VK_BLEND_FACTOR_SRC_COLOR = 2,
-    VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
-    VK_BLEND_FACTOR_DST_COLOR = 4,
-    VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
-    VK_BLEND_FACTOR_SRC_ALPHA = 6,
-    VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
-    VK_BLEND_FACTOR_DST_ALPHA = 8,
-    VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
-    VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
-    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
-    VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
-    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
-    VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
-    VK_BLEND_FACTOR_SRC1_COLOR = 15,
-    VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
-    VK_BLEND_FACTOR_SRC1_ALPHA = 17,
-    VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18
-} VkBlendFactor;
-typedef enum VkBlendOp {
-    VK_BLEND_OP_ADD = 0,
-    VK_BLEND_OP_SUBTRACT = 1,
-    VK_BLEND_OP_REVERSE_SUBTRACT = 2,
-    VK_BLEND_OP_MIN = 3,
-    VK_BLEND_OP_MAX = 4
-} VkBlendOp;
-typedef enum VkBorderColor {
-    VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
-    VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
-    VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
-    VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
-    VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
-    VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5
-} VkBorderColor;
-
-typedef enum VkPipelineCacheHeaderVersion {
-    VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1
-} VkPipelineCacheHeaderVersion;
-
-typedef enum VkDeviceQueueCreateFlagBits {
-    VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 1
-} VkDeviceQueueCreateFlagBits;
-typedef enum VkBufferCreateFlagBits {
-    VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 1,
-    VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 2,
-    VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 4,
-    VK_BUFFER_CREATE_PROTECTED_BIT = 8
-} VkBufferCreateFlagBits;
-typedef enum VkBufferUsageFlagBits {
-    VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 1,
-    VK_BUFFER_USAGE_TRANSFER_DST_BIT = 2,
-    VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 4,
-    VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 8,
-    VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 16,
-    VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 32,
-    VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 64,
-    VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 128,
-    VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 256
-} VkBufferUsageFlagBits;
-typedef enum VkColorComponentFlagBits {
-    VK_COLOR_COMPONENT_R_BIT = 1,
-    VK_COLOR_COMPONENT_G_BIT = 2,
-    VK_COLOR_COMPONENT_B_BIT = 4,
-    VK_COLOR_COMPONENT_A_BIT = 8
-} VkColorComponentFlagBits;
-typedef enum VkComponentSwizzle {
-    VK_COMPONENT_SWIZZLE_IDENTITY = 0,
-    VK_COMPONENT_SWIZZLE_ZERO = 1,
-    VK_COMPONENT_SWIZZLE_ONE = 2,
-    VK_COMPONENT_SWIZZLE_R = 3,
-    VK_COMPONENT_SWIZZLE_G = 4,
-    VK_COMPONENT_SWIZZLE_B = 5,
-    VK_COMPONENT_SWIZZLE_A = 6
-} VkComponentSwizzle;
-typedef enum VkCommandPoolCreateFlagBits {
-    VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 1,
-    VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 2,
-    VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 4
-} VkCommandPoolCreateFlagBits;
-typedef enum VkCommandPoolResetFlagBits {
-    VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 1
-} VkCommandPoolResetFlagBits;
-typedef enum VkCommandBufferResetFlagBits {
-    VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 1
-} VkCommandBufferResetFlagBits;
-typedef enum VkCommandBufferLevel {
-    VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
-    VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1
-} VkCommandBufferLevel;
-typedef enum VkCommandBufferUsageFlagBits {
-    VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 1,
-    VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 2,
-    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 4
-} VkCommandBufferUsageFlagBits;
-typedef enum VkCompareOp {
-    VK_COMPARE_OP_NEVER = 0,
-    VK_COMPARE_OP_LESS = 1,
-    VK_COMPARE_OP_EQUAL = 2,
-    VK_COMPARE_OP_LESS_OR_EQUAL = 3,
-    VK_COMPARE_OP_GREATER = 4,
-    VK_COMPARE_OP_NOT_EQUAL = 5,
-    VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
-    VK_COMPARE_OP_ALWAYS = 7
-} VkCompareOp;
-typedef enum VkCullModeFlagBits {
-    VK_CULL_MODE_NONE = 0,
-    VK_CULL_MODE_FRONT_BIT = 1,
-    VK_CULL_MODE_BACK_BIT = 2,
-    VK_CULL_MODE_FRONT_AND_BACK = 0x00000003
-} VkCullModeFlagBits;
-typedef enum VkDescriptorType {
-    VK_DESCRIPTOR_TYPE_SAMPLER = 0,
-    VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
-    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
-    VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
-    VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
-    VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
-    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
-    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
-    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
-    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
-    VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10
-} VkDescriptorType;
-typedef enum VkDynamicState {
-    VK_DYNAMIC_STATE_VIEWPORT = 0,
-    VK_DYNAMIC_STATE_SCISSOR = 1,
-    VK_DYNAMIC_STATE_LINE_WIDTH = 2,
-    VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
-    VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
-    VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
-    VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
-    VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
-    VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
-    VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1)
-} VkDynamicState;
-typedef enum VkFenceCreateFlagBits {
-    VK_FENCE_CREATE_SIGNALED_BIT = 1
-} VkFenceCreateFlagBits;
-typedef enum VkPolygonMode {
-    VK_POLYGON_MODE_FILL = 0,
-    VK_POLYGON_MODE_LINE = 1,
-    VK_POLYGON_MODE_POINT = 2
-} VkPolygonMode;
-typedef enum VkFormat {
-    VK_FORMAT_UNDEFINED = 0,
-    VK_FORMAT_R4G4_UNORM_PACK8 = 1,
-    VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
-    VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
-    VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
-    VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
-    VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
-    VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
-    VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
-    VK_FORMAT_R8_UNORM = 9,
-    VK_FORMAT_R8_SNORM = 10,
-    VK_FORMAT_R8_USCALED = 11,
-    VK_FORMAT_R8_SSCALED = 12,
-    VK_FORMAT_R8_UINT = 13,
-    VK_FORMAT_R8_SINT = 14,
-    VK_FORMAT_R8_SRGB = 15,
-    VK_FORMAT_R8G8_UNORM = 16,
-    VK_FORMAT_R8G8_SNORM = 17,
-    VK_FORMAT_R8G8_USCALED = 18,
-    VK_FORMAT_R8G8_SSCALED = 19,
-    VK_FORMAT_R8G8_UINT = 20,
-    VK_FORMAT_R8G8_SINT = 21,
-    VK_FORMAT_R8G8_SRGB = 22,
-    VK_FORMAT_R8G8B8_UNORM = 23,
-    VK_FORMAT_R8G8B8_SNORM = 24,
-    VK_FORMAT_R8G8B8_USCALED = 25,
-    VK_FORMAT_R8G8B8_SSCALED = 26,
-    VK_FORMAT_R8G8B8_UINT = 27,
-    VK_FORMAT_R8G8B8_SINT = 28,
-    VK_FORMAT_R8G8B8_SRGB = 29,
-    VK_FORMAT_B8G8R8_UNORM = 30,
-    VK_FORMAT_B8G8R8_SNORM = 31,
-    VK_FORMAT_B8G8R8_USCALED = 32,
-    VK_FORMAT_B8G8R8_SSCALED = 33,
-    VK_FORMAT_B8G8R8_UINT = 34,
-    VK_FORMAT_B8G8R8_SINT = 35,
-    VK_FORMAT_B8G8R8_SRGB = 36,
-    VK_FORMAT_R8G8B8A8_UNORM = 37,
-    VK_FORMAT_R8G8B8A8_SNORM = 38,
-    VK_FORMAT_R8G8B8A8_USCALED = 39,
-    VK_FORMAT_R8G8B8A8_SSCALED = 40,
-    VK_FORMAT_R8G8B8A8_UINT = 41,
-    VK_FORMAT_R8G8B8A8_SINT = 42,
-    VK_FORMAT_R8G8B8A8_SRGB = 43,
-    VK_FORMAT_B8G8R8A8_UNORM = 44,
-    VK_FORMAT_B8G8R8A8_SNORM = 45,
-    VK_FORMAT_B8G8R8A8_USCALED = 46,
-    VK_FORMAT_B8G8R8A8_SSCALED = 47,
-    VK_FORMAT_B8G8R8A8_UINT = 48,
-    VK_FORMAT_B8G8R8A8_SINT = 49,
-    VK_FORMAT_B8G8R8A8_SRGB = 50,
-    VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
-    VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
-    VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
-    VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
-    VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
-    VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
-    VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
-    VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
-    VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
-    VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
-    VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
-    VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
-    VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
-    VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
-    VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
-    VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
-    VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
-    VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
-    VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
-    VK_FORMAT_R16_UNORM = 70,
-    VK_FORMAT_R16_SNORM = 71,
-    VK_FORMAT_R16_USCALED = 72,
-    VK_FORMAT_R16_SSCALED = 73,
-    VK_FORMAT_R16_UINT = 74,
-    VK_FORMAT_R16_SINT = 75,
-    VK_FORMAT_R16_SFLOAT = 76,
-    VK_FORMAT_R16G16_UNORM = 77,
-    VK_FORMAT_R16G16_SNORM = 78,
-    VK_FORMAT_R16G16_USCALED = 79,
-    VK_FORMAT_R16G16_SSCALED = 80,
-    VK_FORMAT_R16G16_UINT = 81,
-    VK_FORMAT_R16G16_SINT = 82,
-    VK_FORMAT_R16G16_SFLOAT = 83,
-    VK_FORMAT_R16G16B16_UNORM = 84,
-    VK_FORMAT_R16G16B16_SNORM = 85,
-    VK_FORMAT_R16G16B16_USCALED = 86,
-    VK_FORMAT_R16G16B16_SSCALED = 87,
-    VK_FORMAT_R16G16B16_UINT = 88,
-    VK_FORMAT_R16G16B16_SINT = 89,
-    VK_FORMAT_R16G16B16_SFLOAT = 90,
-    VK_FORMAT_R16G16B16A16_UNORM = 91,
-    VK_FORMAT_R16G16B16A16_SNORM = 92,
-    VK_FORMAT_R16G16B16A16_USCALED = 93,
-    VK_FORMAT_R16G16B16A16_SSCALED = 94,
-    VK_FORMAT_R16G16B16A16_UINT = 95,
-    VK_FORMAT_R16G16B16A16_SINT = 96,
-    VK_FORMAT_R16G16B16A16_SFLOAT = 97,
-    VK_FORMAT_R32_UINT = 98,
-    VK_FORMAT_R32_SINT = 99,
-    VK_FORMAT_R32_SFLOAT = 100,
-    VK_FORMAT_R32G32_UINT = 101,
-    VK_FORMAT_R32G32_SINT = 102,
-    VK_FORMAT_R32G32_SFLOAT = 103,
-    VK_FORMAT_R32G32B32_UINT = 104,
-    VK_FORMAT_R32G32B32_SINT = 105,
-    VK_FORMAT_R32G32B32_SFLOAT = 106,
-    VK_FORMAT_R32G32B32A32_UINT = 107,
-    VK_FORMAT_R32G32B32A32_SINT = 108,
-    VK_FORMAT_R32G32B32A32_SFLOAT = 109,
-    VK_FORMAT_R64_UINT = 110,
-    VK_FORMAT_R64_SINT = 111,
-    VK_FORMAT_R64_SFLOAT = 112,
-    VK_FORMAT_R64G64_UINT = 113,
-    VK_FORMAT_R64G64_SINT = 114,
-    VK_FORMAT_R64G64_SFLOAT = 115,
-    VK_FORMAT_R64G64B64_UINT = 116,
-    VK_FORMAT_R64G64B64_SINT = 117,
-    VK_FORMAT_R64G64B64_SFLOAT = 118,
-    VK_FORMAT_R64G64B64A64_UINT = 119,
-    VK_FORMAT_R64G64B64A64_SINT = 120,
-    VK_FORMAT_R64G64B64A64_SFLOAT = 121,
-    VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
-    VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
-    VK_FORMAT_D16_UNORM = 124,
-    VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
-    VK_FORMAT_D32_SFLOAT = 126,
-    VK_FORMAT_S8_UINT = 127,
-    VK_FORMAT_D16_UNORM_S8_UINT = 128,
-    VK_FORMAT_D24_UNORM_S8_UINT = 129,
-    VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
-    VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
-    VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
-    VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
-    VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
-    VK_FORMAT_BC2_UNORM_BLOCK = 135,
-    VK_FORMAT_BC2_SRGB_BLOCK = 136,
-    VK_FORMAT_BC3_UNORM_BLOCK = 137,
-    VK_FORMAT_BC3_SRGB_BLOCK = 138,
-    VK_FORMAT_BC4_UNORM_BLOCK = 139,
-    VK_FORMAT_BC4_SNORM_BLOCK = 140,
-    VK_FORMAT_BC5_UNORM_BLOCK = 141,
-    VK_FORMAT_BC5_SNORM_BLOCK = 142,
-    VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
-    VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
-    VK_FORMAT_BC7_UNORM_BLOCK = 145,
-    VK_FORMAT_BC7_SRGB_BLOCK = 146,
-    VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
-    VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
-    VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
-    VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
-    VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
-    VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
-    VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
-    VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
-    VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
-    VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
-    VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
-    VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
-    VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
-    VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
-    VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
-    VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
-    VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
-    VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
-    VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
-    VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
-    VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
-    VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
-    VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
-    VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
-    VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
-    VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
-    VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
-    VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
-    VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
-    VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
-    VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
-    VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
-    VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
-    VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
-    VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
-    VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
-    VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
-    VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
-    VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
-    VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
-    VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
-    VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
-    VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
-    VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
-    VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
-    VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
-    VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
-    VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
-    VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
-    VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
-    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
-    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
-    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
-    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
-    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
-    VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
-    VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
-    VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
-    VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
-    VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
-    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
-    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
-    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
-    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
-    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
-    VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
-    VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
-    VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
-    VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
-    VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
-    VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
-    VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033
-} VkFormat;
-typedef enum VkFormatFeatureFlagBits {
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 1,
-    VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 2,
-    VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 4,
-    VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 8,
-    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 16,
-    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 32,
-    VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 64,
-    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 128,
-    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 256,
-    VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 512,
-    VK_FORMAT_FEATURE_BLIT_SRC_BIT = 1024,
-    VK_FORMAT_FEATURE_BLIT_DST_BIT = 2048,
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 4096,
-    VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 16384,
-    VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 32768,
-    VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 131072,
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 262144,
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 524288,
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1048576,
-    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 2097152,
-    VK_FORMAT_FEATURE_DISJOINT_BIT = 4194304,
-    VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 8388608
-} VkFormatFeatureFlagBits;
-typedef enum VkFrontFace {
-    VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
-    VK_FRONT_FACE_CLOCKWISE = 1
-} VkFrontFace;
-typedef enum VkImageAspectFlagBits {
-    VK_IMAGE_ASPECT_COLOR_BIT = 1,
-    VK_IMAGE_ASPECT_DEPTH_BIT = 2,
-    VK_IMAGE_ASPECT_STENCIL_BIT = 4,
-    VK_IMAGE_ASPECT_METADATA_BIT = 8,
-    VK_IMAGE_ASPECT_PLANE_0_BIT = 16,
-    VK_IMAGE_ASPECT_PLANE_1_BIT = 32,
-    VK_IMAGE_ASPECT_PLANE_2_BIT = 64
-} VkImageAspectFlagBits;
-typedef enum VkImageCreateFlagBits {
-    VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 1,
-    VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 2,
-    VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 4,
-    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 8,
-    VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 16,
-    VK_IMAGE_CREATE_ALIAS_BIT = 1024,
-    VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 64,
-    VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 32,
-    VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 128,
-    VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 256,
-    VK_IMAGE_CREATE_PROTECTED_BIT = 2048,
-    VK_IMAGE_CREATE_DISJOINT_BIT = 512
-} VkImageCreateFlagBits;
-typedef enum VkImageLayout {
-    VK_IMAGE_LAYOUT_UNDEFINED = 0,
-    VK_IMAGE_LAYOUT_GENERAL = 1,
-    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
-    VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
-    VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
-    VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
-    VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
-    VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
-    VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
-    VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
-    VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
-    VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002
-} VkImageLayout;
-typedef enum VkImageTiling {
-    VK_IMAGE_TILING_OPTIMAL = 0,
-    VK_IMAGE_TILING_LINEAR = 1
-} VkImageTiling;
-typedef enum VkImageType {
-    VK_IMAGE_TYPE_1D = 0,
-    VK_IMAGE_TYPE_2D = 1,
-    VK_IMAGE_TYPE_3D = 2
-} VkImageType;
-typedef enum VkImageUsageFlagBits {
-    VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 1,
-    VK_IMAGE_USAGE_TRANSFER_DST_BIT = 2,
-    VK_IMAGE_USAGE_SAMPLED_BIT = 4,
-    VK_IMAGE_USAGE_STORAGE_BIT = 8,
-    VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 16,
-    VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 32,
-    VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 64,
-    VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 128
-} VkImageUsageFlagBits;
-
-typedef enum VkImageViewType {
-    VK_IMAGE_VIEW_TYPE_1D = 0,
-    VK_IMAGE_VIEW_TYPE_2D = 1,
-    VK_IMAGE_VIEW_TYPE_3D = 2,
-    VK_IMAGE_VIEW_TYPE_CUBE = 3,
-    VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
-    VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
-    VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6
-} VkImageViewType;
-typedef enum VkSharingMode {
-    VK_SHARING_MODE_EXCLUSIVE = 0,
-    VK_SHARING_MODE_CONCURRENT = 1
-} VkSharingMode;
-typedef enum VkIndexType {
-    VK_INDEX_TYPE_UINT16 = 0,
-    VK_INDEX_TYPE_UINT32 = 1
-} VkIndexType;
-typedef enum VkLogicOp {
-    VK_LOGIC_OP_CLEAR = 0,
-    VK_LOGIC_OP_AND = 1,
-    VK_LOGIC_OP_AND_REVERSE = 2,
-    VK_LOGIC_OP_COPY = 3,
-    VK_LOGIC_OP_AND_INVERTED = 4,
-    VK_LOGIC_OP_NO_OP = 5,
-    VK_LOGIC_OP_XOR = 6,
-    VK_LOGIC_OP_OR = 7,
-    VK_LOGIC_OP_NOR = 8,
-    VK_LOGIC_OP_EQUIVALENT = 9,
-    VK_LOGIC_OP_INVERT = 10,
-    VK_LOGIC_OP_OR_REVERSE = 11,
-    VK_LOGIC_OP_COPY_INVERTED = 12,
-    VK_LOGIC_OP_OR_INVERTED = 13,
-    VK_LOGIC_OP_NAND = 14,
-    VK_LOGIC_OP_SET = 15
-} VkLogicOp;
-typedef enum VkMemoryHeapFlagBits {
-    VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 1,
-    VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 2
-} VkMemoryHeapFlagBits;
-typedef enum VkAccessFlagBits {
-    VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 1,
-    VK_ACCESS_INDEX_READ_BIT = 2,
-    VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 4,
-    VK_ACCESS_UNIFORM_READ_BIT = 8,
-    VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 16,
-    VK_ACCESS_SHADER_READ_BIT = 32,
-    VK_ACCESS_SHADER_WRITE_BIT = 64,
-    VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 128,
-    VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 256,
-    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 512,
-    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1024,
-    VK_ACCESS_TRANSFER_READ_BIT = 2048,
-    VK_ACCESS_TRANSFER_WRITE_BIT = 4096,
-    VK_ACCESS_HOST_READ_BIT = 8192,
-    VK_ACCESS_HOST_WRITE_BIT = 16384,
-    VK_ACCESS_MEMORY_READ_BIT = 32768,
-    VK_ACCESS_MEMORY_WRITE_BIT = 65536
-} VkAccessFlagBits;
-typedef enum VkMemoryPropertyFlagBits {
-    VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 1,
-    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 2,
-    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 4,
-    VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 8,
-    VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 16,
-    VK_MEMORY_PROPERTY_PROTECTED_BIT = 32
-} VkMemoryPropertyFlagBits;
-typedef enum VkPhysicalDeviceType {
-    VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
-    VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
-    VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
-    VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
-    VK_PHYSICAL_DEVICE_TYPE_CPU = 4
-} VkPhysicalDeviceType;
-typedef enum VkPipelineBindPoint {
-    VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
-    VK_PIPELINE_BIND_POINT_COMPUTE = 1
-} VkPipelineBindPoint;
-typedef enum VkPipelineCreateFlagBits {
-    VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 1,
-    VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 2,
-    VK_PIPELINE_CREATE_DERIVATIVE_BIT = 4,
-    VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 8,
-    VK_PIPELINE_CREATE_DISPATCH_BASE = 16
-} VkPipelineCreateFlagBits;
-typedef enum VkPrimitiveTopology {
-    VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
-    VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
-    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
-    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
-    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
-    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
-    VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
-    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
-    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
-    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
-    VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10
-} VkPrimitiveTopology;
-typedef enum VkQueryControlFlagBits {
-    VK_QUERY_CONTROL_PRECISE_BIT = 1
-} VkQueryControlFlagBits;
-typedef enum VkQueryPipelineStatisticFlagBits {
-    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 1,
-    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 2,
-    VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 4,
-    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 8,
-    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 16,
-    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 32,
-    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 64,
-    VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 128,
-    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 256,
-    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 512,
-    VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 1024
-} VkQueryPipelineStatisticFlagBits;
-typedef enum VkQueryResultFlagBits {
-    VK_QUERY_RESULT_64_BIT = 1,
-    VK_QUERY_RESULT_WAIT_BIT = 2,
-    VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 4,
-    VK_QUERY_RESULT_PARTIAL_BIT = 8
-} VkQueryResultFlagBits;
-typedef enum VkQueryType {
-    VK_QUERY_TYPE_OCCLUSION = 0,
-    VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
-    VK_QUERY_TYPE_TIMESTAMP = 2
-} VkQueryType;
-typedef enum VkQueueFlagBits {
-    VK_QUEUE_GRAPHICS_BIT = 1,
-    VK_QUEUE_COMPUTE_BIT = 2,
-    VK_QUEUE_TRANSFER_BIT = 4,
-    VK_QUEUE_SPARSE_BINDING_BIT = 8,
-    VK_QUEUE_PROTECTED_BIT = 16
-} VkQueueFlagBits;
-typedef enum VkSubpassContents {
-    VK_SUBPASS_CONTENTS_INLINE = 0,
-    VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1
-} VkSubpassContents;
-typedef enum VkResult {
-    VK_SUCCESS = 0,
-    VK_NOT_READY = 1,
-    VK_TIMEOUT = 2,
-    VK_EVENT_SET = 3,
-    VK_EVENT_RESET = 4,
-    VK_INCOMPLETE = 5,
-    VK_ERROR_OUT_OF_HOST_MEMORY = -1,
-    VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
-    VK_ERROR_INITIALIZATION_FAILED = -3,
-    VK_ERROR_DEVICE_LOST = -4,
-    VK_ERROR_MEMORY_MAP_FAILED = -5,
-    VK_ERROR_LAYER_NOT_PRESENT = -6,
-    VK_ERROR_EXTENSION_NOT_PRESENT = -7,
-    VK_ERROR_FEATURE_NOT_PRESENT = -8,
-    VK_ERROR_INCOMPATIBLE_DRIVER = -9,
-    VK_ERROR_TOO_MANY_OBJECTS = -10,
-    VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
-    VK_ERROR_FRAGMENTED_POOL = -12,
-    VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,
-    VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,
-    VK_ERROR_SURFACE_LOST_KHR = -1000000000,
-    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
-    VK_SUBOPTIMAL_KHR = 1000001003,
-    VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
-    VK_ERROR_VALIDATION_FAILED_EXT = -1000011001
-} VkResult;
-typedef enum VkShaderStageFlagBits {
-    VK_SHADER_STAGE_VERTEX_BIT = 1,
-    VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 2,
-    VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 4,
-    VK_SHADER_STAGE_GEOMETRY_BIT = 8,
-    VK_SHADER_STAGE_FRAGMENT_BIT = 16,
-    VK_SHADER_STAGE_COMPUTE_BIT = 32,
-    VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
-    VK_SHADER_STAGE_ALL = 0x7FFFFFFF
-} VkShaderStageFlagBits;
-typedef enum VkSparseMemoryBindFlagBits {
-    VK_SPARSE_MEMORY_BIND_METADATA_BIT = 1
-} VkSparseMemoryBindFlagBits;
-typedef enum VkStencilFaceFlagBits {
-    VK_STENCIL_FACE_FRONT_BIT = 1,
-    VK_STENCIL_FACE_BACK_BIT = 2,
-    VK_STENCIL_FRONT_AND_BACK = 0x00000003
-} VkStencilFaceFlagBits;
-typedef enum VkStencilOp {
-    VK_STENCIL_OP_KEEP = 0,
-    VK_STENCIL_OP_ZERO = 1,
-    VK_STENCIL_OP_REPLACE = 2,
-    VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
-    VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
-    VK_STENCIL_OP_INVERT = 5,
-    VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
-    VK_STENCIL_OP_DECREMENT_AND_WRAP = 7
-} VkStencilOp;
-typedef enum VkStructureType {
-    VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
-    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
-    VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
-    VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
-    VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
-    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
-    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
-    VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
-    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
-    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
-    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
-    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
-    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
-    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
-    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
-    VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
-    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
-    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
-    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
-    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
-    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
-    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
-    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
-    VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
-    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
-    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
-    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
-    VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
-    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
-    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
-    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
-    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
-    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
-    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
-    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
-    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
-    VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
-    VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
-    VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
-    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
-    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
-    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
-    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
-    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
-    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
-    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
-    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
-    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
-    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
-    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
-    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
-    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
-    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
-    VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
-    VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
-    VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
-    VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
-    VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
-    VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
-    VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
-    VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
-    VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
-    VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
-    VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
-    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
-    VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
-    VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
-    VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
-    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
-    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
-    VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
-    VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
-    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
-    VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
-    VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
-    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
-    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
-    VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
-    VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
-    VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
-    VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
-    VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
-    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000,
-    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
-    VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
-    VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
-    VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
-    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
-    VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
-    VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
-    VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
-    VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
-} VkStructureType;
-typedef enum VkSystemAllocationScope {
-    VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
-    VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
-    VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
-    VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
-    VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4
-} VkSystemAllocationScope;
-typedef enum VkInternalAllocationType {
-    VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0
-} VkInternalAllocationType;
-typedef enum VkSamplerAddressMode {
-    VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
-    VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
-    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
-    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3
-} VkSamplerAddressMode;
-typedef enum VkFilter {
-    VK_FILTER_NEAREST = 0,
-    VK_FILTER_LINEAR = 1
-} VkFilter;
-typedef enum VkSamplerMipmapMode {
-    VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
-    VK_SAMPLER_MIPMAP_MODE_LINEAR = 1
-} VkSamplerMipmapMode;
-typedef enum VkVertexInputRate {
-    VK_VERTEX_INPUT_RATE_VERTEX = 0,
-    VK_VERTEX_INPUT_RATE_INSTANCE = 1
-} VkVertexInputRate;
-typedef enum VkPipelineStageFlagBits {
-    VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 1,
-    VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 2,
-    VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 4,
-    VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 8,
-    VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 16,
-    VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 32,
-    VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 64,
-    VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 128,
-    VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 256,
-    VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 512,
-    VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 1024,
-    VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 2048,
-    VK_PIPELINE_STAGE_TRANSFER_BIT = 4096,
-    VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 8192,
-    VK_PIPELINE_STAGE_HOST_BIT = 16384,
-    VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 32768,
-    VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 65536
-} VkPipelineStageFlagBits;
-typedef enum VkSparseImageFormatFlagBits {
-    VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 1,
-    VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 2,
-    VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 4
-} VkSparseImageFormatFlagBits;
-typedef enum VkSampleCountFlagBits {
-    VK_SAMPLE_COUNT_1_BIT = 1,
-    VK_SAMPLE_COUNT_2_BIT = 2,
-    VK_SAMPLE_COUNT_4_BIT = 4,
-    VK_SAMPLE_COUNT_8_BIT = 8,
-    VK_SAMPLE_COUNT_16_BIT = 16,
-    VK_SAMPLE_COUNT_32_BIT = 32,
-    VK_SAMPLE_COUNT_64_BIT = 64
-} VkSampleCountFlagBits;
-typedef enum VkAttachmentDescriptionFlagBits {
-    VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 1
-} VkAttachmentDescriptionFlagBits;
-typedef enum VkDescriptorPoolCreateFlagBits {
-    VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 1
-} VkDescriptorPoolCreateFlagBits;
-typedef enum VkDependencyFlagBits {
-    VK_DEPENDENCY_BY_REGION_BIT = 1,
-    VK_DEPENDENCY_DEVICE_GROUP_BIT = 4,
-    VK_DEPENDENCY_VIEW_LOCAL_BIT = 2
-} VkDependencyFlagBits;
-typedef enum VkObjectType {
-    VK_OBJECT_TYPE_UNKNOWN = 0,
-    VK_OBJECT_TYPE_INSTANCE = 1,
-    VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
-    VK_OBJECT_TYPE_DEVICE = 3,
-    VK_OBJECT_TYPE_QUEUE = 4,
-    VK_OBJECT_TYPE_SEMAPHORE = 5,
-    VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
-    VK_OBJECT_TYPE_FENCE = 7,
-    VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
-    VK_OBJECT_TYPE_BUFFER = 9,
-    VK_OBJECT_TYPE_IMAGE = 10,
-    VK_OBJECT_TYPE_EVENT = 11,
-    VK_OBJECT_TYPE_QUERY_POOL = 12,
-    VK_OBJECT_TYPE_BUFFER_VIEW = 13,
-    VK_OBJECT_TYPE_IMAGE_VIEW = 14,
-    VK_OBJECT_TYPE_SHADER_MODULE = 15,
-    VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
-    VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
-    VK_OBJECT_TYPE_RENDER_PASS = 18,
-    VK_OBJECT_TYPE_PIPELINE = 19,
-    VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
-    VK_OBJECT_TYPE_SAMPLER = 21,
-    VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
-    VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
-    VK_OBJECT_TYPE_FRAMEBUFFER = 24,
-    VK_OBJECT_TYPE_COMMAND_POOL = 25,
-    VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
-    VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
-    VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
-    VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
-    VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000
-} VkObjectType;
-typedef enum VkDescriptorUpdateTemplateType {
-    VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0
-} VkDescriptorUpdateTemplateType;
-
-typedef enum VkPointClippingBehavior {
-    VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
-    VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1
-} VkPointClippingBehavior;
-typedef enum VkColorSpaceKHR {
-    VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
-    VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
-} VkColorSpaceKHR;
-typedef enum VkCompositeAlphaFlagBitsKHR {
-    VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1,
-    VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 2,
-    VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 4,
-    VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 8
-} VkCompositeAlphaFlagBitsKHR;
-typedef enum VkPresentModeKHR {
-    VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
-    VK_PRESENT_MODE_MAILBOX_KHR = 1,
-    VK_PRESENT_MODE_FIFO_KHR = 2,
-    VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3
-} VkPresentModeKHR;
-typedef enum VkSurfaceTransformFlagBitsKHR {
-    VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1,
-    VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 2,
-    VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 4,
-    VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 8,
-    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 16,
-    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 32,
-    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 64,
-    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 128,
-    VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 256
-} VkSurfaceTransformFlagBitsKHR;
-typedef enum VkDebugReportFlagBitsEXT {
-    VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 1,
-    VK_DEBUG_REPORT_WARNING_BIT_EXT = 2,
-    VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 4,
-    VK_DEBUG_REPORT_ERROR_BIT_EXT = 8,
-    VK_DEBUG_REPORT_DEBUG_BIT_EXT = 16
-} VkDebugReportFlagBitsEXT;
-typedef enum VkDebugReportObjectTypeEXT {
-    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
-    VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
-    VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
-    VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
-    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
-    VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
-    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
-    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
-    VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
-    VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
-    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
-    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
-    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
-    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
-    VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
-    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
-    VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
-    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
-    VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
-    VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
-    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,
-    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
-    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,
-    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000
-} VkDebugReportObjectTypeEXT;
-typedef enum VkExternalMemoryHandleTypeFlagBits {
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 8,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 16,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 32,
-    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 64
-} VkExternalMemoryHandleTypeFlagBits;
-typedef enum VkExternalMemoryFeatureFlagBits {
-    VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 1,
-    VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 2,
-    VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 4
-} VkExternalMemoryFeatureFlagBits;
-typedef enum VkExternalSemaphoreHandleTypeFlagBits {
-    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
-    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
-    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
-    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 8,
-    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 16
-} VkExternalSemaphoreHandleTypeFlagBits;
-typedef enum VkExternalSemaphoreFeatureFlagBits {
-    VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 1,
-    VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 2
-} VkExternalSemaphoreFeatureFlagBits;
-typedef enum VkSemaphoreImportFlagBits {
-    VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 1
-} VkSemaphoreImportFlagBits;
-typedef enum VkExternalFenceHandleTypeFlagBits {
-    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
-    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
-    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
-    VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 8
-} VkExternalFenceHandleTypeFlagBits;
-typedef enum VkExternalFenceFeatureFlagBits {
-    VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 1,
-    VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 2
-} VkExternalFenceFeatureFlagBits;
-typedef enum VkFenceImportFlagBits {
-    VK_FENCE_IMPORT_TEMPORARY_BIT = 1
-} VkFenceImportFlagBits;
-typedef enum VkPeerMemoryFeatureFlagBits {
-    VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 1,
-    VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 2,
-    VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 4,
-    VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 8
-} VkPeerMemoryFeatureFlagBits;
-typedef enum VkMemoryAllocateFlagBits {
-    VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 1
-} VkMemoryAllocateFlagBits;
-typedef enum VkDeviceGroupPresentModeFlagBitsKHR {
-    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1,
-    VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 2,
-    VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 4,
-    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 8
-} VkDeviceGroupPresentModeFlagBitsKHR;
-typedef enum VkSwapchainCreateFlagBitsKHR {
-    VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1,
-    VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 2
-} VkSwapchainCreateFlagBitsKHR;
-typedef enum VkSubgroupFeatureFlagBits {
-    VK_SUBGROUP_FEATURE_BASIC_BIT = 1,
-    VK_SUBGROUP_FEATURE_VOTE_BIT = 2,
-    VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 4,
-    VK_SUBGROUP_FEATURE_BALLOT_BIT = 8,
-    VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 16,
-    VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 32,
-    VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 64,
-    VK_SUBGROUP_FEATURE_QUAD_BIT = 128
-} VkSubgroupFeatureFlagBits;
-typedef enum VkTessellationDomainOrigin {
-    VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
-    VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1
-} VkTessellationDomainOrigin;
-typedef enum VkSamplerYcbcrModelConversion {
-    VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
-    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
-    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
-    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
-    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4
-} VkSamplerYcbcrModelConversion;
-typedef enum VkSamplerYcbcrRange {
-    VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
-    VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1
-} VkSamplerYcbcrRange;
-typedef enum VkChromaLocation {
-    VK_CHROMA_LOCATION_COSITED_EVEN = 0,
-    VK_CHROMA_LOCATION_MIDPOINT = 1
-} VkChromaLocation;
-typedef enum VkVendorId {
-    VK_VENDOR_ID_VIV = 0x10001,
-    VK_VENDOR_ID_VSI = 0x10002,
-    VK_VENDOR_ID_KAZAN = 0x10003
-} VkVendorId;
-typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
-    void*                                       pUserData,
-    size_t                                      size,
-    VkInternalAllocationType                    allocationType,
-    VkSystemAllocationScope                     allocationScope);
-typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
-    void*                                       pUserData,
-    size_t                                      size,
-    VkInternalAllocationType                    allocationType,
-    VkSystemAllocationScope                     allocationScope);
-typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
-    void*                                       pUserData,
-    void*                                       pOriginal,
-    size_t                                      size,
-    size_t                                      alignment,
-    VkSystemAllocationScope                     allocationScope);
-typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
-    void*                                       pUserData,
-    size_t                                      size,
-    size_t                                      alignment,
-    VkSystemAllocationScope                     allocationScope);
-typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
-    void*                                       pUserData,
-    void*                                       pMemory);
-typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
-typedef struct VkBaseOutStructure {
-    VkStructureType   sType;
-    struct  VkBaseOutStructure *  pNext;
-} VkBaseOutStructure;
-typedef struct VkBaseInStructure {
-    VkStructureType   sType;
-    const struct  VkBaseInStructure *  pNext;
-} VkBaseInStructure;
-typedef struct VkOffset2D {
-    int32_t          x;
-    int32_t          y;
-} VkOffset2D;
-typedef struct VkOffset3D {
-    int32_t          x;
-    int32_t          y;
-    int32_t          z;
-} VkOffset3D;
-typedef struct VkExtent2D {
-    uint32_t          width;
-    uint32_t          height;
-} VkExtent2D;
-typedef struct VkExtent3D {
-    uint32_t          width;
-    uint32_t          height;
-    uint32_t          depth;
-} VkExtent3D;
-typedef struct VkViewport {
-    float   x;
-    float   y;
-    float   width;
-    float   height;
-    float                         minDepth;
-    float                         maxDepth;
-} VkViewport;
-typedef struct VkRect2D {
-    VkOffset2D       offset;
-    VkExtent2D       extent;
-} VkRect2D;
-typedef struct VkClearRect {
-    VkRect2D         rect;
-    uint32_t         baseArrayLayer;
-    uint32_t         layerCount;
-} VkClearRect;
-typedef struct VkComponentMapping {
-    VkComponentSwizzle   r;
-    VkComponentSwizzle   g;
-    VkComponentSwizzle   b;
-    VkComponentSwizzle   a;
-} VkComponentMapping;
-typedef struct VkExtensionProperties {
-    char              extensionName [ VK_MAX_EXTENSION_NAME_SIZE ];
-    uint32_t          specVersion;
-} VkExtensionProperties;
-typedef struct VkLayerProperties {
-    char              layerName [ VK_MAX_EXTENSION_NAME_SIZE ];
-    uint32_t          specVersion;
-    uint32_t          implementationVersion;
-    char              description [ VK_MAX_DESCRIPTION_SIZE ];
-} VkLayerProperties;
-typedef struct VkApplicationInfo {
-    VkStructureType   sType;
-    const  void *      pNext;
-    const  char *      pApplicationName;
-    uint32_t          applicationVersion;
-    const  char *      pEngineName;
-    uint32_t          engineVersion;
-    uint32_t          apiVersion;
-} VkApplicationInfo;
-typedef struct VkAllocationCallbacks {
-    void *            pUserData;
-    PFN_vkAllocationFunction     pfnAllocation;
-    PFN_vkReallocationFunction   pfnReallocation;
-    PFN_vkFreeFunction      pfnFree;
-    PFN_vkInternalAllocationNotification   pfnInternalAllocation;
-    PFN_vkInternalFreeNotification   pfnInternalFree;
-} VkAllocationCallbacks;
-typedef struct VkDescriptorImageInfo {
-    VkSampler         sampler;
-    VkImageView       imageView;
-    VkImageLayout     imageLayout;
-} VkDescriptorImageInfo;
-typedef struct VkCopyDescriptorSet {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDescriptorSet          srcSet;
-    uint32_t                 srcBinding;
-    uint32_t                 srcArrayElement;
-    VkDescriptorSet          dstSet;
-    uint32_t                 dstBinding;
-    uint32_t                 dstArrayElement;
-    uint32_t                 descriptorCount;
-} VkCopyDescriptorSet;
-typedef struct VkDescriptorPoolSize {
-    VkDescriptorType         type;
-    uint32_t                 descriptorCount;
-} VkDescriptorPoolSize;
-typedef struct VkDescriptorSetAllocateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDescriptorPool         descriptorPool;
-    uint32_t                 descriptorSetCount;
-    const  VkDescriptorSetLayout *  pSetLayouts;
-} VkDescriptorSetAllocateInfo;
-typedef struct VkSpecializationMapEntry {
-    uint32_t                       constantID;
-    uint32_t                       offset;
-    size_t   size;
-} VkSpecializationMapEntry;
-typedef struct VkSpecializationInfo {
-    uint32_t                 mapEntryCount;
-    const  VkSpecializationMapEntry *  pMapEntries;
-    size_t                   dataSize;
-    const  void *             pData;
-} VkSpecializationInfo;
-typedef struct VkVertexInputBindingDescription {
-    uint32_t                 binding;
-    uint32_t                 stride;
-    VkVertexInputRate        inputRate;
-} VkVertexInputBindingDescription;
-typedef struct VkVertexInputAttributeDescription {
-    uint32_t                 location;
-    uint32_t                 binding;
-    VkFormat                 format;
-    uint32_t                 offset;
-} VkVertexInputAttributeDescription;
-typedef struct VkStencilOpState {
-    VkStencilOp              failOp;
-    VkStencilOp              passOp;
-    VkStencilOp              depthFailOp;
-    VkCompareOp              compareOp;
-    uint32_t                 compareMask;
-    uint32_t                 writeMask;
-    uint32_t                 reference;
-} VkStencilOpState;
-typedef struct VkCommandBufferAllocateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkCommandPool            commandPool;
-    VkCommandBufferLevel     level;
-    uint32_t                 commandBufferCount;
-} VkCommandBufferAllocateInfo;
-typedef union VkClearColorValue {
-    float                    float32 [4];
-    int32_t                  int32 [4];
-    uint32_t                 uint32 [4];
-} VkClearColorValue;
-typedef struct VkClearDepthStencilValue {
-    float                    depth;
-    uint32_t                 stencil;
-} VkClearDepthStencilValue;
-typedef union VkClearValue {
-    VkClearColorValue        color;
-    VkClearDepthStencilValue   depthStencil;
-} VkClearValue;
-typedef struct VkAttachmentReference {
-    uint32_t                 attachment;
-    VkImageLayout            layout;
-} VkAttachmentReference;
-typedef struct VkDrawIndirectCommand {
-    uint32_t                         vertexCount;
-    uint32_t                         instanceCount;
-    uint32_t                         firstVertex;
-    uint32_t   firstInstance;
-} VkDrawIndirectCommand;
-typedef struct VkDrawIndexedIndirectCommand {
-    uint32_t                         indexCount;
-    uint32_t                         instanceCount;
-    uint32_t                         firstIndex;
-    int32_t                          vertexOffset;
-    uint32_t   firstInstance;
-} VkDrawIndexedIndirectCommand;
-typedef struct VkDispatchIndirectCommand {
-    uint32_t   x;
-    uint32_t   y;
-    uint32_t   z;
-} VkDispatchIndirectCommand;
-typedef struct VkSurfaceFormatKHR {
-    VkFormat                           format;
-    VkColorSpaceKHR                    colorSpace;
-} VkSurfaceFormatKHR;
-typedef struct VkPresentInfoKHR {
-    VkStructureType   sType;
-    const  void *   pNext;
-    uint32_t           waitSemaphoreCount;
-    const  VkSemaphore *  pWaitSemaphores;
-    uint32_t                           swapchainCount;
-    const  VkSwapchainKHR *  pSwapchains;
-    const  uint32_t *  pImageIndices;
-    VkResult *  pResults;
-} VkPresentInfoKHR;
-typedef struct VkPhysicalDeviceExternalImageFormatInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalMemoryHandleTypeFlagBits   handleType;
-} VkPhysicalDeviceExternalImageFormatInfo;
-typedef struct VkPhysicalDeviceExternalSemaphoreInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalSemaphoreHandleTypeFlagBits   handleType;
-} VkPhysicalDeviceExternalSemaphoreInfo;
-typedef struct VkPhysicalDeviceExternalFenceInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalFenceHandleTypeFlagBits   handleType;
-} VkPhysicalDeviceExternalFenceInfo;
-typedef struct VkPhysicalDeviceMultiviewProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    uint32_t                           maxMultiviewViewCount;
-    uint32_t                           maxMultiviewInstanceIndex;
-} VkPhysicalDeviceMultiviewProperties;
-typedef struct VkRenderPassMultiviewCreateInfo {
-    VkStructureType          sType;
-    const  void *             pNext;
-    uint32_t                 subpassCount;
-    const  uint32_t *      pViewMasks;
-    uint32_t                 dependencyCount;
-    const  int32_t *    pViewOffsets;
-    uint32_t                 correlationMaskCount;
-    const  uint32_t *  pCorrelationMasks;
-} VkRenderPassMultiviewCreateInfo;
-typedef struct VkBindBufferMemoryDeviceGroupInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t           deviceIndexCount;
-    const  uint32_t *   pDeviceIndices;
-} VkBindBufferMemoryDeviceGroupInfo;
-typedef struct VkBindImageMemoryDeviceGroupInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t           deviceIndexCount;
-    const  uint32_t *   pDeviceIndices;
-    uint32_t           splitInstanceBindRegionCount;
-    const  VkRect2D *   pSplitInstanceBindRegions;
-} VkBindImageMemoryDeviceGroupInfo;
-typedef struct VkDeviceGroupRenderPassBeginInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t                           deviceMask;
-    uint32_t           deviceRenderAreaCount;
-    const  VkRect2D *   pDeviceRenderAreas;
-} VkDeviceGroupRenderPassBeginInfo;
-typedef struct VkDeviceGroupCommandBufferBeginInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t                           deviceMask;
-} VkDeviceGroupCommandBufferBeginInfo;
-typedef struct VkDeviceGroupSubmitInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t           waitSemaphoreCount;
-    const  uint32_t *     pWaitSemaphoreDeviceIndices;
-    uint32_t           commandBufferCount;
-    const  uint32_t *     pCommandBufferDeviceMasks;
-    uint32_t           signalSemaphoreCount;
-    const  uint32_t *   pSignalSemaphoreDeviceIndices;
-} VkDeviceGroupSubmitInfo;
-typedef struct VkDeviceGroupBindSparseInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t                           resourceDeviceIndex;
-    uint32_t                           memoryDeviceIndex;
-} VkDeviceGroupBindSparseInfo;
-typedef struct VkImageSwapchainCreateInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkSwapchainKHR     swapchain;
-} VkImageSwapchainCreateInfoKHR;
-typedef struct VkBindImageMemorySwapchainInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkSwapchainKHR   swapchain;
-    uint32_t                           imageIndex;
-} VkBindImageMemorySwapchainInfoKHR;
-typedef struct VkAcquireNextImageInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkSwapchainKHR   swapchain;
-    uint64_t                           timeout;
-    VkSemaphore   semaphore;
-    VkFence   fence;
-    uint32_t                           deviceMask;
-} VkAcquireNextImageInfoKHR;
-typedef struct VkDeviceGroupPresentInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t           swapchainCount;
-    const  uint32_t *  pDeviceMasks;
-    VkDeviceGroupPresentModeFlagBitsKHR   mode;
-} VkDeviceGroupPresentInfoKHR;
-typedef struct VkDeviceGroupDeviceCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t                           physicalDeviceCount;
-    const  VkPhysicalDevice *   pPhysicalDevices;
-} VkDeviceGroupDeviceCreateInfo;
-typedef struct VkDescriptorUpdateTemplateEntry {
-    uint32_t                           dstBinding;
-    uint32_t                           dstArrayElement;
-    uint32_t                           descriptorCount;
-    VkDescriptorType                   descriptorType;
-    size_t                             offset;
-    size_t                             stride;
-} VkDescriptorUpdateTemplateEntry;
-typedef struct VkBufferMemoryRequirementsInfo2 {
-    VkStructureType   sType;
-    const  void *                                                           pNext;
-    VkBuffer                                                               buffer;
-} VkBufferMemoryRequirementsInfo2;
-typedef struct VkImageMemoryRequirementsInfo2 {
-    VkStructureType   sType;
-    const  void *                                                           pNext;
-    VkImage                                                                image;
-} VkImageMemoryRequirementsInfo2;
-typedef struct VkImageSparseMemoryRequirementsInfo2 {
-    VkStructureType   sType;
-    const  void *                                                           pNext;
-    VkImage                                                                image;
-} VkImageSparseMemoryRequirementsInfo2;
-typedef struct VkPhysicalDevicePointClippingProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkPointClippingBehavior        pointClippingBehavior;
-} VkPhysicalDevicePointClippingProperties;
-typedef struct VkMemoryDedicatedAllocateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkImage            image;
-    VkBuffer           buffer;
-} VkMemoryDedicatedAllocateInfo;
-typedef struct VkPipelineTessellationDomainOriginStateCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkTessellationDomainOrigin      domainOrigin;
-} VkPipelineTessellationDomainOriginStateCreateInfo;
-typedef struct VkSamplerYcbcrConversionInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkSamplerYcbcrConversion        conversion;
-} VkSamplerYcbcrConversionInfo;
-typedef struct VkBindImagePlaneMemoryInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkImageAspectFlagBits              planeAspect;
-} VkBindImagePlaneMemoryInfo;
-typedef struct VkImagePlaneMemoryRequirementsInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkImageAspectFlagBits              planeAspect;
-} VkImagePlaneMemoryRequirementsInfo;
-typedef struct VkSamplerYcbcrConversionImageFormatProperties {
-    VkStructureType   sType;
-    void *       pNext;
-    uint32_t                           combinedImageSamplerDescriptorCount;
-} VkSamplerYcbcrConversionImageFormatProperties;
-typedef uint32_t VkSampleMask;
-typedef uint32_t VkBool32;
-typedef uint32_t VkFlags;
-typedef uint64_t VkDeviceSize;
-typedef VkFlags VkFramebufferCreateFlags;
-typedef VkFlags VkQueryPoolCreateFlags;
-typedef VkFlags VkRenderPassCreateFlags;
-typedef VkFlags VkSamplerCreateFlags;
-typedef VkFlags VkPipelineLayoutCreateFlags;
-typedef VkFlags VkPipelineCacheCreateFlags;
-typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
-typedef VkFlags VkPipelineDynamicStateCreateFlags;
-typedef VkFlags VkPipelineColorBlendStateCreateFlags;
-typedef VkFlags VkPipelineMultisampleStateCreateFlags;
-typedef VkFlags VkPipelineRasterizationStateCreateFlags;
-typedef VkFlags VkPipelineViewportStateCreateFlags;
-typedef VkFlags VkPipelineTessellationStateCreateFlags;
-typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
-typedef VkFlags VkPipelineVertexInputStateCreateFlags;
-typedef VkFlags VkPipelineShaderStageCreateFlags;
-typedef VkFlags VkDescriptorSetLayoutCreateFlags;
-typedef VkFlags VkBufferViewCreateFlags;
-typedef VkFlags VkInstanceCreateFlags;
-typedef VkFlags VkDeviceCreateFlags;
-typedef VkFlags VkDeviceQueueCreateFlags;
-typedef VkFlags VkQueueFlags;
-typedef VkFlags VkMemoryPropertyFlags;
-typedef VkFlags VkMemoryHeapFlags;
-typedef VkFlags VkAccessFlags;
-typedef VkFlags VkBufferUsageFlags;
-typedef VkFlags VkBufferCreateFlags;
-typedef VkFlags VkShaderStageFlags;
-typedef VkFlags VkImageUsageFlags;
-typedef VkFlags VkImageCreateFlags;
-typedef VkFlags VkImageViewCreateFlags;
-typedef VkFlags VkPipelineCreateFlags;
-typedef VkFlags VkColorComponentFlags;
-typedef VkFlags VkFenceCreateFlags;
-typedef VkFlags VkSemaphoreCreateFlags;
-typedef VkFlags VkFormatFeatureFlags;
-typedef VkFlags VkQueryControlFlags;
-typedef VkFlags VkQueryResultFlags;
-typedef VkFlags VkShaderModuleCreateFlags;
-typedef VkFlags VkEventCreateFlags;
-typedef VkFlags VkCommandPoolCreateFlags;
-typedef VkFlags VkCommandPoolResetFlags;
-typedef VkFlags VkCommandBufferResetFlags;
-typedef VkFlags VkCommandBufferUsageFlags;
-typedef VkFlags VkQueryPipelineStatisticFlags;
-typedef VkFlags VkMemoryMapFlags;
-typedef VkFlags VkImageAspectFlags;
-typedef VkFlags VkSparseMemoryBindFlags;
-typedef VkFlags VkSparseImageFormatFlags;
-typedef VkFlags VkSubpassDescriptionFlags;
-typedef VkFlags VkPipelineStageFlags;
-typedef VkFlags VkSampleCountFlags;
-typedef VkFlags VkAttachmentDescriptionFlags;
-typedef VkFlags VkStencilFaceFlags;
-typedef VkFlags VkCullModeFlags;
-typedef VkFlags VkDescriptorPoolCreateFlags;
-typedef VkFlags VkDescriptorPoolResetFlags;
-typedef VkFlags VkDependencyFlags;
-typedef VkFlags VkSubgroupFeatureFlags;
-typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;
-typedef VkFlags VkCompositeAlphaFlagsKHR;
-typedef VkFlags VkSurfaceTransformFlagsKHR;
-typedef VkFlags VkSwapchainCreateFlagsKHR;
-typedef VkFlags VkPeerMemoryFeatureFlags;
-typedef VkFlags VkMemoryAllocateFlags;
-typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;
-typedef VkFlags VkDebugReportFlagsEXT;
-typedef VkFlags VkCommandPoolTrimFlags;
-typedef VkFlags VkExternalMemoryHandleTypeFlags;
-typedef VkFlags VkExternalMemoryFeatureFlags;
-typedef VkFlags VkExternalSemaphoreHandleTypeFlags;
-typedef VkFlags VkExternalSemaphoreFeatureFlags;
-typedef VkFlags VkSemaphoreImportFlags;
-typedef VkFlags VkExternalFenceHandleTypeFlags;
-typedef VkFlags VkExternalFenceFeatureFlags;
-typedef VkFlags VkFenceImportFlags;
-typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
-    VkDebugReportFlagsEXT                       flags,
-    VkDebugReportObjectTypeEXT                  objectType,
-    uint64_t                                    object,
-    size_t                                      location,
-    int32_t                                     messageCode,
-    const char*                                 pLayerPrefix,
-    const char*                                 pMessage,
-    void*                                       pUserData);
-typedef struct VkDeviceQueueCreateInfo {
-    VkStructureType   sType;
-    const  void *      pNext;
-    VkDeviceQueueCreateFlags      flags;
-    uint32_t          queueFamilyIndex;
-    uint32_t          queueCount;
-    const  float *     pQueuePriorities;
-} VkDeviceQueueCreateInfo;
-typedef struct VkInstanceCreateInfo {
-    VkStructureType   sType;
-    const  void *      pNext;
-    VkInstanceCreateFlags    flags;
-    const  VkApplicationInfo *  pApplicationInfo;
-    uint32_t                 enabledLayerCount;
-    const  char * const*       ppEnabledLayerNames;
-    uint32_t                 enabledExtensionCount;
-    const  char * const*       ppEnabledExtensionNames;
-} VkInstanceCreateInfo;
-typedef struct VkQueueFamilyProperties {
-    VkQueueFlags             queueFlags;
-    uint32_t                 queueCount;
-    uint32_t                 timestampValidBits;
-    VkExtent3D               minImageTransferGranularity;
-} VkQueueFamilyProperties;
-typedef struct VkMemoryAllocateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDeviceSize             allocationSize;
-    uint32_t                 memoryTypeIndex;
-} VkMemoryAllocateInfo;
-typedef struct VkMemoryRequirements {
-    VkDeviceSize             size;
-    VkDeviceSize             alignment;
-    uint32_t                 memoryTypeBits;
-} VkMemoryRequirements;
-typedef struct VkSparseImageFormatProperties {
-    VkImageAspectFlags       aspectMask;
-    VkExtent3D               imageGranularity;
-    VkSparseImageFormatFlags   flags;
-} VkSparseImageFormatProperties;
-typedef struct VkSparseImageMemoryRequirements {
-    VkSparseImageFormatProperties   formatProperties;
-    uint32_t                 imageMipTailFirstLod;
-    VkDeviceSize             imageMipTailSize;
-    VkDeviceSize             imageMipTailOffset;
-    VkDeviceSize             imageMipTailStride;
-} VkSparseImageMemoryRequirements;
-typedef struct VkMemoryType {
-    VkMemoryPropertyFlags    propertyFlags;
-    uint32_t                 heapIndex;
-} VkMemoryType;
-typedef struct VkMemoryHeap {
-    VkDeviceSize             size;
-    VkMemoryHeapFlags        flags;
-} VkMemoryHeap;
-typedef struct VkMappedMemoryRange {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDeviceMemory           memory;
-    VkDeviceSize             offset;
-    VkDeviceSize             size;
-} VkMappedMemoryRange;
-typedef struct VkFormatProperties {
-    VkFormatFeatureFlags     linearTilingFeatures;
-    VkFormatFeatureFlags     optimalTilingFeatures;
-    VkFormatFeatureFlags     bufferFeatures;
-} VkFormatProperties;
-typedef struct VkImageFormatProperties {
-    VkExtent3D               maxExtent;
-    uint32_t                 maxMipLevels;
-    uint32_t                 maxArrayLayers;
-    VkSampleCountFlags       sampleCounts;
-    VkDeviceSize             maxResourceSize;
-} VkImageFormatProperties;
-typedef struct VkDescriptorBufferInfo {
-    VkBuffer                 buffer;
-    VkDeviceSize             offset;
-    VkDeviceSize             range;
-} VkDescriptorBufferInfo;
-typedef struct VkWriteDescriptorSet {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDescriptorSet          dstSet;
-    uint32_t                 dstBinding;
-    uint32_t                 dstArrayElement;
-    uint32_t                 descriptorCount;
-    VkDescriptorType         descriptorType;
-    const  VkDescriptorImageInfo *  pImageInfo;
-    const  VkDescriptorBufferInfo *  pBufferInfo;
-    const  VkBufferView *     pTexelBufferView;
-} VkWriteDescriptorSet;
-typedef struct VkBufferCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkBufferCreateFlags      flags;
-    VkDeviceSize             size;
-    VkBufferUsageFlags       usage;
-    VkSharingMode            sharingMode;
-    uint32_t                 queueFamilyIndexCount;
-    const  uint32_t *         pQueueFamilyIndices;
-} VkBufferCreateInfo;
-typedef struct VkBufferViewCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkBufferViewCreateFlags flags;
-    VkBuffer                 buffer;
-    VkFormat                 format;
-    VkDeviceSize             offset;
-    VkDeviceSize             range;
-} VkBufferViewCreateInfo;
-typedef struct VkImageSubresource {
-    VkImageAspectFlags       aspectMask;
-    uint32_t                 mipLevel;
-    uint32_t                 arrayLayer;
-} VkImageSubresource;
-typedef struct VkImageSubresourceLayers {
-    VkImageAspectFlags       aspectMask;
-    uint32_t                 mipLevel;
-    uint32_t                 baseArrayLayer;
-    uint32_t                 layerCount;
-} VkImageSubresourceLayers;
-typedef struct VkImageSubresourceRange {
-    VkImageAspectFlags       aspectMask;
-    uint32_t                 baseMipLevel;
-    uint32_t                 levelCount;
-    uint32_t                 baseArrayLayer;
-    uint32_t                 layerCount;
-} VkImageSubresourceRange;
-typedef struct VkMemoryBarrier {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkAccessFlags            srcAccessMask;
-    VkAccessFlags            dstAccessMask;
-} VkMemoryBarrier;
-typedef struct VkBufferMemoryBarrier {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkAccessFlags            srcAccessMask;
-    VkAccessFlags            dstAccessMask;
-    uint32_t                 srcQueueFamilyIndex;
-    uint32_t                 dstQueueFamilyIndex;
-    VkBuffer                 buffer;
-    VkDeviceSize             offset;
-    VkDeviceSize             size;
-} VkBufferMemoryBarrier;
-typedef struct VkImageMemoryBarrier {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkAccessFlags            srcAccessMask;
-    VkAccessFlags            dstAccessMask;
-    VkImageLayout            oldLayout;
-    VkImageLayout            newLayout;
-    uint32_t                 srcQueueFamilyIndex;
-    uint32_t                 dstQueueFamilyIndex;
-    VkImage                  image;
-    VkImageSubresourceRange   subresourceRange;
-} VkImageMemoryBarrier;
-typedef struct VkImageCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkImageCreateFlags       flags;
-    VkImageType              imageType;
-    VkFormat                 format;
-    VkExtent3D               extent;
-    uint32_t                 mipLevels;
-    uint32_t                 arrayLayers;
-    VkSampleCountFlagBits    samples;
-    VkImageTiling            tiling;
-    VkImageUsageFlags        usage;
-    VkSharingMode            sharingMode;
-    uint32_t                 queueFamilyIndexCount;
-    const  uint32_t *         pQueueFamilyIndices;
-    VkImageLayout            initialLayout;
-} VkImageCreateInfo;
-typedef struct VkSubresourceLayout {
-    VkDeviceSize             offset;
-    VkDeviceSize             size;
-    VkDeviceSize             rowPitch;
-    VkDeviceSize             arrayPitch;
-    VkDeviceSize             depthPitch;
-} VkSubresourceLayout;
-typedef struct VkImageViewCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkImageViewCreateFlags   flags;
-    VkImage                  image;
-    VkImageViewType          viewType;
-    VkFormat                 format;
-    VkComponentMapping       components;
-    VkImageSubresourceRange   subresourceRange;
-} VkImageViewCreateInfo;
-typedef struct VkBufferCopy {
-    VkDeviceSize                         srcOffset;
-    VkDeviceSize                         dstOffset;
-    VkDeviceSize   size;
-} VkBufferCopy;
-typedef struct VkSparseMemoryBind {
-    VkDeviceSize             resourceOffset;
-    VkDeviceSize             size;
-    VkDeviceMemory           memory;
-    VkDeviceSize             memoryOffset;
-    VkSparseMemoryBindFlags flags;
-} VkSparseMemoryBind;
-typedef struct VkSparseImageMemoryBind {
-    VkImageSubresource       subresource;
-    VkOffset3D               offset;
-    VkExtent3D               extent;
-    VkDeviceMemory           memory;
-    VkDeviceSize             memoryOffset;
-    VkSparseMemoryBindFlags flags;
-} VkSparseImageMemoryBind;
-typedef struct VkSparseBufferMemoryBindInfo {
-    VkBuffer   buffer;
-    uint32_t                 bindCount;
-    const  VkSparseMemoryBind *  pBinds;
-} VkSparseBufferMemoryBindInfo;
-typedef struct VkSparseImageOpaqueMemoryBindInfo {
-    VkImage   image;
-    uint32_t                 bindCount;
-    const  VkSparseMemoryBind *  pBinds;
-} VkSparseImageOpaqueMemoryBindInfo;
-typedef struct VkSparseImageMemoryBindInfo {
-    VkImage   image;
-    uint32_t                 bindCount;
-    const  VkSparseImageMemoryBind *  pBinds;
-} VkSparseImageMemoryBindInfo;
-typedef struct VkBindSparseInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    uint32_t                 waitSemaphoreCount;
-    const  VkSemaphore *      pWaitSemaphores;
-    uint32_t                 bufferBindCount;
-    const  VkSparseBufferMemoryBindInfo *  pBufferBinds;
-    uint32_t                 imageOpaqueBindCount;
-    const  VkSparseImageOpaqueMemoryBindInfo *  pImageOpaqueBinds;
-    uint32_t                 imageBindCount;
-    const  VkSparseImageMemoryBindInfo *  pImageBinds;
-    uint32_t                 signalSemaphoreCount;
-    const  VkSemaphore *      pSignalSemaphores;
-} VkBindSparseInfo;
-typedef struct VkImageCopy {
-    VkImageSubresourceLayers   srcSubresource;
-    VkOffset3D               srcOffset;
-    VkImageSubresourceLayers   dstSubresource;
-    VkOffset3D               dstOffset;
-    VkExtent3D               extent;
-} VkImageCopy;
-typedef struct VkImageBlit {
-    VkImageSubresourceLayers   srcSubresource;
-    VkOffset3D               srcOffsets [2];
-    VkImageSubresourceLayers   dstSubresource;
-    VkOffset3D               dstOffsets [2];
-} VkImageBlit;
-typedef struct VkBufferImageCopy {
-    VkDeviceSize             bufferOffset;
-    uint32_t                 bufferRowLength;
-    uint32_t                 bufferImageHeight;
-    VkImageSubresourceLayers   imageSubresource;
-    VkOffset3D               imageOffset;
-    VkExtent3D               imageExtent;
-} VkBufferImageCopy;
-typedef struct VkImageResolve {
-    VkImageSubresourceLayers   srcSubresource;
-    VkOffset3D               srcOffset;
-    VkImageSubresourceLayers   dstSubresource;
-    VkOffset3D               dstOffset;
-    VkExtent3D               extent;
-} VkImageResolve;
-typedef struct VkShaderModuleCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkShaderModuleCreateFlags   flags;
-    size_t                   codeSize;
-    const  uint32_t *             pCode;
-} VkShaderModuleCreateInfo;
-typedef struct VkDescriptorSetLayoutBinding {
-    uint32_t                 binding;
-    VkDescriptorType         descriptorType;
-    uint32_t   descriptorCount;
-    VkShaderStageFlags       stageFlags;
-    const  VkSampler *        pImmutableSamplers;
-} VkDescriptorSetLayoutBinding;
-typedef struct VkDescriptorSetLayoutCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDescriptorSetLayoutCreateFlags      flags;
-    uint32_t                 bindingCount;
-    const  VkDescriptorSetLayoutBinding *  pBindings;
-} VkDescriptorSetLayoutCreateInfo;
-typedef struct VkDescriptorPoolCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkDescriptorPoolCreateFlags    flags;
-    uint32_t                 maxSets;
-    uint32_t                 poolSizeCount;
-    const  VkDescriptorPoolSize *  pPoolSizes;
-} VkDescriptorPoolCreateInfo;
-typedef struct VkPipelineShaderStageCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineShaderStageCreateFlags      flags;
-    VkShaderStageFlagBits    stage;
-    VkShaderModule           module;
-    const  char *             pName;
-    const  VkSpecializationInfo *  pSpecializationInfo;
-} VkPipelineShaderStageCreateInfo;
-typedef struct VkComputePipelineCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineCreateFlags    flags;
-    VkPipelineShaderStageCreateInfo   stage;
-    VkPipelineLayout         layout;
-    VkPipeline        basePipelineHandle;
-    int32_t                  basePipelineIndex;
-} VkComputePipelineCreateInfo;
-typedef struct VkPipelineVertexInputStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineVertexInputStateCreateFlags      flags;
-    uint32_t                 vertexBindingDescriptionCount;
-    const  VkVertexInputBindingDescription *  pVertexBindingDescriptions;
-    uint32_t                 vertexAttributeDescriptionCount;
-    const  VkVertexInputAttributeDescription *  pVertexAttributeDescriptions;
-} VkPipelineVertexInputStateCreateInfo;
-typedef struct VkPipelineInputAssemblyStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineInputAssemblyStateCreateFlags      flags;
-    VkPrimitiveTopology      topology;
-    VkBool32                 primitiveRestartEnable;
-} VkPipelineInputAssemblyStateCreateInfo;
-typedef struct VkPipelineTessellationStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineTessellationStateCreateFlags      flags;
-    uint32_t                 patchControlPoints;
-} VkPipelineTessellationStateCreateInfo;
-typedef struct VkPipelineViewportStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineViewportStateCreateFlags      flags;
-    uint32_t                 viewportCount;
-    const  VkViewport *       pViewports;
-    uint32_t                 scissorCount;
-    const  VkRect2D *         pScissors;
-} VkPipelineViewportStateCreateInfo;
-typedef struct VkPipelineRasterizationStateCreateInfo {
-    VkStructureType   sType;
-    const  void *  pNext;
-    VkPipelineRasterizationStateCreateFlags      flags;
-    VkBool32                 depthClampEnable;
-    VkBool32                 rasterizerDiscardEnable;
-    VkPolygonMode            polygonMode;
-    VkCullModeFlags          cullMode;
-    VkFrontFace              frontFace;
-    VkBool32                 depthBiasEnable;
-    float                    depthBiasConstantFactor;
-    float                    depthBiasClamp;
-    float                    depthBiasSlopeFactor;
-    float                    lineWidth;
-} VkPipelineRasterizationStateCreateInfo;
-typedef struct VkPipelineMultisampleStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineMultisampleStateCreateFlags      flags;
-    VkSampleCountFlagBits    rasterizationSamples;
-    VkBool32                 sampleShadingEnable;
-    float                    minSampleShading;
-    const  VkSampleMask *     pSampleMask;
-    VkBool32                 alphaToCoverageEnable;
-    VkBool32                 alphaToOneEnable;
-} VkPipelineMultisampleStateCreateInfo;
-typedef struct VkPipelineColorBlendAttachmentState {
-    VkBool32                 blendEnable;
-    VkBlendFactor            srcColorBlendFactor;
-    VkBlendFactor            dstColorBlendFactor;
-    VkBlendOp                colorBlendOp;
-    VkBlendFactor            srcAlphaBlendFactor;
-    VkBlendFactor            dstAlphaBlendFactor;
-    VkBlendOp                alphaBlendOp;
-    VkColorComponentFlags    colorWriteMask;
-} VkPipelineColorBlendAttachmentState;
-typedef struct VkPipelineColorBlendStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineColorBlendStateCreateFlags      flags;
-    VkBool32                 logicOpEnable;
-    VkLogicOp                logicOp;
-    uint32_t                 attachmentCount;
-    const  VkPipelineColorBlendAttachmentState *  pAttachments;
-    float                    blendConstants [4];
-} VkPipelineColorBlendStateCreateInfo;
-typedef struct VkPipelineDynamicStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineDynamicStateCreateFlags      flags;
-    uint32_t                 dynamicStateCount;
-    const  VkDynamicState *   pDynamicStates;
-} VkPipelineDynamicStateCreateInfo;
-typedef struct VkPipelineDepthStencilStateCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineDepthStencilStateCreateFlags      flags;
-    VkBool32                 depthTestEnable;
-    VkBool32                 depthWriteEnable;
-    VkCompareOp              depthCompareOp;
-    VkBool32                 depthBoundsTestEnable;
-    VkBool32                 stencilTestEnable;
-    VkStencilOpState         front;
-    VkStencilOpState         back;
-    float                    minDepthBounds;
-    float                    maxDepthBounds;
-} VkPipelineDepthStencilStateCreateInfo;
-typedef struct VkGraphicsPipelineCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineCreateFlags    flags;
-    uint32_t                 stageCount;
-    const  VkPipelineShaderStageCreateInfo *  pStages;
-    const  VkPipelineVertexInputStateCreateInfo *  pVertexInputState;
-    const  VkPipelineInputAssemblyStateCreateInfo *  pInputAssemblyState;
-    const  VkPipelineTessellationStateCreateInfo *  pTessellationState;
-    const  VkPipelineViewportStateCreateInfo *  pViewportState;
-    const  VkPipelineRasterizationStateCreateInfo *  pRasterizationState;
-    const  VkPipelineMultisampleStateCreateInfo *  pMultisampleState;
-    const  VkPipelineDepthStencilStateCreateInfo *  pDepthStencilState;
-    const  VkPipelineColorBlendStateCreateInfo *  pColorBlendState;
-    const  VkPipelineDynamicStateCreateInfo *  pDynamicState;
-    VkPipelineLayout         layout;
-    VkRenderPass             renderPass;
-    uint32_t                 subpass;
-    VkPipeline        basePipelineHandle;
-    int32_t                  basePipelineIndex;
-} VkGraphicsPipelineCreateInfo;
-typedef struct VkPipelineCacheCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineCacheCreateFlags      flags;
-    size_t                   initialDataSize;
-    const  void *             pInitialData;
-} VkPipelineCacheCreateInfo;
-typedef struct VkPushConstantRange {
-    VkShaderStageFlags       stageFlags;
-    uint32_t                 offset;
-    uint32_t                 size;
-} VkPushConstantRange;
-typedef struct VkPipelineLayoutCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkPipelineLayoutCreateFlags      flags;
-    uint32_t                 setLayoutCount;
-    const  VkDescriptorSetLayout *  pSetLayouts;
-    uint32_t                 pushConstantRangeCount;
-    const  VkPushConstantRange *  pPushConstantRanges;
-} VkPipelineLayoutCreateInfo;
-typedef struct VkSamplerCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkSamplerCreateFlags     flags;
-    VkFilter                 magFilter;
-    VkFilter                 minFilter;
-    VkSamplerMipmapMode      mipmapMode;
-    VkSamplerAddressMode     addressModeU;
-    VkSamplerAddressMode     addressModeV;
-    VkSamplerAddressMode     addressModeW;
-    float                    mipLodBias;
-    VkBool32                 anisotropyEnable;
-    float                    maxAnisotropy;
-    VkBool32                 compareEnable;
-    VkCompareOp              compareOp;
-    float                    minLod;
-    float                    maxLod;
-    VkBorderColor            borderColor;
-    VkBool32                 unnormalizedCoordinates;
-} VkSamplerCreateInfo;
-typedef struct VkCommandPoolCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkCommandPoolCreateFlags     flags;
-    uint32_t                 queueFamilyIndex;
-} VkCommandPoolCreateInfo;
-typedef struct VkCommandBufferInheritanceInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkRenderPass      renderPass;
-    uint32_t                 subpass;
-    VkFramebuffer     framebuffer;
-    VkBool32                 occlusionQueryEnable;
-    VkQueryControlFlags      queryFlags;
-    VkQueryPipelineStatisticFlags   pipelineStatistics;
-} VkCommandBufferInheritanceInfo;
-typedef struct VkCommandBufferBeginInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkCommandBufferUsageFlags    flags;
-    const  VkCommandBufferInheritanceInfo *        pInheritanceInfo;
-} VkCommandBufferBeginInfo;
-typedef struct VkRenderPassBeginInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkRenderPass             renderPass;
-    VkFramebuffer            framebuffer;
-    VkRect2D                 renderArea;
-    uint32_t                 clearValueCount;
-    const  VkClearValue *     pClearValues;
-} VkRenderPassBeginInfo;
-typedef struct VkClearAttachment {
-    VkImageAspectFlags       aspectMask;
-    uint32_t                 colorAttachment;
-    VkClearValue             clearValue;
-} VkClearAttachment;
-typedef struct VkAttachmentDescription {
-    VkAttachmentDescriptionFlags   flags;
-    VkFormat                 format;
-    VkSampleCountFlagBits    samples;
-    VkAttachmentLoadOp       loadOp;
-    VkAttachmentStoreOp      storeOp;
-    VkAttachmentLoadOp       stencilLoadOp;
-    VkAttachmentStoreOp      stencilStoreOp;
-    VkImageLayout            initialLayout;
-    VkImageLayout            finalLayout;
-} VkAttachmentDescription;
-typedef struct VkSubpassDescription {
-    VkSubpassDescriptionFlags   flags;
-    VkPipelineBindPoint      pipelineBindPoint;
-    uint32_t                 inputAttachmentCount;
-    const  VkAttachmentReference *  pInputAttachments;
-    uint32_t                 colorAttachmentCount;
-    const  VkAttachmentReference *  pColorAttachments;
-    const  VkAttachmentReference *  pResolveAttachments;
-    const  VkAttachmentReference *  pDepthStencilAttachment;
-    uint32_t                 preserveAttachmentCount;
-    const  uint32_t *  pPreserveAttachments;
-} VkSubpassDescription;
-typedef struct VkSubpassDependency {
-    uint32_t                 srcSubpass;
-    uint32_t                 dstSubpass;
-    VkPipelineStageFlags     srcStageMask;
-    VkPipelineStageFlags     dstStageMask;
-    VkAccessFlags            srcAccessMask;
-    VkAccessFlags            dstAccessMask;
-    VkDependencyFlags        dependencyFlags;
-} VkSubpassDependency;
-typedef struct VkRenderPassCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkRenderPassCreateFlags      flags;
-    uint32_t     attachmentCount;
-    const  VkAttachmentDescription *  pAttachments;
-    uint32_t                 subpassCount;
-    const  VkSubpassDescription *  pSubpasses;
-    uint32_t         dependencyCount;
-    const  VkSubpassDependency *  pDependencies;
-} VkRenderPassCreateInfo;
-typedef struct VkEventCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkEventCreateFlags       flags;
-} VkEventCreateInfo;
-typedef struct VkFenceCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkFenceCreateFlags       flags;
-} VkFenceCreateInfo;
-typedef struct VkPhysicalDeviceFeatures {
-    VkBool32                 robustBufferAccess;
-    VkBool32                 fullDrawIndexUint32;
-    VkBool32                 imageCubeArray;
-    VkBool32                 independentBlend;
-    VkBool32                 geometryShader;
-    VkBool32                 tessellationShader;
-    VkBool32                 sampleRateShading;
-    VkBool32                 dualSrcBlend;
-    VkBool32                 logicOp;
-    VkBool32                 multiDrawIndirect;
-    VkBool32                 drawIndirectFirstInstance;
-    VkBool32                 depthClamp;
-    VkBool32                 depthBiasClamp;
-    VkBool32                 fillModeNonSolid;
-    VkBool32                 depthBounds;
-    VkBool32                 wideLines;
-    VkBool32                 largePoints;
-    VkBool32                 alphaToOne;
-    VkBool32                 multiViewport;
-    VkBool32                 samplerAnisotropy;
-    VkBool32                 textureCompressionETC2;
-    VkBool32                 textureCompressionASTC_LDR;
-    VkBool32                 textureCompressionBC;
-    VkBool32                 occlusionQueryPrecise;
-    VkBool32                 pipelineStatisticsQuery;
-    VkBool32                 vertexPipelineStoresAndAtomics;
-    VkBool32                 fragmentStoresAndAtomics;
-    VkBool32                 shaderTessellationAndGeometryPointSize;
-    VkBool32                 shaderImageGatherExtended;
-    VkBool32                 shaderStorageImageExtendedFormats;
-    VkBool32                 shaderStorageImageMultisample;
-    VkBool32                 shaderStorageImageReadWithoutFormat;
-    VkBool32                 shaderStorageImageWriteWithoutFormat;
-    VkBool32                 shaderUniformBufferArrayDynamicIndexing;
-    VkBool32                 shaderSampledImageArrayDynamicIndexing;
-    VkBool32                 shaderStorageBufferArrayDynamicIndexing;
-    VkBool32                 shaderStorageImageArrayDynamicIndexing;
-    VkBool32                 shaderClipDistance;
-    VkBool32                 shaderCullDistance;
-    VkBool32                 shaderFloat64;
-    VkBool32                 shaderInt64;
-    VkBool32                 shaderInt16;
-    VkBool32                 shaderResourceResidency;
-    VkBool32                 shaderResourceMinLod;
-    VkBool32                 sparseBinding;
-    VkBool32                 sparseResidencyBuffer;
-    VkBool32                 sparseResidencyImage2D;
-    VkBool32                 sparseResidencyImage3D;
-    VkBool32                 sparseResidency2Samples;
-    VkBool32                 sparseResidency4Samples;
-    VkBool32                 sparseResidency8Samples;
-    VkBool32                 sparseResidency16Samples;
-    VkBool32                 sparseResidencyAliased;
-    VkBool32                 variableMultisampleRate;
-    VkBool32                 inheritedQueries;
-} VkPhysicalDeviceFeatures;
-typedef struct VkPhysicalDeviceSparseProperties {
-    VkBool32                 residencyStandard2DBlockShape;
-    VkBool32                 residencyStandard2DMultisampleBlockShape;
-    VkBool32                 residencyStandard3DBlockShape;
-    VkBool32                 residencyAlignedMipSize;
-    VkBool32                 residencyNonResidentStrict;
-} VkPhysicalDeviceSparseProperties;
-typedef struct VkPhysicalDeviceLimits {
-    uint32_t                 maxImageDimension1D;
-    uint32_t                 maxImageDimension2D;
-    uint32_t                 maxImageDimension3D;
-    uint32_t                 maxImageDimensionCube;
-    uint32_t                 maxImageArrayLayers;
-    uint32_t                 maxTexelBufferElements;
-    uint32_t                 maxUniformBufferRange;
-    uint32_t                 maxStorageBufferRange;
-    uint32_t                 maxPushConstantsSize;
-    uint32_t                 maxMemoryAllocationCount;
-    uint32_t                 maxSamplerAllocationCount;
-    VkDeviceSize             bufferImageGranularity;
-    VkDeviceSize             sparseAddressSpaceSize;
-    uint32_t                 maxBoundDescriptorSets;
-    uint32_t                 maxPerStageDescriptorSamplers;
-    uint32_t                 maxPerStageDescriptorUniformBuffers;
-    uint32_t                 maxPerStageDescriptorStorageBuffers;
-    uint32_t                 maxPerStageDescriptorSampledImages;
-    uint32_t                 maxPerStageDescriptorStorageImages;
-    uint32_t                 maxPerStageDescriptorInputAttachments;
-    uint32_t                 maxPerStageResources;
-    uint32_t                 maxDescriptorSetSamplers;
-    uint32_t                 maxDescriptorSetUniformBuffers;
-    uint32_t                 maxDescriptorSetUniformBuffersDynamic;
-    uint32_t                 maxDescriptorSetStorageBuffers;
-    uint32_t                 maxDescriptorSetStorageBuffersDynamic;
-    uint32_t                 maxDescriptorSetSampledImages;
-    uint32_t                 maxDescriptorSetStorageImages;
-    uint32_t                 maxDescriptorSetInputAttachments;
-    uint32_t                 maxVertexInputAttributes;
-    uint32_t                 maxVertexInputBindings;
-    uint32_t                 maxVertexInputAttributeOffset;
-    uint32_t                 maxVertexInputBindingStride;
-    uint32_t                 maxVertexOutputComponents;
-    uint32_t                 maxTessellationGenerationLevel;
-    uint32_t                 maxTessellationPatchSize;
-    uint32_t                 maxTessellationControlPerVertexInputComponents;
-    uint32_t                 maxTessellationControlPerVertexOutputComponents;
-    uint32_t                 maxTessellationControlPerPatchOutputComponents;
-    uint32_t                 maxTessellationControlTotalOutputComponents;
-    uint32_t                 maxTessellationEvaluationInputComponents;
-    uint32_t                 maxTessellationEvaluationOutputComponents;
-    uint32_t                 maxGeometryShaderInvocations;
-    uint32_t                 maxGeometryInputComponents;
-    uint32_t                 maxGeometryOutputComponents;
-    uint32_t                 maxGeometryOutputVertices;
-    uint32_t                 maxGeometryTotalOutputComponents;
-    uint32_t                 maxFragmentInputComponents;
-    uint32_t                 maxFragmentOutputAttachments;
-    uint32_t                 maxFragmentDualSrcAttachments;
-    uint32_t                 maxFragmentCombinedOutputResources;
-    uint32_t                 maxComputeSharedMemorySize;
-    uint32_t                 maxComputeWorkGroupCount [3];
-    uint32_t                 maxComputeWorkGroupInvocations;
-    uint32_t                 maxComputeWorkGroupSize [3];
-    uint32_t                 subPixelPrecisionBits;
-    uint32_t                 subTexelPrecisionBits;
-    uint32_t                 mipmapPrecisionBits;
-    uint32_t                 maxDrawIndexedIndexValue;
-    uint32_t                 maxDrawIndirectCount;
-    float                    maxSamplerLodBias;
-    float                    maxSamplerAnisotropy;
-    uint32_t                 maxViewports;
-    uint32_t                 maxViewportDimensions [2];
-    float                    viewportBoundsRange [2];
-    uint32_t                 viewportSubPixelBits;
-    size_t                   minMemoryMapAlignment;
-    VkDeviceSize             minTexelBufferOffsetAlignment;
-    VkDeviceSize             minUniformBufferOffsetAlignment;
-    VkDeviceSize             minStorageBufferOffsetAlignment;
-    int32_t                  minTexelOffset;
-    uint32_t                 maxTexelOffset;
-    int32_t                  minTexelGatherOffset;
-    uint32_t                 maxTexelGatherOffset;
-    float                    minInterpolationOffset;
-    float                    maxInterpolationOffset;
-    uint32_t                 subPixelInterpolationOffsetBits;
-    uint32_t                 maxFramebufferWidth;
-    uint32_t                 maxFramebufferHeight;
-    uint32_t                 maxFramebufferLayers;
-    VkSampleCountFlags       framebufferColorSampleCounts;
-    VkSampleCountFlags       framebufferDepthSampleCounts;
-    VkSampleCountFlags       framebufferStencilSampleCounts;
-    VkSampleCountFlags       framebufferNoAttachmentsSampleCounts;
-    uint32_t                 maxColorAttachments;
-    VkSampleCountFlags       sampledImageColorSampleCounts;
-    VkSampleCountFlags       sampledImageIntegerSampleCounts;
-    VkSampleCountFlags       sampledImageDepthSampleCounts;
-    VkSampleCountFlags       sampledImageStencilSampleCounts;
-    VkSampleCountFlags       storageImageSampleCounts;
-    uint32_t                 maxSampleMaskWords;
-    VkBool32                 timestampComputeAndGraphics;
-    float                    timestampPeriod;
-    uint32_t                 maxClipDistances;
-    uint32_t                 maxCullDistances;
-    uint32_t                 maxCombinedClipAndCullDistances;
-    uint32_t                 discreteQueuePriorities;
-    float                    pointSizeRange [2];
-    float                    lineWidthRange [2];
-    float                    pointSizeGranularity;
-    float                    lineWidthGranularity;
-    VkBool32                 strictLines;
-    VkBool32                 standardSampleLocations;
-    VkDeviceSize             optimalBufferCopyOffsetAlignment;
-    VkDeviceSize             optimalBufferCopyRowPitchAlignment;
-    VkDeviceSize             nonCoherentAtomSize;
-} VkPhysicalDeviceLimits;
-typedef struct VkSemaphoreCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkSemaphoreCreateFlags   flags;
-} VkSemaphoreCreateInfo;
-typedef struct VkQueryPoolCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkQueryPoolCreateFlags   flags;
-    VkQueryType              queryType;
-    uint32_t                 queryCount;
-    VkQueryPipelineStatisticFlags   pipelineStatistics;
-} VkQueryPoolCreateInfo;
-typedef struct VkFramebufferCreateInfo {
-    VkStructureType   sType;
-    const  void *             pNext;
-    VkFramebufferCreateFlags      flags;
-    VkRenderPass             renderPass;
-    uint32_t                 attachmentCount;
-    const  VkImageView *      pAttachments;
-    uint32_t                 width;
-    uint32_t                 height;
-    uint32_t                 layers;
-} VkFramebufferCreateInfo;
-typedef struct VkSubmitInfo {
-    VkStructureType   sType;
-    const  void *  pNext;
-    uint32_t         waitSemaphoreCount;
-    const  VkSemaphore *      pWaitSemaphores;
-    const  VkPipelineStageFlags *            pWaitDstStageMask;
-    uint32_t         commandBufferCount;
-    const  VkCommandBuffer *      pCommandBuffers;
-    uint32_t         signalSemaphoreCount;
-    const  VkSemaphore *      pSignalSemaphores;
-} VkSubmitInfo;
-typedef struct VkSurfaceCapabilitiesKHR {
-    uint32_t                           minImageCount;
-    uint32_t                           maxImageCount;
-    VkExtent2D                         currentExtent;
-    VkExtent2D                         minImageExtent;
-    VkExtent2D                         maxImageExtent;
-    uint32_t                           maxImageArrayLayers;
-    VkSurfaceTransformFlagsKHR         supportedTransforms;
-    VkSurfaceTransformFlagBitsKHR      currentTransform;
-    VkCompositeAlphaFlagsKHR           supportedCompositeAlpha;
-    VkImageUsageFlags                  supportedUsageFlags;
-} VkSurfaceCapabilitiesKHR;
-typedef struct VkSwapchainCreateInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkSwapchainCreateFlagsKHR          flags;
-    VkSurfaceKHR                       surface;
-    uint32_t                           minImageCount;
-    VkFormat                           imageFormat;
-    VkColorSpaceKHR                    imageColorSpace;
-    VkExtent2D                         imageExtent;
-    uint32_t                           imageArrayLayers;
-    VkImageUsageFlags                  imageUsage;
-    VkSharingMode                      imageSharingMode;
-    uint32_t           queueFamilyIndexCount;
-    const  uint32_t *                   pQueueFamilyIndices;
-    VkSurfaceTransformFlagBitsKHR      preTransform;
-    VkCompositeAlphaFlagBitsKHR        compositeAlpha;
-    VkPresentModeKHR                   presentMode;
-    VkBool32                           clipped;
-    VkSwapchainKHR     oldSwapchain;
-} VkSwapchainCreateInfoKHR;
-typedef struct VkDebugReportCallbackCreateInfoEXT {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkDebugReportFlagsEXT              flags;
-    PFN_vkDebugReportCallbackEXT       pfnCallback;
-    void *             pUserData;
-} VkDebugReportCallbackCreateInfoEXT;
-typedef struct VkPhysicalDeviceFeatures2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkPhysicalDeviceFeatures           features;
-} VkPhysicalDeviceFeatures2;
-typedef struct VkFormatProperties2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkFormatProperties                 formatProperties;
-} VkFormatProperties2;
-typedef struct VkImageFormatProperties2 {
-    VkStructureType   sType;
-    void *  pNext;
-    VkImageFormatProperties            imageFormatProperties;
-} VkImageFormatProperties2;
-typedef struct VkPhysicalDeviceImageFormatInfo2 {
-    VkStructureType   sType;
-    const  void *  pNext;
-    VkFormat                           format;
-    VkImageType                        type;
-    VkImageTiling                      tiling;
-    VkImageUsageFlags                  usage;
-    VkImageCreateFlags   flags;
-} VkPhysicalDeviceImageFormatInfo2;
-typedef struct VkQueueFamilyProperties2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkQueueFamilyProperties            queueFamilyProperties;
-} VkQueueFamilyProperties2;
-typedef struct VkSparseImageFormatProperties2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkSparseImageFormatProperties      properties;
-} VkSparseImageFormatProperties2;
-typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkFormat                           format;
-    VkImageType                        type;
-    VkSampleCountFlagBits              samples;
-    VkImageUsageFlags                  usage;
-    VkImageTiling                      tiling;
-} VkPhysicalDeviceSparseImageFormatInfo2;
-typedef struct VkPhysicalDeviceVariablePointersFeatures {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkBool32                           variablePointersStorageBuffer;
-    VkBool32                           variablePointers;
-} VkPhysicalDeviceVariablePointersFeatures;
-typedef struct VkPhysicalDeviceVariablePointerFeatures  VkPhysicalDeviceVariablePointerFeatures;
-typedef struct VkExternalMemoryProperties {
-    VkExternalMemoryFeatureFlags    externalMemoryFeatures;
-    VkExternalMemoryHandleTypeFlags   exportFromImportedHandleTypes;
-    VkExternalMemoryHandleTypeFlags   compatibleHandleTypes;
-} VkExternalMemoryProperties;
-typedef struct VkExternalImageFormatProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkExternalMemoryProperties   externalMemoryProperties;
-} VkExternalImageFormatProperties;
-typedef struct VkPhysicalDeviceExternalBufferInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkBufferCreateFlags   flags;
-    VkBufferUsageFlags                 usage;
-    VkExternalMemoryHandleTypeFlagBits   handleType;
-} VkPhysicalDeviceExternalBufferInfo;
-typedef struct VkExternalBufferProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkExternalMemoryProperties      externalMemoryProperties;
-} VkExternalBufferProperties;
-typedef struct VkPhysicalDeviceIDProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    uint8_t                            deviceUUID [ VK_UUID_SIZE ];
-    uint8_t                            driverUUID [ VK_UUID_SIZE ];
-    uint8_t                            deviceLUID [ VK_LUID_SIZE ];
-    uint32_t                           deviceNodeMask;
-    VkBool32                           deviceLUIDValid;
-} VkPhysicalDeviceIDProperties;
-typedef struct VkExternalMemoryImageCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalMemoryHandleTypeFlags   handleTypes;
-} VkExternalMemoryImageCreateInfo;
-typedef struct VkExternalMemoryBufferCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalMemoryHandleTypeFlags   handleTypes;
-} VkExternalMemoryBufferCreateInfo;
-typedef struct VkExportMemoryAllocateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalMemoryHandleTypeFlags   handleTypes;
-} VkExportMemoryAllocateInfo;
-typedef struct VkExternalSemaphoreProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkExternalSemaphoreHandleTypeFlags   exportFromImportedHandleTypes;
-    VkExternalSemaphoreHandleTypeFlags   compatibleHandleTypes;
-    VkExternalSemaphoreFeatureFlags   externalSemaphoreFeatures;
-} VkExternalSemaphoreProperties;
-typedef struct VkExportSemaphoreCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalSemaphoreHandleTypeFlags   handleTypes;
-} VkExportSemaphoreCreateInfo;
-typedef struct VkExternalFenceProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkExternalFenceHandleTypeFlags   exportFromImportedHandleTypes;
-    VkExternalFenceHandleTypeFlags   compatibleHandleTypes;
-    VkExternalFenceFeatureFlags   externalFenceFeatures;
-} VkExternalFenceProperties;
-typedef struct VkExportFenceCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkExternalFenceHandleTypeFlags   handleTypes;
-} VkExportFenceCreateInfo;
-typedef struct VkPhysicalDeviceMultiviewFeatures {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkBool32                           multiview;
-    VkBool32                           multiviewGeometryShader;
-    VkBool32                           multiviewTessellationShader;
-} VkPhysicalDeviceMultiviewFeatures;
-typedef struct VkPhysicalDeviceGroupProperties {
-    VkStructureType   sType;
-    void *                             pNext;
-    uint32_t                           physicalDeviceCount;
-    VkPhysicalDevice                   physicalDevices [ VK_MAX_DEVICE_GROUP_SIZE ];
-    VkBool32                           subsetAllocation;
-} VkPhysicalDeviceGroupProperties;
-typedef struct VkMemoryAllocateFlagsInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkMemoryAllocateFlags   flags;
-    uint32_t                           deviceMask;
-} VkMemoryAllocateFlagsInfo;
-typedef struct VkBindBufferMemoryInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkBuffer                           buffer;
-    VkDeviceMemory                     memory;
-    VkDeviceSize                       memoryOffset;
-} VkBindBufferMemoryInfo;
-typedef struct VkBindImageMemoryInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkImage                            image;
-    VkDeviceMemory                     memory;
-    VkDeviceSize                       memoryOffset;
-} VkBindImageMemoryInfo;
-typedef struct VkDeviceGroupPresentCapabilitiesKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    uint32_t                           presentMask [ VK_MAX_DEVICE_GROUP_SIZE ];
-    VkDeviceGroupPresentModeFlagsKHR   modes;
-} VkDeviceGroupPresentCapabilitiesKHR;
-typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkDeviceGroupPresentModeFlagsKHR                           modes;
-} VkDeviceGroupSwapchainCreateInfoKHR;
-typedef struct VkDescriptorUpdateTemplateCreateInfo {
-    VkStructureType   sType;
-    const  void *                                pNext;
-    VkDescriptorUpdateTemplateCreateFlags      flags;
-    uint32_t                   descriptorUpdateEntryCount;
-    const  VkDescriptorUpdateTemplateEntry *  pDescriptorUpdateEntries;
-    VkDescriptorUpdateTemplateType   templateType;
-    VkDescriptorSetLayout   descriptorSetLayout;
-    VkPipelineBindPoint   pipelineBindPoint;
-    VkPipelineLayout pipelineLayout;
-    uint32_t   set;
-} VkDescriptorUpdateTemplateCreateInfo;
-typedef struct VkInputAttachmentAspectReference {
-    uint32_t                          subpass;
-    uint32_t                          inputAttachmentIndex;
-    VkImageAspectFlags                aspectMask;
-} VkInputAttachmentAspectReference;
-typedef struct VkRenderPassInputAttachmentAspectCreateInfo {
-    VkStructureType   sType;
-    const  void *                      pNext;
-    uint32_t                          aspectReferenceCount;
-    const  VkInputAttachmentAspectReference *  pAspectReferences;
-} VkRenderPassInputAttachmentAspectCreateInfo;
-typedef struct VkPhysicalDevice16BitStorageFeatures {
-    VkStructureType   sType;
-    void *       pNext;
-    VkBool32                           storageBuffer16BitAccess;
-    VkBool32                           uniformAndStorageBuffer16BitAccess;
-    VkBool32                           storagePushConstant16;
-    VkBool32                           storageInputOutput16;
-} VkPhysicalDevice16BitStorageFeatures;
-typedef struct VkPhysicalDeviceSubgroupProperties {
-    VkStructureType   sType;
-    void *                    pNext;
-    uint32_t                        subgroupSize;
-    VkShaderStageFlags              supportedStages;
-    VkSubgroupFeatureFlags          supportedOperations;
-    VkBool32   quadOperationsInAllStages;
-} VkPhysicalDeviceSubgroupProperties;
-typedef struct VkMemoryRequirements2 {
-    VkStructureType   sType;
-    void *  pNext;
-    VkMemoryRequirements                                                   memoryRequirements;
-} VkMemoryRequirements2;
-typedef struct VkMemoryRequirements2KHR  VkMemoryRequirements2KHR;
-typedef struct VkSparseImageMemoryRequirements2 {
-    VkStructureType   sType;
-    void *                                        pNext;
-    VkSparseImageMemoryRequirements                                        memoryRequirements;
-} VkSparseImageMemoryRequirements2;
-typedef struct VkMemoryDedicatedRequirements {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkBool32                           prefersDedicatedAllocation;
-    VkBool32                           requiresDedicatedAllocation;
-} VkMemoryDedicatedRequirements;
-typedef struct VkImageViewUsageCreateInfo {
-    VkStructureType   sType;
-    const  void *  pNext;
-    VkImageUsageFlags   usage;
-} VkImageViewUsageCreateInfo;
-typedef struct VkSamplerYcbcrConversionCreateInfo {
-    VkStructureType   sType;
-    const  void *                       pNext;
-    VkFormat                           format;
-    VkSamplerYcbcrModelConversion   ycbcrModel;
-    VkSamplerYcbcrRange             ycbcrRange;
-    VkComponentMapping                 components;
-    VkChromaLocation                xChromaOffset;
-    VkChromaLocation                yChromaOffset;
-    VkFilter                           chromaFilter;
-    VkBool32                           forceExplicitReconstruction;
-} VkSamplerYcbcrConversionCreateInfo;
-typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {
-    VkStructureType   sType;
-    void *       pNext;
-    VkBool32                           samplerYcbcrConversion;
-} VkPhysicalDeviceSamplerYcbcrConversionFeatures;
-typedef struct VkProtectedSubmitInfo {
-    VkStructureType   sType;
-    const  void *                      pNext;
-    VkBool32                          protectedSubmit;
-} VkProtectedSubmitInfo;
-typedef struct VkPhysicalDeviceProtectedMemoryFeatures {
-    VkStructureType   sType;
-    void *                                pNext;
-    VkBool32                              protectedMemory;
-} VkPhysicalDeviceProtectedMemoryFeatures;
-typedef struct VkPhysicalDeviceProtectedMemoryProperties {
-    VkStructureType   sType;
-    void *                                pNext;
-    VkBool32                              protectedNoFault;
-} VkPhysicalDeviceProtectedMemoryProperties;
-typedef struct VkDeviceQueueInfo2 {
-    VkStructureType   sType;
-    const  void *                          pNext;
-    VkDeviceQueueCreateFlags              flags;
-    uint32_t                              queueFamilyIndex;
-    uint32_t                              queueIndex;
-} VkDeviceQueueInfo2;
-typedef struct VkPhysicalDeviceMaintenance3Properties {
-    VkStructureType   sType;
-    void *                             pNext;
-    uint32_t                           maxPerSetDescriptors;
-    VkDeviceSize                       maxMemoryAllocationSize;
-} VkPhysicalDeviceMaintenance3Properties;
-typedef struct VkDescriptorSetLayoutSupport {
-    VkStructureType   sType;
-    void *             pNext;
-    VkBool32           supported;
-} VkDescriptorSetLayoutSupport;
-typedef struct VkPhysicalDeviceShaderDrawParametersFeatures {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkBool32                           shaderDrawParameters;
-} VkPhysicalDeviceShaderDrawParametersFeatures;
-typedef struct VkPhysicalDeviceShaderDrawParameterFeatures  VkPhysicalDeviceShaderDrawParameterFeatures;
-typedef struct VkPhysicalDeviceProperties {
-    uint32_t         apiVersion;
-    uint32_t         driverVersion;
-    uint32_t         vendorID;
-    uint32_t         deviceID;
-    VkPhysicalDeviceType   deviceType;
-    char             deviceName [ VK_MAX_PHYSICAL_DEVICE_NAME_SIZE ];
-    uint8_t          pipelineCacheUUID [ VK_UUID_SIZE ];
-    VkPhysicalDeviceLimits   limits;
-    VkPhysicalDeviceSparseProperties   sparseProperties;
-} VkPhysicalDeviceProperties;
-typedef struct VkDeviceCreateInfo {
-    VkStructureType   sType;
-    const  void *      pNext;
-    VkDeviceCreateFlags      flags;
-    uint32_t          queueCreateInfoCount;
-    const  VkDeviceQueueCreateInfo *  pQueueCreateInfos;
-    uint32_t                 enabledLayerCount;
-    const  char * const*       ppEnabledLayerNames;
-    uint32_t                 enabledExtensionCount;
-    const  char * const*       ppEnabledExtensionNames;
-    const  VkPhysicalDeviceFeatures *  pEnabledFeatures;
-} VkDeviceCreateInfo;
-typedef struct VkPhysicalDeviceMemoryProperties {
-    uint32_t                 memoryTypeCount;
-    VkMemoryType             memoryTypes [ VK_MAX_MEMORY_TYPES ];
-    uint32_t                 memoryHeapCount;
-    VkMemoryHeap             memoryHeaps [ VK_MAX_MEMORY_HEAPS ];
-} VkPhysicalDeviceMemoryProperties;
-typedef struct VkPhysicalDeviceProperties2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkPhysicalDeviceProperties         properties;
-} VkPhysicalDeviceProperties2;
-typedef struct VkPhysicalDeviceMemoryProperties2 {
-    VkStructureType   sType;
-    void *                             pNext;
-    VkPhysicalDeviceMemoryProperties   memoryProperties;
-} VkPhysicalDeviceMemoryProperties2;
-
-
-#define VK_VERSION_1_0 1
-GLAD_API_CALL int GLAD_VK_VERSION_1_0;
-#define VK_VERSION_1_1 1
-GLAD_API_CALL int GLAD_VK_VERSION_1_1;
-#define VK_EXT_debug_report 1
-GLAD_API_CALL int GLAD_VK_EXT_debug_report;
-#define VK_KHR_surface 1
-GLAD_API_CALL int GLAD_VK_KHR_surface;
-#define VK_KHR_swapchain 1
-GLAD_API_CALL int GLAD_VK_KHR_swapchain;
-
-
-typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice   device, const  VkAcquireNextImageInfoKHR *  pAcquireInfo, uint32_t *  pImageIndex);
-typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImageKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint64_t   timeout, VkSemaphore   semaphore, VkFence   fence, uint32_t *  pImageIndex);
-typedef VkResult (GLAD_API_PTR *PFN_vkAllocateCommandBuffers)(VkDevice   device, const  VkCommandBufferAllocateInfo *  pAllocateInfo, VkCommandBuffer *  pCommandBuffers);
-typedef VkResult (GLAD_API_PTR *PFN_vkAllocateDescriptorSets)(VkDevice   device, const  VkDescriptorSetAllocateInfo *  pAllocateInfo, VkDescriptorSet *  pDescriptorSets);
-typedef VkResult (GLAD_API_PTR *PFN_vkAllocateMemory)(VkDevice   device, const  VkMemoryAllocateInfo *  pAllocateInfo, const  VkAllocationCallbacks *  pAllocator, VkDeviceMemory *  pMemory);
-typedef VkResult (GLAD_API_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer   commandBuffer, const  VkCommandBufferBeginInfo *  pBeginInfo);
-typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory)(VkDevice   device, VkBuffer   buffer, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);
-typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindBufferMemoryInfo *  pBindInfos);
-typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory)(VkDevice   device, VkImage   image, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);
-typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindImageMemoryInfo *  pBindInfos);
-typedef void (GLAD_API_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query, VkQueryControlFlags   flags);
-typedef void (GLAD_API_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer   commandBuffer, const  VkRenderPassBeginInfo *  pRenderPassBegin, VkSubpassContents   contents);
-typedef void (GLAD_API_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipelineLayout   layout, uint32_t   firstSet, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets, uint32_t   dynamicOffsetCount, const  uint32_t *  pDynamicOffsets);
-typedef void (GLAD_API_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, VkIndexType   indexType);
-typedef void (GLAD_API_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipeline   pipeline);
-typedef void (GLAD_API_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer   commandBuffer, uint32_t   firstBinding, uint32_t   bindingCount, const  VkBuffer *  pBuffers, const  VkDeviceSize *  pOffsets);
-typedef void (GLAD_API_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageBlit *  pRegions, VkFilter   filter);
-typedef void (GLAD_API_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer   commandBuffer, uint32_t   attachmentCount, const  VkClearAttachment *  pAttachments, uint32_t   rectCount, const  VkClearRect *  pRects);
-typedef void (GLAD_API_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearColorValue *  pColor, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);
-typedef void (GLAD_API_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearDepthStencilValue *  pDepthStencil, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);
-typedef void (GLAD_API_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferCopy *  pRegions);
-typedef void (GLAD_API_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);
-typedef void (GLAD_API_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageCopy *  pRegions);
-typedef void (GLAD_API_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);
-typedef void (GLAD_API_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   stride, VkQueryResultFlags   flags);
-typedef void (GLAD_API_PTR *PFN_vkCmdDispatch)(VkCommandBuffer   commandBuffer, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);
-typedef void (GLAD_API_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer   commandBuffer, uint32_t   baseGroupX, uint32_t   baseGroupY, uint32_t   baseGroupZ, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);
-typedef void (GLAD_API_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset);
-typedef void (GLAD_API_PTR *PFN_vkCmdDraw)(VkCommandBuffer   commandBuffer, uint32_t   vertexCount, uint32_t   instanceCount, uint32_t   firstVertex, uint32_t   firstInstance);
-typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer   commandBuffer, uint32_t   indexCount, uint32_t   instanceCount, uint32_t   firstIndex, int32_t   vertexOffset, uint32_t   firstInstance);
-typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);
-typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);
-typedef void (GLAD_API_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query);
-typedef void (GLAD_API_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer   commandBuffer);
-typedef void (GLAD_API_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer   commandBuffer, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);
-typedef void (GLAD_API_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   size, uint32_t   data);
-typedef void (GLAD_API_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer   commandBuffer, VkSubpassContents   contents);
-typedef void (GLAD_API_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer   commandBuffer, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, VkDependencyFlags   dependencyFlags, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);
-typedef void (GLAD_API_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer   commandBuffer, VkPipelineLayout   layout, VkShaderStageFlags   stageFlags, uint32_t   offset, uint32_t   size, const  void *  pValues);
-typedef void (GLAD_API_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);
-typedef void (GLAD_API_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount);
-typedef void (GLAD_API_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageResolve *  pRegions);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer   commandBuffer, const  float   blendConstants [4]);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer   commandBuffer, float   depthBiasConstantFactor, float   depthBiasClamp, float   depthBiasSlopeFactor);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer   commandBuffer, float   minDepthBounds, float   maxDepthBounds);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer   commandBuffer, uint32_t   deviceMask);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer   commandBuffer, float   lineWidth);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer   commandBuffer, uint32_t   firstScissor, uint32_t   scissorCount, const  VkRect2D *  pScissors);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   compareMask);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   reference);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   writeMask);
-typedef void (GLAD_API_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer   commandBuffer, uint32_t   firstViewport, uint32_t   viewportCount, const  VkViewport *  pViewports);
-typedef void (GLAD_API_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   dataSize, const  void *  pData);
-typedef void (GLAD_API_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer   commandBuffer, uint32_t   eventCount, const  VkEvent *  pEvents, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);
-typedef void (GLAD_API_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer   commandBuffer, VkPipelineStageFlagBits   pipelineStage, VkQueryPool   queryPool, uint32_t   query);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateBuffer)(VkDevice   device, const  VkBufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBuffer *  pBuffer);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateBufferView)(VkDevice   device, const  VkBufferViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBufferView *  pView);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateCommandPool)(VkDevice   device, const  VkCommandPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkCommandPool *  pCommandPool);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateComputePipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkComputePipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance   instance, const  VkDebugReportCallbackCreateInfoEXT *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDebugReportCallbackEXT *  pCallback);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorPool)(VkDevice   device, const  VkDescriptorPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorPool *  pDescriptorPool);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorSetLayout *  pSetLayout);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice   device, const  VkDescriptorUpdateTemplateCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorUpdateTemplate *  pDescriptorUpdateTemplate);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateDevice)(VkPhysicalDevice   physicalDevice, const  VkDeviceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDevice *  pDevice);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateEvent)(VkDevice   device, const  VkEventCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkEvent *  pEvent);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateFence)(VkDevice   device, const  VkFenceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFence *  pFence);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateFramebuffer)(VkDevice   device, const  VkFramebufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFramebuffer *  pFramebuffer);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkGraphicsPipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateImage)(VkDevice   device, const  VkImageCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImage *  pImage);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateImageView)(VkDevice   device, const  VkImageViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImageView *  pView);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateInstance)(const  VkInstanceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkInstance *  pInstance);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineCache)(VkDevice   device, const  VkPipelineCacheCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineCache *  pPipelineCache);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineLayout)(VkDevice   device, const  VkPipelineLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineLayout *  pPipelineLayout);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateQueryPool)(VkDevice   device, const  VkQueryPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkQueryPool *  pQueryPool);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateRenderPass)(VkDevice   device, const  VkRenderPassCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkRenderPass *  pRenderPass);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateSampler)(VkDevice   device, const  VkSamplerCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSampler *  pSampler);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice   device, const  VkSamplerYcbcrConversionCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSamplerYcbcrConversion *  pYcbcrConversion);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateSemaphore)(VkDevice   device, const  VkSemaphoreCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSemaphore *  pSemaphore);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateShaderModule)(VkDevice   device, const  VkShaderModuleCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkShaderModule *  pShaderModule);
-typedef VkResult (GLAD_API_PTR *PFN_vkCreateSwapchainKHR)(VkDevice   device, const  VkSwapchainCreateInfoKHR *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSwapchainKHR *  pSwapchain);
-typedef void (GLAD_API_PTR *PFN_vkDebugReportMessageEXT)(VkInstance   instance, VkDebugReportFlagsEXT   flags, VkDebugReportObjectTypeEXT   objectType, uint64_t   object, size_t   location, int32_t   messageCode, const  char *  pLayerPrefix, const  char *  pMessage);
-typedef void (GLAD_API_PTR *PFN_vkDestroyBuffer)(VkDevice   device, VkBuffer   buffer, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyBufferView)(VkDevice   device, VkBufferView   bufferView, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyCommandPool)(VkDevice   device, VkCommandPool   commandPool, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance   instance, VkDebugReportCallbackEXT   callback, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice   device, VkDescriptorSetLayout   descriptorSetLayout, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice   device, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyDevice)(VkDevice   device, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyEvent)(VkDevice   device, VkEvent   event, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyFence)(VkDevice   device, VkFence   fence, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyFramebuffer)(VkDevice   device, VkFramebuffer   framebuffer, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyImage)(VkDevice   device, VkImage   image, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyImageView)(VkDevice   device, VkImageView   imageView, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyInstance)(VkInstance   instance, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyPipeline)(VkDevice   device, VkPipeline   pipeline, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineCache)(VkDevice   device, VkPipelineCache   pipelineCache, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineLayout)(VkDevice   device, VkPipelineLayout   pipelineLayout, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyQueryPool)(VkDevice   device, VkQueryPool   queryPool, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyRenderPass)(VkDevice   device, VkRenderPass   renderPass, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroySampler)(VkDevice   device, VkSampler   sampler, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice   device, VkSamplerYcbcrConversion   ycbcrConversion, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroySemaphore)(VkDevice   device, VkSemaphore   semaphore, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroyShaderModule)(VkDevice   device, VkShaderModule   shaderModule, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroySurfaceKHR)(VkInstance   instance, VkSurfaceKHR   surface, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkDestroySwapchainKHR)(VkDevice   device, VkSwapchainKHR   swapchain, const  VkAllocationCallbacks *  pAllocator);
-typedef VkResult (GLAD_API_PTR *PFN_vkDeviceWaitIdle)(VkDevice   device);
-typedef VkResult (GLAD_API_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer   commandBuffer);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice   physicalDevice, const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t *  pApiVersion);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance   instance, uint32_t *  pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *  pPhysicalDeviceGroupProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance   instance, uint32_t *  pPhysicalDeviceCount, VkPhysicalDevice *  pPhysicalDevices);
-typedef VkResult (GLAD_API_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);
-typedef void (GLAD_API_PTR *PFN_vkFreeCommandBuffers)(VkDevice   device, VkCommandPool   commandPool, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);
-typedef VkResult (GLAD_API_PTR *PFN_vkFreeDescriptorSets)(VkDevice   device, VkDescriptorPool   descriptorPool, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets);
-typedef void (GLAD_API_PTR *PFN_vkFreeMemory)(VkDevice   device, VkDeviceMemory   memory, const  VkAllocationCallbacks *  pAllocator);
-typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice   device, VkBuffer   buffer, VkMemoryRequirements *  pMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice   device, const  VkBufferMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, VkDescriptorSetLayoutSupport *  pSupport);
-typedef void (GLAD_API_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice   device, uint32_t   heapIndex, uint32_t   localDeviceIndex, uint32_t   remoteDeviceIndex, VkPeerMemoryFeatureFlags *  pPeerMemoryFeatures);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice   device, VkDeviceGroupPresentCapabilitiesKHR *  pDeviceGroupPresentCapabilities);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice   device, VkSurfaceKHR   surface, VkDeviceGroupPresentModeFlagsKHR *  pModes);
-typedef void (GLAD_API_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize *  pCommittedMemoryInBytes);
-typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetDeviceProcAddr)(VkDevice   device, const  char *  pName);
-typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue)(VkDevice   device, uint32_t   queueFamilyIndex, uint32_t   queueIndex, VkQueue *  pQueue);
-typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue2)(VkDevice   device, const  VkDeviceQueueInfo2 *  pQueueInfo, VkQueue *  pQueue);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetEventStatus)(VkDevice   device, VkEvent   event);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetFenceStatus)(VkDevice   device, VkFence   fence);
-typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice   device, VkImage   image, VkMemoryRequirements *  pMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice   device, const  VkImageMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice   device, VkImage   image, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *  pSparseMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice   device, const  VkImageSparseMemoryRequirementsInfo2 *  pInfo, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *  pSparseMemoryRequirements);
-typedef void (GLAD_API_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice   device, VkImage   image, const  VkImageSubresource *  pSubresource, VkSubresourceLayout *  pLayout);
-typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetInstanceProcAddr)(VkInstance   instance, const  char *  pName);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalBufferInfo *  pExternalBufferInfo, VkExternalBufferProperties *  pExternalBufferProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalFenceInfo *  pExternalFenceInfo, VkExternalFenceProperties *  pExternalFenceProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalSemaphoreInfo *  pExternalSemaphoreInfo, VkExternalSemaphoreProperties *  pExternalSemaphoreProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures *  pFeatures);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures2 *  pFeatures);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties *  pFormatProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties2 *  pFormatProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkImageTiling   tiling, VkImageUsageFlags   usage, VkImageCreateFlags   flags, VkImageFormatProperties *  pImageFormatProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceImageFormatInfo2 *  pImageFormatInfo, VkImageFormatProperties2 *  pImageFormatProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties *  pMemoryProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties2 *  pMemoryProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pRectCount, VkRect2D *  pRects);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties *  pProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties2 *  pProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties *  pQueueFamilyProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *  pQueueFamilyProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkSampleCountFlagBits   samples, VkImageUsageFlags   usage, VkImageTiling   tiling, uint32_t *  pPropertyCount, VkSparseImageFormatProperties *  pProperties);
-typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceSparseImageFormatInfo2 *  pFormatInfo, uint32_t *  pPropertyCount, VkSparseImageFormatProperties2 *  pProperties);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, VkSurfaceCapabilitiesKHR *  pSurfaceCapabilities);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pSurfaceFormatCount, VkSurfaceFormatKHR *  pSurfaceFormats);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pPresentModeCount, VkPresentModeKHR *  pPresentModes);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice   physicalDevice, uint32_t   queueFamilyIndex, VkSurfaceKHR   surface, VkBool32 *  pSupported);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetPipelineCacheData)(VkDevice   device, VkPipelineCache   pipelineCache, size_t *  pDataSize, void *  pData);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetQueryPoolResults)(VkDevice   device, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, size_t   dataSize, void *  pData, VkDeviceSize   stride, VkQueryResultFlags   flags);
-typedef void (GLAD_API_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice   device, VkRenderPass   renderPass, VkExtent2D *  pGranularity);
-typedef VkResult (GLAD_API_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint32_t *  pSwapchainImageCount, VkImage *  pSwapchainImages);
-typedef VkResult (GLAD_API_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);
-typedef VkResult (GLAD_API_PTR *PFN_vkMapMemory)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize   offset, VkDeviceSize   size, VkMemoryMapFlags   flags, void **  ppData);
-typedef VkResult (GLAD_API_PTR *PFN_vkMergePipelineCaches)(VkDevice   device, VkPipelineCache   dstCache, uint32_t   srcCacheCount, const  VkPipelineCache *  pSrcCaches);
-typedef VkResult (GLAD_API_PTR *PFN_vkQueueBindSparse)(VkQueue   queue, uint32_t   bindInfoCount, const  VkBindSparseInfo *  pBindInfo, VkFence   fence);
-typedef VkResult (GLAD_API_PTR *PFN_vkQueuePresentKHR)(VkQueue   queue, const  VkPresentInfoKHR *  pPresentInfo);
-typedef VkResult (GLAD_API_PTR *PFN_vkQueueSubmit)(VkQueue   queue, uint32_t   submitCount, const  VkSubmitInfo *  pSubmits, VkFence   fence);
-typedef VkResult (GLAD_API_PTR *PFN_vkQueueWaitIdle)(VkQueue   queue);
-typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer   commandBuffer, VkCommandBufferResetFlags   flags);
-typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolResetFlags   flags);
-typedef VkResult (GLAD_API_PTR *PFN_vkResetDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, VkDescriptorPoolResetFlags   flags);
-typedef VkResult (GLAD_API_PTR *PFN_vkResetEvent)(VkDevice   device, VkEvent   event);
-typedef VkResult (GLAD_API_PTR *PFN_vkResetFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences);
-typedef VkResult (GLAD_API_PTR *PFN_vkSetEvent)(VkDevice   device, VkEvent   event);
-typedef void (GLAD_API_PTR *PFN_vkTrimCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolTrimFlags   flags);
-typedef void (GLAD_API_PTR *PFN_vkUnmapMemory)(VkDevice   device, VkDeviceMemory   memory);
-typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice   device, VkDescriptorSet   descriptorSet, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  void *  pData);
-typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSets)(VkDevice   device, uint32_t   descriptorWriteCount, const  VkWriteDescriptorSet *  pDescriptorWrites, uint32_t   descriptorCopyCount, const  VkCopyDescriptorSet *  pDescriptorCopies);
-typedef VkResult (GLAD_API_PTR *PFN_vkWaitForFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences, VkBool32   waitAll, uint64_t   timeout);
-
-GLAD_API_CALL PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR;
-#define vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR
-GLAD_API_CALL PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR;
-#define vkAcquireNextImageKHR glad_vkAcquireNextImageKHR
-GLAD_API_CALL PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers;
-#define vkAllocateCommandBuffers glad_vkAllocateCommandBuffers
-GLAD_API_CALL PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets;
-#define vkAllocateDescriptorSets glad_vkAllocateDescriptorSets
-GLAD_API_CALL PFN_vkAllocateMemory glad_vkAllocateMemory;
-#define vkAllocateMemory glad_vkAllocateMemory
-GLAD_API_CALL PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer;
-#define vkBeginCommandBuffer glad_vkBeginCommandBuffer
-GLAD_API_CALL PFN_vkBindBufferMemory glad_vkBindBufferMemory;
-#define vkBindBufferMemory glad_vkBindBufferMemory
-GLAD_API_CALL PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2;
-#define vkBindBufferMemory2 glad_vkBindBufferMemory2
-GLAD_API_CALL PFN_vkBindImageMemory glad_vkBindImageMemory;
-#define vkBindImageMemory glad_vkBindImageMemory
-GLAD_API_CALL PFN_vkBindImageMemory2 glad_vkBindImageMemory2;
-#define vkBindImageMemory2 glad_vkBindImageMemory2
-GLAD_API_CALL PFN_vkCmdBeginQuery glad_vkCmdBeginQuery;
-#define vkCmdBeginQuery glad_vkCmdBeginQuery
-GLAD_API_CALL PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass;
-#define vkCmdBeginRenderPass glad_vkCmdBeginRenderPass
-GLAD_API_CALL PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets;
-#define vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets
-GLAD_API_CALL PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer;
-#define vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer
-GLAD_API_CALL PFN_vkCmdBindPipeline glad_vkCmdBindPipeline;
-#define vkCmdBindPipeline glad_vkCmdBindPipeline
-GLAD_API_CALL PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers;
-#define vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers
-GLAD_API_CALL PFN_vkCmdBlitImage glad_vkCmdBlitImage;
-#define vkCmdBlitImage glad_vkCmdBlitImage
-GLAD_API_CALL PFN_vkCmdClearAttachments glad_vkCmdClearAttachments;
-#define vkCmdClearAttachments glad_vkCmdClearAttachments
-GLAD_API_CALL PFN_vkCmdClearColorImage glad_vkCmdClearColorImage;
-#define vkCmdClearColorImage glad_vkCmdClearColorImage
-GLAD_API_CALL PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage;
-#define vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage
-GLAD_API_CALL PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer;
-#define vkCmdCopyBuffer glad_vkCmdCopyBuffer
-GLAD_API_CALL PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage;
-#define vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage
-GLAD_API_CALL PFN_vkCmdCopyImage glad_vkCmdCopyImage;
-#define vkCmdCopyImage glad_vkCmdCopyImage
-GLAD_API_CALL PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer;
-#define vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer
-GLAD_API_CALL PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults;
-#define vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults
-GLAD_API_CALL PFN_vkCmdDispatch glad_vkCmdDispatch;
-#define vkCmdDispatch glad_vkCmdDispatch
-GLAD_API_CALL PFN_vkCmdDispatchBase glad_vkCmdDispatchBase;
-#define vkCmdDispatchBase glad_vkCmdDispatchBase
-GLAD_API_CALL PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect;
-#define vkCmdDispatchIndirect glad_vkCmdDispatchIndirect
-GLAD_API_CALL PFN_vkCmdDraw glad_vkCmdDraw;
-#define vkCmdDraw glad_vkCmdDraw
-GLAD_API_CALL PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed;
-#define vkCmdDrawIndexed glad_vkCmdDrawIndexed
-GLAD_API_CALL PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect;
-#define vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect
-GLAD_API_CALL PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect;
-#define vkCmdDrawIndirect glad_vkCmdDrawIndirect
-GLAD_API_CALL PFN_vkCmdEndQuery glad_vkCmdEndQuery;
-#define vkCmdEndQuery glad_vkCmdEndQuery
-GLAD_API_CALL PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass;
-#define vkCmdEndRenderPass glad_vkCmdEndRenderPass
-GLAD_API_CALL PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands;
-#define vkCmdExecuteCommands glad_vkCmdExecuteCommands
-GLAD_API_CALL PFN_vkCmdFillBuffer glad_vkCmdFillBuffer;
-#define vkCmdFillBuffer glad_vkCmdFillBuffer
-GLAD_API_CALL PFN_vkCmdNextSubpass glad_vkCmdNextSubpass;
-#define vkCmdNextSubpass glad_vkCmdNextSubpass
-GLAD_API_CALL PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier;
-#define vkCmdPipelineBarrier glad_vkCmdPipelineBarrier
-GLAD_API_CALL PFN_vkCmdPushConstants glad_vkCmdPushConstants;
-#define vkCmdPushConstants glad_vkCmdPushConstants
-GLAD_API_CALL PFN_vkCmdResetEvent glad_vkCmdResetEvent;
-#define vkCmdResetEvent glad_vkCmdResetEvent
-GLAD_API_CALL PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool;
-#define vkCmdResetQueryPool glad_vkCmdResetQueryPool
-GLAD_API_CALL PFN_vkCmdResolveImage glad_vkCmdResolveImage;
-#define vkCmdResolveImage glad_vkCmdResolveImage
-GLAD_API_CALL PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants;
-#define vkCmdSetBlendConstants glad_vkCmdSetBlendConstants
-GLAD_API_CALL PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias;
-#define vkCmdSetDepthBias glad_vkCmdSetDepthBias
-GLAD_API_CALL PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds;
-#define vkCmdSetDepthBounds glad_vkCmdSetDepthBounds
-GLAD_API_CALL PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask;
-#define vkCmdSetDeviceMask glad_vkCmdSetDeviceMask
-GLAD_API_CALL PFN_vkCmdSetEvent glad_vkCmdSetEvent;
-#define vkCmdSetEvent glad_vkCmdSetEvent
-GLAD_API_CALL PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth;
-#define vkCmdSetLineWidth glad_vkCmdSetLineWidth
-GLAD_API_CALL PFN_vkCmdSetScissor glad_vkCmdSetScissor;
-#define vkCmdSetScissor glad_vkCmdSetScissor
-GLAD_API_CALL PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask;
-#define vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask
-GLAD_API_CALL PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference;
-#define vkCmdSetStencilReference glad_vkCmdSetStencilReference
-GLAD_API_CALL PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask;
-#define vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask
-GLAD_API_CALL PFN_vkCmdSetViewport glad_vkCmdSetViewport;
-#define vkCmdSetViewport glad_vkCmdSetViewport
-GLAD_API_CALL PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer;
-#define vkCmdUpdateBuffer glad_vkCmdUpdateBuffer
-GLAD_API_CALL PFN_vkCmdWaitEvents glad_vkCmdWaitEvents;
-#define vkCmdWaitEvents glad_vkCmdWaitEvents
-GLAD_API_CALL PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp;
-#define vkCmdWriteTimestamp glad_vkCmdWriteTimestamp
-GLAD_API_CALL PFN_vkCreateBuffer glad_vkCreateBuffer;
-#define vkCreateBuffer glad_vkCreateBuffer
-GLAD_API_CALL PFN_vkCreateBufferView glad_vkCreateBufferView;
-#define vkCreateBufferView glad_vkCreateBufferView
-GLAD_API_CALL PFN_vkCreateCommandPool glad_vkCreateCommandPool;
-#define vkCreateCommandPool glad_vkCreateCommandPool
-GLAD_API_CALL PFN_vkCreateComputePipelines glad_vkCreateComputePipelines;
-#define vkCreateComputePipelines glad_vkCreateComputePipelines
-GLAD_API_CALL PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT;
-#define vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT
-GLAD_API_CALL PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool;
-#define vkCreateDescriptorPool glad_vkCreateDescriptorPool
-GLAD_API_CALL PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout;
-#define vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout
-GLAD_API_CALL PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate;
-#define vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate
-GLAD_API_CALL PFN_vkCreateDevice glad_vkCreateDevice;
-#define vkCreateDevice glad_vkCreateDevice
-GLAD_API_CALL PFN_vkCreateEvent glad_vkCreateEvent;
-#define vkCreateEvent glad_vkCreateEvent
-GLAD_API_CALL PFN_vkCreateFence glad_vkCreateFence;
-#define vkCreateFence glad_vkCreateFence
-GLAD_API_CALL PFN_vkCreateFramebuffer glad_vkCreateFramebuffer;
-#define vkCreateFramebuffer glad_vkCreateFramebuffer
-GLAD_API_CALL PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines;
-#define vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines
-GLAD_API_CALL PFN_vkCreateImage glad_vkCreateImage;
-#define vkCreateImage glad_vkCreateImage
-GLAD_API_CALL PFN_vkCreateImageView glad_vkCreateImageView;
-#define vkCreateImageView glad_vkCreateImageView
-GLAD_API_CALL PFN_vkCreateInstance glad_vkCreateInstance;
-#define vkCreateInstance glad_vkCreateInstance
-GLAD_API_CALL PFN_vkCreatePipelineCache glad_vkCreatePipelineCache;
-#define vkCreatePipelineCache glad_vkCreatePipelineCache
-GLAD_API_CALL PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout;
-#define vkCreatePipelineLayout glad_vkCreatePipelineLayout
-GLAD_API_CALL PFN_vkCreateQueryPool glad_vkCreateQueryPool;
-#define vkCreateQueryPool glad_vkCreateQueryPool
-GLAD_API_CALL PFN_vkCreateRenderPass glad_vkCreateRenderPass;
-#define vkCreateRenderPass glad_vkCreateRenderPass
-GLAD_API_CALL PFN_vkCreateSampler glad_vkCreateSampler;
-#define vkCreateSampler glad_vkCreateSampler
-GLAD_API_CALL PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion;
-#define vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion
-GLAD_API_CALL PFN_vkCreateSemaphore glad_vkCreateSemaphore;
-#define vkCreateSemaphore glad_vkCreateSemaphore
-GLAD_API_CALL PFN_vkCreateShaderModule glad_vkCreateShaderModule;
-#define vkCreateShaderModule glad_vkCreateShaderModule
-GLAD_API_CALL PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR;
-#define vkCreateSwapchainKHR glad_vkCreateSwapchainKHR
-GLAD_API_CALL PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT;
-#define vkDebugReportMessageEXT glad_vkDebugReportMessageEXT
-GLAD_API_CALL PFN_vkDestroyBuffer glad_vkDestroyBuffer;
-#define vkDestroyBuffer glad_vkDestroyBuffer
-GLAD_API_CALL PFN_vkDestroyBufferView glad_vkDestroyBufferView;
-#define vkDestroyBufferView glad_vkDestroyBufferView
-GLAD_API_CALL PFN_vkDestroyCommandPool glad_vkDestroyCommandPool;
-#define vkDestroyCommandPool glad_vkDestroyCommandPool
-GLAD_API_CALL PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT;
-#define vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT
-GLAD_API_CALL PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool;
-#define vkDestroyDescriptorPool glad_vkDestroyDescriptorPool
-GLAD_API_CALL PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout;
-#define vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout
-GLAD_API_CALL PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate;
-#define vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate
-GLAD_API_CALL PFN_vkDestroyDevice glad_vkDestroyDevice;
-#define vkDestroyDevice glad_vkDestroyDevice
-GLAD_API_CALL PFN_vkDestroyEvent glad_vkDestroyEvent;
-#define vkDestroyEvent glad_vkDestroyEvent
-GLAD_API_CALL PFN_vkDestroyFence glad_vkDestroyFence;
-#define vkDestroyFence glad_vkDestroyFence
-GLAD_API_CALL PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer;
-#define vkDestroyFramebuffer glad_vkDestroyFramebuffer
-GLAD_API_CALL PFN_vkDestroyImage glad_vkDestroyImage;
-#define vkDestroyImage glad_vkDestroyImage
-GLAD_API_CALL PFN_vkDestroyImageView glad_vkDestroyImageView;
-#define vkDestroyImageView glad_vkDestroyImageView
-GLAD_API_CALL PFN_vkDestroyInstance glad_vkDestroyInstance;
-#define vkDestroyInstance glad_vkDestroyInstance
-GLAD_API_CALL PFN_vkDestroyPipeline glad_vkDestroyPipeline;
-#define vkDestroyPipeline glad_vkDestroyPipeline
-GLAD_API_CALL PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache;
-#define vkDestroyPipelineCache glad_vkDestroyPipelineCache
-GLAD_API_CALL PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout;
-#define vkDestroyPipelineLayout glad_vkDestroyPipelineLayout
-GLAD_API_CALL PFN_vkDestroyQueryPool glad_vkDestroyQueryPool;
-#define vkDestroyQueryPool glad_vkDestroyQueryPool
-GLAD_API_CALL PFN_vkDestroyRenderPass glad_vkDestroyRenderPass;
-#define vkDestroyRenderPass glad_vkDestroyRenderPass
-GLAD_API_CALL PFN_vkDestroySampler glad_vkDestroySampler;
-#define vkDestroySampler glad_vkDestroySampler
-GLAD_API_CALL PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion;
-#define vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion
-GLAD_API_CALL PFN_vkDestroySemaphore glad_vkDestroySemaphore;
-#define vkDestroySemaphore glad_vkDestroySemaphore
-GLAD_API_CALL PFN_vkDestroyShaderModule glad_vkDestroyShaderModule;
-#define vkDestroyShaderModule glad_vkDestroyShaderModule
-GLAD_API_CALL PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR;
-#define vkDestroySurfaceKHR glad_vkDestroySurfaceKHR
-GLAD_API_CALL PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR;
-#define vkDestroySwapchainKHR glad_vkDestroySwapchainKHR
-GLAD_API_CALL PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle;
-#define vkDeviceWaitIdle glad_vkDeviceWaitIdle
-GLAD_API_CALL PFN_vkEndCommandBuffer glad_vkEndCommandBuffer;
-#define vkEndCommandBuffer glad_vkEndCommandBuffer
-GLAD_API_CALL PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties;
-#define vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties
-GLAD_API_CALL PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties;
-#define vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties
-GLAD_API_CALL PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties;
-#define vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties
-GLAD_API_CALL PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties;
-#define vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties
-GLAD_API_CALL PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion;
-#define vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion
-GLAD_API_CALL PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups;
-#define vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups
-GLAD_API_CALL PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices;
-#define vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices
-GLAD_API_CALL PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges;
-#define vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges
-GLAD_API_CALL PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers;
-#define vkFreeCommandBuffers glad_vkFreeCommandBuffers
-GLAD_API_CALL PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets;
-#define vkFreeDescriptorSets glad_vkFreeDescriptorSets
-GLAD_API_CALL PFN_vkFreeMemory glad_vkFreeMemory;
-#define vkFreeMemory glad_vkFreeMemory
-GLAD_API_CALL PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements;
-#define vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements
-GLAD_API_CALL PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2;
-#define vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2
-GLAD_API_CALL PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport;
-#define vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport
-GLAD_API_CALL PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures;
-#define vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures
-GLAD_API_CALL PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR;
-#define vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR
-GLAD_API_CALL PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR;
-#define vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR
-GLAD_API_CALL PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment;
-#define vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment
-GLAD_API_CALL PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr;
-#define vkGetDeviceProcAddr glad_vkGetDeviceProcAddr
-GLAD_API_CALL PFN_vkGetDeviceQueue glad_vkGetDeviceQueue;
-#define vkGetDeviceQueue glad_vkGetDeviceQueue
-GLAD_API_CALL PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2;
-#define vkGetDeviceQueue2 glad_vkGetDeviceQueue2
-GLAD_API_CALL PFN_vkGetEventStatus glad_vkGetEventStatus;
-#define vkGetEventStatus glad_vkGetEventStatus
-GLAD_API_CALL PFN_vkGetFenceStatus glad_vkGetFenceStatus;
-#define vkGetFenceStatus glad_vkGetFenceStatus
-GLAD_API_CALL PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements;
-#define vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements
-GLAD_API_CALL PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2;
-#define vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2
-GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements;
-#define vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements
-GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2;
-#define vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2
-GLAD_API_CALL PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout;
-#define vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout
-GLAD_API_CALL PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr;
-#define vkGetInstanceProcAddr glad_vkGetInstanceProcAddr
-GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties;
-#define vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties;
-#define vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties;
-#define vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures;
-#define vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures
-GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2;
-#define vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties;
-#define vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2;
-#define vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties;
-#define vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2;
-#define vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties;
-#define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2;
-#define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR;
-#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR
-GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties;
-#define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2;
-#define vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties;
-#define vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2;
-#define vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties;
-#define vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2;
-#define vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
-#define vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR;
-#define vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR;
-#define vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR
-GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR;
-#define vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR
-GLAD_API_CALL PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData;
-#define vkGetPipelineCacheData glad_vkGetPipelineCacheData
-GLAD_API_CALL PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults;
-#define vkGetQueryPoolResults glad_vkGetQueryPoolResults
-GLAD_API_CALL PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity;
-#define vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity
-GLAD_API_CALL PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR;
-#define vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR
-GLAD_API_CALL PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges;
-#define vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges
-GLAD_API_CALL PFN_vkMapMemory glad_vkMapMemory;
-#define vkMapMemory glad_vkMapMemory
-GLAD_API_CALL PFN_vkMergePipelineCaches glad_vkMergePipelineCaches;
-#define vkMergePipelineCaches glad_vkMergePipelineCaches
-GLAD_API_CALL PFN_vkQueueBindSparse glad_vkQueueBindSparse;
-#define vkQueueBindSparse glad_vkQueueBindSparse
-GLAD_API_CALL PFN_vkQueuePresentKHR glad_vkQueuePresentKHR;
-#define vkQueuePresentKHR glad_vkQueuePresentKHR
-GLAD_API_CALL PFN_vkQueueSubmit glad_vkQueueSubmit;
-#define vkQueueSubmit glad_vkQueueSubmit
-GLAD_API_CALL PFN_vkQueueWaitIdle glad_vkQueueWaitIdle;
-#define vkQueueWaitIdle glad_vkQueueWaitIdle
-GLAD_API_CALL PFN_vkResetCommandBuffer glad_vkResetCommandBuffer;
-#define vkResetCommandBuffer glad_vkResetCommandBuffer
-GLAD_API_CALL PFN_vkResetCommandPool glad_vkResetCommandPool;
-#define vkResetCommandPool glad_vkResetCommandPool
-GLAD_API_CALL PFN_vkResetDescriptorPool glad_vkResetDescriptorPool;
-#define vkResetDescriptorPool glad_vkResetDescriptorPool
-GLAD_API_CALL PFN_vkResetEvent glad_vkResetEvent;
-#define vkResetEvent glad_vkResetEvent
-GLAD_API_CALL PFN_vkResetFences glad_vkResetFences;
-#define vkResetFences glad_vkResetFences
-GLAD_API_CALL PFN_vkSetEvent glad_vkSetEvent;
-#define vkSetEvent glad_vkSetEvent
-GLAD_API_CALL PFN_vkTrimCommandPool glad_vkTrimCommandPool;
-#define vkTrimCommandPool glad_vkTrimCommandPool
-GLAD_API_CALL PFN_vkUnmapMemory glad_vkUnmapMemory;
-#define vkUnmapMemory glad_vkUnmapMemory
-GLAD_API_CALL PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate;
-#define vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate
-GLAD_API_CALL PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets;
-#define vkUpdateDescriptorSets glad_vkUpdateDescriptorSets
-GLAD_API_CALL PFN_vkWaitForFences glad_vkWaitForFences;
-#define vkWaitForFences glad_vkWaitForFences
-
-
-GLAD_API_CALL int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr);
-GLAD_API_CALL int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load);
-
-
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
+/**
+ * Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:38 2019
+ *
+ * Generator: C/C++
+ * Specification: vk
+ * Extensions: 3
+ *
+ * APIs:
+ *  - vulkan=1.1
+ *
+ * Options:
+ *  - MX_GLOBAL = False
+ *  - LOADER = False
+ *  - ALIAS = False
+ *  - HEADER_ONLY = False
+ *  - DEBUG = False
+ *  - MX = False
+ *
+ * Commandline:
+ *    --api='vulkan=1.1' --extensions='VK_EXT_debug_report,VK_KHR_surface,VK_KHR_swapchain' c
+ *
+ * Online:
+ *    http://glad.sh/#api=vulkan%3D1.1&extensions=VK_EXT_debug_report%2CVK_KHR_surface%2CVK_KHR_swapchain&generator=c&options=
+ *
+ */
+
+#ifndef GLAD_VULKAN_H_
+#define GLAD_VULKAN_H_
+
+#ifdef VULKAN_H_
+    #error  header already included (API: vulkan), remove previous include!
+#endif
+#define VULKAN_H_ 1
+
+#ifdef VULKAN_CORE_H_
+    #error  header already included (API: vulkan), remove previous include!
+#endif
+#define VULKAN_CORE_H_ 1
+
+
+#define GLAD_VULKAN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef GLAD_PLATFORM_H_
+#define GLAD_PLATFORM_H_
+
+#ifndef GLAD_PLATFORM_WIN32
+  #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
+    #define GLAD_PLATFORM_WIN32 1
+  #else
+    #define GLAD_PLATFORM_WIN32 0
+  #endif
+#endif
+
+#ifndef GLAD_PLATFORM_APPLE
+  #ifdef __APPLE__
+    #define GLAD_PLATFORM_APPLE 1
+  #else
+    #define GLAD_PLATFORM_APPLE 0
+  #endif
+#endif
+
+#ifndef GLAD_PLATFORM_EMSCRIPTEN
+  #ifdef __EMSCRIPTEN__
+    #define GLAD_PLATFORM_EMSCRIPTEN 1
+  #else
+    #define GLAD_PLATFORM_EMSCRIPTEN 0
+  #endif
+#endif
+
+#ifndef GLAD_PLATFORM_UWP
+  #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
+    #ifdef __has_include
+      #if __has_include(<winapifamily.h>)
+        #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+      #endif
+    #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
+      #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
+    #endif
+  #endif
+
+  #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
+    #include <winapifamily.h>
+    #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+      #define GLAD_PLATFORM_UWP 1
+    #endif
+  #endif
+
+  #ifndef GLAD_PLATFORM_UWP
+    #define GLAD_PLATFORM_UWP 0
+  #endif
+#endif
+
+#ifdef __GNUC__
+  #define GLAD_GNUC_EXTENSION __extension__
+#else
+  #define GLAD_GNUC_EXTENSION
+#endif
+
+#ifndef GLAD_API_CALL
+  #if defined(GLAD_API_CALL_EXPORT)
+    #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
+      #if defined(GLAD_API_CALL_EXPORT_BUILD)
+        #if defined(__GNUC__)
+          #define GLAD_API_CALL __attribute__ ((dllexport)) extern
+        #else
+          #define GLAD_API_CALL __declspec(dllexport) extern
+        #endif
+      #else
+        #if defined(__GNUC__)
+          #define GLAD_API_CALL __attribute__ ((dllimport)) extern
+        #else
+          #define GLAD_API_CALL __declspec(dllimport) extern
+        #endif
+      #endif
+    #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
+      #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
+    #else
+      #define GLAD_API_CALL extern
+    #endif
+  #else
+    #define GLAD_API_CALL extern
+  #endif
+#endif
+
+#ifdef APIENTRY
+  #define GLAD_API_PTR APIENTRY
+#elif GLAD_PLATFORM_WIN32
+  #define GLAD_API_PTR __stdcall
+#else
+  #define GLAD_API_PTR
+#endif
+
+#ifndef GLAPI
+#define GLAPI GLAD_API_CALL
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY GLAD_API_PTR
+#endif
+
+
+#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
+#define GLAD_VERSION_MAJOR(version) (version / 10000)
+#define GLAD_VERSION_MINOR(version) (version % 10000)
+
+typedef void (*GLADapiproc)(void);
+
+typedef GLADapiproc (*GLADloadfunc)(const char *name);
+typedef GLADapiproc (*GLADuserptrloadfunc)(const char *name, void *userptr);
+
+typedef void (*GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args, ...);
+typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args, ...);
+
+#endif /* GLAD_PLATFORM_H_ */
+
+#define VK_ATTACHMENT_UNUSED (~0U)
+#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
+#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
+#define VK_FALSE 0
+#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
+#define VK_KHR_SURFACE_SPEC_VERSION 25
+#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
+#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
+#define VK_LOD_CLAMP_NONE 1000.0f
+#define VK_LUID_SIZE 8
+#define VK_MAX_DESCRIPTION_SIZE 256
+#define VK_MAX_DEVICE_GROUP_SIZE 32
+#define VK_MAX_EXTENSION_NAME_SIZE 256
+#define VK_MAX_MEMORY_HEAPS 16
+#define VK_MAX_MEMORY_TYPES 32
+#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
+#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
+#define VK_QUEUE_FAMILY_IGNORED (~0U)
+#define VK_REMAINING_ARRAY_LAYERS (~0U)
+#define VK_REMAINING_MIP_LEVELS (~0U)
+#define VK_SUBPASS_EXTERNAL (~0U)
+#define VK_TRUE 1
+#define VK_UUID_SIZE 16
+#define VK_WHOLE_SIZE (~0ULL)
+
+
+#include <glad/vk_platform.h>
+#define VK_MAKE_VERSION(major, minor, patch) \
+    (((major) << 22) | ((minor) << 12) | (patch))
+#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
+#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
+#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
+/* DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. */
+/*#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 */
+/* Vulkan 1.0 version number */
+#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)/* Patch version should always be set to 0 */
+/* Vulkan 1.1 version number */
+#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)/* Patch version should always be set to 0 */
+/* Version of this file */
+#define VK_HEADER_VERSION 106
+#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
+#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
+#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
+#else
+        #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#endif
+#endif
+#define VK_NULL_HANDLE 0
+
+
+
+
+
+
+
+
+VK_DEFINE_HANDLE(VkInstance)
+VK_DEFINE_HANDLE(VkPhysicalDevice)
+VK_DEFINE_HANDLE(VkDevice)
+VK_DEFINE_HANDLE(VkQueue)
+VK_DEFINE_HANDLE(VkCommandBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
+typedef enum VkAttachmentLoadOp {
+    VK_ATTACHMENT_LOAD_OP_LOAD = 0,
+    VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
+    VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2
+} VkAttachmentLoadOp;
+typedef enum VkAttachmentStoreOp {
+    VK_ATTACHMENT_STORE_OP_STORE = 0,
+    VK_ATTACHMENT_STORE_OP_DONT_CARE = 1
+} VkAttachmentStoreOp;
+typedef enum VkBlendFactor {
+    VK_BLEND_FACTOR_ZERO = 0,
+    VK_BLEND_FACTOR_ONE = 1,
+    VK_BLEND_FACTOR_SRC_COLOR = 2,
+    VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
+    VK_BLEND_FACTOR_DST_COLOR = 4,
+    VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
+    VK_BLEND_FACTOR_SRC_ALPHA = 6,
+    VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
+    VK_BLEND_FACTOR_DST_ALPHA = 8,
+    VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
+    VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
+    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
+    VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
+    VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
+    VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
+    VK_BLEND_FACTOR_SRC1_COLOR = 15,
+    VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
+    VK_BLEND_FACTOR_SRC1_ALPHA = 17,
+    VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18
+} VkBlendFactor;
+typedef enum VkBlendOp {
+    VK_BLEND_OP_ADD = 0,
+    VK_BLEND_OP_SUBTRACT = 1,
+    VK_BLEND_OP_REVERSE_SUBTRACT = 2,
+    VK_BLEND_OP_MIN = 3,
+    VK_BLEND_OP_MAX = 4
+} VkBlendOp;
+typedef enum VkBorderColor {
+    VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
+    VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
+    VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
+    VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
+    VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
+    VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5
+} VkBorderColor;
+
+typedef enum VkPipelineCacheHeaderVersion {
+    VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1
+} VkPipelineCacheHeaderVersion;
+
+typedef enum VkDeviceQueueCreateFlagBits {
+    VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 1
+} VkDeviceQueueCreateFlagBits;
+typedef enum VkBufferCreateFlagBits {
+    VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 1,
+    VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 2,
+    VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 4,
+    VK_BUFFER_CREATE_PROTECTED_BIT = 8
+} VkBufferCreateFlagBits;
+typedef enum VkBufferUsageFlagBits {
+    VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 1,
+    VK_BUFFER_USAGE_TRANSFER_DST_BIT = 2,
+    VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 4,
+    VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 8,
+    VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 16,
+    VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 32,
+    VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 64,
+    VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 128,
+    VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 256
+} VkBufferUsageFlagBits;
+typedef enum VkColorComponentFlagBits {
+    VK_COLOR_COMPONENT_R_BIT = 1,
+    VK_COLOR_COMPONENT_G_BIT = 2,
+    VK_COLOR_COMPONENT_B_BIT = 4,
+    VK_COLOR_COMPONENT_A_BIT = 8
+} VkColorComponentFlagBits;
+typedef enum VkComponentSwizzle {
+    VK_COMPONENT_SWIZZLE_IDENTITY = 0,
+    VK_COMPONENT_SWIZZLE_ZERO = 1,
+    VK_COMPONENT_SWIZZLE_ONE = 2,
+    VK_COMPONENT_SWIZZLE_R = 3,
+    VK_COMPONENT_SWIZZLE_G = 4,
+    VK_COMPONENT_SWIZZLE_B = 5,
+    VK_COMPONENT_SWIZZLE_A = 6
+} VkComponentSwizzle;
+typedef enum VkCommandPoolCreateFlagBits {
+    VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 1,
+    VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 2,
+    VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 4
+} VkCommandPoolCreateFlagBits;
+typedef enum VkCommandPoolResetFlagBits {
+    VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 1
+} VkCommandPoolResetFlagBits;
+typedef enum VkCommandBufferResetFlagBits {
+    VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 1
+} VkCommandBufferResetFlagBits;
+typedef enum VkCommandBufferLevel {
+    VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
+    VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1
+} VkCommandBufferLevel;
+typedef enum VkCommandBufferUsageFlagBits {
+    VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 1,
+    VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 2,
+    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 4
+} VkCommandBufferUsageFlagBits;
+typedef enum VkCompareOp {
+    VK_COMPARE_OP_NEVER = 0,
+    VK_COMPARE_OP_LESS = 1,
+    VK_COMPARE_OP_EQUAL = 2,
+    VK_COMPARE_OP_LESS_OR_EQUAL = 3,
+    VK_COMPARE_OP_GREATER = 4,
+    VK_COMPARE_OP_NOT_EQUAL = 5,
+    VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
+    VK_COMPARE_OP_ALWAYS = 7
+} VkCompareOp;
+typedef enum VkCullModeFlagBits {
+    VK_CULL_MODE_NONE = 0,
+    VK_CULL_MODE_FRONT_BIT = 1,
+    VK_CULL_MODE_BACK_BIT = 2,
+    VK_CULL_MODE_FRONT_AND_BACK = 0x00000003
+} VkCullModeFlagBits;
+typedef enum VkDescriptorType {
+    VK_DESCRIPTOR_TYPE_SAMPLER = 0,
+    VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
+    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
+    VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
+    VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
+    VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
+    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
+    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
+    VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
+    VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
+    VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10
+} VkDescriptorType;
+typedef enum VkDynamicState {
+    VK_DYNAMIC_STATE_VIEWPORT = 0,
+    VK_DYNAMIC_STATE_SCISSOR = 1,
+    VK_DYNAMIC_STATE_LINE_WIDTH = 2,
+    VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
+    VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
+    VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
+    VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
+    VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
+    VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
+    VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1)
+} VkDynamicState;
+typedef enum VkFenceCreateFlagBits {
+    VK_FENCE_CREATE_SIGNALED_BIT = 1
+} VkFenceCreateFlagBits;
+typedef enum VkPolygonMode {
+    VK_POLYGON_MODE_FILL = 0,
+    VK_POLYGON_MODE_LINE = 1,
+    VK_POLYGON_MODE_POINT = 2
+} VkPolygonMode;
+typedef enum VkFormat {
+    VK_FORMAT_UNDEFINED = 0,
+    VK_FORMAT_R4G4_UNORM_PACK8 = 1,
+    VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
+    VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
+    VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
+    VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
+    VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
+    VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
+    VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
+    VK_FORMAT_R8_UNORM = 9,
+    VK_FORMAT_R8_SNORM = 10,
+    VK_FORMAT_R8_USCALED = 11,
+    VK_FORMAT_R8_SSCALED = 12,
+    VK_FORMAT_R8_UINT = 13,
+    VK_FORMAT_R8_SINT = 14,
+    VK_FORMAT_R8_SRGB = 15,
+    VK_FORMAT_R8G8_UNORM = 16,
+    VK_FORMAT_R8G8_SNORM = 17,
+    VK_FORMAT_R8G8_USCALED = 18,
+    VK_FORMAT_R8G8_SSCALED = 19,
+    VK_FORMAT_R8G8_UINT = 20,
+    VK_FORMAT_R8G8_SINT = 21,
+    VK_FORMAT_R8G8_SRGB = 22,
+    VK_FORMAT_R8G8B8_UNORM = 23,
+    VK_FORMAT_R8G8B8_SNORM = 24,
+    VK_FORMAT_R8G8B8_USCALED = 25,
+    VK_FORMAT_R8G8B8_SSCALED = 26,
+    VK_FORMAT_R8G8B8_UINT = 27,
+    VK_FORMAT_R8G8B8_SINT = 28,
+    VK_FORMAT_R8G8B8_SRGB = 29,
+    VK_FORMAT_B8G8R8_UNORM = 30,
+    VK_FORMAT_B8G8R8_SNORM = 31,
+    VK_FORMAT_B8G8R8_USCALED = 32,
+    VK_FORMAT_B8G8R8_SSCALED = 33,
+    VK_FORMAT_B8G8R8_UINT = 34,
+    VK_FORMAT_B8G8R8_SINT = 35,
+    VK_FORMAT_B8G8R8_SRGB = 36,
+    VK_FORMAT_R8G8B8A8_UNORM = 37,
+    VK_FORMAT_R8G8B8A8_SNORM = 38,
+    VK_FORMAT_R8G8B8A8_USCALED = 39,
+    VK_FORMAT_R8G8B8A8_SSCALED = 40,
+    VK_FORMAT_R8G8B8A8_UINT = 41,
+    VK_FORMAT_R8G8B8A8_SINT = 42,
+    VK_FORMAT_R8G8B8A8_SRGB = 43,
+    VK_FORMAT_B8G8R8A8_UNORM = 44,
+    VK_FORMAT_B8G8R8A8_SNORM = 45,
+    VK_FORMAT_B8G8R8A8_USCALED = 46,
+    VK_FORMAT_B8G8R8A8_SSCALED = 47,
+    VK_FORMAT_B8G8R8A8_UINT = 48,
+    VK_FORMAT_B8G8R8A8_SINT = 49,
+    VK_FORMAT_B8G8R8A8_SRGB = 50,
+    VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
+    VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
+    VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
+    VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
+    VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
+    VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
+    VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
+    VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
+    VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
+    VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
+    VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
+    VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
+    VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
+    VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
+    VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
+    VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
+    VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
+    VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
+    VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
+    VK_FORMAT_R16_UNORM = 70,
+    VK_FORMAT_R16_SNORM = 71,
+    VK_FORMAT_R16_USCALED = 72,
+    VK_FORMAT_R16_SSCALED = 73,
+    VK_FORMAT_R16_UINT = 74,
+    VK_FORMAT_R16_SINT = 75,
+    VK_FORMAT_R16_SFLOAT = 76,
+    VK_FORMAT_R16G16_UNORM = 77,
+    VK_FORMAT_R16G16_SNORM = 78,
+    VK_FORMAT_R16G16_USCALED = 79,
+    VK_FORMAT_R16G16_SSCALED = 80,
+    VK_FORMAT_R16G16_UINT = 81,
+    VK_FORMAT_R16G16_SINT = 82,
+    VK_FORMAT_R16G16_SFLOAT = 83,
+    VK_FORMAT_R16G16B16_UNORM = 84,
+    VK_FORMAT_R16G16B16_SNORM = 85,
+    VK_FORMAT_R16G16B16_USCALED = 86,
+    VK_FORMAT_R16G16B16_SSCALED = 87,
+    VK_FORMAT_R16G16B16_UINT = 88,
+    VK_FORMAT_R16G16B16_SINT = 89,
+    VK_FORMAT_R16G16B16_SFLOAT = 90,
+    VK_FORMAT_R16G16B16A16_UNORM = 91,
+    VK_FORMAT_R16G16B16A16_SNORM = 92,
+    VK_FORMAT_R16G16B16A16_USCALED = 93,
+    VK_FORMAT_R16G16B16A16_SSCALED = 94,
+    VK_FORMAT_R16G16B16A16_UINT = 95,
+    VK_FORMAT_R16G16B16A16_SINT = 96,
+    VK_FORMAT_R16G16B16A16_SFLOAT = 97,
+    VK_FORMAT_R32_UINT = 98,
+    VK_FORMAT_R32_SINT = 99,
+    VK_FORMAT_R32_SFLOAT = 100,
+    VK_FORMAT_R32G32_UINT = 101,
+    VK_FORMAT_R32G32_SINT = 102,
+    VK_FORMAT_R32G32_SFLOAT = 103,
+    VK_FORMAT_R32G32B32_UINT = 104,
+    VK_FORMAT_R32G32B32_SINT = 105,
+    VK_FORMAT_R32G32B32_SFLOAT = 106,
+    VK_FORMAT_R32G32B32A32_UINT = 107,
+    VK_FORMAT_R32G32B32A32_SINT = 108,
+    VK_FORMAT_R32G32B32A32_SFLOAT = 109,
+    VK_FORMAT_R64_UINT = 110,
+    VK_FORMAT_R64_SINT = 111,
+    VK_FORMAT_R64_SFLOAT = 112,
+    VK_FORMAT_R64G64_UINT = 113,
+    VK_FORMAT_R64G64_SINT = 114,
+    VK_FORMAT_R64G64_SFLOAT = 115,
+    VK_FORMAT_R64G64B64_UINT = 116,
+    VK_FORMAT_R64G64B64_SINT = 117,
+    VK_FORMAT_R64G64B64_SFLOAT = 118,
+    VK_FORMAT_R64G64B64A64_UINT = 119,
+    VK_FORMAT_R64G64B64A64_SINT = 120,
+    VK_FORMAT_R64G64B64A64_SFLOAT = 121,
+    VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
+    VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
+    VK_FORMAT_D16_UNORM = 124,
+    VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
+    VK_FORMAT_D32_SFLOAT = 126,
+    VK_FORMAT_S8_UINT = 127,
+    VK_FORMAT_D16_UNORM_S8_UINT = 128,
+    VK_FORMAT_D24_UNORM_S8_UINT = 129,
+    VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
+    VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
+    VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
+    VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
+    VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
+    VK_FORMAT_BC2_UNORM_BLOCK = 135,
+    VK_FORMAT_BC2_SRGB_BLOCK = 136,
+    VK_FORMAT_BC3_UNORM_BLOCK = 137,
+    VK_FORMAT_BC3_SRGB_BLOCK = 138,
+    VK_FORMAT_BC4_UNORM_BLOCK = 139,
+    VK_FORMAT_BC4_SNORM_BLOCK = 140,
+    VK_FORMAT_BC5_UNORM_BLOCK = 141,
+    VK_FORMAT_BC5_SNORM_BLOCK = 142,
+    VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
+    VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
+    VK_FORMAT_BC7_UNORM_BLOCK = 145,
+    VK_FORMAT_BC7_SRGB_BLOCK = 146,
+    VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
+    VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
+    VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
+    VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
+    VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
+    VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
+    VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
+    VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
+    VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
+    VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
+    VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
+    VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
+    VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
+    VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
+    VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
+    VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
+    VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
+    VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
+    VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
+    VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
+    VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
+    VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
+    VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
+    VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
+    VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
+    VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
+    VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
+    VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
+    VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
+    VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
+    VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
+    VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
+    VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
+    VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
+    VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
+    VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
+    VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
+    VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
+    VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
+    VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
+    VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
+    VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
+    VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
+    VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
+    VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
+    VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
+    VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
+    VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
+    VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
+    VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
+    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
+    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
+    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
+    VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
+    VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
+    VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
+    VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
+    VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
+    VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
+    VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
+    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
+    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
+    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
+    VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
+    VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
+    VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
+    VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
+    VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
+    VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
+    VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
+    VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
+    VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033
+} VkFormat;
+typedef enum VkFormatFeatureFlagBits {
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 1,
+    VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 2,
+    VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 4,
+    VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 8,
+    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 16,
+    VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 32,
+    VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 64,
+    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 128,
+    VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 256,
+    VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 512,
+    VK_FORMAT_FEATURE_BLIT_SRC_BIT = 1024,
+    VK_FORMAT_FEATURE_BLIT_DST_BIT = 2048,
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 4096,
+    VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 16384,
+    VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 32768,
+    VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 131072,
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 262144,
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 524288,
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1048576,
+    VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 2097152,
+    VK_FORMAT_FEATURE_DISJOINT_BIT = 4194304,
+    VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 8388608
+} VkFormatFeatureFlagBits;
+typedef enum VkFrontFace {
+    VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
+    VK_FRONT_FACE_CLOCKWISE = 1
+} VkFrontFace;
+typedef enum VkImageAspectFlagBits {
+    VK_IMAGE_ASPECT_COLOR_BIT = 1,
+    VK_IMAGE_ASPECT_DEPTH_BIT = 2,
+    VK_IMAGE_ASPECT_STENCIL_BIT = 4,
+    VK_IMAGE_ASPECT_METADATA_BIT = 8,
+    VK_IMAGE_ASPECT_PLANE_0_BIT = 16,
+    VK_IMAGE_ASPECT_PLANE_1_BIT = 32,
+    VK_IMAGE_ASPECT_PLANE_2_BIT = 64
+} VkImageAspectFlagBits;
+typedef enum VkImageCreateFlagBits {
+    VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 1,
+    VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 2,
+    VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 4,
+    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 8,
+    VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 16,
+    VK_IMAGE_CREATE_ALIAS_BIT = 1024,
+    VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 64,
+    VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 32,
+    VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 128,
+    VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 256,
+    VK_IMAGE_CREATE_PROTECTED_BIT = 2048,
+    VK_IMAGE_CREATE_DISJOINT_BIT = 512
+} VkImageCreateFlagBits;
+typedef enum VkImageLayout {
+    VK_IMAGE_LAYOUT_UNDEFINED = 0,
+    VK_IMAGE_LAYOUT_GENERAL = 1,
+    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
+    VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
+    VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
+    VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
+    VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
+    VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
+    VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
+    VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
+    VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
+    VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002
+} VkImageLayout;
+typedef enum VkImageTiling {
+    VK_IMAGE_TILING_OPTIMAL = 0,
+    VK_IMAGE_TILING_LINEAR = 1
+} VkImageTiling;
+typedef enum VkImageType {
+    VK_IMAGE_TYPE_1D = 0,
+    VK_IMAGE_TYPE_2D = 1,
+    VK_IMAGE_TYPE_3D = 2
+} VkImageType;
+typedef enum VkImageUsageFlagBits {
+    VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 1,
+    VK_IMAGE_USAGE_TRANSFER_DST_BIT = 2,
+    VK_IMAGE_USAGE_SAMPLED_BIT = 4,
+    VK_IMAGE_USAGE_STORAGE_BIT = 8,
+    VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 16,
+    VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 32,
+    VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 64,
+    VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 128
+} VkImageUsageFlagBits;
+
+typedef enum VkImageViewType {
+    VK_IMAGE_VIEW_TYPE_1D = 0,
+    VK_IMAGE_VIEW_TYPE_2D = 1,
+    VK_IMAGE_VIEW_TYPE_3D = 2,
+    VK_IMAGE_VIEW_TYPE_CUBE = 3,
+    VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
+    VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
+    VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6
+} VkImageViewType;
+typedef enum VkSharingMode {
+    VK_SHARING_MODE_EXCLUSIVE = 0,
+    VK_SHARING_MODE_CONCURRENT = 1
+} VkSharingMode;
+typedef enum VkIndexType {
+    VK_INDEX_TYPE_UINT16 = 0,
+    VK_INDEX_TYPE_UINT32 = 1
+} VkIndexType;
+typedef enum VkLogicOp {
+    VK_LOGIC_OP_CLEAR = 0,
+    VK_LOGIC_OP_AND = 1,
+    VK_LOGIC_OP_AND_REVERSE = 2,
+    VK_LOGIC_OP_COPY = 3,
+    VK_LOGIC_OP_AND_INVERTED = 4,
+    VK_LOGIC_OP_NO_OP = 5,
+    VK_LOGIC_OP_XOR = 6,
+    VK_LOGIC_OP_OR = 7,
+    VK_LOGIC_OP_NOR = 8,
+    VK_LOGIC_OP_EQUIVALENT = 9,
+    VK_LOGIC_OP_INVERT = 10,
+    VK_LOGIC_OP_OR_REVERSE = 11,
+    VK_LOGIC_OP_COPY_INVERTED = 12,
+    VK_LOGIC_OP_OR_INVERTED = 13,
+    VK_LOGIC_OP_NAND = 14,
+    VK_LOGIC_OP_SET = 15
+} VkLogicOp;
+typedef enum VkMemoryHeapFlagBits {
+    VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 1,
+    VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 2
+} VkMemoryHeapFlagBits;
+typedef enum VkAccessFlagBits {
+    VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 1,
+    VK_ACCESS_INDEX_READ_BIT = 2,
+    VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 4,
+    VK_ACCESS_UNIFORM_READ_BIT = 8,
+    VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 16,
+    VK_ACCESS_SHADER_READ_BIT = 32,
+    VK_ACCESS_SHADER_WRITE_BIT = 64,
+    VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 128,
+    VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 256,
+    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 512,
+    VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1024,
+    VK_ACCESS_TRANSFER_READ_BIT = 2048,
+    VK_ACCESS_TRANSFER_WRITE_BIT = 4096,
+    VK_ACCESS_HOST_READ_BIT = 8192,
+    VK_ACCESS_HOST_WRITE_BIT = 16384,
+    VK_ACCESS_MEMORY_READ_BIT = 32768,
+    VK_ACCESS_MEMORY_WRITE_BIT = 65536
+} VkAccessFlagBits;
+typedef enum VkMemoryPropertyFlagBits {
+    VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 1,
+    VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 2,
+    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 4,
+    VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 8,
+    VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 16,
+    VK_MEMORY_PROPERTY_PROTECTED_BIT = 32
+} VkMemoryPropertyFlagBits;
+typedef enum VkPhysicalDeviceType {
+    VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
+    VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
+    VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
+    VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
+    VK_PHYSICAL_DEVICE_TYPE_CPU = 4
+} VkPhysicalDeviceType;
+typedef enum VkPipelineBindPoint {
+    VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
+    VK_PIPELINE_BIND_POINT_COMPUTE = 1
+} VkPipelineBindPoint;
+typedef enum VkPipelineCreateFlagBits {
+    VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 1,
+    VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 2,
+    VK_PIPELINE_CREATE_DERIVATIVE_BIT = 4,
+    VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 8,
+    VK_PIPELINE_CREATE_DISPATCH_BASE = 16
+} VkPipelineCreateFlagBits;
+typedef enum VkPrimitiveTopology {
+    VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
+    VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
+    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
+    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
+    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
+    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
+    VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
+    VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
+    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
+    VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
+    VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10
+} VkPrimitiveTopology;
+typedef enum VkQueryControlFlagBits {
+    VK_QUERY_CONTROL_PRECISE_BIT = 1
+} VkQueryControlFlagBits;
+typedef enum VkQueryPipelineStatisticFlagBits {
+    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 1,
+    VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 2,
+    VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 4,
+    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 8,
+    VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 16,
+    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 32,
+    VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 64,
+    VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 128,
+    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 256,
+    VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 512,
+    VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 1024
+} VkQueryPipelineStatisticFlagBits;
+typedef enum VkQueryResultFlagBits {
+    VK_QUERY_RESULT_64_BIT = 1,
+    VK_QUERY_RESULT_WAIT_BIT = 2,
+    VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 4,
+    VK_QUERY_RESULT_PARTIAL_BIT = 8
+} VkQueryResultFlagBits;
+typedef enum VkQueryType {
+    VK_QUERY_TYPE_OCCLUSION = 0,
+    VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
+    VK_QUERY_TYPE_TIMESTAMP = 2
+} VkQueryType;
+typedef enum VkQueueFlagBits {
+    VK_QUEUE_GRAPHICS_BIT = 1,
+    VK_QUEUE_COMPUTE_BIT = 2,
+    VK_QUEUE_TRANSFER_BIT = 4,
+    VK_QUEUE_SPARSE_BINDING_BIT = 8,
+    VK_QUEUE_PROTECTED_BIT = 16
+} VkQueueFlagBits;
+typedef enum VkSubpassContents {
+    VK_SUBPASS_CONTENTS_INLINE = 0,
+    VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1
+} VkSubpassContents;
+typedef enum VkResult {
+    VK_SUCCESS = 0,
+    VK_NOT_READY = 1,
+    VK_TIMEOUT = 2,
+    VK_EVENT_SET = 3,
+    VK_EVENT_RESET = 4,
+    VK_INCOMPLETE = 5,
+    VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+    VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
+    VK_ERROR_INITIALIZATION_FAILED = -3,
+    VK_ERROR_DEVICE_LOST = -4,
+    VK_ERROR_MEMORY_MAP_FAILED = -5,
+    VK_ERROR_LAYER_NOT_PRESENT = -6,
+    VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+    VK_ERROR_FEATURE_NOT_PRESENT = -8,
+    VK_ERROR_INCOMPATIBLE_DRIVER = -9,
+    VK_ERROR_TOO_MANY_OBJECTS = -10,
+    VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
+    VK_ERROR_FRAGMENTED_POOL = -12,
+    VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,
+    VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,
+    VK_ERROR_SURFACE_LOST_KHR = -1000000000,
+    VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
+    VK_SUBOPTIMAL_KHR = 1000001003,
+    VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
+    VK_ERROR_VALIDATION_FAILED_EXT = -1000011001
+} VkResult;
+typedef enum VkShaderStageFlagBits {
+    VK_SHADER_STAGE_VERTEX_BIT = 1,
+    VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 2,
+    VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 4,
+    VK_SHADER_STAGE_GEOMETRY_BIT = 8,
+    VK_SHADER_STAGE_FRAGMENT_BIT = 16,
+    VK_SHADER_STAGE_COMPUTE_BIT = 32,
+    VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
+    VK_SHADER_STAGE_ALL = 0x7FFFFFFF
+} VkShaderStageFlagBits;
+typedef enum VkSparseMemoryBindFlagBits {
+    VK_SPARSE_MEMORY_BIND_METADATA_BIT = 1
+} VkSparseMemoryBindFlagBits;
+typedef enum VkStencilFaceFlagBits {
+    VK_STENCIL_FACE_FRONT_BIT = 1,
+    VK_STENCIL_FACE_BACK_BIT = 2,
+    VK_STENCIL_FRONT_AND_BACK = 0x00000003
+} VkStencilFaceFlagBits;
+typedef enum VkStencilOp {
+    VK_STENCIL_OP_KEEP = 0,
+    VK_STENCIL_OP_ZERO = 1,
+    VK_STENCIL_OP_REPLACE = 2,
+    VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
+    VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
+    VK_STENCIL_OP_INVERT = 5,
+    VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
+    VK_STENCIL_OP_DECREMENT_AND_WRAP = 7
+} VkStencilOp;
+typedef enum VkStructureType {
+    VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
+    VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
+    VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
+    VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
+    VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
+    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
+    VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
+    VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
+    VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
+    VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
+    VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
+    VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
+    VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
+    VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
+    VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
+    VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
+    VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
+    VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
+    VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
+    VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
+    VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
+    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
+    VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
+    VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
+    VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
+    VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
+    VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
+    VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
+    VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
+    VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
+    VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
+    VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
+    VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
+    VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
+    VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
+    VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
+    VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
+    VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
+    VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
+    VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
+    VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
+    VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
+    VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
+    VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
+    VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
+    VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
+    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
+    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
+    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
+    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
+    VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
+    VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
+    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
+    VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
+    VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
+    VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
+    VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
+    VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
+    VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
+    VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
+    VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
+    VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
+    VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
+    VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
+    VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
+    VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES,
+    VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
+    VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
+    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
+    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
+    VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
+    VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
+    VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
+    VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
+    VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
+    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
+    VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
+    VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
+    VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
+    VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
+    VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
+    VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
+    VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000,
+    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES,
+    VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
+    VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
+    VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
+    VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
+    VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
+    VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
+    VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
+    VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
+} VkStructureType;
+typedef enum VkSystemAllocationScope {
+    VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
+    VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
+    VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
+    VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
+    VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4
+} VkSystemAllocationScope;
+typedef enum VkInternalAllocationType {
+    VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0
+} VkInternalAllocationType;
+typedef enum VkSamplerAddressMode {
+    VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
+    VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
+    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
+    VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3
+} VkSamplerAddressMode;
+typedef enum VkFilter {
+    VK_FILTER_NEAREST = 0,
+    VK_FILTER_LINEAR = 1
+} VkFilter;
+typedef enum VkSamplerMipmapMode {
+    VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
+    VK_SAMPLER_MIPMAP_MODE_LINEAR = 1
+} VkSamplerMipmapMode;
+typedef enum VkVertexInputRate {
+    VK_VERTEX_INPUT_RATE_VERTEX = 0,
+    VK_VERTEX_INPUT_RATE_INSTANCE = 1
+} VkVertexInputRate;
+typedef enum VkPipelineStageFlagBits {
+    VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 1,
+    VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 2,
+    VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 4,
+    VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 8,
+    VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 16,
+    VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 32,
+    VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 64,
+    VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 128,
+    VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 256,
+    VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 512,
+    VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 1024,
+    VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 2048,
+    VK_PIPELINE_STAGE_TRANSFER_BIT = 4096,
+    VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 8192,
+    VK_PIPELINE_STAGE_HOST_BIT = 16384,
+    VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 32768,
+    VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 65536
+} VkPipelineStageFlagBits;
+typedef enum VkSparseImageFormatFlagBits {
+    VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 1,
+    VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 2,
+    VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 4
+} VkSparseImageFormatFlagBits;
+typedef enum VkSampleCountFlagBits {
+    VK_SAMPLE_COUNT_1_BIT = 1,
+    VK_SAMPLE_COUNT_2_BIT = 2,
+    VK_SAMPLE_COUNT_4_BIT = 4,
+    VK_SAMPLE_COUNT_8_BIT = 8,
+    VK_SAMPLE_COUNT_16_BIT = 16,
+    VK_SAMPLE_COUNT_32_BIT = 32,
+    VK_SAMPLE_COUNT_64_BIT = 64
+} VkSampleCountFlagBits;
+typedef enum VkAttachmentDescriptionFlagBits {
+    VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 1
+} VkAttachmentDescriptionFlagBits;
+typedef enum VkDescriptorPoolCreateFlagBits {
+    VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 1
+} VkDescriptorPoolCreateFlagBits;
+typedef enum VkDependencyFlagBits {
+    VK_DEPENDENCY_BY_REGION_BIT = 1,
+    VK_DEPENDENCY_DEVICE_GROUP_BIT = 4,
+    VK_DEPENDENCY_VIEW_LOCAL_BIT = 2
+} VkDependencyFlagBits;
+typedef enum VkObjectType {
+    VK_OBJECT_TYPE_UNKNOWN = 0,
+    VK_OBJECT_TYPE_INSTANCE = 1,
+    VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
+    VK_OBJECT_TYPE_DEVICE = 3,
+    VK_OBJECT_TYPE_QUEUE = 4,
+    VK_OBJECT_TYPE_SEMAPHORE = 5,
+    VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
+    VK_OBJECT_TYPE_FENCE = 7,
+    VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
+    VK_OBJECT_TYPE_BUFFER = 9,
+    VK_OBJECT_TYPE_IMAGE = 10,
+    VK_OBJECT_TYPE_EVENT = 11,
+    VK_OBJECT_TYPE_QUERY_POOL = 12,
+    VK_OBJECT_TYPE_BUFFER_VIEW = 13,
+    VK_OBJECT_TYPE_IMAGE_VIEW = 14,
+    VK_OBJECT_TYPE_SHADER_MODULE = 15,
+    VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
+    VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
+    VK_OBJECT_TYPE_RENDER_PASS = 18,
+    VK_OBJECT_TYPE_PIPELINE = 19,
+    VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
+    VK_OBJECT_TYPE_SAMPLER = 21,
+    VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
+    VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
+    VK_OBJECT_TYPE_FRAMEBUFFER = 24,
+    VK_OBJECT_TYPE_COMMAND_POOL = 25,
+    VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
+    VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
+    VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
+    VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
+    VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000
+} VkObjectType;
+typedef enum VkDescriptorUpdateTemplateType {
+    VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0
+} VkDescriptorUpdateTemplateType;
+
+typedef enum VkPointClippingBehavior {
+    VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
+    VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1
+} VkPointClippingBehavior;
+typedef enum VkColorSpaceKHR {
+    VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
+    VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
+} VkColorSpaceKHR;
+typedef enum VkCompositeAlphaFlagBitsKHR {
+    VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1,
+    VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 2,
+    VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 4,
+    VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 8
+} VkCompositeAlphaFlagBitsKHR;
+typedef enum VkPresentModeKHR {
+    VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
+    VK_PRESENT_MODE_MAILBOX_KHR = 1,
+    VK_PRESENT_MODE_FIFO_KHR = 2,
+    VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3
+} VkPresentModeKHR;
+typedef enum VkSurfaceTransformFlagBitsKHR {
+    VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1,
+    VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 2,
+    VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 4,
+    VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 8,
+    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 16,
+    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 32,
+    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 64,
+    VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 128,
+    VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 256
+} VkSurfaceTransformFlagBitsKHR;
+typedef enum VkDebugReportFlagBitsEXT {
+    VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 1,
+    VK_DEBUG_REPORT_WARNING_BIT_EXT = 2,
+    VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 4,
+    VK_DEBUG_REPORT_ERROR_BIT_EXT = 8,
+    VK_DEBUG_REPORT_DEBUG_BIT_EXT = 16
+} VkDebugReportFlagBitsEXT;
+typedef enum VkDebugReportObjectTypeEXT {
+    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
+    VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
+    VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
+    VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
+    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
+    VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
+    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
+    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
+    VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
+    VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
+    VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
+    VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
+    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
+    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
+    VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
+    VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
+    VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
+    VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
+    VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
+    VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
+    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,
+    VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+    VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,
+    VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000
+} VkDebugReportObjectTypeEXT;
+typedef enum VkExternalMemoryHandleTypeFlagBits {
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 8,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 16,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 32,
+    VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 64
+} VkExternalMemoryHandleTypeFlagBits;
+typedef enum VkExternalMemoryFeatureFlagBits {
+    VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 1,
+    VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 2,
+    VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 4
+} VkExternalMemoryFeatureFlagBits;
+typedef enum VkExternalSemaphoreHandleTypeFlagBits {
+    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 8,
+    VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 16
+} VkExternalSemaphoreHandleTypeFlagBits;
+typedef enum VkExternalSemaphoreFeatureFlagBits {
+    VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 1,
+    VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 2
+} VkExternalSemaphoreFeatureFlagBits;
+typedef enum VkSemaphoreImportFlagBits {
+    VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 1
+} VkSemaphoreImportFlagBits;
+typedef enum VkExternalFenceHandleTypeFlagBits {
+    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 1,
+    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 2,
+    VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 4,
+    VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 8
+} VkExternalFenceHandleTypeFlagBits;
+typedef enum VkExternalFenceFeatureFlagBits {
+    VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 1,
+    VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 2
+} VkExternalFenceFeatureFlagBits;
+typedef enum VkFenceImportFlagBits {
+    VK_FENCE_IMPORT_TEMPORARY_BIT = 1
+} VkFenceImportFlagBits;
+typedef enum VkPeerMemoryFeatureFlagBits {
+    VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 1,
+    VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 2,
+    VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 4,
+    VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 8
+} VkPeerMemoryFeatureFlagBits;
+typedef enum VkMemoryAllocateFlagBits {
+    VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 1
+} VkMemoryAllocateFlagBits;
+typedef enum VkDeviceGroupPresentModeFlagBitsKHR {
+    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1,
+    VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 2,
+    VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 4,
+    VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 8
+} VkDeviceGroupPresentModeFlagBitsKHR;
+typedef enum VkSwapchainCreateFlagBitsKHR {
+    VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1,
+    VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 2
+} VkSwapchainCreateFlagBitsKHR;
+typedef enum VkSubgroupFeatureFlagBits {
+    VK_SUBGROUP_FEATURE_BASIC_BIT = 1,
+    VK_SUBGROUP_FEATURE_VOTE_BIT = 2,
+    VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 4,
+    VK_SUBGROUP_FEATURE_BALLOT_BIT = 8,
+    VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 16,
+    VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 32,
+    VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 64,
+    VK_SUBGROUP_FEATURE_QUAD_BIT = 128
+} VkSubgroupFeatureFlagBits;
+typedef enum VkTessellationDomainOrigin {
+    VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
+    VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1
+} VkTessellationDomainOrigin;
+typedef enum VkSamplerYcbcrModelConversion {
+    VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
+    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
+    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
+    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
+    VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4
+} VkSamplerYcbcrModelConversion;
+typedef enum VkSamplerYcbcrRange {
+    VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
+    VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1
+} VkSamplerYcbcrRange;
+typedef enum VkChromaLocation {
+    VK_CHROMA_LOCATION_COSITED_EVEN = 0,
+    VK_CHROMA_LOCATION_MIDPOINT = 1
+} VkChromaLocation;
+typedef enum VkVendorId {
+    VK_VENDOR_ID_VIV = 0x10001,
+    VK_VENDOR_ID_VSI = 0x10002,
+    VK_VENDOR_ID_KAZAN = 0x10003
+} VkVendorId;
+typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
+    void*                                       pUserData,
+    size_t                                      size,
+    VkInternalAllocationType                    allocationType,
+    VkSystemAllocationScope                     allocationScope);
+typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
+    void*                                       pUserData,
+    size_t                                      size,
+    VkInternalAllocationType                    allocationType,
+    VkSystemAllocationScope                     allocationScope);
+typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
+    void*                                       pUserData,
+    void*                                       pOriginal,
+    size_t                                      size,
+    size_t                                      alignment,
+    VkSystemAllocationScope                     allocationScope);
+typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
+    void*                                       pUserData,
+    size_t                                      size,
+    size_t                                      alignment,
+    VkSystemAllocationScope                     allocationScope);
+typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
+    void*                                       pUserData,
+    void*                                       pMemory);
+typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
+typedef struct VkBaseOutStructure {
+    VkStructureType   sType;
+    struct  VkBaseOutStructure *  pNext;
+} VkBaseOutStructure;
+typedef struct VkBaseInStructure {
+    VkStructureType   sType;
+    const struct  VkBaseInStructure *  pNext;
+} VkBaseInStructure;
+typedef struct VkOffset2D {
+    int32_t          x;
+    int32_t          y;
+} VkOffset2D;
+typedef struct VkOffset3D {
+    int32_t          x;
+    int32_t          y;
+    int32_t          z;
+} VkOffset3D;
+typedef struct VkExtent2D {
+    uint32_t          width;
+    uint32_t          height;
+} VkExtent2D;
+typedef struct VkExtent3D {
+    uint32_t          width;
+    uint32_t          height;
+    uint32_t          depth;
+} VkExtent3D;
+typedef struct VkViewport {
+    float   x;
+    float   y;
+    float   width;
+    float   height;
+    float                         minDepth;
+    float                         maxDepth;
+} VkViewport;
+typedef struct VkRect2D {
+    VkOffset2D       offset;
+    VkExtent2D       extent;
+} VkRect2D;
+typedef struct VkClearRect {
+    VkRect2D         rect;
+    uint32_t         baseArrayLayer;
+    uint32_t         layerCount;
+} VkClearRect;
+typedef struct VkComponentMapping {
+    VkComponentSwizzle   r;
+    VkComponentSwizzle   g;
+    VkComponentSwizzle   b;
+    VkComponentSwizzle   a;
+} VkComponentMapping;
+typedef struct VkExtensionProperties {
+    char              extensionName [ VK_MAX_EXTENSION_NAME_SIZE ];
+    uint32_t          specVersion;
+} VkExtensionProperties;
+typedef struct VkLayerProperties {
+    char              layerName [ VK_MAX_EXTENSION_NAME_SIZE ];
+    uint32_t          specVersion;
+    uint32_t          implementationVersion;
+    char              description [ VK_MAX_DESCRIPTION_SIZE ];
+} VkLayerProperties;
+typedef struct VkApplicationInfo {
+    VkStructureType   sType;
+    const  void *      pNext;
+    const  char *      pApplicationName;
+    uint32_t          applicationVersion;
+    const  char *      pEngineName;
+    uint32_t          engineVersion;
+    uint32_t          apiVersion;
+} VkApplicationInfo;
+typedef struct VkAllocationCallbacks {
+    void *            pUserData;
+    PFN_vkAllocationFunction     pfnAllocation;
+    PFN_vkReallocationFunction   pfnReallocation;
+    PFN_vkFreeFunction      pfnFree;
+    PFN_vkInternalAllocationNotification   pfnInternalAllocation;
+    PFN_vkInternalFreeNotification   pfnInternalFree;
+} VkAllocationCallbacks;
+typedef struct VkDescriptorImageInfo {
+    VkSampler         sampler;
+    VkImageView       imageView;
+    VkImageLayout     imageLayout;
+} VkDescriptorImageInfo;
+typedef struct VkCopyDescriptorSet {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDescriptorSet          srcSet;
+    uint32_t                 srcBinding;
+    uint32_t                 srcArrayElement;
+    VkDescriptorSet          dstSet;
+    uint32_t                 dstBinding;
+    uint32_t                 dstArrayElement;
+    uint32_t                 descriptorCount;
+} VkCopyDescriptorSet;
+typedef struct VkDescriptorPoolSize {
+    VkDescriptorType         type;
+    uint32_t                 descriptorCount;
+} VkDescriptorPoolSize;
+typedef struct VkDescriptorSetAllocateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDescriptorPool         descriptorPool;
+    uint32_t                 descriptorSetCount;
+    const  VkDescriptorSetLayout *  pSetLayouts;
+} VkDescriptorSetAllocateInfo;
+typedef struct VkSpecializationMapEntry {
+    uint32_t                       constantID;
+    uint32_t                       offset;
+    size_t   size;
+} VkSpecializationMapEntry;
+typedef struct VkSpecializationInfo {
+    uint32_t                 mapEntryCount;
+    const  VkSpecializationMapEntry *  pMapEntries;
+    size_t                   dataSize;
+    const  void *             pData;
+} VkSpecializationInfo;
+typedef struct VkVertexInputBindingDescription {
+    uint32_t                 binding;
+    uint32_t                 stride;
+    VkVertexInputRate        inputRate;
+} VkVertexInputBindingDescription;
+typedef struct VkVertexInputAttributeDescription {
+    uint32_t                 location;
+    uint32_t                 binding;
+    VkFormat                 format;
+    uint32_t                 offset;
+} VkVertexInputAttributeDescription;
+typedef struct VkStencilOpState {
+    VkStencilOp              failOp;
+    VkStencilOp              passOp;
+    VkStencilOp              depthFailOp;
+    VkCompareOp              compareOp;
+    uint32_t                 compareMask;
+    uint32_t                 writeMask;
+    uint32_t                 reference;
+} VkStencilOpState;
+typedef struct VkCommandBufferAllocateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkCommandPool            commandPool;
+    VkCommandBufferLevel     level;
+    uint32_t                 commandBufferCount;
+} VkCommandBufferAllocateInfo;
+typedef union VkClearColorValue {
+    float                    float32 [4];
+    int32_t                  int32 [4];
+    uint32_t                 uint32 [4];
+} VkClearColorValue;
+typedef struct VkClearDepthStencilValue {
+    float                    depth;
+    uint32_t                 stencil;
+} VkClearDepthStencilValue;
+typedef union VkClearValue {
+    VkClearColorValue        color;
+    VkClearDepthStencilValue   depthStencil;
+} VkClearValue;
+typedef struct VkAttachmentReference {
+    uint32_t                 attachment;
+    VkImageLayout            layout;
+} VkAttachmentReference;
+typedef struct VkDrawIndirectCommand {
+    uint32_t                         vertexCount;
+    uint32_t                         instanceCount;
+    uint32_t                         firstVertex;
+    uint32_t   firstInstance;
+} VkDrawIndirectCommand;
+typedef struct VkDrawIndexedIndirectCommand {
+    uint32_t                         indexCount;
+    uint32_t                         instanceCount;
+    uint32_t                         firstIndex;
+    int32_t                          vertexOffset;
+    uint32_t   firstInstance;
+} VkDrawIndexedIndirectCommand;
+typedef struct VkDispatchIndirectCommand {
+    uint32_t   x;
+    uint32_t   y;
+    uint32_t   z;
+} VkDispatchIndirectCommand;
+typedef struct VkSurfaceFormatKHR {
+    VkFormat                           format;
+    VkColorSpaceKHR                    colorSpace;
+} VkSurfaceFormatKHR;
+typedef struct VkPresentInfoKHR {
+    VkStructureType   sType;
+    const  void *   pNext;
+    uint32_t           waitSemaphoreCount;
+    const  VkSemaphore *  pWaitSemaphores;
+    uint32_t                           swapchainCount;
+    const  VkSwapchainKHR *  pSwapchains;
+    const  uint32_t *  pImageIndices;
+    VkResult *  pResults;
+} VkPresentInfoKHR;
+typedef struct VkPhysicalDeviceExternalImageFormatInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalMemoryHandleTypeFlagBits   handleType;
+} VkPhysicalDeviceExternalImageFormatInfo;
+typedef struct VkPhysicalDeviceExternalSemaphoreInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalSemaphoreHandleTypeFlagBits   handleType;
+} VkPhysicalDeviceExternalSemaphoreInfo;
+typedef struct VkPhysicalDeviceExternalFenceInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalFenceHandleTypeFlagBits   handleType;
+} VkPhysicalDeviceExternalFenceInfo;
+typedef struct VkPhysicalDeviceMultiviewProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    uint32_t                           maxMultiviewViewCount;
+    uint32_t                           maxMultiviewInstanceIndex;
+} VkPhysicalDeviceMultiviewProperties;
+typedef struct VkRenderPassMultiviewCreateInfo {
+    VkStructureType          sType;
+    const  void *             pNext;
+    uint32_t                 subpassCount;
+    const  uint32_t *      pViewMasks;
+    uint32_t                 dependencyCount;
+    const  int32_t *    pViewOffsets;
+    uint32_t                 correlationMaskCount;
+    const  uint32_t *  pCorrelationMasks;
+} VkRenderPassMultiviewCreateInfo;
+typedef struct VkBindBufferMemoryDeviceGroupInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t           deviceIndexCount;
+    const  uint32_t *   pDeviceIndices;
+} VkBindBufferMemoryDeviceGroupInfo;
+typedef struct VkBindImageMemoryDeviceGroupInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t           deviceIndexCount;
+    const  uint32_t *   pDeviceIndices;
+    uint32_t           splitInstanceBindRegionCount;
+    const  VkRect2D *   pSplitInstanceBindRegions;
+} VkBindImageMemoryDeviceGroupInfo;
+typedef struct VkDeviceGroupRenderPassBeginInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t                           deviceMask;
+    uint32_t           deviceRenderAreaCount;
+    const  VkRect2D *   pDeviceRenderAreas;
+} VkDeviceGroupRenderPassBeginInfo;
+typedef struct VkDeviceGroupCommandBufferBeginInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t                           deviceMask;
+} VkDeviceGroupCommandBufferBeginInfo;
+typedef struct VkDeviceGroupSubmitInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t           waitSemaphoreCount;
+    const  uint32_t *     pWaitSemaphoreDeviceIndices;
+    uint32_t           commandBufferCount;
+    const  uint32_t *     pCommandBufferDeviceMasks;
+    uint32_t           signalSemaphoreCount;
+    const  uint32_t *   pSignalSemaphoreDeviceIndices;
+} VkDeviceGroupSubmitInfo;
+typedef struct VkDeviceGroupBindSparseInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t                           resourceDeviceIndex;
+    uint32_t                           memoryDeviceIndex;
+} VkDeviceGroupBindSparseInfo;
+typedef struct VkImageSwapchainCreateInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkSwapchainKHR     swapchain;
+} VkImageSwapchainCreateInfoKHR;
+typedef struct VkBindImageMemorySwapchainInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkSwapchainKHR   swapchain;
+    uint32_t                           imageIndex;
+} VkBindImageMemorySwapchainInfoKHR;
+typedef struct VkAcquireNextImageInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkSwapchainKHR   swapchain;
+    uint64_t                           timeout;
+    VkSemaphore   semaphore;
+    VkFence   fence;
+    uint32_t                           deviceMask;
+} VkAcquireNextImageInfoKHR;
+typedef struct VkDeviceGroupPresentInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t           swapchainCount;
+    const  uint32_t *  pDeviceMasks;
+    VkDeviceGroupPresentModeFlagBitsKHR   mode;
+} VkDeviceGroupPresentInfoKHR;
+typedef struct VkDeviceGroupDeviceCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t                           physicalDeviceCount;
+    const  VkPhysicalDevice *   pPhysicalDevices;
+} VkDeviceGroupDeviceCreateInfo;
+typedef struct VkDescriptorUpdateTemplateEntry {
+    uint32_t                           dstBinding;
+    uint32_t                           dstArrayElement;
+    uint32_t                           descriptorCount;
+    VkDescriptorType                   descriptorType;
+    size_t                             offset;
+    size_t                             stride;
+} VkDescriptorUpdateTemplateEntry;
+typedef struct VkBufferMemoryRequirementsInfo2 {
+    VkStructureType   sType;
+    const  void *                                                           pNext;
+    VkBuffer                                                               buffer;
+} VkBufferMemoryRequirementsInfo2;
+typedef struct VkImageMemoryRequirementsInfo2 {
+    VkStructureType   sType;
+    const  void *                                                           pNext;
+    VkImage                                                                image;
+} VkImageMemoryRequirementsInfo2;
+typedef struct VkImageSparseMemoryRequirementsInfo2 {
+    VkStructureType   sType;
+    const  void *                                                           pNext;
+    VkImage                                                                image;
+} VkImageSparseMemoryRequirementsInfo2;
+typedef struct VkPhysicalDevicePointClippingProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkPointClippingBehavior        pointClippingBehavior;
+} VkPhysicalDevicePointClippingProperties;
+typedef struct VkMemoryDedicatedAllocateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkImage            image;
+    VkBuffer           buffer;
+} VkMemoryDedicatedAllocateInfo;
+typedef struct VkPipelineTessellationDomainOriginStateCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkTessellationDomainOrigin      domainOrigin;
+} VkPipelineTessellationDomainOriginStateCreateInfo;
+typedef struct VkSamplerYcbcrConversionInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkSamplerYcbcrConversion        conversion;
+} VkSamplerYcbcrConversionInfo;
+typedef struct VkBindImagePlaneMemoryInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkImageAspectFlagBits              planeAspect;
+} VkBindImagePlaneMemoryInfo;
+typedef struct VkImagePlaneMemoryRequirementsInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkImageAspectFlagBits              planeAspect;
+} VkImagePlaneMemoryRequirementsInfo;
+typedef struct VkSamplerYcbcrConversionImageFormatProperties {
+    VkStructureType   sType;
+    void *       pNext;
+    uint32_t                           combinedImageSamplerDescriptorCount;
+} VkSamplerYcbcrConversionImageFormatProperties;
+typedef uint32_t VkSampleMask;
+typedef uint32_t VkBool32;
+typedef uint32_t VkFlags;
+typedef uint64_t VkDeviceSize;
+typedef VkFlags VkFramebufferCreateFlags;
+typedef VkFlags VkQueryPoolCreateFlags;
+typedef VkFlags VkRenderPassCreateFlags;
+typedef VkFlags VkSamplerCreateFlags;
+typedef VkFlags VkPipelineLayoutCreateFlags;
+typedef VkFlags VkPipelineCacheCreateFlags;
+typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
+typedef VkFlags VkPipelineDynamicStateCreateFlags;
+typedef VkFlags VkPipelineColorBlendStateCreateFlags;
+typedef VkFlags VkPipelineMultisampleStateCreateFlags;
+typedef VkFlags VkPipelineRasterizationStateCreateFlags;
+typedef VkFlags VkPipelineViewportStateCreateFlags;
+typedef VkFlags VkPipelineTessellationStateCreateFlags;
+typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
+typedef VkFlags VkPipelineVertexInputStateCreateFlags;
+typedef VkFlags VkPipelineShaderStageCreateFlags;
+typedef VkFlags VkDescriptorSetLayoutCreateFlags;
+typedef VkFlags VkBufferViewCreateFlags;
+typedef VkFlags VkInstanceCreateFlags;
+typedef VkFlags VkDeviceCreateFlags;
+typedef VkFlags VkDeviceQueueCreateFlags;
+typedef VkFlags VkQueueFlags;
+typedef VkFlags VkMemoryPropertyFlags;
+typedef VkFlags VkMemoryHeapFlags;
+typedef VkFlags VkAccessFlags;
+typedef VkFlags VkBufferUsageFlags;
+typedef VkFlags VkBufferCreateFlags;
+typedef VkFlags VkShaderStageFlags;
+typedef VkFlags VkImageUsageFlags;
+typedef VkFlags VkImageCreateFlags;
+typedef VkFlags VkImageViewCreateFlags;
+typedef VkFlags VkPipelineCreateFlags;
+typedef VkFlags VkColorComponentFlags;
+typedef VkFlags VkFenceCreateFlags;
+typedef VkFlags VkSemaphoreCreateFlags;
+typedef VkFlags VkFormatFeatureFlags;
+typedef VkFlags VkQueryControlFlags;
+typedef VkFlags VkQueryResultFlags;
+typedef VkFlags VkShaderModuleCreateFlags;
+typedef VkFlags VkEventCreateFlags;
+typedef VkFlags VkCommandPoolCreateFlags;
+typedef VkFlags VkCommandPoolResetFlags;
+typedef VkFlags VkCommandBufferResetFlags;
+typedef VkFlags VkCommandBufferUsageFlags;
+typedef VkFlags VkQueryPipelineStatisticFlags;
+typedef VkFlags VkMemoryMapFlags;
+typedef VkFlags VkImageAspectFlags;
+typedef VkFlags VkSparseMemoryBindFlags;
+typedef VkFlags VkSparseImageFormatFlags;
+typedef VkFlags VkSubpassDescriptionFlags;
+typedef VkFlags VkPipelineStageFlags;
+typedef VkFlags VkSampleCountFlags;
+typedef VkFlags VkAttachmentDescriptionFlags;
+typedef VkFlags VkStencilFaceFlags;
+typedef VkFlags VkCullModeFlags;
+typedef VkFlags VkDescriptorPoolCreateFlags;
+typedef VkFlags VkDescriptorPoolResetFlags;
+typedef VkFlags VkDependencyFlags;
+typedef VkFlags VkSubgroupFeatureFlags;
+typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;
+typedef VkFlags VkCompositeAlphaFlagsKHR;
+typedef VkFlags VkSurfaceTransformFlagsKHR;
+typedef VkFlags VkSwapchainCreateFlagsKHR;
+typedef VkFlags VkPeerMemoryFeatureFlags;
+typedef VkFlags VkMemoryAllocateFlags;
+typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;
+typedef VkFlags VkDebugReportFlagsEXT;
+typedef VkFlags VkCommandPoolTrimFlags;
+typedef VkFlags VkExternalMemoryHandleTypeFlags;
+typedef VkFlags VkExternalMemoryFeatureFlags;
+typedef VkFlags VkExternalSemaphoreHandleTypeFlags;
+typedef VkFlags VkExternalSemaphoreFeatureFlags;
+typedef VkFlags VkSemaphoreImportFlags;
+typedef VkFlags VkExternalFenceHandleTypeFlags;
+typedef VkFlags VkExternalFenceFeatureFlags;
+typedef VkFlags VkFenceImportFlags;
+typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
+    VkDebugReportFlagsEXT                       flags,
+    VkDebugReportObjectTypeEXT                  objectType,
+    uint64_t                                    object,
+    size_t                                      location,
+    int32_t                                     messageCode,
+    const char*                                 pLayerPrefix,
+    const char*                                 pMessage,
+    void*                                       pUserData);
+typedef struct VkDeviceQueueCreateInfo {
+    VkStructureType   sType;
+    const  void *      pNext;
+    VkDeviceQueueCreateFlags      flags;
+    uint32_t          queueFamilyIndex;
+    uint32_t          queueCount;
+    const  float *     pQueuePriorities;
+} VkDeviceQueueCreateInfo;
+typedef struct VkInstanceCreateInfo {
+    VkStructureType   sType;
+    const  void *      pNext;
+    VkInstanceCreateFlags    flags;
+    const  VkApplicationInfo *  pApplicationInfo;
+    uint32_t                 enabledLayerCount;
+    const  char * const*       ppEnabledLayerNames;
+    uint32_t                 enabledExtensionCount;
+    const  char * const*       ppEnabledExtensionNames;
+} VkInstanceCreateInfo;
+typedef struct VkQueueFamilyProperties {
+    VkQueueFlags             queueFlags;
+    uint32_t                 queueCount;
+    uint32_t                 timestampValidBits;
+    VkExtent3D               minImageTransferGranularity;
+} VkQueueFamilyProperties;
+typedef struct VkMemoryAllocateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDeviceSize             allocationSize;
+    uint32_t                 memoryTypeIndex;
+} VkMemoryAllocateInfo;
+typedef struct VkMemoryRequirements {
+    VkDeviceSize             size;
+    VkDeviceSize             alignment;
+    uint32_t                 memoryTypeBits;
+} VkMemoryRequirements;
+typedef struct VkSparseImageFormatProperties {
+    VkImageAspectFlags       aspectMask;
+    VkExtent3D               imageGranularity;
+    VkSparseImageFormatFlags   flags;
+} VkSparseImageFormatProperties;
+typedef struct VkSparseImageMemoryRequirements {
+    VkSparseImageFormatProperties   formatProperties;
+    uint32_t                 imageMipTailFirstLod;
+    VkDeviceSize             imageMipTailSize;
+    VkDeviceSize             imageMipTailOffset;
+    VkDeviceSize             imageMipTailStride;
+} VkSparseImageMemoryRequirements;
+typedef struct VkMemoryType {
+    VkMemoryPropertyFlags    propertyFlags;
+    uint32_t                 heapIndex;
+} VkMemoryType;
+typedef struct VkMemoryHeap {
+    VkDeviceSize             size;
+    VkMemoryHeapFlags        flags;
+} VkMemoryHeap;
+typedef struct VkMappedMemoryRange {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDeviceMemory           memory;
+    VkDeviceSize             offset;
+    VkDeviceSize             size;
+} VkMappedMemoryRange;
+typedef struct VkFormatProperties {
+    VkFormatFeatureFlags     linearTilingFeatures;
+    VkFormatFeatureFlags     optimalTilingFeatures;
+    VkFormatFeatureFlags     bufferFeatures;
+} VkFormatProperties;
+typedef struct VkImageFormatProperties {
+    VkExtent3D               maxExtent;
+    uint32_t                 maxMipLevels;
+    uint32_t                 maxArrayLayers;
+    VkSampleCountFlags       sampleCounts;
+    VkDeviceSize             maxResourceSize;
+} VkImageFormatProperties;
+typedef struct VkDescriptorBufferInfo {
+    VkBuffer                 buffer;
+    VkDeviceSize             offset;
+    VkDeviceSize             range;
+} VkDescriptorBufferInfo;
+typedef struct VkWriteDescriptorSet {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDescriptorSet          dstSet;
+    uint32_t                 dstBinding;
+    uint32_t                 dstArrayElement;
+    uint32_t                 descriptorCount;
+    VkDescriptorType         descriptorType;
+    const  VkDescriptorImageInfo *  pImageInfo;
+    const  VkDescriptorBufferInfo *  pBufferInfo;
+    const  VkBufferView *     pTexelBufferView;
+} VkWriteDescriptorSet;
+typedef struct VkBufferCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkBufferCreateFlags      flags;
+    VkDeviceSize             size;
+    VkBufferUsageFlags       usage;
+    VkSharingMode            sharingMode;
+    uint32_t                 queueFamilyIndexCount;
+    const  uint32_t *         pQueueFamilyIndices;
+} VkBufferCreateInfo;
+typedef struct VkBufferViewCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkBufferViewCreateFlags flags;
+    VkBuffer                 buffer;
+    VkFormat                 format;
+    VkDeviceSize             offset;
+    VkDeviceSize             range;
+} VkBufferViewCreateInfo;
+typedef struct VkImageSubresource {
+    VkImageAspectFlags       aspectMask;
+    uint32_t                 mipLevel;
+    uint32_t                 arrayLayer;
+} VkImageSubresource;
+typedef struct VkImageSubresourceLayers {
+    VkImageAspectFlags       aspectMask;
+    uint32_t                 mipLevel;
+    uint32_t                 baseArrayLayer;
+    uint32_t                 layerCount;
+} VkImageSubresourceLayers;
+typedef struct VkImageSubresourceRange {
+    VkImageAspectFlags       aspectMask;
+    uint32_t                 baseMipLevel;
+    uint32_t                 levelCount;
+    uint32_t                 baseArrayLayer;
+    uint32_t                 layerCount;
+} VkImageSubresourceRange;
+typedef struct VkMemoryBarrier {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkAccessFlags            srcAccessMask;
+    VkAccessFlags            dstAccessMask;
+} VkMemoryBarrier;
+typedef struct VkBufferMemoryBarrier {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkAccessFlags            srcAccessMask;
+    VkAccessFlags            dstAccessMask;
+    uint32_t                 srcQueueFamilyIndex;
+    uint32_t                 dstQueueFamilyIndex;
+    VkBuffer                 buffer;
+    VkDeviceSize             offset;
+    VkDeviceSize             size;
+} VkBufferMemoryBarrier;
+typedef struct VkImageMemoryBarrier {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkAccessFlags            srcAccessMask;
+    VkAccessFlags            dstAccessMask;
+    VkImageLayout            oldLayout;
+    VkImageLayout            newLayout;
+    uint32_t                 srcQueueFamilyIndex;
+    uint32_t                 dstQueueFamilyIndex;
+    VkImage                  image;
+    VkImageSubresourceRange   subresourceRange;
+} VkImageMemoryBarrier;
+typedef struct VkImageCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkImageCreateFlags       flags;
+    VkImageType              imageType;
+    VkFormat                 format;
+    VkExtent3D               extent;
+    uint32_t                 mipLevels;
+    uint32_t                 arrayLayers;
+    VkSampleCountFlagBits    samples;
+    VkImageTiling            tiling;
+    VkImageUsageFlags        usage;
+    VkSharingMode            sharingMode;
+    uint32_t                 queueFamilyIndexCount;
+    const  uint32_t *         pQueueFamilyIndices;
+    VkImageLayout            initialLayout;
+} VkImageCreateInfo;
+typedef struct VkSubresourceLayout {
+    VkDeviceSize             offset;
+    VkDeviceSize             size;
+    VkDeviceSize             rowPitch;
+    VkDeviceSize             arrayPitch;
+    VkDeviceSize             depthPitch;
+} VkSubresourceLayout;
+typedef struct VkImageViewCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkImageViewCreateFlags   flags;
+    VkImage                  image;
+    VkImageViewType          viewType;
+    VkFormat                 format;
+    VkComponentMapping       components;
+    VkImageSubresourceRange   subresourceRange;
+} VkImageViewCreateInfo;
+typedef struct VkBufferCopy {
+    VkDeviceSize                         srcOffset;
+    VkDeviceSize                         dstOffset;
+    VkDeviceSize   size;
+} VkBufferCopy;
+typedef struct VkSparseMemoryBind {
+    VkDeviceSize             resourceOffset;
+    VkDeviceSize             size;
+    VkDeviceMemory           memory;
+    VkDeviceSize             memoryOffset;
+    VkSparseMemoryBindFlags flags;
+} VkSparseMemoryBind;
+typedef struct VkSparseImageMemoryBind {
+    VkImageSubresource       subresource;
+    VkOffset3D               offset;
+    VkExtent3D               extent;
+    VkDeviceMemory           memory;
+    VkDeviceSize             memoryOffset;
+    VkSparseMemoryBindFlags flags;
+} VkSparseImageMemoryBind;
+typedef struct VkSparseBufferMemoryBindInfo {
+    VkBuffer   buffer;
+    uint32_t                 bindCount;
+    const  VkSparseMemoryBind *  pBinds;
+} VkSparseBufferMemoryBindInfo;
+typedef struct VkSparseImageOpaqueMemoryBindInfo {
+    VkImage   image;
+    uint32_t                 bindCount;
+    const  VkSparseMemoryBind *  pBinds;
+} VkSparseImageOpaqueMemoryBindInfo;
+typedef struct VkSparseImageMemoryBindInfo {
+    VkImage   image;
+    uint32_t                 bindCount;
+    const  VkSparseImageMemoryBind *  pBinds;
+} VkSparseImageMemoryBindInfo;
+typedef struct VkBindSparseInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    uint32_t                 waitSemaphoreCount;
+    const  VkSemaphore *      pWaitSemaphores;
+    uint32_t                 bufferBindCount;
+    const  VkSparseBufferMemoryBindInfo *  pBufferBinds;
+    uint32_t                 imageOpaqueBindCount;
+    const  VkSparseImageOpaqueMemoryBindInfo *  pImageOpaqueBinds;
+    uint32_t                 imageBindCount;
+    const  VkSparseImageMemoryBindInfo *  pImageBinds;
+    uint32_t                 signalSemaphoreCount;
+    const  VkSemaphore *      pSignalSemaphores;
+} VkBindSparseInfo;
+typedef struct VkImageCopy {
+    VkImageSubresourceLayers   srcSubresource;
+    VkOffset3D               srcOffset;
+    VkImageSubresourceLayers   dstSubresource;
+    VkOffset3D               dstOffset;
+    VkExtent3D               extent;
+} VkImageCopy;
+typedef struct VkImageBlit {
+    VkImageSubresourceLayers   srcSubresource;
+    VkOffset3D               srcOffsets [2];
+    VkImageSubresourceLayers   dstSubresource;
+    VkOffset3D               dstOffsets [2];
+} VkImageBlit;
+typedef struct VkBufferImageCopy {
+    VkDeviceSize             bufferOffset;
+    uint32_t                 bufferRowLength;
+    uint32_t                 bufferImageHeight;
+    VkImageSubresourceLayers   imageSubresource;
+    VkOffset3D               imageOffset;
+    VkExtent3D               imageExtent;
+} VkBufferImageCopy;
+typedef struct VkImageResolve {
+    VkImageSubresourceLayers   srcSubresource;
+    VkOffset3D               srcOffset;
+    VkImageSubresourceLayers   dstSubresource;
+    VkOffset3D               dstOffset;
+    VkExtent3D               extent;
+} VkImageResolve;
+typedef struct VkShaderModuleCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkShaderModuleCreateFlags   flags;
+    size_t                   codeSize;
+    const  uint32_t *             pCode;
+} VkShaderModuleCreateInfo;
+typedef struct VkDescriptorSetLayoutBinding {
+    uint32_t                 binding;
+    VkDescriptorType         descriptorType;
+    uint32_t   descriptorCount;
+    VkShaderStageFlags       stageFlags;
+    const  VkSampler *        pImmutableSamplers;
+} VkDescriptorSetLayoutBinding;
+typedef struct VkDescriptorSetLayoutCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDescriptorSetLayoutCreateFlags      flags;
+    uint32_t                 bindingCount;
+    const  VkDescriptorSetLayoutBinding *  pBindings;
+} VkDescriptorSetLayoutCreateInfo;
+typedef struct VkDescriptorPoolCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkDescriptorPoolCreateFlags    flags;
+    uint32_t                 maxSets;
+    uint32_t                 poolSizeCount;
+    const  VkDescriptorPoolSize *  pPoolSizes;
+} VkDescriptorPoolCreateInfo;
+typedef struct VkPipelineShaderStageCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineShaderStageCreateFlags      flags;
+    VkShaderStageFlagBits    stage;
+    VkShaderModule           module;
+    const  char *             pName;
+    const  VkSpecializationInfo *  pSpecializationInfo;
+} VkPipelineShaderStageCreateInfo;
+typedef struct VkComputePipelineCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineCreateFlags    flags;
+    VkPipelineShaderStageCreateInfo   stage;
+    VkPipelineLayout         layout;
+    VkPipeline        basePipelineHandle;
+    int32_t                  basePipelineIndex;
+} VkComputePipelineCreateInfo;
+typedef struct VkPipelineVertexInputStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineVertexInputStateCreateFlags      flags;
+    uint32_t                 vertexBindingDescriptionCount;
+    const  VkVertexInputBindingDescription *  pVertexBindingDescriptions;
+    uint32_t                 vertexAttributeDescriptionCount;
+    const  VkVertexInputAttributeDescription *  pVertexAttributeDescriptions;
+} VkPipelineVertexInputStateCreateInfo;
+typedef struct VkPipelineInputAssemblyStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineInputAssemblyStateCreateFlags      flags;
+    VkPrimitiveTopology      topology;
+    VkBool32                 primitiveRestartEnable;
+} VkPipelineInputAssemblyStateCreateInfo;
+typedef struct VkPipelineTessellationStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineTessellationStateCreateFlags      flags;
+    uint32_t                 patchControlPoints;
+} VkPipelineTessellationStateCreateInfo;
+typedef struct VkPipelineViewportStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineViewportStateCreateFlags      flags;
+    uint32_t                 viewportCount;
+    const  VkViewport *       pViewports;
+    uint32_t                 scissorCount;
+    const  VkRect2D *         pScissors;
+} VkPipelineViewportStateCreateInfo;
+typedef struct VkPipelineRasterizationStateCreateInfo {
+    VkStructureType   sType;
+    const  void *  pNext;
+    VkPipelineRasterizationStateCreateFlags      flags;
+    VkBool32                 depthClampEnable;
+    VkBool32                 rasterizerDiscardEnable;
+    VkPolygonMode            polygonMode;
+    VkCullModeFlags          cullMode;
+    VkFrontFace              frontFace;
+    VkBool32                 depthBiasEnable;
+    float                    depthBiasConstantFactor;
+    float                    depthBiasClamp;
+    float                    depthBiasSlopeFactor;
+    float                    lineWidth;
+} VkPipelineRasterizationStateCreateInfo;
+typedef struct VkPipelineMultisampleStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineMultisampleStateCreateFlags      flags;
+    VkSampleCountFlagBits    rasterizationSamples;
+    VkBool32                 sampleShadingEnable;
+    float                    minSampleShading;
+    const  VkSampleMask *     pSampleMask;
+    VkBool32                 alphaToCoverageEnable;
+    VkBool32                 alphaToOneEnable;
+} VkPipelineMultisampleStateCreateInfo;
+typedef struct VkPipelineColorBlendAttachmentState {
+    VkBool32                 blendEnable;
+    VkBlendFactor            srcColorBlendFactor;
+    VkBlendFactor            dstColorBlendFactor;
+    VkBlendOp                colorBlendOp;
+    VkBlendFactor            srcAlphaBlendFactor;
+    VkBlendFactor            dstAlphaBlendFactor;
+    VkBlendOp                alphaBlendOp;
+    VkColorComponentFlags    colorWriteMask;
+} VkPipelineColorBlendAttachmentState;
+typedef struct VkPipelineColorBlendStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineColorBlendStateCreateFlags      flags;
+    VkBool32                 logicOpEnable;
+    VkLogicOp                logicOp;
+    uint32_t                 attachmentCount;
+    const  VkPipelineColorBlendAttachmentState *  pAttachments;
+    float                    blendConstants [4];
+} VkPipelineColorBlendStateCreateInfo;
+typedef struct VkPipelineDynamicStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineDynamicStateCreateFlags      flags;
+    uint32_t                 dynamicStateCount;
+    const  VkDynamicState *   pDynamicStates;
+} VkPipelineDynamicStateCreateInfo;
+typedef struct VkPipelineDepthStencilStateCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineDepthStencilStateCreateFlags      flags;
+    VkBool32                 depthTestEnable;
+    VkBool32                 depthWriteEnable;
+    VkCompareOp              depthCompareOp;
+    VkBool32                 depthBoundsTestEnable;
+    VkBool32                 stencilTestEnable;
+    VkStencilOpState         front;
+    VkStencilOpState         back;
+    float                    minDepthBounds;
+    float                    maxDepthBounds;
+} VkPipelineDepthStencilStateCreateInfo;
+typedef struct VkGraphicsPipelineCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineCreateFlags    flags;
+    uint32_t                 stageCount;
+    const  VkPipelineShaderStageCreateInfo *  pStages;
+    const  VkPipelineVertexInputStateCreateInfo *  pVertexInputState;
+    const  VkPipelineInputAssemblyStateCreateInfo *  pInputAssemblyState;
+    const  VkPipelineTessellationStateCreateInfo *  pTessellationState;
+    const  VkPipelineViewportStateCreateInfo *  pViewportState;
+    const  VkPipelineRasterizationStateCreateInfo *  pRasterizationState;
+    const  VkPipelineMultisampleStateCreateInfo *  pMultisampleState;
+    const  VkPipelineDepthStencilStateCreateInfo *  pDepthStencilState;
+    const  VkPipelineColorBlendStateCreateInfo *  pColorBlendState;
+    const  VkPipelineDynamicStateCreateInfo *  pDynamicState;
+    VkPipelineLayout         layout;
+    VkRenderPass             renderPass;
+    uint32_t                 subpass;
+    VkPipeline        basePipelineHandle;
+    int32_t                  basePipelineIndex;
+} VkGraphicsPipelineCreateInfo;
+typedef struct VkPipelineCacheCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineCacheCreateFlags      flags;
+    size_t                   initialDataSize;
+    const  void *             pInitialData;
+} VkPipelineCacheCreateInfo;
+typedef struct VkPushConstantRange {
+    VkShaderStageFlags       stageFlags;
+    uint32_t                 offset;
+    uint32_t                 size;
+} VkPushConstantRange;
+typedef struct VkPipelineLayoutCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkPipelineLayoutCreateFlags      flags;
+    uint32_t                 setLayoutCount;
+    const  VkDescriptorSetLayout *  pSetLayouts;
+    uint32_t                 pushConstantRangeCount;
+    const  VkPushConstantRange *  pPushConstantRanges;
+} VkPipelineLayoutCreateInfo;
+typedef struct VkSamplerCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkSamplerCreateFlags     flags;
+    VkFilter                 magFilter;
+    VkFilter                 minFilter;
+    VkSamplerMipmapMode      mipmapMode;
+    VkSamplerAddressMode     addressModeU;
+    VkSamplerAddressMode     addressModeV;
+    VkSamplerAddressMode     addressModeW;
+    float                    mipLodBias;
+    VkBool32                 anisotropyEnable;
+    float                    maxAnisotropy;
+    VkBool32                 compareEnable;
+    VkCompareOp              compareOp;
+    float                    minLod;
+    float                    maxLod;
+    VkBorderColor            borderColor;
+    VkBool32                 unnormalizedCoordinates;
+} VkSamplerCreateInfo;
+typedef struct VkCommandPoolCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkCommandPoolCreateFlags     flags;
+    uint32_t                 queueFamilyIndex;
+} VkCommandPoolCreateInfo;
+typedef struct VkCommandBufferInheritanceInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkRenderPass      renderPass;
+    uint32_t                 subpass;
+    VkFramebuffer     framebuffer;
+    VkBool32                 occlusionQueryEnable;
+    VkQueryControlFlags      queryFlags;
+    VkQueryPipelineStatisticFlags   pipelineStatistics;
+} VkCommandBufferInheritanceInfo;
+typedef struct VkCommandBufferBeginInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkCommandBufferUsageFlags    flags;
+    const  VkCommandBufferInheritanceInfo *        pInheritanceInfo;
+} VkCommandBufferBeginInfo;
+typedef struct VkRenderPassBeginInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkRenderPass             renderPass;
+    VkFramebuffer            framebuffer;
+    VkRect2D                 renderArea;
+    uint32_t                 clearValueCount;
+    const  VkClearValue *     pClearValues;
+} VkRenderPassBeginInfo;
+typedef struct VkClearAttachment {
+    VkImageAspectFlags       aspectMask;
+    uint32_t                 colorAttachment;
+    VkClearValue             clearValue;
+} VkClearAttachment;
+typedef struct VkAttachmentDescription {
+    VkAttachmentDescriptionFlags   flags;
+    VkFormat                 format;
+    VkSampleCountFlagBits    samples;
+    VkAttachmentLoadOp       loadOp;
+    VkAttachmentStoreOp      storeOp;
+    VkAttachmentLoadOp       stencilLoadOp;
+    VkAttachmentStoreOp      stencilStoreOp;
+    VkImageLayout            initialLayout;
+    VkImageLayout            finalLayout;
+} VkAttachmentDescription;
+typedef struct VkSubpassDescription {
+    VkSubpassDescriptionFlags   flags;
+    VkPipelineBindPoint      pipelineBindPoint;
+    uint32_t                 inputAttachmentCount;
+    const  VkAttachmentReference *  pInputAttachments;
+    uint32_t                 colorAttachmentCount;
+    const  VkAttachmentReference *  pColorAttachments;
+    const  VkAttachmentReference *  pResolveAttachments;
+    const  VkAttachmentReference *  pDepthStencilAttachment;
+    uint32_t                 preserveAttachmentCount;
+    const  uint32_t *  pPreserveAttachments;
+} VkSubpassDescription;
+typedef struct VkSubpassDependency {
+    uint32_t                 srcSubpass;
+    uint32_t                 dstSubpass;
+    VkPipelineStageFlags     srcStageMask;
+    VkPipelineStageFlags     dstStageMask;
+    VkAccessFlags            srcAccessMask;
+    VkAccessFlags            dstAccessMask;
+    VkDependencyFlags        dependencyFlags;
+} VkSubpassDependency;
+typedef struct VkRenderPassCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkRenderPassCreateFlags      flags;
+    uint32_t     attachmentCount;
+    const  VkAttachmentDescription *  pAttachments;
+    uint32_t                 subpassCount;
+    const  VkSubpassDescription *  pSubpasses;
+    uint32_t         dependencyCount;
+    const  VkSubpassDependency *  pDependencies;
+} VkRenderPassCreateInfo;
+typedef struct VkEventCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkEventCreateFlags       flags;
+} VkEventCreateInfo;
+typedef struct VkFenceCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkFenceCreateFlags       flags;
+} VkFenceCreateInfo;
+typedef struct VkPhysicalDeviceFeatures {
+    VkBool32                 robustBufferAccess;
+    VkBool32                 fullDrawIndexUint32;
+    VkBool32                 imageCubeArray;
+    VkBool32                 independentBlend;
+    VkBool32                 geometryShader;
+    VkBool32                 tessellationShader;
+    VkBool32                 sampleRateShading;
+    VkBool32                 dualSrcBlend;
+    VkBool32                 logicOp;
+    VkBool32                 multiDrawIndirect;
+    VkBool32                 drawIndirectFirstInstance;
+    VkBool32                 depthClamp;
+    VkBool32                 depthBiasClamp;
+    VkBool32                 fillModeNonSolid;
+    VkBool32                 depthBounds;
+    VkBool32                 wideLines;
+    VkBool32                 largePoints;
+    VkBool32                 alphaToOne;
+    VkBool32                 multiViewport;
+    VkBool32                 samplerAnisotropy;
+    VkBool32                 textureCompressionETC2;
+    VkBool32                 textureCompressionASTC_LDR;
+    VkBool32                 textureCompressionBC;
+    VkBool32                 occlusionQueryPrecise;
+    VkBool32                 pipelineStatisticsQuery;
+    VkBool32                 vertexPipelineStoresAndAtomics;
+    VkBool32                 fragmentStoresAndAtomics;
+    VkBool32                 shaderTessellationAndGeometryPointSize;
+    VkBool32                 shaderImageGatherExtended;
+    VkBool32                 shaderStorageImageExtendedFormats;
+    VkBool32                 shaderStorageImageMultisample;
+    VkBool32                 shaderStorageImageReadWithoutFormat;
+    VkBool32                 shaderStorageImageWriteWithoutFormat;
+    VkBool32                 shaderUniformBufferArrayDynamicIndexing;
+    VkBool32                 shaderSampledImageArrayDynamicIndexing;
+    VkBool32                 shaderStorageBufferArrayDynamicIndexing;
+    VkBool32                 shaderStorageImageArrayDynamicIndexing;
+    VkBool32                 shaderClipDistance;
+    VkBool32                 shaderCullDistance;
+    VkBool32                 shaderFloat64;
+    VkBool32                 shaderInt64;
+    VkBool32                 shaderInt16;
+    VkBool32                 shaderResourceResidency;
+    VkBool32                 shaderResourceMinLod;
+    VkBool32                 sparseBinding;
+    VkBool32                 sparseResidencyBuffer;
+    VkBool32                 sparseResidencyImage2D;
+    VkBool32                 sparseResidencyImage3D;
+    VkBool32                 sparseResidency2Samples;
+    VkBool32                 sparseResidency4Samples;
+    VkBool32                 sparseResidency8Samples;
+    VkBool32                 sparseResidency16Samples;
+    VkBool32                 sparseResidencyAliased;
+    VkBool32                 variableMultisampleRate;
+    VkBool32                 inheritedQueries;
+} VkPhysicalDeviceFeatures;
+typedef struct VkPhysicalDeviceSparseProperties {
+    VkBool32                 residencyStandard2DBlockShape;
+    VkBool32                 residencyStandard2DMultisampleBlockShape;
+    VkBool32                 residencyStandard3DBlockShape;
+    VkBool32                 residencyAlignedMipSize;
+    VkBool32                 residencyNonResidentStrict;
+} VkPhysicalDeviceSparseProperties;
+typedef struct VkPhysicalDeviceLimits {
+    uint32_t                 maxImageDimension1D;
+    uint32_t                 maxImageDimension2D;
+    uint32_t                 maxImageDimension3D;
+    uint32_t                 maxImageDimensionCube;
+    uint32_t                 maxImageArrayLayers;
+    uint32_t                 maxTexelBufferElements;
+    uint32_t                 maxUniformBufferRange;
+    uint32_t                 maxStorageBufferRange;
+    uint32_t                 maxPushConstantsSize;
+    uint32_t                 maxMemoryAllocationCount;
+    uint32_t                 maxSamplerAllocationCount;
+    VkDeviceSize             bufferImageGranularity;
+    VkDeviceSize             sparseAddressSpaceSize;
+    uint32_t                 maxBoundDescriptorSets;
+    uint32_t                 maxPerStageDescriptorSamplers;
+    uint32_t                 maxPerStageDescriptorUniformBuffers;
+    uint32_t                 maxPerStageDescriptorStorageBuffers;
+    uint32_t                 maxPerStageDescriptorSampledImages;
+    uint32_t                 maxPerStageDescriptorStorageImages;
+    uint32_t                 maxPerStageDescriptorInputAttachments;
+    uint32_t                 maxPerStageResources;
+    uint32_t                 maxDescriptorSetSamplers;
+    uint32_t                 maxDescriptorSetUniformBuffers;
+    uint32_t                 maxDescriptorSetUniformBuffersDynamic;
+    uint32_t                 maxDescriptorSetStorageBuffers;
+    uint32_t                 maxDescriptorSetStorageBuffersDynamic;
+    uint32_t                 maxDescriptorSetSampledImages;
+    uint32_t                 maxDescriptorSetStorageImages;
+    uint32_t                 maxDescriptorSetInputAttachments;
+    uint32_t                 maxVertexInputAttributes;
+    uint32_t                 maxVertexInputBindings;
+    uint32_t                 maxVertexInputAttributeOffset;
+    uint32_t                 maxVertexInputBindingStride;
+    uint32_t                 maxVertexOutputComponents;
+    uint32_t                 maxTessellationGenerationLevel;
+    uint32_t                 maxTessellationPatchSize;
+    uint32_t                 maxTessellationControlPerVertexInputComponents;
+    uint32_t                 maxTessellationControlPerVertexOutputComponents;
+    uint32_t                 maxTessellationControlPerPatchOutputComponents;
+    uint32_t                 maxTessellationControlTotalOutputComponents;
+    uint32_t                 maxTessellationEvaluationInputComponents;
+    uint32_t                 maxTessellationEvaluationOutputComponents;
+    uint32_t                 maxGeometryShaderInvocations;
+    uint32_t                 maxGeometryInputComponents;
+    uint32_t                 maxGeometryOutputComponents;
+    uint32_t                 maxGeometryOutputVertices;
+    uint32_t                 maxGeometryTotalOutputComponents;
+    uint32_t                 maxFragmentInputComponents;
+    uint32_t                 maxFragmentOutputAttachments;
+    uint32_t                 maxFragmentDualSrcAttachments;
+    uint32_t                 maxFragmentCombinedOutputResources;
+    uint32_t                 maxComputeSharedMemorySize;
+    uint32_t                 maxComputeWorkGroupCount [3];
+    uint32_t                 maxComputeWorkGroupInvocations;
+    uint32_t                 maxComputeWorkGroupSize [3];
+    uint32_t                 subPixelPrecisionBits;
+    uint32_t                 subTexelPrecisionBits;
+    uint32_t                 mipmapPrecisionBits;
+    uint32_t                 maxDrawIndexedIndexValue;
+    uint32_t                 maxDrawIndirectCount;
+    float                    maxSamplerLodBias;
+    float                    maxSamplerAnisotropy;
+    uint32_t                 maxViewports;
+    uint32_t                 maxViewportDimensions [2];
+    float                    viewportBoundsRange [2];
+    uint32_t                 viewportSubPixelBits;
+    size_t                   minMemoryMapAlignment;
+    VkDeviceSize             minTexelBufferOffsetAlignment;
+    VkDeviceSize             minUniformBufferOffsetAlignment;
+    VkDeviceSize             minStorageBufferOffsetAlignment;
+    int32_t                  minTexelOffset;
+    uint32_t                 maxTexelOffset;
+    int32_t                  minTexelGatherOffset;
+    uint32_t                 maxTexelGatherOffset;
+    float                    minInterpolationOffset;
+    float                    maxInterpolationOffset;
+    uint32_t                 subPixelInterpolationOffsetBits;
+    uint32_t                 maxFramebufferWidth;
+    uint32_t                 maxFramebufferHeight;
+    uint32_t                 maxFramebufferLayers;
+    VkSampleCountFlags       framebufferColorSampleCounts;
+    VkSampleCountFlags       framebufferDepthSampleCounts;
+    VkSampleCountFlags       framebufferStencilSampleCounts;
+    VkSampleCountFlags       framebufferNoAttachmentsSampleCounts;
+    uint32_t                 maxColorAttachments;
+    VkSampleCountFlags       sampledImageColorSampleCounts;
+    VkSampleCountFlags       sampledImageIntegerSampleCounts;
+    VkSampleCountFlags       sampledImageDepthSampleCounts;
+    VkSampleCountFlags       sampledImageStencilSampleCounts;
+    VkSampleCountFlags       storageImageSampleCounts;
+    uint32_t                 maxSampleMaskWords;
+    VkBool32                 timestampComputeAndGraphics;
+    float                    timestampPeriod;
+    uint32_t                 maxClipDistances;
+    uint32_t                 maxCullDistances;
+    uint32_t                 maxCombinedClipAndCullDistances;
+    uint32_t                 discreteQueuePriorities;
+    float                    pointSizeRange [2];
+    float                    lineWidthRange [2];
+    float                    pointSizeGranularity;
+    float                    lineWidthGranularity;
+    VkBool32                 strictLines;
+    VkBool32                 standardSampleLocations;
+    VkDeviceSize             optimalBufferCopyOffsetAlignment;
+    VkDeviceSize             optimalBufferCopyRowPitchAlignment;
+    VkDeviceSize             nonCoherentAtomSize;
+} VkPhysicalDeviceLimits;
+typedef struct VkSemaphoreCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkSemaphoreCreateFlags   flags;
+} VkSemaphoreCreateInfo;
+typedef struct VkQueryPoolCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkQueryPoolCreateFlags   flags;
+    VkQueryType              queryType;
+    uint32_t                 queryCount;
+    VkQueryPipelineStatisticFlags   pipelineStatistics;
+} VkQueryPoolCreateInfo;
+typedef struct VkFramebufferCreateInfo {
+    VkStructureType   sType;
+    const  void *             pNext;
+    VkFramebufferCreateFlags      flags;
+    VkRenderPass             renderPass;
+    uint32_t                 attachmentCount;
+    const  VkImageView *      pAttachments;
+    uint32_t                 width;
+    uint32_t                 height;
+    uint32_t                 layers;
+} VkFramebufferCreateInfo;
+typedef struct VkSubmitInfo {
+    VkStructureType   sType;
+    const  void *  pNext;
+    uint32_t         waitSemaphoreCount;
+    const  VkSemaphore *      pWaitSemaphores;
+    const  VkPipelineStageFlags *            pWaitDstStageMask;
+    uint32_t         commandBufferCount;
+    const  VkCommandBuffer *      pCommandBuffers;
+    uint32_t         signalSemaphoreCount;
+    const  VkSemaphore *      pSignalSemaphores;
+} VkSubmitInfo;
+typedef struct VkSurfaceCapabilitiesKHR {
+    uint32_t                           minImageCount;
+    uint32_t                           maxImageCount;
+    VkExtent2D                         currentExtent;
+    VkExtent2D                         minImageExtent;
+    VkExtent2D                         maxImageExtent;
+    uint32_t                           maxImageArrayLayers;
+    VkSurfaceTransformFlagsKHR         supportedTransforms;
+    VkSurfaceTransformFlagBitsKHR      currentTransform;
+    VkCompositeAlphaFlagsKHR           supportedCompositeAlpha;
+    VkImageUsageFlags                  supportedUsageFlags;
+} VkSurfaceCapabilitiesKHR;
+typedef struct VkSwapchainCreateInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkSwapchainCreateFlagsKHR          flags;
+    VkSurfaceKHR                       surface;
+    uint32_t                           minImageCount;
+    VkFormat                           imageFormat;
+    VkColorSpaceKHR                    imageColorSpace;
+    VkExtent2D                         imageExtent;
+    uint32_t                           imageArrayLayers;
+    VkImageUsageFlags                  imageUsage;
+    VkSharingMode                      imageSharingMode;
+    uint32_t           queueFamilyIndexCount;
+    const  uint32_t *                   pQueueFamilyIndices;
+    VkSurfaceTransformFlagBitsKHR      preTransform;
+    VkCompositeAlphaFlagBitsKHR        compositeAlpha;
+    VkPresentModeKHR                   presentMode;
+    VkBool32                           clipped;
+    VkSwapchainKHR     oldSwapchain;
+} VkSwapchainCreateInfoKHR;
+typedef struct VkDebugReportCallbackCreateInfoEXT {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkDebugReportFlagsEXT              flags;
+    PFN_vkDebugReportCallbackEXT       pfnCallback;
+    void *             pUserData;
+} VkDebugReportCallbackCreateInfoEXT;
+typedef struct VkPhysicalDeviceFeatures2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkPhysicalDeviceFeatures           features;
+} VkPhysicalDeviceFeatures2;
+typedef struct VkFormatProperties2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkFormatProperties                 formatProperties;
+} VkFormatProperties2;
+typedef struct VkImageFormatProperties2 {
+    VkStructureType   sType;
+    void *  pNext;
+    VkImageFormatProperties            imageFormatProperties;
+} VkImageFormatProperties2;
+typedef struct VkPhysicalDeviceImageFormatInfo2 {
+    VkStructureType   sType;
+    const  void *  pNext;
+    VkFormat                           format;
+    VkImageType                        type;
+    VkImageTiling                      tiling;
+    VkImageUsageFlags                  usage;
+    VkImageCreateFlags   flags;
+} VkPhysicalDeviceImageFormatInfo2;
+typedef struct VkQueueFamilyProperties2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkQueueFamilyProperties            queueFamilyProperties;
+} VkQueueFamilyProperties2;
+typedef struct VkSparseImageFormatProperties2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkSparseImageFormatProperties      properties;
+} VkSparseImageFormatProperties2;
+typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkFormat                           format;
+    VkImageType                        type;
+    VkSampleCountFlagBits              samples;
+    VkImageUsageFlags                  usage;
+    VkImageTiling                      tiling;
+} VkPhysicalDeviceSparseImageFormatInfo2;
+typedef struct VkPhysicalDeviceVariablePointersFeatures {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkBool32                           variablePointersStorageBuffer;
+    VkBool32                           variablePointers;
+} VkPhysicalDeviceVariablePointersFeatures;
+typedef struct VkPhysicalDeviceVariablePointerFeatures  VkPhysicalDeviceVariablePointerFeatures;
+typedef struct VkExternalMemoryProperties {
+    VkExternalMemoryFeatureFlags    externalMemoryFeatures;
+    VkExternalMemoryHandleTypeFlags   exportFromImportedHandleTypes;
+    VkExternalMemoryHandleTypeFlags   compatibleHandleTypes;
+} VkExternalMemoryProperties;
+typedef struct VkExternalImageFormatProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkExternalMemoryProperties   externalMemoryProperties;
+} VkExternalImageFormatProperties;
+typedef struct VkPhysicalDeviceExternalBufferInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkBufferCreateFlags   flags;
+    VkBufferUsageFlags                 usage;
+    VkExternalMemoryHandleTypeFlagBits   handleType;
+} VkPhysicalDeviceExternalBufferInfo;
+typedef struct VkExternalBufferProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkExternalMemoryProperties      externalMemoryProperties;
+} VkExternalBufferProperties;
+typedef struct VkPhysicalDeviceIDProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    uint8_t                            deviceUUID [ VK_UUID_SIZE ];
+    uint8_t                            driverUUID [ VK_UUID_SIZE ];
+    uint8_t                            deviceLUID [ VK_LUID_SIZE ];
+    uint32_t                           deviceNodeMask;
+    VkBool32                           deviceLUIDValid;
+} VkPhysicalDeviceIDProperties;
+typedef struct VkExternalMemoryImageCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalMemoryHandleTypeFlags   handleTypes;
+} VkExternalMemoryImageCreateInfo;
+typedef struct VkExternalMemoryBufferCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalMemoryHandleTypeFlags   handleTypes;
+} VkExternalMemoryBufferCreateInfo;
+typedef struct VkExportMemoryAllocateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalMemoryHandleTypeFlags   handleTypes;
+} VkExportMemoryAllocateInfo;
+typedef struct VkExternalSemaphoreProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkExternalSemaphoreHandleTypeFlags   exportFromImportedHandleTypes;
+    VkExternalSemaphoreHandleTypeFlags   compatibleHandleTypes;
+    VkExternalSemaphoreFeatureFlags   externalSemaphoreFeatures;
+} VkExternalSemaphoreProperties;
+typedef struct VkExportSemaphoreCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalSemaphoreHandleTypeFlags   handleTypes;
+} VkExportSemaphoreCreateInfo;
+typedef struct VkExternalFenceProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkExternalFenceHandleTypeFlags   exportFromImportedHandleTypes;
+    VkExternalFenceHandleTypeFlags   compatibleHandleTypes;
+    VkExternalFenceFeatureFlags   externalFenceFeatures;
+} VkExternalFenceProperties;
+typedef struct VkExportFenceCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkExternalFenceHandleTypeFlags   handleTypes;
+} VkExportFenceCreateInfo;
+typedef struct VkPhysicalDeviceMultiviewFeatures {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkBool32                           multiview;
+    VkBool32                           multiviewGeometryShader;
+    VkBool32                           multiviewTessellationShader;
+} VkPhysicalDeviceMultiviewFeatures;
+typedef struct VkPhysicalDeviceGroupProperties {
+    VkStructureType   sType;
+    void *                             pNext;
+    uint32_t                           physicalDeviceCount;
+    VkPhysicalDevice                   physicalDevices [ VK_MAX_DEVICE_GROUP_SIZE ];
+    VkBool32                           subsetAllocation;
+} VkPhysicalDeviceGroupProperties;
+typedef struct VkMemoryAllocateFlagsInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkMemoryAllocateFlags   flags;
+    uint32_t                           deviceMask;
+} VkMemoryAllocateFlagsInfo;
+typedef struct VkBindBufferMemoryInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkBuffer                           buffer;
+    VkDeviceMemory                     memory;
+    VkDeviceSize                       memoryOffset;
+} VkBindBufferMemoryInfo;
+typedef struct VkBindImageMemoryInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkImage                            image;
+    VkDeviceMemory                     memory;
+    VkDeviceSize                       memoryOffset;
+} VkBindImageMemoryInfo;
+typedef struct VkDeviceGroupPresentCapabilitiesKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    uint32_t                           presentMask [ VK_MAX_DEVICE_GROUP_SIZE ];
+    VkDeviceGroupPresentModeFlagsKHR   modes;
+} VkDeviceGroupPresentCapabilitiesKHR;
+typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkDeviceGroupPresentModeFlagsKHR                           modes;
+} VkDeviceGroupSwapchainCreateInfoKHR;
+typedef struct VkDescriptorUpdateTemplateCreateInfo {
+    VkStructureType   sType;
+    const  void *                                pNext;
+    VkDescriptorUpdateTemplateCreateFlags      flags;
+    uint32_t                   descriptorUpdateEntryCount;
+    const  VkDescriptorUpdateTemplateEntry *  pDescriptorUpdateEntries;
+    VkDescriptorUpdateTemplateType   templateType;
+    VkDescriptorSetLayout   descriptorSetLayout;
+    VkPipelineBindPoint   pipelineBindPoint;
+    VkPipelineLayout pipelineLayout;
+    uint32_t   set;
+} VkDescriptorUpdateTemplateCreateInfo;
+typedef struct VkInputAttachmentAspectReference {
+    uint32_t                          subpass;
+    uint32_t                          inputAttachmentIndex;
+    VkImageAspectFlags                aspectMask;
+} VkInputAttachmentAspectReference;
+typedef struct VkRenderPassInputAttachmentAspectCreateInfo {
+    VkStructureType   sType;
+    const  void *                      pNext;
+    uint32_t                          aspectReferenceCount;
+    const  VkInputAttachmentAspectReference *  pAspectReferences;
+} VkRenderPassInputAttachmentAspectCreateInfo;
+typedef struct VkPhysicalDevice16BitStorageFeatures {
+    VkStructureType   sType;
+    void *       pNext;
+    VkBool32                           storageBuffer16BitAccess;
+    VkBool32                           uniformAndStorageBuffer16BitAccess;
+    VkBool32                           storagePushConstant16;
+    VkBool32                           storageInputOutput16;
+} VkPhysicalDevice16BitStorageFeatures;
+typedef struct VkPhysicalDeviceSubgroupProperties {
+    VkStructureType   sType;
+    void *                    pNext;
+    uint32_t                        subgroupSize;
+    VkShaderStageFlags              supportedStages;
+    VkSubgroupFeatureFlags          supportedOperations;
+    VkBool32   quadOperationsInAllStages;
+} VkPhysicalDeviceSubgroupProperties;
+typedef struct VkMemoryRequirements2 {
+    VkStructureType   sType;
+    void *  pNext;
+    VkMemoryRequirements                                                   memoryRequirements;
+} VkMemoryRequirements2;
+typedef struct VkMemoryRequirements2KHR  VkMemoryRequirements2KHR;
+typedef struct VkSparseImageMemoryRequirements2 {
+    VkStructureType   sType;
+    void *                                        pNext;
+    VkSparseImageMemoryRequirements                                        memoryRequirements;
+} VkSparseImageMemoryRequirements2;
+typedef struct VkMemoryDedicatedRequirements {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkBool32                           prefersDedicatedAllocation;
+    VkBool32                           requiresDedicatedAllocation;
+} VkMemoryDedicatedRequirements;
+typedef struct VkImageViewUsageCreateInfo {
+    VkStructureType   sType;
+    const  void *  pNext;
+    VkImageUsageFlags   usage;
+} VkImageViewUsageCreateInfo;
+typedef struct VkSamplerYcbcrConversionCreateInfo {
+    VkStructureType   sType;
+    const  void *                       pNext;
+    VkFormat                           format;
+    VkSamplerYcbcrModelConversion   ycbcrModel;
+    VkSamplerYcbcrRange             ycbcrRange;
+    VkComponentMapping                 components;
+    VkChromaLocation                xChromaOffset;
+    VkChromaLocation                yChromaOffset;
+    VkFilter                           chromaFilter;
+    VkBool32                           forceExplicitReconstruction;
+} VkSamplerYcbcrConversionCreateInfo;
+typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {
+    VkStructureType   sType;
+    void *       pNext;
+    VkBool32                           samplerYcbcrConversion;
+} VkPhysicalDeviceSamplerYcbcrConversionFeatures;
+typedef struct VkProtectedSubmitInfo {
+    VkStructureType   sType;
+    const  void *                      pNext;
+    VkBool32                          protectedSubmit;
+} VkProtectedSubmitInfo;
+typedef struct VkPhysicalDeviceProtectedMemoryFeatures {
+    VkStructureType   sType;
+    void *                                pNext;
+    VkBool32                              protectedMemory;
+} VkPhysicalDeviceProtectedMemoryFeatures;
+typedef struct VkPhysicalDeviceProtectedMemoryProperties {
+    VkStructureType   sType;
+    void *                                pNext;
+    VkBool32                              protectedNoFault;
+} VkPhysicalDeviceProtectedMemoryProperties;
+typedef struct VkDeviceQueueInfo2 {
+    VkStructureType   sType;
+    const  void *                          pNext;
+    VkDeviceQueueCreateFlags              flags;
+    uint32_t                              queueFamilyIndex;
+    uint32_t                              queueIndex;
+} VkDeviceQueueInfo2;
+typedef struct VkPhysicalDeviceMaintenance3Properties {
+    VkStructureType   sType;
+    void *                             pNext;
+    uint32_t                           maxPerSetDescriptors;
+    VkDeviceSize                       maxMemoryAllocationSize;
+} VkPhysicalDeviceMaintenance3Properties;
+typedef struct VkDescriptorSetLayoutSupport {
+    VkStructureType   sType;
+    void *             pNext;
+    VkBool32           supported;
+} VkDescriptorSetLayoutSupport;
+typedef struct VkPhysicalDeviceShaderDrawParametersFeatures {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkBool32                           shaderDrawParameters;
+} VkPhysicalDeviceShaderDrawParametersFeatures;
+typedef struct VkPhysicalDeviceShaderDrawParameterFeatures  VkPhysicalDeviceShaderDrawParameterFeatures;
+typedef struct VkPhysicalDeviceProperties {
+    uint32_t         apiVersion;
+    uint32_t         driverVersion;
+    uint32_t         vendorID;
+    uint32_t         deviceID;
+    VkPhysicalDeviceType   deviceType;
+    char             deviceName [ VK_MAX_PHYSICAL_DEVICE_NAME_SIZE ];
+    uint8_t          pipelineCacheUUID [ VK_UUID_SIZE ];
+    VkPhysicalDeviceLimits   limits;
+    VkPhysicalDeviceSparseProperties   sparseProperties;
+} VkPhysicalDeviceProperties;
+typedef struct VkDeviceCreateInfo {
+    VkStructureType   sType;
+    const  void *      pNext;
+    VkDeviceCreateFlags      flags;
+    uint32_t          queueCreateInfoCount;
+    const  VkDeviceQueueCreateInfo *  pQueueCreateInfos;
+    uint32_t                 enabledLayerCount;
+    const  char * const*       ppEnabledLayerNames;
+    uint32_t                 enabledExtensionCount;
+    const  char * const*       ppEnabledExtensionNames;
+    const  VkPhysicalDeviceFeatures *  pEnabledFeatures;
+} VkDeviceCreateInfo;
+typedef struct VkPhysicalDeviceMemoryProperties {
+    uint32_t                 memoryTypeCount;
+    VkMemoryType             memoryTypes [ VK_MAX_MEMORY_TYPES ];
+    uint32_t                 memoryHeapCount;
+    VkMemoryHeap             memoryHeaps [ VK_MAX_MEMORY_HEAPS ];
+} VkPhysicalDeviceMemoryProperties;
+typedef struct VkPhysicalDeviceProperties2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkPhysicalDeviceProperties         properties;
+} VkPhysicalDeviceProperties2;
+typedef struct VkPhysicalDeviceMemoryProperties2 {
+    VkStructureType   sType;
+    void *                             pNext;
+    VkPhysicalDeviceMemoryProperties   memoryProperties;
+} VkPhysicalDeviceMemoryProperties2;
+
+
+#define VK_VERSION_1_0 1
+GLAD_API_CALL int GLAD_VK_VERSION_1_0;
+#define VK_VERSION_1_1 1
+GLAD_API_CALL int GLAD_VK_VERSION_1_1;
+#define VK_EXT_debug_report 1
+GLAD_API_CALL int GLAD_VK_EXT_debug_report;
+#define VK_KHR_surface 1
+GLAD_API_CALL int GLAD_VK_KHR_surface;
+#define VK_KHR_swapchain 1
+GLAD_API_CALL int GLAD_VK_KHR_swapchain;
+
+
+typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice   device, const  VkAcquireNextImageInfoKHR *  pAcquireInfo, uint32_t *  pImageIndex);
+typedef VkResult (GLAD_API_PTR *PFN_vkAcquireNextImageKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint64_t   timeout, VkSemaphore   semaphore, VkFence   fence, uint32_t *  pImageIndex);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateCommandBuffers)(VkDevice   device, const  VkCommandBufferAllocateInfo *  pAllocateInfo, VkCommandBuffer *  pCommandBuffers);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateDescriptorSets)(VkDevice   device, const  VkDescriptorSetAllocateInfo *  pAllocateInfo, VkDescriptorSet *  pDescriptorSets);
+typedef VkResult (GLAD_API_PTR *PFN_vkAllocateMemory)(VkDevice   device, const  VkMemoryAllocateInfo *  pAllocateInfo, const  VkAllocationCallbacks *  pAllocator, VkDeviceMemory *  pMemory);
+typedef VkResult (GLAD_API_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer   commandBuffer, const  VkCommandBufferBeginInfo *  pBeginInfo);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory)(VkDevice   device, VkBuffer   buffer, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindBufferMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindBufferMemoryInfo *  pBindInfos);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory)(VkDevice   device, VkImage   image, VkDeviceMemory   memory, VkDeviceSize   memoryOffset);
+typedef VkResult (GLAD_API_PTR *PFN_vkBindImageMemory2)(VkDevice   device, uint32_t   bindInfoCount, const  VkBindImageMemoryInfo *  pBindInfos);
+typedef void (GLAD_API_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query, VkQueryControlFlags   flags);
+typedef void (GLAD_API_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer   commandBuffer, const  VkRenderPassBeginInfo *  pRenderPassBegin, VkSubpassContents   contents);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipelineLayout   layout, uint32_t   firstSet, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets, uint32_t   dynamicOffsetCount, const  uint32_t *  pDynamicOffsets);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, VkIndexType   indexType);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer   commandBuffer, VkPipelineBindPoint   pipelineBindPoint, VkPipeline   pipeline);
+typedef void (GLAD_API_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer   commandBuffer, uint32_t   firstBinding, uint32_t   bindingCount, const  VkBuffer *  pBuffers, const  VkDeviceSize *  pOffsets);
+typedef void (GLAD_API_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageBlit *  pRegions, VkFilter   filter);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer   commandBuffer, uint32_t   attachmentCount, const  VkClearAttachment *  pAttachments, uint32_t   rectCount, const  VkClearRect *  pRects);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearColorValue *  pColor, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);
+typedef void (GLAD_API_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer   commandBuffer, VkImage   image, VkImageLayout   imageLayout, const  VkClearDepthStencilValue *  pDepthStencil, uint32_t   rangeCount, const  VkImageSubresourceRange *  pRanges);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferCopy *  pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer   commandBuffer, VkBuffer   srcBuffer, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageCopy *  pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkBuffer   dstBuffer, uint32_t   regionCount, const  VkBufferImageCopy *  pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   stride, VkQueryResultFlags   flags);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatch)(VkCommandBuffer   commandBuffer, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer   commandBuffer, uint32_t   baseGroupX, uint32_t   baseGroupY, uint32_t   baseGroupZ, uint32_t   groupCountX, uint32_t   groupCountY, uint32_t   groupCountZ);
+typedef void (GLAD_API_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset);
+typedef void (GLAD_API_PTR *PFN_vkCmdDraw)(VkCommandBuffer   commandBuffer, uint32_t   vertexCount, uint32_t   instanceCount, uint32_t   firstVertex, uint32_t   firstInstance);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer   commandBuffer, uint32_t   indexCount, uint32_t   instanceCount, uint32_t   firstIndex, int32_t   vertexOffset, uint32_t   firstInstance);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);
+typedef void (GLAD_API_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer   commandBuffer, VkBuffer   buffer, VkDeviceSize   offset, uint32_t   drawCount, uint32_t   stride);
+typedef void (GLAD_API_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   query);
+typedef void (GLAD_API_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer   commandBuffer);
+typedef void (GLAD_API_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer   commandBuffer, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);
+typedef void (GLAD_API_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   size, uint32_t   data);
+typedef void (GLAD_API_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer   commandBuffer, VkSubpassContents   contents);
+typedef void (GLAD_API_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer   commandBuffer, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, VkDependencyFlags   dependencyFlags, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);
+typedef void (GLAD_API_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer   commandBuffer, VkPipelineLayout   layout, VkShaderStageFlags   stageFlags, uint32_t   offset, uint32_t   size, const  void *  pValues);
+typedef void (GLAD_API_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer   commandBuffer, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount);
+typedef void (GLAD_API_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer   commandBuffer, VkImage   srcImage, VkImageLayout   srcImageLayout, VkImage   dstImage, VkImageLayout   dstImageLayout, uint32_t   regionCount, const  VkImageResolve *  pRegions);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer   commandBuffer, const  float   blendConstants [4]);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer   commandBuffer, float   depthBiasConstantFactor, float   depthBiasClamp, float   depthBiasSlopeFactor);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer   commandBuffer, float   minDepthBounds, float   maxDepthBounds);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer   commandBuffer, uint32_t   deviceMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer   commandBuffer, VkEvent   event, VkPipelineStageFlags   stageMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer   commandBuffer, float   lineWidth);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer   commandBuffer, uint32_t   firstScissor, uint32_t   scissorCount, const  VkRect2D *  pScissors);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   compareMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   reference);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer   commandBuffer, VkStencilFaceFlags   faceMask, uint32_t   writeMask);
+typedef void (GLAD_API_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer   commandBuffer, uint32_t   firstViewport, uint32_t   viewportCount, const  VkViewport *  pViewports);
+typedef void (GLAD_API_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer   commandBuffer, VkBuffer   dstBuffer, VkDeviceSize   dstOffset, VkDeviceSize   dataSize, const  void *  pData);
+typedef void (GLAD_API_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer   commandBuffer, uint32_t   eventCount, const  VkEvent *  pEvents, VkPipelineStageFlags   srcStageMask, VkPipelineStageFlags   dstStageMask, uint32_t   memoryBarrierCount, const  VkMemoryBarrier *  pMemoryBarriers, uint32_t   bufferMemoryBarrierCount, const  VkBufferMemoryBarrier *  pBufferMemoryBarriers, uint32_t   imageMemoryBarrierCount, const  VkImageMemoryBarrier *  pImageMemoryBarriers);
+typedef void (GLAD_API_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer   commandBuffer, VkPipelineStageFlagBits   pipelineStage, VkQueryPool   queryPool, uint32_t   query);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateBuffer)(VkDevice   device, const  VkBufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBuffer *  pBuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateBufferView)(VkDevice   device, const  VkBufferViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkBufferView *  pView);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateCommandPool)(VkDevice   device, const  VkCommandPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkCommandPool *  pCommandPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateComputePipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkComputePipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance   instance, const  VkDebugReportCallbackCreateInfoEXT *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDebugReportCallbackEXT *  pCallback);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorPool)(VkDevice   device, const  VkDescriptorPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorPool *  pDescriptorPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorSetLayout *  pSetLayout);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice   device, const  VkDescriptorUpdateTemplateCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDescriptorUpdateTemplate *  pDescriptorUpdateTemplate);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateDevice)(VkPhysicalDevice   physicalDevice, const  VkDeviceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkDevice *  pDevice);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateEvent)(VkDevice   device, const  VkEventCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkEvent *  pEvent);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateFence)(VkDevice   device, const  VkFenceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFence *  pFence);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateFramebuffer)(VkDevice   device, const  VkFramebufferCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkFramebuffer *  pFramebuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice   device, VkPipelineCache   pipelineCache, uint32_t   createInfoCount, const  VkGraphicsPipelineCreateInfo *  pCreateInfos, const  VkAllocationCallbacks *  pAllocator, VkPipeline *  pPipelines);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateImage)(VkDevice   device, const  VkImageCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImage *  pImage);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateImageView)(VkDevice   device, const  VkImageViewCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkImageView *  pView);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateInstance)(const  VkInstanceCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkInstance *  pInstance);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineCache)(VkDevice   device, const  VkPipelineCacheCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineCache *  pPipelineCache);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreatePipelineLayout)(VkDevice   device, const  VkPipelineLayoutCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkPipelineLayout *  pPipelineLayout);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateQueryPool)(VkDevice   device, const  VkQueryPoolCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkQueryPool *  pQueryPool);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateRenderPass)(VkDevice   device, const  VkRenderPassCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkRenderPass *  pRenderPass);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSampler)(VkDevice   device, const  VkSamplerCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSampler *  pSampler);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice   device, const  VkSamplerYcbcrConversionCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSamplerYcbcrConversion *  pYcbcrConversion);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSemaphore)(VkDevice   device, const  VkSemaphoreCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSemaphore *  pSemaphore);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateShaderModule)(VkDevice   device, const  VkShaderModuleCreateInfo *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkShaderModule *  pShaderModule);
+typedef VkResult (GLAD_API_PTR *PFN_vkCreateSwapchainKHR)(VkDevice   device, const  VkSwapchainCreateInfoKHR *  pCreateInfo, const  VkAllocationCallbacks *  pAllocator, VkSwapchainKHR *  pSwapchain);
+typedef void (GLAD_API_PTR *PFN_vkDebugReportMessageEXT)(VkInstance   instance, VkDebugReportFlagsEXT   flags, VkDebugReportObjectTypeEXT   objectType, uint64_t   object, size_t   location, int32_t   messageCode, const  char *  pLayerPrefix, const  char *  pMessage);
+typedef void (GLAD_API_PTR *PFN_vkDestroyBuffer)(VkDevice   device, VkBuffer   buffer, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyBufferView)(VkDevice   device, VkBufferView   bufferView, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyCommandPool)(VkDevice   device, VkCommandPool   commandPool, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance   instance, VkDebugReportCallbackEXT   callback, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice   device, VkDescriptorSetLayout   descriptorSetLayout, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice   device, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyDevice)(VkDevice   device, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyEvent)(VkDevice   device, VkEvent   event, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyFence)(VkDevice   device, VkFence   fence, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyFramebuffer)(VkDevice   device, VkFramebuffer   framebuffer, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyImage)(VkDevice   device, VkImage   image, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyImageView)(VkDevice   device, VkImageView   imageView, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyInstance)(VkInstance   instance, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipeline)(VkDevice   device, VkPipeline   pipeline, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineCache)(VkDevice   device, VkPipelineCache   pipelineCache, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyPipelineLayout)(VkDevice   device, VkPipelineLayout   pipelineLayout, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyQueryPool)(VkDevice   device, VkQueryPool   queryPool, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyRenderPass)(VkDevice   device, VkRenderPass   renderPass, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySampler)(VkDevice   device, VkSampler   sampler, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice   device, VkSamplerYcbcrConversion   ycbcrConversion, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySemaphore)(VkDevice   device, VkSemaphore   semaphore, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroyShaderModule)(VkDevice   device, VkShaderModule   shaderModule, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySurfaceKHR)(VkInstance   instance, VkSurfaceKHR   surface, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkDestroySwapchainKHR)(VkDevice   device, VkSwapchainKHR   swapchain, const  VkAllocationCallbacks *  pAllocator);
+typedef VkResult (GLAD_API_PTR *PFN_vkDeviceWaitIdle)(VkDevice   device);
+typedef VkResult (GLAD_API_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer   commandBuffer);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice   physicalDevice, const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const  char *  pLayerName, uint32_t *  pPropertyCount, VkExtensionProperties *  pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t *  pPropertyCount, VkLayerProperties *  pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t *  pApiVersion);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance   instance, uint32_t *  pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *  pPhysicalDeviceGroupProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance   instance, uint32_t *  pPhysicalDeviceCount, VkPhysicalDevice *  pPhysicalDevices);
+typedef VkResult (GLAD_API_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);
+typedef void (GLAD_API_PTR *PFN_vkFreeCommandBuffers)(VkDevice   device, VkCommandPool   commandPool, uint32_t   commandBufferCount, const  VkCommandBuffer *  pCommandBuffers);
+typedef VkResult (GLAD_API_PTR *PFN_vkFreeDescriptorSets)(VkDevice   device, VkDescriptorPool   descriptorPool, uint32_t   descriptorSetCount, const  VkDescriptorSet *  pDescriptorSets);
+typedef void (GLAD_API_PTR *PFN_vkFreeMemory)(VkDevice   device, VkDeviceMemory   memory, const  VkAllocationCallbacks *  pAllocator);
+typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice   device, VkBuffer   buffer, VkMemoryRequirements *  pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice   device, const  VkBufferMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice   device, const  VkDescriptorSetLayoutCreateInfo *  pCreateInfo, VkDescriptorSetLayoutSupport *  pSupport);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice   device, uint32_t   heapIndex, uint32_t   localDeviceIndex, uint32_t   remoteDeviceIndex, VkPeerMemoryFeatureFlags *  pPeerMemoryFeatures);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice   device, VkDeviceGroupPresentCapabilitiesKHR *  pDeviceGroupPresentCapabilities);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice   device, VkSurfaceKHR   surface, VkDeviceGroupPresentModeFlagsKHR *  pModes);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize *  pCommittedMemoryInBytes);
+typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetDeviceProcAddr)(VkDevice   device, const  char *  pName);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue)(VkDevice   device, uint32_t   queueFamilyIndex, uint32_t   queueIndex, VkQueue *  pQueue);
+typedef void (GLAD_API_PTR *PFN_vkGetDeviceQueue2)(VkDevice   device, const  VkDeviceQueueInfo2 *  pQueueInfo, VkQueue *  pQueue);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetEventStatus)(VkDevice   device, VkEvent   event);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetFenceStatus)(VkDevice   device, VkFence   fence);
+typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice   device, VkImage   image, VkMemoryRequirements *  pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice   device, const  VkImageMemoryRequirementsInfo2 *  pInfo, VkMemoryRequirements2 *  pMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice   device, VkImage   image, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *  pSparseMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice   device, const  VkImageSparseMemoryRequirementsInfo2 *  pInfo, uint32_t *  pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *  pSparseMemoryRequirements);
+typedef void (GLAD_API_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice   device, VkImage   image, const  VkImageSubresource *  pSubresource, VkSubresourceLayout *  pLayout);
+typedef PFN_vkVoidFunction (GLAD_API_PTR *PFN_vkGetInstanceProcAddr)(VkInstance   instance, const  char *  pName);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalBufferInfo *  pExternalBufferInfo, VkExternalBufferProperties *  pExternalBufferProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalFenceInfo *  pExternalFenceInfo, VkExternalFenceProperties *  pExternalFenceProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceExternalSemaphoreInfo *  pExternalSemaphoreInfo, VkExternalSemaphoreProperties *  pExternalSemaphoreProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures *  pFeatures);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceFeatures2 *  pFeatures);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties *  pFormatProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkFormatProperties2 *  pFormatProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkImageTiling   tiling, VkImageUsageFlags   usage, VkImageCreateFlags   flags, VkImageFormatProperties *  pImageFormatProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceImageFormatInfo2 *  pImageFormatInfo, VkImageFormatProperties2 *  pImageFormatProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties *  pMemoryProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceMemoryProperties2 *  pMemoryProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pRectCount, VkRect2D *  pRects);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties *  pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice   physicalDevice, VkPhysicalDeviceProperties2 *  pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties *  pQueueFamilyProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice   physicalDevice, uint32_t *  pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *  pQueueFamilyProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice   physicalDevice, VkFormat   format, VkImageType   type, VkSampleCountFlagBits   samples, VkImageUsageFlags   usage, VkImageTiling   tiling, uint32_t *  pPropertyCount, VkSparseImageFormatProperties *  pProperties);
+typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice   physicalDevice, const  VkPhysicalDeviceSparseImageFormatInfo2 *  pFormatInfo, uint32_t *  pPropertyCount, VkSparseImageFormatProperties2 *  pProperties);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, VkSurfaceCapabilitiesKHR *  pSurfaceCapabilities);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pSurfaceFormatCount, VkSurfaceFormatKHR *  pSurfaceFormats);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice   physicalDevice, VkSurfaceKHR   surface, uint32_t *  pPresentModeCount, VkPresentModeKHR *  pPresentModes);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice   physicalDevice, uint32_t   queueFamilyIndex, VkSurfaceKHR   surface, VkBool32 *  pSupported);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetPipelineCacheData)(VkDevice   device, VkPipelineCache   pipelineCache, size_t *  pDataSize, void *  pData);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetQueryPoolResults)(VkDevice   device, VkQueryPool   queryPool, uint32_t   firstQuery, uint32_t   queryCount, size_t   dataSize, void *  pData, VkDeviceSize   stride, VkQueryResultFlags   flags);
+typedef void (GLAD_API_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice   device, VkRenderPass   renderPass, VkExtent2D *  pGranularity);
+typedef VkResult (GLAD_API_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice   device, VkSwapchainKHR   swapchain, uint32_t *  pSwapchainImageCount, VkImage *  pSwapchainImages);
+typedef VkResult (GLAD_API_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice   device, uint32_t   memoryRangeCount, const  VkMappedMemoryRange *  pMemoryRanges);
+typedef VkResult (GLAD_API_PTR *PFN_vkMapMemory)(VkDevice   device, VkDeviceMemory   memory, VkDeviceSize   offset, VkDeviceSize   size, VkMemoryMapFlags   flags, void **  ppData);
+typedef VkResult (GLAD_API_PTR *PFN_vkMergePipelineCaches)(VkDevice   device, VkPipelineCache   dstCache, uint32_t   srcCacheCount, const  VkPipelineCache *  pSrcCaches);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueBindSparse)(VkQueue   queue, uint32_t   bindInfoCount, const  VkBindSparseInfo *  pBindInfo, VkFence   fence);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueuePresentKHR)(VkQueue   queue, const  VkPresentInfoKHR *  pPresentInfo);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueSubmit)(VkQueue   queue, uint32_t   submitCount, const  VkSubmitInfo *  pSubmits, VkFence   fence);
+typedef VkResult (GLAD_API_PTR *PFN_vkQueueWaitIdle)(VkQueue   queue);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer   commandBuffer, VkCommandBufferResetFlags   flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolResetFlags   flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetDescriptorPool)(VkDevice   device, VkDescriptorPool   descriptorPool, VkDescriptorPoolResetFlags   flags);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetEvent)(VkDevice   device, VkEvent   event);
+typedef VkResult (GLAD_API_PTR *PFN_vkResetFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences);
+typedef VkResult (GLAD_API_PTR *PFN_vkSetEvent)(VkDevice   device, VkEvent   event);
+typedef void (GLAD_API_PTR *PFN_vkTrimCommandPool)(VkDevice   device, VkCommandPool   commandPool, VkCommandPoolTrimFlags   flags);
+typedef void (GLAD_API_PTR *PFN_vkUnmapMemory)(VkDevice   device, VkDeviceMemory   memory);
+typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice   device, VkDescriptorSet   descriptorSet, VkDescriptorUpdateTemplate   descriptorUpdateTemplate, const  void *  pData);
+typedef void (GLAD_API_PTR *PFN_vkUpdateDescriptorSets)(VkDevice   device, uint32_t   descriptorWriteCount, const  VkWriteDescriptorSet *  pDescriptorWrites, uint32_t   descriptorCopyCount, const  VkCopyDescriptorSet *  pDescriptorCopies);
+typedef VkResult (GLAD_API_PTR *PFN_vkWaitForFences)(VkDevice   device, uint32_t   fenceCount, const  VkFence *  pFences, VkBool32   waitAll, uint64_t   timeout);
+
+GLAD_API_CALL PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR;
+#define vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR
+GLAD_API_CALL PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR;
+#define vkAcquireNextImageKHR glad_vkAcquireNextImageKHR
+GLAD_API_CALL PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers;
+#define vkAllocateCommandBuffers glad_vkAllocateCommandBuffers
+GLAD_API_CALL PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets;
+#define vkAllocateDescriptorSets glad_vkAllocateDescriptorSets
+GLAD_API_CALL PFN_vkAllocateMemory glad_vkAllocateMemory;
+#define vkAllocateMemory glad_vkAllocateMemory
+GLAD_API_CALL PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer;
+#define vkBeginCommandBuffer glad_vkBeginCommandBuffer
+GLAD_API_CALL PFN_vkBindBufferMemory glad_vkBindBufferMemory;
+#define vkBindBufferMemory glad_vkBindBufferMemory
+GLAD_API_CALL PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2;
+#define vkBindBufferMemory2 glad_vkBindBufferMemory2
+GLAD_API_CALL PFN_vkBindImageMemory glad_vkBindImageMemory;
+#define vkBindImageMemory glad_vkBindImageMemory
+GLAD_API_CALL PFN_vkBindImageMemory2 glad_vkBindImageMemory2;
+#define vkBindImageMemory2 glad_vkBindImageMemory2
+GLAD_API_CALL PFN_vkCmdBeginQuery glad_vkCmdBeginQuery;
+#define vkCmdBeginQuery glad_vkCmdBeginQuery
+GLAD_API_CALL PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass;
+#define vkCmdBeginRenderPass glad_vkCmdBeginRenderPass
+GLAD_API_CALL PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets;
+#define vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets
+GLAD_API_CALL PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer;
+#define vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer
+GLAD_API_CALL PFN_vkCmdBindPipeline glad_vkCmdBindPipeline;
+#define vkCmdBindPipeline glad_vkCmdBindPipeline
+GLAD_API_CALL PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers;
+#define vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers
+GLAD_API_CALL PFN_vkCmdBlitImage glad_vkCmdBlitImage;
+#define vkCmdBlitImage glad_vkCmdBlitImage
+GLAD_API_CALL PFN_vkCmdClearAttachments glad_vkCmdClearAttachments;
+#define vkCmdClearAttachments glad_vkCmdClearAttachments
+GLAD_API_CALL PFN_vkCmdClearColorImage glad_vkCmdClearColorImage;
+#define vkCmdClearColorImage glad_vkCmdClearColorImage
+GLAD_API_CALL PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage;
+#define vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage
+GLAD_API_CALL PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer;
+#define vkCmdCopyBuffer glad_vkCmdCopyBuffer
+GLAD_API_CALL PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage;
+#define vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage
+GLAD_API_CALL PFN_vkCmdCopyImage glad_vkCmdCopyImage;
+#define vkCmdCopyImage glad_vkCmdCopyImage
+GLAD_API_CALL PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer;
+#define vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer
+GLAD_API_CALL PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults;
+#define vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults
+GLAD_API_CALL PFN_vkCmdDispatch glad_vkCmdDispatch;
+#define vkCmdDispatch glad_vkCmdDispatch
+GLAD_API_CALL PFN_vkCmdDispatchBase glad_vkCmdDispatchBase;
+#define vkCmdDispatchBase glad_vkCmdDispatchBase
+GLAD_API_CALL PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect;
+#define vkCmdDispatchIndirect glad_vkCmdDispatchIndirect
+GLAD_API_CALL PFN_vkCmdDraw glad_vkCmdDraw;
+#define vkCmdDraw glad_vkCmdDraw
+GLAD_API_CALL PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed;
+#define vkCmdDrawIndexed glad_vkCmdDrawIndexed
+GLAD_API_CALL PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect;
+#define vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect
+GLAD_API_CALL PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect;
+#define vkCmdDrawIndirect glad_vkCmdDrawIndirect
+GLAD_API_CALL PFN_vkCmdEndQuery glad_vkCmdEndQuery;
+#define vkCmdEndQuery glad_vkCmdEndQuery
+GLAD_API_CALL PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass;
+#define vkCmdEndRenderPass glad_vkCmdEndRenderPass
+GLAD_API_CALL PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands;
+#define vkCmdExecuteCommands glad_vkCmdExecuteCommands
+GLAD_API_CALL PFN_vkCmdFillBuffer glad_vkCmdFillBuffer;
+#define vkCmdFillBuffer glad_vkCmdFillBuffer
+GLAD_API_CALL PFN_vkCmdNextSubpass glad_vkCmdNextSubpass;
+#define vkCmdNextSubpass glad_vkCmdNextSubpass
+GLAD_API_CALL PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier;
+#define vkCmdPipelineBarrier glad_vkCmdPipelineBarrier
+GLAD_API_CALL PFN_vkCmdPushConstants glad_vkCmdPushConstants;
+#define vkCmdPushConstants glad_vkCmdPushConstants
+GLAD_API_CALL PFN_vkCmdResetEvent glad_vkCmdResetEvent;
+#define vkCmdResetEvent glad_vkCmdResetEvent
+GLAD_API_CALL PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool;
+#define vkCmdResetQueryPool glad_vkCmdResetQueryPool
+GLAD_API_CALL PFN_vkCmdResolveImage glad_vkCmdResolveImage;
+#define vkCmdResolveImage glad_vkCmdResolveImage
+GLAD_API_CALL PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants;
+#define vkCmdSetBlendConstants glad_vkCmdSetBlendConstants
+GLAD_API_CALL PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias;
+#define vkCmdSetDepthBias glad_vkCmdSetDepthBias
+GLAD_API_CALL PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds;
+#define vkCmdSetDepthBounds glad_vkCmdSetDepthBounds
+GLAD_API_CALL PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask;
+#define vkCmdSetDeviceMask glad_vkCmdSetDeviceMask
+GLAD_API_CALL PFN_vkCmdSetEvent glad_vkCmdSetEvent;
+#define vkCmdSetEvent glad_vkCmdSetEvent
+GLAD_API_CALL PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth;
+#define vkCmdSetLineWidth glad_vkCmdSetLineWidth
+GLAD_API_CALL PFN_vkCmdSetScissor glad_vkCmdSetScissor;
+#define vkCmdSetScissor glad_vkCmdSetScissor
+GLAD_API_CALL PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask;
+#define vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask
+GLAD_API_CALL PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference;
+#define vkCmdSetStencilReference glad_vkCmdSetStencilReference
+GLAD_API_CALL PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask;
+#define vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask
+GLAD_API_CALL PFN_vkCmdSetViewport glad_vkCmdSetViewport;
+#define vkCmdSetViewport glad_vkCmdSetViewport
+GLAD_API_CALL PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer;
+#define vkCmdUpdateBuffer glad_vkCmdUpdateBuffer
+GLAD_API_CALL PFN_vkCmdWaitEvents glad_vkCmdWaitEvents;
+#define vkCmdWaitEvents glad_vkCmdWaitEvents
+GLAD_API_CALL PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp;
+#define vkCmdWriteTimestamp glad_vkCmdWriteTimestamp
+GLAD_API_CALL PFN_vkCreateBuffer glad_vkCreateBuffer;
+#define vkCreateBuffer glad_vkCreateBuffer
+GLAD_API_CALL PFN_vkCreateBufferView glad_vkCreateBufferView;
+#define vkCreateBufferView glad_vkCreateBufferView
+GLAD_API_CALL PFN_vkCreateCommandPool glad_vkCreateCommandPool;
+#define vkCreateCommandPool glad_vkCreateCommandPool
+GLAD_API_CALL PFN_vkCreateComputePipelines glad_vkCreateComputePipelines;
+#define vkCreateComputePipelines glad_vkCreateComputePipelines
+GLAD_API_CALL PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT;
+#define vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT
+GLAD_API_CALL PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool;
+#define vkCreateDescriptorPool glad_vkCreateDescriptorPool
+GLAD_API_CALL PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout;
+#define vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout
+GLAD_API_CALL PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate;
+#define vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate
+GLAD_API_CALL PFN_vkCreateDevice glad_vkCreateDevice;
+#define vkCreateDevice glad_vkCreateDevice
+GLAD_API_CALL PFN_vkCreateEvent glad_vkCreateEvent;
+#define vkCreateEvent glad_vkCreateEvent
+GLAD_API_CALL PFN_vkCreateFence glad_vkCreateFence;
+#define vkCreateFence glad_vkCreateFence
+GLAD_API_CALL PFN_vkCreateFramebuffer glad_vkCreateFramebuffer;
+#define vkCreateFramebuffer glad_vkCreateFramebuffer
+GLAD_API_CALL PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines;
+#define vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines
+GLAD_API_CALL PFN_vkCreateImage glad_vkCreateImage;
+#define vkCreateImage glad_vkCreateImage
+GLAD_API_CALL PFN_vkCreateImageView glad_vkCreateImageView;
+#define vkCreateImageView glad_vkCreateImageView
+GLAD_API_CALL PFN_vkCreateInstance glad_vkCreateInstance;
+#define vkCreateInstance glad_vkCreateInstance
+GLAD_API_CALL PFN_vkCreatePipelineCache glad_vkCreatePipelineCache;
+#define vkCreatePipelineCache glad_vkCreatePipelineCache
+GLAD_API_CALL PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout;
+#define vkCreatePipelineLayout glad_vkCreatePipelineLayout
+GLAD_API_CALL PFN_vkCreateQueryPool glad_vkCreateQueryPool;
+#define vkCreateQueryPool glad_vkCreateQueryPool
+GLAD_API_CALL PFN_vkCreateRenderPass glad_vkCreateRenderPass;
+#define vkCreateRenderPass glad_vkCreateRenderPass
+GLAD_API_CALL PFN_vkCreateSampler glad_vkCreateSampler;
+#define vkCreateSampler glad_vkCreateSampler
+GLAD_API_CALL PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion;
+#define vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion
+GLAD_API_CALL PFN_vkCreateSemaphore glad_vkCreateSemaphore;
+#define vkCreateSemaphore glad_vkCreateSemaphore
+GLAD_API_CALL PFN_vkCreateShaderModule glad_vkCreateShaderModule;
+#define vkCreateShaderModule glad_vkCreateShaderModule
+GLAD_API_CALL PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR;
+#define vkCreateSwapchainKHR glad_vkCreateSwapchainKHR
+GLAD_API_CALL PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT;
+#define vkDebugReportMessageEXT glad_vkDebugReportMessageEXT
+GLAD_API_CALL PFN_vkDestroyBuffer glad_vkDestroyBuffer;
+#define vkDestroyBuffer glad_vkDestroyBuffer
+GLAD_API_CALL PFN_vkDestroyBufferView glad_vkDestroyBufferView;
+#define vkDestroyBufferView glad_vkDestroyBufferView
+GLAD_API_CALL PFN_vkDestroyCommandPool glad_vkDestroyCommandPool;
+#define vkDestroyCommandPool glad_vkDestroyCommandPool
+GLAD_API_CALL PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT;
+#define vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT
+GLAD_API_CALL PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool;
+#define vkDestroyDescriptorPool glad_vkDestroyDescriptorPool
+GLAD_API_CALL PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout;
+#define vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout
+GLAD_API_CALL PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate;
+#define vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate
+GLAD_API_CALL PFN_vkDestroyDevice glad_vkDestroyDevice;
+#define vkDestroyDevice glad_vkDestroyDevice
+GLAD_API_CALL PFN_vkDestroyEvent glad_vkDestroyEvent;
+#define vkDestroyEvent glad_vkDestroyEvent
+GLAD_API_CALL PFN_vkDestroyFence glad_vkDestroyFence;
+#define vkDestroyFence glad_vkDestroyFence
+GLAD_API_CALL PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer;
+#define vkDestroyFramebuffer glad_vkDestroyFramebuffer
+GLAD_API_CALL PFN_vkDestroyImage glad_vkDestroyImage;
+#define vkDestroyImage glad_vkDestroyImage
+GLAD_API_CALL PFN_vkDestroyImageView glad_vkDestroyImageView;
+#define vkDestroyImageView glad_vkDestroyImageView
+GLAD_API_CALL PFN_vkDestroyInstance glad_vkDestroyInstance;
+#define vkDestroyInstance glad_vkDestroyInstance
+GLAD_API_CALL PFN_vkDestroyPipeline glad_vkDestroyPipeline;
+#define vkDestroyPipeline glad_vkDestroyPipeline
+GLAD_API_CALL PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache;
+#define vkDestroyPipelineCache glad_vkDestroyPipelineCache
+GLAD_API_CALL PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout;
+#define vkDestroyPipelineLayout glad_vkDestroyPipelineLayout
+GLAD_API_CALL PFN_vkDestroyQueryPool glad_vkDestroyQueryPool;
+#define vkDestroyQueryPool glad_vkDestroyQueryPool
+GLAD_API_CALL PFN_vkDestroyRenderPass glad_vkDestroyRenderPass;
+#define vkDestroyRenderPass glad_vkDestroyRenderPass
+GLAD_API_CALL PFN_vkDestroySampler glad_vkDestroySampler;
+#define vkDestroySampler glad_vkDestroySampler
+GLAD_API_CALL PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion;
+#define vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion
+GLAD_API_CALL PFN_vkDestroySemaphore glad_vkDestroySemaphore;
+#define vkDestroySemaphore glad_vkDestroySemaphore
+GLAD_API_CALL PFN_vkDestroyShaderModule glad_vkDestroyShaderModule;
+#define vkDestroyShaderModule glad_vkDestroyShaderModule
+GLAD_API_CALL PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR;
+#define vkDestroySurfaceKHR glad_vkDestroySurfaceKHR
+GLAD_API_CALL PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR;
+#define vkDestroySwapchainKHR glad_vkDestroySwapchainKHR
+GLAD_API_CALL PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle;
+#define vkDeviceWaitIdle glad_vkDeviceWaitIdle
+GLAD_API_CALL PFN_vkEndCommandBuffer glad_vkEndCommandBuffer;
+#define vkEndCommandBuffer glad_vkEndCommandBuffer
+GLAD_API_CALL PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties;
+#define vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties
+GLAD_API_CALL PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties;
+#define vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties;
+#define vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties;
+#define vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties
+GLAD_API_CALL PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion;
+#define vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion
+GLAD_API_CALL PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups;
+#define vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups
+GLAD_API_CALL PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices;
+#define vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices
+GLAD_API_CALL PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges;
+#define vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges
+GLAD_API_CALL PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers;
+#define vkFreeCommandBuffers glad_vkFreeCommandBuffers
+GLAD_API_CALL PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets;
+#define vkFreeDescriptorSets glad_vkFreeDescriptorSets
+GLAD_API_CALL PFN_vkFreeMemory glad_vkFreeMemory;
+#define vkFreeMemory glad_vkFreeMemory
+GLAD_API_CALL PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements;
+#define vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements
+GLAD_API_CALL PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2;
+#define vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2
+GLAD_API_CALL PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport;
+#define vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport
+GLAD_API_CALL PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures;
+#define vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures
+GLAD_API_CALL PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR;
+#define vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR
+GLAD_API_CALL PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR;
+#define vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR
+GLAD_API_CALL PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment;
+#define vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment
+GLAD_API_CALL PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr;
+#define vkGetDeviceProcAddr glad_vkGetDeviceProcAddr
+GLAD_API_CALL PFN_vkGetDeviceQueue glad_vkGetDeviceQueue;
+#define vkGetDeviceQueue glad_vkGetDeviceQueue
+GLAD_API_CALL PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2;
+#define vkGetDeviceQueue2 glad_vkGetDeviceQueue2
+GLAD_API_CALL PFN_vkGetEventStatus glad_vkGetEventStatus;
+#define vkGetEventStatus glad_vkGetEventStatus
+GLAD_API_CALL PFN_vkGetFenceStatus glad_vkGetFenceStatus;
+#define vkGetFenceStatus glad_vkGetFenceStatus
+GLAD_API_CALL PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements;
+#define vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements
+GLAD_API_CALL PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2;
+#define vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2
+GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements;
+#define vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements
+GLAD_API_CALL PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2;
+#define vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2
+GLAD_API_CALL PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout;
+#define vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout
+GLAD_API_CALL PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr;
+#define vkGetInstanceProcAddr glad_vkGetInstanceProcAddr
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties;
+#define vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties;
+#define vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties;
+#define vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures;
+#define vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2;
+#define vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties;
+#define vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2;
+#define vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties;
+#define vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2;
+#define vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties;
+#define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2;
+#define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR;
+#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties;
+#define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2;
+#define vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties;
+#define vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2;
+#define vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties;
+#define vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2;
+#define vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
+#define vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR;
+#define vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR;
+#define vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR
+GLAD_API_CALL PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR;
+#define vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR
+GLAD_API_CALL PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData;
+#define vkGetPipelineCacheData glad_vkGetPipelineCacheData
+GLAD_API_CALL PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults;
+#define vkGetQueryPoolResults glad_vkGetQueryPoolResults
+GLAD_API_CALL PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity;
+#define vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity
+GLAD_API_CALL PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR;
+#define vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR
+GLAD_API_CALL PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges;
+#define vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges
+GLAD_API_CALL PFN_vkMapMemory glad_vkMapMemory;
+#define vkMapMemory glad_vkMapMemory
+GLAD_API_CALL PFN_vkMergePipelineCaches glad_vkMergePipelineCaches;
+#define vkMergePipelineCaches glad_vkMergePipelineCaches
+GLAD_API_CALL PFN_vkQueueBindSparse glad_vkQueueBindSparse;
+#define vkQueueBindSparse glad_vkQueueBindSparse
+GLAD_API_CALL PFN_vkQueuePresentKHR glad_vkQueuePresentKHR;
+#define vkQueuePresentKHR glad_vkQueuePresentKHR
+GLAD_API_CALL PFN_vkQueueSubmit glad_vkQueueSubmit;
+#define vkQueueSubmit glad_vkQueueSubmit
+GLAD_API_CALL PFN_vkQueueWaitIdle glad_vkQueueWaitIdle;
+#define vkQueueWaitIdle glad_vkQueueWaitIdle
+GLAD_API_CALL PFN_vkResetCommandBuffer glad_vkResetCommandBuffer;
+#define vkResetCommandBuffer glad_vkResetCommandBuffer
+GLAD_API_CALL PFN_vkResetCommandPool glad_vkResetCommandPool;
+#define vkResetCommandPool glad_vkResetCommandPool
+GLAD_API_CALL PFN_vkResetDescriptorPool glad_vkResetDescriptorPool;
+#define vkResetDescriptorPool glad_vkResetDescriptorPool
+GLAD_API_CALL PFN_vkResetEvent glad_vkResetEvent;
+#define vkResetEvent glad_vkResetEvent
+GLAD_API_CALL PFN_vkResetFences glad_vkResetFences;
+#define vkResetFences glad_vkResetFences
+GLAD_API_CALL PFN_vkSetEvent glad_vkSetEvent;
+#define vkSetEvent glad_vkSetEvent
+GLAD_API_CALL PFN_vkTrimCommandPool glad_vkTrimCommandPool;
+#define vkTrimCommandPool glad_vkTrimCommandPool
+GLAD_API_CALL PFN_vkUnmapMemory glad_vkUnmapMemory;
+#define vkUnmapMemory glad_vkUnmapMemory
+GLAD_API_CALL PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate;
+#define vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate
+GLAD_API_CALL PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets;
+#define vkUpdateDescriptorSets glad_vkUpdateDescriptorSets
+GLAD_API_CALL PFN_vkWaitForFences glad_vkWaitForFences;
+#define vkWaitForFences glad_vkWaitForFences
+
+
+GLAD_API_CALL int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr);
+GLAD_API_CALL int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load);
+
+
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/glfw/deps/glad_gl.c b/glfw/deps/glad_gl.c
--- a/glfw/deps/glad_gl.c
+++ b/glfw/deps/glad_gl.c
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "glad/gl.h"
+#include <glad/gl.h>
 
 #ifndef GLAD_IMPL_UTIL_C_
 #define GLAD_IMPL_UTIL_C_
diff --git a/glfw/deps/glad_vulkan.c b/glfw/deps/glad_vulkan.c
--- a/glfw/deps/glad_vulkan.c
+++ b/glfw/deps/glad_vulkan.c
@@ -1,593 +1,593 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glad/vulkan.h>
-
-#ifndef GLAD_IMPL_UTIL_C_
-#define GLAD_IMPL_UTIL_C_
-
-#ifdef _MSC_VER
-#define GLAD_IMPL_UTIL_SSCANF sscanf_s
-#else
-#define GLAD_IMPL_UTIL_SSCANF sscanf
-#endif
-
-#endif /* GLAD_IMPL_UTIL_C_ */
-
-
-int GLAD_VK_VERSION_1_0 = 0;
-int GLAD_VK_VERSION_1_1 = 0;
-int GLAD_VK_EXT_debug_report = 0;
-int GLAD_VK_KHR_surface = 0;
-int GLAD_VK_KHR_swapchain = 0;
-
-
-
-PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR = NULL;
-PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR = NULL;
-PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers = NULL;
-PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets = NULL;
-PFN_vkAllocateMemory glad_vkAllocateMemory = NULL;
-PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer = NULL;
-PFN_vkBindBufferMemory glad_vkBindBufferMemory = NULL;
-PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2 = NULL;
-PFN_vkBindImageMemory glad_vkBindImageMemory = NULL;
-PFN_vkBindImageMemory2 glad_vkBindImageMemory2 = NULL;
-PFN_vkCmdBeginQuery glad_vkCmdBeginQuery = NULL;
-PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass = NULL;
-PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets = NULL;
-PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer = NULL;
-PFN_vkCmdBindPipeline glad_vkCmdBindPipeline = NULL;
-PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers = NULL;
-PFN_vkCmdBlitImage glad_vkCmdBlitImage = NULL;
-PFN_vkCmdClearAttachments glad_vkCmdClearAttachments = NULL;
-PFN_vkCmdClearColorImage glad_vkCmdClearColorImage = NULL;
-PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage = NULL;
-PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer = NULL;
-PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage = NULL;
-PFN_vkCmdCopyImage glad_vkCmdCopyImage = NULL;
-PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer = NULL;
-PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults = NULL;
-PFN_vkCmdDispatch glad_vkCmdDispatch = NULL;
-PFN_vkCmdDispatchBase glad_vkCmdDispatchBase = NULL;
-PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect = NULL;
-PFN_vkCmdDraw glad_vkCmdDraw = NULL;
-PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed = NULL;
-PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect = NULL;
-PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect = NULL;
-PFN_vkCmdEndQuery glad_vkCmdEndQuery = NULL;
-PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass = NULL;
-PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands = NULL;
-PFN_vkCmdFillBuffer glad_vkCmdFillBuffer = NULL;
-PFN_vkCmdNextSubpass glad_vkCmdNextSubpass = NULL;
-PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier = NULL;
-PFN_vkCmdPushConstants glad_vkCmdPushConstants = NULL;
-PFN_vkCmdResetEvent glad_vkCmdResetEvent = NULL;
-PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool = NULL;
-PFN_vkCmdResolveImage glad_vkCmdResolveImage = NULL;
-PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants = NULL;
-PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias = NULL;
-PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds = NULL;
-PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask = NULL;
-PFN_vkCmdSetEvent glad_vkCmdSetEvent = NULL;
-PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth = NULL;
-PFN_vkCmdSetScissor glad_vkCmdSetScissor = NULL;
-PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask = NULL;
-PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference = NULL;
-PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask = NULL;
-PFN_vkCmdSetViewport glad_vkCmdSetViewport = NULL;
-PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer = NULL;
-PFN_vkCmdWaitEvents glad_vkCmdWaitEvents = NULL;
-PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp = NULL;
-PFN_vkCreateBuffer glad_vkCreateBuffer = NULL;
-PFN_vkCreateBufferView glad_vkCreateBufferView = NULL;
-PFN_vkCreateCommandPool glad_vkCreateCommandPool = NULL;
-PFN_vkCreateComputePipelines glad_vkCreateComputePipelines = NULL;
-PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT = NULL;
-PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool = NULL;
-PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout = NULL;
-PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate = NULL;
-PFN_vkCreateDevice glad_vkCreateDevice = NULL;
-PFN_vkCreateEvent glad_vkCreateEvent = NULL;
-PFN_vkCreateFence glad_vkCreateFence = NULL;
-PFN_vkCreateFramebuffer glad_vkCreateFramebuffer = NULL;
-PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines = NULL;
-PFN_vkCreateImage glad_vkCreateImage = NULL;
-PFN_vkCreateImageView glad_vkCreateImageView = NULL;
-PFN_vkCreateInstance glad_vkCreateInstance = NULL;
-PFN_vkCreatePipelineCache glad_vkCreatePipelineCache = NULL;
-PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout = NULL;
-PFN_vkCreateQueryPool glad_vkCreateQueryPool = NULL;
-PFN_vkCreateRenderPass glad_vkCreateRenderPass = NULL;
-PFN_vkCreateSampler glad_vkCreateSampler = NULL;
-PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion = NULL;
-PFN_vkCreateSemaphore glad_vkCreateSemaphore = NULL;
-PFN_vkCreateShaderModule glad_vkCreateShaderModule = NULL;
-PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR = NULL;
-PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT = NULL;
-PFN_vkDestroyBuffer glad_vkDestroyBuffer = NULL;
-PFN_vkDestroyBufferView glad_vkDestroyBufferView = NULL;
-PFN_vkDestroyCommandPool glad_vkDestroyCommandPool = NULL;
-PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT = NULL;
-PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool = NULL;
-PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout = NULL;
-PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate = NULL;
-PFN_vkDestroyDevice glad_vkDestroyDevice = NULL;
-PFN_vkDestroyEvent glad_vkDestroyEvent = NULL;
-PFN_vkDestroyFence glad_vkDestroyFence = NULL;
-PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer = NULL;
-PFN_vkDestroyImage glad_vkDestroyImage = NULL;
-PFN_vkDestroyImageView glad_vkDestroyImageView = NULL;
-PFN_vkDestroyInstance glad_vkDestroyInstance = NULL;
-PFN_vkDestroyPipeline glad_vkDestroyPipeline = NULL;
-PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache = NULL;
-PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout = NULL;
-PFN_vkDestroyQueryPool glad_vkDestroyQueryPool = NULL;
-PFN_vkDestroyRenderPass glad_vkDestroyRenderPass = NULL;
-PFN_vkDestroySampler glad_vkDestroySampler = NULL;
-PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion = NULL;
-PFN_vkDestroySemaphore glad_vkDestroySemaphore = NULL;
-PFN_vkDestroyShaderModule glad_vkDestroyShaderModule = NULL;
-PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR = NULL;
-PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR = NULL;
-PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle = NULL;
-PFN_vkEndCommandBuffer glad_vkEndCommandBuffer = NULL;
-PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties = NULL;
-PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties = NULL;
-PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties = NULL;
-PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties = NULL;
-PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion = NULL;
-PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups = NULL;
-PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices = NULL;
-PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges = NULL;
-PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers = NULL;
-PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets = NULL;
-PFN_vkFreeMemory glad_vkFreeMemory = NULL;
-PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements = NULL;
-PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2 = NULL;
-PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport = NULL;
-PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures = NULL;
-PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR = NULL;
-PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR = NULL;
-PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment = NULL;
-PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr = NULL;
-PFN_vkGetDeviceQueue glad_vkGetDeviceQueue = NULL;
-PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2 = NULL;
-PFN_vkGetEventStatus glad_vkGetEventStatus = NULL;
-PFN_vkGetFenceStatus glad_vkGetFenceStatus = NULL;
-PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements = NULL;
-PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2 = NULL;
-PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements = NULL;
-PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2 = NULL;
-PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout = NULL;
-PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr = NULL;
-PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties = NULL;
-PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties = NULL;
-PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties = NULL;
-PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures = NULL;
-PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2 = NULL;
-PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties = NULL;
-PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2 = NULL;
-PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties = NULL;
-PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL;
-PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL;
-PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL;
-PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL;
-PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL;
-PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL;
-PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL;
-PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2 = NULL;
-PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties = NULL;
-PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2 = NULL;
-PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = NULL;
-PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR = NULL;
-PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR = NULL;
-PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR = NULL;
-PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData = NULL;
-PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults = NULL;
-PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity = NULL;
-PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR = NULL;
-PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges = NULL;
-PFN_vkMapMemory glad_vkMapMemory = NULL;
-PFN_vkMergePipelineCaches glad_vkMergePipelineCaches = NULL;
-PFN_vkQueueBindSparse glad_vkQueueBindSparse = NULL;
-PFN_vkQueuePresentKHR glad_vkQueuePresentKHR = NULL;
-PFN_vkQueueSubmit glad_vkQueueSubmit = NULL;
-PFN_vkQueueWaitIdle glad_vkQueueWaitIdle = NULL;
-PFN_vkResetCommandBuffer glad_vkResetCommandBuffer = NULL;
-PFN_vkResetCommandPool glad_vkResetCommandPool = NULL;
-PFN_vkResetDescriptorPool glad_vkResetDescriptorPool = NULL;
-PFN_vkResetEvent glad_vkResetEvent = NULL;
-PFN_vkResetFences glad_vkResetFences = NULL;
-PFN_vkSetEvent glad_vkSetEvent = NULL;
-PFN_vkTrimCommandPool glad_vkTrimCommandPool = NULL;
-PFN_vkUnmapMemory glad_vkUnmapMemory = NULL;
-PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate = NULL;
-PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets = NULL;
-PFN_vkWaitForFences glad_vkWaitForFences = NULL;
-
-
-static void glad_vk_load_VK_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
-    if(!GLAD_VK_VERSION_1_0) return;
-    vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) load("vkAllocateCommandBuffers", userptr);
-    vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) load("vkAllocateDescriptorSets", userptr);
-    vkAllocateMemory = (PFN_vkAllocateMemory) load("vkAllocateMemory", userptr);
-    vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer) load("vkBeginCommandBuffer", userptr);
-    vkBindBufferMemory = (PFN_vkBindBufferMemory) load("vkBindBufferMemory", userptr);
-    vkBindImageMemory = (PFN_vkBindImageMemory) load("vkBindImageMemory", userptr);
-    vkCmdBeginQuery = (PFN_vkCmdBeginQuery) load("vkCmdBeginQuery", userptr);
-    vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) load("vkCmdBeginRenderPass", userptr);
-    vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) load("vkCmdBindDescriptorSets", userptr);
-    vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) load("vkCmdBindIndexBuffer", userptr);
-    vkCmdBindPipeline = (PFN_vkCmdBindPipeline) load("vkCmdBindPipeline", userptr);
-    vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) load("vkCmdBindVertexBuffers", userptr);
-    vkCmdBlitImage = (PFN_vkCmdBlitImage) load("vkCmdBlitImage", userptr);
-    vkCmdClearAttachments = (PFN_vkCmdClearAttachments) load("vkCmdClearAttachments", userptr);
-    vkCmdClearColorImage = (PFN_vkCmdClearColorImage) load("vkCmdClearColorImage", userptr);
-    vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) load("vkCmdClearDepthStencilImage", userptr);
-    vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer) load("vkCmdCopyBuffer", userptr);
-    vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) load("vkCmdCopyBufferToImage", userptr);
-    vkCmdCopyImage = (PFN_vkCmdCopyImage) load("vkCmdCopyImage", userptr);
-    vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) load("vkCmdCopyImageToBuffer", userptr);
-    vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) load("vkCmdCopyQueryPoolResults", userptr);
-    vkCmdDispatch = (PFN_vkCmdDispatch) load("vkCmdDispatch", userptr);
-    vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) load("vkCmdDispatchIndirect", userptr);
-    vkCmdDraw = (PFN_vkCmdDraw) load("vkCmdDraw", userptr);
-    vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed) load("vkCmdDrawIndexed", userptr);
-    vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) load("vkCmdDrawIndexedIndirect", userptr);
-    vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect) load("vkCmdDrawIndirect", userptr);
-    vkCmdEndQuery = (PFN_vkCmdEndQuery) load("vkCmdEndQuery", userptr);
-    vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass) load("vkCmdEndRenderPass", userptr);
-    vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands) load("vkCmdExecuteCommands", userptr);
-    vkCmdFillBuffer = (PFN_vkCmdFillBuffer) load("vkCmdFillBuffer", userptr);
-    vkCmdNextSubpass = (PFN_vkCmdNextSubpass) load("vkCmdNextSubpass", userptr);
-    vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) load("vkCmdPipelineBarrier", userptr);
-    vkCmdPushConstants = (PFN_vkCmdPushConstants) load("vkCmdPushConstants", userptr);
-    vkCmdResetEvent = (PFN_vkCmdResetEvent) load("vkCmdResetEvent", userptr);
-    vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool) load("vkCmdResetQueryPool", userptr);
-    vkCmdResolveImage = (PFN_vkCmdResolveImage) load("vkCmdResolveImage", userptr);
-    vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) load("vkCmdSetBlendConstants", userptr);
-    vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias) load("vkCmdSetDepthBias", userptr);
-    vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) load("vkCmdSetDepthBounds", userptr);
-    vkCmdSetEvent = (PFN_vkCmdSetEvent) load("vkCmdSetEvent", userptr);
-    vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth) load("vkCmdSetLineWidth", userptr);
-    vkCmdSetScissor = (PFN_vkCmdSetScissor) load("vkCmdSetScissor", userptr);
-    vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) load("vkCmdSetStencilCompareMask", userptr);
-    vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference) load("vkCmdSetStencilReference", userptr);
-    vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) load("vkCmdSetStencilWriteMask", userptr);
-    vkCmdSetViewport = (PFN_vkCmdSetViewport) load("vkCmdSetViewport", userptr);
-    vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) load("vkCmdUpdateBuffer", userptr);
-    vkCmdWaitEvents = (PFN_vkCmdWaitEvents) load("vkCmdWaitEvents", userptr);
-    vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) load("vkCmdWriteTimestamp", userptr);
-    vkCreateBuffer = (PFN_vkCreateBuffer) load("vkCreateBuffer", userptr);
-    vkCreateBufferView = (PFN_vkCreateBufferView) load("vkCreateBufferView", userptr);
-    vkCreateCommandPool = (PFN_vkCreateCommandPool) load("vkCreateCommandPool", userptr);
-    vkCreateComputePipelines = (PFN_vkCreateComputePipelines) load("vkCreateComputePipelines", userptr);
-    vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool) load("vkCreateDescriptorPool", userptr);
-    vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) load("vkCreateDescriptorSetLayout", userptr);
-    vkCreateDevice = (PFN_vkCreateDevice) load("vkCreateDevice", userptr);
-    vkCreateEvent = (PFN_vkCreateEvent) load("vkCreateEvent", userptr);
-    vkCreateFence = (PFN_vkCreateFence) load("vkCreateFence", userptr);
-    vkCreateFramebuffer = (PFN_vkCreateFramebuffer) load("vkCreateFramebuffer", userptr);
-    vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) load("vkCreateGraphicsPipelines", userptr);
-    vkCreateImage = (PFN_vkCreateImage) load("vkCreateImage", userptr);
-    vkCreateImageView = (PFN_vkCreateImageView) load("vkCreateImageView", userptr);
-    vkCreateInstance = (PFN_vkCreateInstance) load("vkCreateInstance", userptr);
-    vkCreatePipelineCache = (PFN_vkCreatePipelineCache) load("vkCreatePipelineCache", userptr);
-    vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout) load("vkCreatePipelineLayout", userptr);
-    vkCreateQueryPool = (PFN_vkCreateQueryPool) load("vkCreateQueryPool", userptr);
-    vkCreateRenderPass = (PFN_vkCreateRenderPass) load("vkCreateRenderPass", userptr);
-    vkCreateSampler = (PFN_vkCreateSampler) load("vkCreateSampler", userptr);
-    vkCreateSemaphore = (PFN_vkCreateSemaphore) load("vkCreateSemaphore", userptr);
-    vkCreateShaderModule = (PFN_vkCreateShaderModule) load("vkCreateShaderModule", userptr);
-    vkDestroyBuffer = (PFN_vkDestroyBuffer) load("vkDestroyBuffer", userptr);
-    vkDestroyBufferView = (PFN_vkDestroyBufferView) load("vkDestroyBufferView", userptr);
-    vkDestroyCommandPool = (PFN_vkDestroyCommandPool) load("vkDestroyCommandPool", userptr);
-    vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) load("vkDestroyDescriptorPool", userptr);
-    vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) load("vkDestroyDescriptorSetLayout", userptr);
-    vkDestroyDevice = (PFN_vkDestroyDevice) load("vkDestroyDevice", userptr);
-    vkDestroyEvent = (PFN_vkDestroyEvent) load("vkDestroyEvent", userptr);
-    vkDestroyFence = (PFN_vkDestroyFence) load("vkDestroyFence", userptr);
-    vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer) load("vkDestroyFramebuffer", userptr);
-    vkDestroyImage = (PFN_vkDestroyImage) load("vkDestroyImage", userptr);
-    vkDestroyImageView = (PFN_vkDestroyImageView) load("vkDestroyImageView", userptr);
-    vkDestroyInstance = (PFN_vkDestroyInstance) load("vkDestroyInstance", userptr);
-    vkDestroyPipeline = (PFN_vkDestroyPipeline) load("vkDestroyPipeline", userptr);
-    vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache) load("vkDestroyPipelineCache", userptr);
-    vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) load("vkDestroyPipelineLayout", userptr);
-    vkDestroyQueryPool = (PFN_vkDestroyQueryPool) load("vkDestroyQueryPool", userptr);
-    vkDestroyRenderPass = (PFN_vkDestroyRenderPass) load("vkDestroyRenderPass", userptr);
-    vkDestroySampler = (PFN_vkDestroySampler) load("vkDestroySampler", userptr);
-    vkDestroySemaphore = (PFN_vkDestroySemaphore) load("vkDestroySemaphore", userptr);
-    vkDestroyShaderModule = (PFN_vkDestroyShaderModule) load("vkDestroyShaderModule", userptr);
-    vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle) load("vkDeviceWaitIdle", userptr);
-    vkEndCommandBuffer = (PFN_vkEndCommandBuffer) load("vkEndCommandBuffer", userptr);
-    vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) load("vkEnumerateDeviceExtensionProperties", userptr);
-    vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) load("vkEnumerateDeviceLayerProperties", userptr);
-    vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) load("vkEnumerateInstanceExtensionProperties", userptr);
-    vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties) load("vkEnumerateInstanceLayerProperties", userptr);
-    vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) load("vkEnumeratePhysicalDevices", userptr);
-    vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) load("vkFlushMappedMemoryRanges", userptr);
-    vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers) load("vkFreeCommandBuffers", userptr);
-    vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets) load("vkFreeDescriptorSets", userptr);
-    vkFreeMemory = (PFN_vkFreeMemory) load("vkFreeMemory", userptr);
-    vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) load("vkGetBufferMemoryRequirements", userptr);
-    vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) load("vkGetDeviceMemoryCommitment", userptr);
-    vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr) load("vkGetDeviceProcAddr", userptr);
-    vkGetDeviceQueue = (PFN_vkGetDeviceQueue) load("vkGetDeviceQueue", userptr);
-    vkGetEventStatus = (PFN_vkGetEventStatus) load("vkGetEventStatus", userptr);
-    vkGetFenceStatus = (PFN_vkGetFenceStatus) load("vkGetFenceStatus", userptr);
-    vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) load("vkGetImageMemoryRequirements", userptr);
-    vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) load("vkGetImageSparseMemoryRequirements", userptr);
-    vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) load("vkGetImageSubresourceLayout", userptr);
-    vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) load("vkGetInstanceProcAddr", userptr);
-    vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) load("vkGetPhysicalDeviceFeatures", userptr);
-    vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) load("vkGetPhysicalDeviceFormatProperties", userptr);
-    vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) load("vkGetPhysicalDeviceImageFormatProperties", userptr);
-    vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) load("vkGetPhysicalDeviceMemoryProperties", userptr);
-    vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) load("vkGetPhysicalDeviceProperties", userptr);
-    vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) load("vkGetPhysicalDeviceQueueFamilyProperties", userptr);
-    vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) load("vkGetPhysicalDeviceSparseImageFormatProperties", userptr);
-    vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData) load("vkGetPipelineCacheData", userptr);
-    vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults) load("vkGetQueryPoolResults", userptr);
-    vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) load("vkGetRenderAreaGranularity", userptr);
-    vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) load("vkInvalidateMappedMemoryRanges", userptr);
-    vkMapMemory = (PFN_vkMapMemory) load("vkMapMemory", userptr);
-    vkMergePipelineCaches = (PFN_vkMergePipelineCaches) load("vkMergePipelineCaches", userptr);
-    vkQueueBindSparse = (PFN_vkQueueBindSparse) load("vkQueueBindSparse", userptr);
-    vkQueueSubmit = (PFN_vkQueueSubmit) load("vkQueueSubmit", userptr);
-    vkQueueWaitIdle = (PFN_vkQueueWaitIdle) load("vkQueueWaitIdle", userptr);
-    vkResetCommandBuffer = (PFN_vkResetCommandBuffer) load("vkResetCommandBuffer", userptr);
-    vkResetCommandPool = (PFN_vkResetCommandPool) load("vkResetCommandPool", userptr);
-    vkResetDescriptorPool = (PFN_vkResetDescriptorPool) load("vkResetDescriptorPool", userptr);
-    vkResetEvent = (PFN_vkResetEvent) load("vkResetEvent", userptr);
-    vkResetFences = (PFN_vkResetFences) load("vkResetFences", userptr);
-    vkSetEvent = (PFN_vkSetEvent) load("vkSetEvent", userptr);
-    vkUnmapMemory = (PFN_vkUnmapMemory) load("vkUnmapMemory", userptr);
-    vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) load("vkUpdateDescriptorSets", userptr);
-    vkWaitForFences = (PFN_vkWaitForFences) load("vkWaitForFences", userptr);
-}
-static void glad_vk_load_VK_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
-    if(!GLAD_VK_VERSION_1_1) return;
-    vkBindBufferMemory2 = (PFN_vkBindBufferMemory2) load("vkBindBufferMemory2", userptr);
-    vkBindImageMemory2 = (PFN_vkBindImageMemory2) load("vkBindImageMemory2", userptr);
-    vkCmdDispatchBase = (PFN_vkCmdDispatchBase) load("vkCmdDispatchBase", userptr);
-    vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) load("vkCmdSetDeviceMask", userptr);
-    vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) load("vkCreateDescriptorUpdateTemplate", userptr);
-    vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) load("vkCreateSamplerYcbcrConversion", userptr);
-    vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) load("vkDestroyDescriptorUpdateTemplate", userptr);
-    vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) load("vkDestroySamplerYcbcrConversion", userptr);
-    vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
-    vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) load("vkEnumeratePhysicalDeviceGroups", userptr);
-    vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) load("vkGetBufferMemoryRequirements2", userptr);
-    vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) load("vkGetDescriptorSetLayoutSupport", userptr);
-    vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) load("vkGetDeviceGroupPeerMemoryFeatures", userptr);
-    vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2) load("vkGetDeviceQueue2", userptr);
-    vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) load("vkGetImageMemoryRequirements2", userptr);
-    vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) load("vkGetImageSparseMemoryRequirements2", userptr);
-    vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) load("vkGetPhysicalDeviceExternalBufferProperties", userptr);
-    vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) load("vkGetPhysicalDeviceExternalFenceProperties", userptr);
-    vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) load("vkGetPhysicalDeviceExternalSemaphoreProperties", userptr);
-    vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) load("vkGetPhysicalDeviceFeatures2", userptr);
-    vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) load("vkGetPhysicalDeviceFormatProperties2", userptr);
-    vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) load("vkGetPhysicalDeviceImageFormatProperties2", userptr);
-    vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) load("vkGetPhysicalDeviceMemoryProperties2", userptr);
-    vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) load("vkGetPhysicalDeviceProperties2", userptr);
-    vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) load("vkGetPhysicalDeviceQueueFamilyProperties2", userptr);
-    vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) load("vkGetPhysicalDeviceSparseImageFormatProperties2", userptr);
-    vkTrimCommandPool = (PFN_vkTrimCommandPool) load("vkTrimCommandPool", userptr);
-    vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) load("vkUpdateDescriptorSetWithTemplate", userptr);
-}
-static void glad_vk_load_VK_EXT_debug_report( GLADuserptrloadfunc load, void* userptr) {
-    if(!GLAD_VK_EXT_debug_report) return;
-    vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) load("vkCreateDebugReportCallbackEXT", userptr);
-    vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) load("vkDebugReportMessageEXT", userptr);
-    vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) load("vkDestroyDebugReportCallbackEXT", userptr);
-}
-static void glad_vk_load_VK_KHR_surface( GLADuserptrloadfunc load, void* userptr) {
-    if(!GLAD_VK_KHR_surface) return;
-    vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) load("vkDestroySurfaceKHR", userptr);
-    vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) load("vkGetPhysicalDeviceSurfaceCapabilitiesKHR", userptr);
-    vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) load("vkGetPhysicalDeviceSurfaceFormatsKHR", userptr);
-    vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) load("vkGetPhysicalDeviceSurfacePresentModesKHR", userptr);
-    vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) load("vkGetPhysicalDeviceSurfaceSupportKHR", userptr);
-}
-static void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userptr) {
-    if(!GLAD_VK_KHR_swapchain) return;
-    vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) load("vkAcquireNextImage2KHR", userptr);
-    vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) load("vkAcquireNextImageKHR", userptr);
-    vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) load("vkCreateSwapchainKHR", userptr);
-    vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load("vkDestroySwapchainKHR", userptr);
-    vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load("vkGetDeviceGroupPresentCapabilitiesKHR", userptr);
-    vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load("vkGetDeviceGroupSurfacePresentModesKHR", userptr);
-    vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load("vkGetPhysicalDevicePresentRectanglesKHR", userptr);
-    vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load("vkGetSwapchainImagesKHR", userptr);
-    vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load("vkQueuePresentKHR", userptr);
-}
-
-
-
-static int glad_vk_get_extensions( VkPhysicalDevice physical_device, uint32_t *out_extension_count, char ***out_extensions) {
-    uint32_t i;
-    uint32_t instance_extension_count = 0;
-    uint32_t device_extension_count = 0;
-    uint32_t max_extension_count;
-    uint32_t total_extension_count;
-    char **extensions;
-    VkExtensionProperties *ext_properties;
-    VkResult result;
-
-    if (vkEnumerateInstanceExtensionProperties == NULL || (physical_device != NULL && vkEnumerateDeviceExtensionProperties == NULL)) {
-        return 0;
-    }
-
-    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, NULL);
-    if (result != VK_SUCCESS) {
-        return 0;
-    }
-
-    if (physical_device != NULL) {
-        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, NULL);
-        if (result != VK_SUCCESS) {
-            return 0;
-        }
-    }
-
-    total_extension_count = instance_extension_count + device_extension_count;
-    max_extension_count = instance_extension_count > device_extension_count
-        ? instance_extension_count : device_extension_count;
-
-    ext_properties = (VkExtensionProperties*) malloc(max_extension_count * sizeof(VkExtensionProperties));
-    if (ext_properties == NULL) {
-        return 0;
-    }
-
-    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, ext_properties);
-    if (result != VK_SUCCESS) {
-        free((void*) ext_properties);
-        return 0;
-    }
-
-    extensions = (char**) calloc(total_extension_count, sizeof(char*));
-    if (extensions == NULL) {
-        free((void*) ext_properties);
-        return 0;
-    }
-
-    for (i = 0; i < instance_extension_count; ++i) {
-        VkExtensionProperties ext = ext_properties[i];
-
-        size_t extension_name_length = strlen(ext.extensionName) + 1;
-        extensions[i] = (char*) malloc(extension_name_length * sizeof(char));
-        memcpy(extensions[i], ext.extensionName, extension_name_length * sizeof(char));
-    }
-
-    if (physical_device != NULL) {
-        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, ext_properties);
-        if (result != VK_SUCCESS) {
-            for (i = 0; i < instance_extension_count; ++i) {
-                free((void*) extensions[i]);
-            }
-            free(extensions);
-            return 0;
-        }
-
-        for (i = 0; i < device_extension_count; ++i) {
-            VkExtensionProperties ext = ext_properties[i];
-
-            size_t extension_name_length = strlen(ext.extensionName) + 1;
-            extensions[instance_extension_count + i] = (char*) malloc(extension_name_length * sizeof(char));
-            memcpy(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char));
-        }
-    }
-
-    free((void*) ext_properties);
-
-    *out_extension_count = total_extension_count;
-    *out_extensions = extensions;
-
-    return 1;
-}
-
-static void glad_vk_free_extensions(uint32_t extension_count, char **extensions) {
-    uint32_t i;
-
-    for(i = 0; i < extension_count ; ++i) {
-        free((void*) (extensions[i]));
-    }
-
-    free((void*) extensions);
-}
-
-static int glad_vk_has_extension(const char *name, uint32_t extension_count, char **extensions) {
-    uint32_t i;
-
-    for (i = 0; i < extension_count; ++i) {
-        if(strcmp(name, extensions[i]) == 0) {
-            return 1;
-        }
-    }
-
-    return 0;
-}
-
-static GLADapiproc glad_vk_get_proc_from_userptr(const char* name, void *userptr) {
-    return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
-}
-
-static int glad_vk_find_extensions_vulkan( VkPhysicalDevice physical_device) {
-    uint32_t extension_count = 0;
-    char **extensions = NULL;
-    if (!glad_vk_get_extensions(physical_device, &extension_count, &extensions)) return 0;
-
-    GLAD_VK_EXT_debug_report = glad_vk_has_extension("VK_EXT_debug_report", extension_count, extensions);
-    GLAD_VK_KHR_surface = glad_vk_has_extension("VK_KHR_surface", extension_count, extensions);
-    GLAD_VK_KHR_swapchain = glad_vk_has_extension("VK_KHR_swapchain", extension_count, extensions);
-
-    glad_vk_free_extensions(extension_count, extensions);
-
-    return 1;
-}
-
-static int glad_vk_find_core_vulkan( VkPhysicalDevice physical_device) {
-    int major = 1;
-    int minor = 0;
-
-#ifdef VK_VERSION_1_1
-    if (vkEnumerateInstanceVersion  != NULL) {
-        uint32_t version;
-        VkResult result;
-
-        result = vkEnumerateInstanceVersion(&version);
-        if (result == VK_SUCCESS) {
-            major = (int) VK_VERSION_MAJOR(version);
-            minor = (int) VK_VERSION_MINOR(version);
-        }
-    }
-#endif
-
-    if (physical_device != NULL && vkGetPhysicalDeviceProperties  != NULL) {
-        VkPhysicalDeviceProperties properties;
-        vkGetPhysicalDeviceProperties(physical_device, &properties);
-
-        major = (int) VK_VERSION_MAJOR(properties.apiVersion);
-        minor = (int) VK_VERSION_MINOR(properties.apiVersion);
-    }
-
-    GLAD_VK_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
-    GLAD_VK_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
-
-    return GLAD_MAKE_VERSION(major, minor);
-}
-
-int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) {
-    int version;
-
-#ifdef VK_VERSION_1_1
-    vkEnumerateInstanceVersion  = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
-#endif
-    version = glad_vk_find_core_vulkan( physical_device);
-    if (!version) {
-        return 0;
-    }
-
-    glad_vk_load_VK_VERSION_1_0(load, userptr);
-    glad_vk_load_VK_VERSION_1_1(load, userptr);
-
-    if (!glad_vk_find_extensions_vulkan( physical_device)) return 0;
-    glad_vk_load_VK_EXT_debug_report(load, userptr);
-    glad_vk_load_VK_KHR_surface(load, userptr);
-    glad_vk_load_VK_KHR_swapchain(load, userptr);
-
-
-    return version;
-}
-
-
-int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load) {
-    return gladLoadVulkanUserPtr( physical_device, glad_vk_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
-}
-
-
-
-
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glad/vulkan.h>
+
+#ifndef GLAD_IMPL_UTIL_C_
+#define GLAD_IMPL_UTIL_C_
+
+#ifdef _MSC_VER
+#define GLAD_IMPL_UTIL_SSCANF sscanf_s
+#else
+#define GLAD_IMPL_UTIL_SSCANF sscanf
+#endif
+
+#endif /* GLAD_IMPL_UTIL_C_ */
+
+
+int GLAD_VK_VERSION_1_0 = 0;
+int GLAD_VK_VERSION_1_1 = 0;
+int GLAD_VK_EXT_debug_report = 0;
+int GLAD_VK_KHR_surface = 0;
+int GLAD_VK_KHR_swapchain = 0;
+
+
+
+PFN_vkAcquireNextImage2KHR glad_vkAcquireNextImage2KHR = NULL;
+PFN_vkAcquireNextImageKHR glad_vkAcquireNextImageKHR = NULL;
+PFN_vkAllocateCommandBuffers glad_vkAllocateCommandBuffers = NULL;
+PFN_vkAllocateDescriptorSets glad_vkAllocateDescriptorSets = NULL;
+PFN_vkAllocateMemory glad_vkAllocateMemory = NULL;
+PFN_vkBeginCommandBuffer glad_vkBeginCommandBuffer = NULL;
+PFN_vkBindBufferMemory glad_vkBindBufferMemory = NULL;
+PFN_vkBindBufferMemory2 glad_vkBindBufferMemory2 = NULL;
+PFN_vkBindImageMemory glad_vkBindImageMemory = NULL;
+PFN_vkBindImageMemory2 glad_vkBindImageMemory2 = NULL;
+PFN_vkCmdBeginQuery glad_vkCmdBeginQuery = NULL;
+PFN_vkCmdBeginRenderPass glad_vkCmdBeginRenderPass = NULL;
+PFN_vkCmdBindDescriptorSets glad_vkCmdBindDescriptorSets = NULL;
+PFN_vkCmdBindIndexBuffer glad_vkCmdBindIndexBuffer = NULL;
+PFN_vkCmdBindPipeline glad_vkCmdBindPipeline = NULL;
+PFN_vkCmdBindVertexBuffers glad_vkCmdBindVertexBuffers = NULL;
+PFN_vkCmdBlitImage glad_vkCmdBlitImage = NULL;
+PFN_vkCmdClearAttachments glad_vkCmdClearAttachments = NULL;
+PFN_vkCmdClearColorImage glad_vkCmdClearColorImage = NULL;
+PFN_vkCmdClearDepthStencilImage glad_vkCmdClearDepthStencilImage = NULL;
+PFN_vkCmdCopyBuffer glad_vkCmdCopyBuffer = NULL;
+PFN_vkCmdCopyBufferToImage glad_vkCmdCopyBufferToImage = NULL;
+PFN_vkCmdCopyImage glad_vkCmdCopyImage = NULL;
+PFN_vkCmdCopyImageToBuffer glad_vkCmdCopyImageToBuffer = NULL;
+PFN_vkCmdCopyQueryPoolResults glad_vkCmdCopyQueryPoolResults = NULL;
+PFN_vkCmdDispatch glad_vkCmdDispatch = NULL;
+PFN_vkCmdDispatchBase glad_vkCmdDispatchBase = NULL;
+PFN_vkCmdDispatchIndirect glad_vkCmdDispatchIndirect = NULL;
+PFN_vkCmdDraw glad_vkCmdDraw = NULL;
+PFN_vkCmdDrawIndexed glad_vkCmdDrawIndexed = NULL;
+PFN_vkCmdDrawIndexedIndirect glad_vkCmdDrawIndexedIndirect = NULL;
+PFN_vkCmdDrawIndirect glad_vkCmdDrawIndirect = NULL;
+PFN_vkCmdEndQuery glad_vkCmdEndQuery = NULL;
+PFN_vkCmdEndRenderPass glad_vkCmdEndRenderPass = NULL;
+PFN_vkCmdExecuteCommands glad_vkCmdExecuteCommands = NULL;
+PFN_vkCmdFillBuffer glad_vkCmdFillBuffer = NULL;
+PFN_vkCmdNextSubpass glad_vkCmdNextSubpass = NULL;
+PFN_vkCmdPipelineBarrier glad_vkCmdPipelineBarrier = NULL;
+PFN_vkCmdPushConstants glad_vkCmdPushConstants = NULL;
+PFN_vkCmdResetEvent glad_vkCmdResetEvent = NULL;
+PFN_vkCmdResetQueryPool glad_vkCmdResetQueryPool = NULL;
+PFN_vkCmdResolveImage glad_vkCmdResolveImage = NULL;
+PFN_vkCmdSetBlendConstants glad_vkCmdSetBlendConstants = NULL;
+PFN_vkCmdSetDepthBias glad_vkCmdSetDepthBias = NULL;
+PFN_vkCmdSetDepthBounds glad_vkCmdSetDepthBounds = NULL;
+PFN_vkCmdSetDeviceMask glad_vkCmdSetDeviceMask = NULL;
+PFN_vkCmdSetEvent glad_vkCmdSetEvent = NULL;
+PFN_vkCmdSetLineWidth glad_vkCmdSetLineWidth = NULL;
+PFN_vkCmdSetScissor glad_vkCmdSetScissor = NULL;
+PFN_vkCmdSetStencilCompareMask glad_vkCmdSetStencilCompareMask = NULL;
+PFN_vkCmdSetStencilReference glad_vkCmdSetStencilReference = NULL;
+PFN_vkCmdSetStencilWriteMask glad_vkCmdSetStencilWriteMask = NULL;
+PFN_vkCmdSetViewport glad_vkCmdSetViewport = NULL;
+PFN_vkCmdUpdateBuffer glad_vkCmdUpdateBuffer = NULL;
+PFN_vkCmdWaitEvents glad_vkCmdWaitEvents = NULL;
+PFN_vkCmdWriteTimestamp glad_vkCmdWriteTimestamp = NULL;
+PFN_vkCreateBuffer glad_vkCreateBuffer = NULL;
+PFN_vkCreateBufferView glad_vkCreateBufferView = NULL;
+PFN_vkCreateCommandPool glad_vkCreateCommandPool = NULL;
+PFN_vkCreateComputePipelines glad_vkCreateComputePipelines = NULL;
+PFN_vkCreateDebugReportCallbackEXT glad_vkCreateDebugReportCallbackEXT = NULL;
+PFN_vkCreateDescriptorPool glad_vkCreateDescriptorPool = NULL;
+PFN_vkCreateDescriptorSetLayout glad_vkCreateDescriptorSetLayout = NULL;
+PFN_vkCreateDescriptorUpdateTemplate glad_vkCreateDescriptorUpdateTemplate = NULL;
+PFN_vkCreateDevice glad_vkCreateDevice = NULL;
+PFN_vkCreateEvent glad_vkCreateEvent = NULL;
+PFN_vkCreateFence glad_vkCreateFence = NULL;
+PFN_vkCreateFramebuffer glad_vkCreateFramebuffer = NULL;
+PFN_vkCreateGraphicsPipelines glad_vkCreateGraphicsPipelines = NULL;
+PFN_vkCreateImage glad_vkCreateImage = NULL;
+PFN_vkCreateImageView glad_vkCreateImageView = NULL;
+PFN_vkCreateInstance glad_vkCreateInstance = NULL;
+PFN_vkCreatePipelineCache glad_vkCreatePipelineCache = NULL;
+PFN_vkCreatePipelineLayout glad_vkCreatePipelineLayout = NULL;
+PFN_vkCreateQueryPool glad_vkCreateQueryPool = NULL;
+PFN_vkCreateRenderPass glad_vkCreateRenderPass = NULL;
+PFN_vkCreateSampler glad_vkCreateSampler = NULL;
+PFN_vkCreateSamplerYcbcrConversion glad_vkCreateSamplerYcbcrConversion = NULL;
+PFN_vkCreateSemaphore glad_vkCreateSemaphore = NULL;
+PFN_vkCreateShaderModule glad_vkCreateShaderModule = NULL;
+PFN_vkCreateSwapchainKHR glad_vkCreateSwapchainKHR = NULL;
+PFN_vkDebugReportMessageEXT glad_vkDebugReportMessageEXT = NULL;
+PFN_vkDestroyBuffer glad_vkDestroyBuffer = NULL;
+PFN_vkDestroyBufferView glad_vkDestroyBufferView = NULL;
+PFN_vkDestroyCommandPool glad_vkDestroyCommandPool = NULL;
+PFN_vkDestroyDebugReportCallbackEXT glad_vkDestroyDebugReportCallbackEXT = NULL;
+PFN_vkDestroyDescriptorPool glad_vkDestroyDescriptorPool = NULL;
+PFN_vkDestroyDescriptorSetLayout glad_vkDestroyDescriptorSetLayout = NULL;
+PFN_vkDestroyDescriptorUpdateTemplate glad_vkDestroyDescriptorUpdateTemplate = NULL;
+PFN_vkDestroyDevice glad_vkDestroyDevice = NULL;
+PFN_vkDestroyEvent glad_vkDestroyEvent = NULL;
+PFN_vkDestroyFence glad_vkDestroyFence = NULL;
+PFN_vkDestroyFramebuffer glad_vkDestroyFramebuffer = NULL;
+PFN_vkDestroyImage glad_vkDestroyImage = NULL;
+PFN_vkDestroyImageView glad_vkDestroyImageView = NULL;
+PFN_vkDestroyInstance glad_vkDestroyInstance = NULL;
+PFN_vkDestroyPipeline glad_vkDestroyPipeline = NULL;
+PFN_vkDestroyPipelineCache glad_vkDestroyPipelineCache = NULL;
+PFN_vkDestroyPipelineLayout glad_vkDestroyPipelineLayout = NULL;
+PFN_vkDestroyQueryPool glad_vkDestroyQueryPool = NULL;
+PFN_vkDestroyRenderPass glad_vkDestroyRenderPass = NULL;
+PFN_vkDestroySampler glad_vkDestroySampler = NULL;
+PFN_vkDestroySamplerYcbcrConversion glad_vkDestroySamplerYcbcrConversion = NULL;
+PFN_vkDestroySemaphore glad_vkDestroySemaphore = NULL;
+PFN_vkDestroyShaderModule glad_vkDestroyShaderModule = NULL;
+PFN_vkDestroySurfaceKHR glad_vkDestroySurfaceKHR = NULL;
+PFN_vkDestroySwapchainKHR glad_vkDestroySwapchainKHR = NULL;
+PFN_vkDeviceWaitIdle glad_vkDeviceWaitIdle = NULL;
+PFN_vkEndCommandBuffer glad_vkEndCommandBuffer = NULL;
+PFN_vkEnumerateDeviceExtensionProperties glad_vkEnumerateDeviceExtensionProperties = NULL;
+PFN_vkEnumerateDeviceLayerProperties glad_vkEnumerateDeviceLayerProperties = NULL;
+PFN_vkEnumerateInstanceExtensionProperties glad_vkEnumerateInstanceExtensionProperties = NULL;
+PFN_vkEnumerateInstanceLayerProperties glad_vkEnumerateInstanceLayerProperties = NULL;
+PFN_vkEnumerateInstanceVersion glad_vkEnumerateInstanceVersion = NULL;
+PFN_vkEnumeratePhysicalDeviceGroups glad_vkEnumeratePhysicalDeviceGroups = NULL;
+PFN_vkEnumeratePhysicalDevices glad_vkEnumeratePhysicalDevices = NULL;
+PFN_vkFlushMappedMemoryRanges glad_vkFlushMappedMemoryRanges = NULL;
+PFN_vkFreeCommandBuffers glad_vkFreeCommandBuffers = NULL;
+PFN_vkFreeDescriptorSets glad_vkFreeDescriptorSets = NULL;
+PFN_vkFreeMemory glad_vkFreeMemory = NULL;
+PFN_vkGetBufferMemoryRequirements glad_vkGetBufferMemoryRequirements = NULL;
+PFN_vkGetBufferMemoryRequirements2 glad_vkGetBufferMemoryRequirements2 = NULL;
+PFN_vkGetDescriptorSetLayoutSupport glad_vkGetDescriptorSetLayoutSupport = NULL;
+PFN_vkGetDeviceGroupPeerMemoryFeatures glad_vkGetDeviceGroupPeerMemoryFeatures = NULL;
+PFN_vkGetDeviceGroupPresentCapabilitiesKHR glad_vkGetDeviceGroupPresentCapabilitiesKHR = NULL;
+PFN_vkGetDeviceGroupSurfacePresentModesKHR glad_vkGetDeviceGroupSurfacePresentModesKHR = NULL;
+PFN_vkGetDeviceMemoryCommitment glad_vkGetDeviceMemoryCommitment = NULL;
+PFN_vkGetDeviceProcAddr glad_vkGetDeviceProcAddr = NULL;
+PFN_vkGetDeviceQueue glad_vkGetDeviceQueue = NULL;
+PFN_vkGetDeviceQueue2 glad_vkGetDeviceQueue2 = NULL;
+PFN_vkGetEventStatus glad_vkGetEventStatus = NULL;
+PFN_vkGetFenceStatus glad_vkGetFenceStatus = NULL;
+PFN_vkGetImageMemoryRequirements glad_vkGetImageMemoryRequirements = NULL;
+PFN_vkGetImageMemoryRequirements2 glad_vkGetImageMemoryRequirements2 = NULL;
+PFN_vkGetImageSparseMemoryRequirements glad_vkGetImageSparseMemoryRequirements = NULL;
+PFN_vkGetImageSparseMemoryRequirements2 glad_vkGetImageSparseMemoryRequirements2 = NULL;
+PFN_vkGetImageSubresourceLayout glad_vkGetImageSubresourceLayout = NULL;
+PFN_vkGetInstanceProcAddr glad_vkGetInstanceProcAddr = NULL;
+PFN_vkGetPhysicalDeviceExternalBufferProperties glad_vkGetPhysicalDeviceExternalBufferProperties = NULL;
+PFN_vkGetPhysicalDeviceExternalFenceProperties glad_vkGetPhysicalDeviceExternalFenceProperties = NULL;
+PFN_vkGetPhysicalDeviceExternalSemaphoreProperties glad_vkGetPhysicalDeviceExternalSemaphoreProperties = NULL;
+PFN_vkGetPhysicalDeviceFeatures glad_vkGetPhysicalDeviceFeatures = NULL;
+PFN_vkGetPhysicalDeviceFeatures2 glad_vkGetPhysicalDeviceFeatures2 = NULL;
+PFN_vkGetPhysicalDeviceFormatProperties glad_vkGetPhysicalDeviceFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceFormatProperties2 glad_vkGetPhysicalDeviceFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL;
+PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL;
+PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL;
+PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL;
+PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL;
+PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL;
+PFN_vkGetPhysicalDeviceQueueFamilyProperties2 glad_vkGetPhysicalDeviceQueueFamilyProperties2 = NULL;
+PFN_vkGetPhysicalDeviceSparseImageFormatProperties glad_vkGetPhysicalDeviceSparseImageFormatProperties = NULL;
+PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 glad_vkGetPhysicalDeviceSparseImageFormatProperties2 = NULL;
+PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR glad_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfaceFormatsKHR glad_vkGetPhysicalDeviceSurfaceFormatsKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfacePresentModesKHR glad_vkGetPhysicalDeviceSurfacePresentModesKHR = NULL;
+PFN_vkGetPhysicalDeviceSurfaceSupportKHR glad_vkGetPhysicalDeviceSurfaceSupportKHR = NULL;
+PFN_vkGetPipelineCacheData glad_vkGetPipelineCacheData = NULL;
+PFN_vkGetQueryPoolResults glad_vkGetQueryPoolResults = NULL;
+PFN_vkGetRenderAreaGranularity glad_vkGetRenderAreaGranularity = NULL;
+PFN_vkGetSwapchainImagesKHR glad_vkGetSwapchainImagesKHR = NULL;
+PFN_vkInvalidateMappedMemoryRanges glad_vkInvalidateMappedMemoryRanges = NULL;
+PFN_vkMapMemory glad_vkMapMemory = NULL;
+PFN_vkMergePipelineCaches glad_vkMergePipelineCaches = NULL;
+PFN_vkQueueBindSparse glad_vkQueueBindSparse = NULL;
+PFN_vkQueuePresentKHR glad_vkQueuePresentKHR = NULL;
+PFN_vkQueueSubmit glad_vkQueueSubmit = NULL;
+PFN_vkQueueWaitIdle glad_vkQueueWaitIdle = NULL;
+PFN_vkResetCommandBuffer glad_vkResetCommandBuffer = NULL;
+PFN_vkResetCommandPool glad_vkResetCommandPool = NULL;
+PFN_vkResetDescriptorPool glad_vkResetDescriptorPool = NULL;
+PFN_vkResetEvent glad_vkResetEvent = NULL;
+PFN_vkResetFences glad_vkResetFences = NULL;
+PFN_vkSetEvent glad_vkSetEvent = NULL;
+PFN_vkTrimCommandPool glad_vkTrimCommandPool = NULL;
+PFN_vkUnmapMemory glad_vkUnmapMemory = NULL;
+PFN_vkUpdateDescriptorSetWithTemplate glad_vkUpdateDescriptorSetWithTemplate = NULL;
+PFN_vkUpdateDescriptorSets glad_vkUpdateDescriptorSets = NULL;
+PFN_vkWaitForFences glad_vkWaitForFences = NULL;
+
+
+static void glad_vk_load_VK_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) {
+    if(!GLAD_VK_VERSION_1_0) return;
+    vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) load("vkAllocateCommandBuffers", userptr);
+    vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) load("vkAllocateDescriptorSets", userptr);
+    vkAllocateMemory = (PFN_vkAllocateMemory) load("vkAllocateMemory", userptr);
+    vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer) load("vkBeginCommandBuffer", userptr);
+    vkBindBufferMemory = (PFN_vkBindBufferMemory) load("vkBindBufferMemory", userptr);
+    vkBindImageMemory = (PFN_vkBindImageMemory) load("vkBindImageMemory", userptr);
+    vkCmdBeginQuery = (PFN_vkCmdBeginQuery) load("vkCmdBeginQuery", userptr);
+    vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) load("vkCmdBeginRenderPass", userptr);
+    vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) load("vkCmdBindDescriptorSets", userptr);
+    vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) load("vkCmdBindIndexBuffer", userptr);
+    vkCmdBindPipeline = (PFN_vkCmdBindPipeline) load("vkCmdBindPipeline", userptr);
+    vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) load("vkCmdBindVertexBuffers", userptr);
+    vkCmdBlitImage = (PFN_vkCmdBlitImage) load("vkCmdBlitImage", userptr);
+    vkCmdClearAttachments = (PFN_vkCmdClearAttachments) load("vkCmdClearAttachments", userptr);
+    vkCmdClearColorImage = (PFN_vkCmdClearColorImage) load("vkCmdClearColorImage", userptr);
+    vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) load("vkCmdClearDepthStencilImage", userptr);
+    vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer) load("vkCmdCopyBuffer", userptr);
+    vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) load("vkCmdCopyBufferToImage", userptr);
+    vkCmdCopyImage = (PFN_vkCmdCopyImage) load("vkCmdCopyImage", userptr);
+    vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) load("vkCmdCopyImageToBuffer", userptr);
+    vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) load("vkCmdCopyQueryPoolResults", userptr);
+    vkCmdDispatch = (PFN_vkCmdDispatch) load("vkCmdDispatch", userptr);
+    vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) load("vkCmdDispatchIndirect", userptr);
+    vkCmdDraw = (PFN_vkCmdDraw) load("vkCmdDraw", userptr);
+    vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed) load("vkCmdDrawIndexed", userptr);
+    vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) load("vkCmdDrawIndexedIndirect", userptr);
+    vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect) load("vkCmdDrawIndirect", userptr);
+    vkCmdEndQuery = (PFN_vkCmdEndQuery) load("vkCmdEndQuery", userptr);
+    vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass) load("vkCmdEndRenderPass", userptr);
+    vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands) load("vkCmdExecuteCommands", userptr);
+    vkCmdFillBuffer = (PFN_vkCmdFillBuffer) load("vkCmdFillBuffer", userptr);
+    vkCmdNextSubpass = (PFN_vkCmdNextSubpass) load("vkCmdNextSubpass", userptr);
+    vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) load("vkCmdPipelineBarrier", userptr);
+    vkCmdPushConstants = (PFN_vkCmdPushConstants) load("vkCmdPushConstants", userptr);
+    vkCmdResetEvent = (PFN_vkCmdResetEvent) load("vkCmdResetEvent", userptr);
+    vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool) load("vkCmdResetQueryPool", userptr);
+    vkCmdResolveImage = (PFN_vkCmdResolveImage) load("vkCmdResolveImage", userptr);
+    vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) load("vkCmdSetBlendConstants", userptr);
+    vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias) load("vkCmdSetDepthBias", userptr);
+    vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) load("vkCmdSetDepthBounds", userptr);
+    vkCmdSetEvent = (PFN_vkCmdSetEvent) load("vkCmdSetEvent", userptr);
+    vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth) load("vkCmdSetLineWidth", userptr);
+    vkCmdSetScissor = (PFN_vkCmdSetScissor) load("vkCmdSetScissor", userptr);
+    vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) load("vkCmdSetStencilCompareMask", userptr);
+    vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference) load("vkCmdSetStencilReference", userptr);
+    vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) load("vkCmdSetStencilWriteMask", userptr);
+    vkCmdSetViewport = (PFN_vkCmdSetViewport) load("vkCmdSetViewport", userptr);
+    vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) load("vkCmdUpdateBuffer", userptr);
+    vkCmdWaitEvents = (PFN_vkCmdWaitEvents) load("vkCmdWaitEvents", userptr);
+    vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) load("vkCmdWriteTimestamp", userptr);
+    vkCreateBuffer = (PFN_vkCreateBuffer) load("vkCreateBuffer", userptr);
+    vkCreateBufferView = (PFN_vkCreateBufferView) load("vkCreateBufferView", userptr);
+    vkCreateCommandPool = (PFN_vkCreateCommandPool) load("vkCreateCommandPool", userptr);
+    vkCreateComputePipelines = (PFN_vkCreateComputePipelines) load("vkCreateComputePipelines", userptr);
+    vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool) load("vkCreateDescriptorPool", userptr);
+    vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) load("vkCreateDescriptorSetLayout", userptr);
+    vkCreateDevice = (PFN_vkCreateDevice) load("vkCreateDevice", userptr);
+    vkCreateEvent = (PFN_vkCreateEvent) load("vkCreateEvent", userptr);
+    vkCreateFence = (PFN_vkCreateFence) load("vkCreateFence", userptr);
+    vkCreateFramebuffer = (PFN_vkCreateFramebuffer) load("vkCreateFramebuffer", userptr);
+    vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) load("vkCreateGraphicsPipelines", userptr);
+    vkCreateImage = (PFN_vkCreateImage) load("vkCreateImage", userptr);
+    vkCreateImageView = (PFN_vkCreateImageView) load("vkCreateImageView", userptr);
+    vkCreateInstance = (PFN_vkCreateInstance) load("vkCreateInstance", userptr);
+    vkCreatePipelineCache = (PFN_vkCreatePipelineCache) load("vkCreatePipelineCache", userptr);
+    vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout) load("vkCreatePipelineLayout", userptr);
+    vkCreateQueryPool = (PFN_vkCreateQueryPool) load("vkCreateQueryPool", userptr);
+    vkCreateRenderPass = (PFN_vkCreateRenderPass) load("vkCreateRenderPass", userptr);
+    vkCreateSampler = (PFN_vkCreateSampler) load("vkCreateSampler", userptr);
+    vkCreateSemaphore = (PFN_vkCreateSemaphore) load("vkCreateSemaphore", userptr);
+    vkCreateShaderModule = (PFN_vkCreateShaderModule) load("vkCreateShaderModule", userptr);
+    vkDestroyBuffer = (PFN_vkDestroyBuffer) load("vkDestroyBuffer", userptr);
+    vkDestroyBufferView = (PFN_vkDestroyBufferView) load("vkDestroyBufferView", userptr);
+    vkDestroyCommandPool = (PFN_vkDestroyCommandPool) load("vkDestroyCommandPool", userptr);
+    vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) load("vkDestroyDescriptorPool", userptr);
+    vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) load("vkDestroyDescriptorSetLayout", userptr);
+    vkDestroyDevice = (PFN_vkDestroyDevice) load("vkDestroyDevice", userptr);
+    vkDestroyEvent = (PFN_vkDestroyEvent) load("vkDestroyEvent", userptr);
+    vkDestroyFence = (PFN_vkDestroyFence) load("vkDestroyFence", userptr);
+    vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer) load("vkDestroyFramebuffer", userptr);
+    vkDestroyImage = (PFN_vkDestroyImage) load("vkDestroyImage", userptr);
+    vkDestroyImageView = (PFN_vkDestroyImageView) load("vkDestroyImageView", userptr);
+    vkDestroyInstance = (PFN_vkDestroyInstance) load("vkDestroyInstance", userptr);
+    vkDestroyPipeline = (PFN_vkDestroyPipeline) load("vkDestroyPipeline", userptr);
+    vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache) load("vkDestroyPipelineCache", userptr);
+    vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) load("vkDestroyPipelineLayout", userptr);
+    vkDestroyQueryPool = (PFN_vkDestroyQueryPool) load("vkDestroyQueryPool", userptr);
+    vkDestroyRenderPass = (PFN_vkDestroyRenderPass) load("vkDestroyRenderPass", userptr);
+    vkDestroySampler = (PFN_vkDestroySampler) load("vkDestroySampler", userptr);
+    vkDestroySemaphore = (PFN_vkDestroySemaphore) load("vkDestroySemaphore", userptr);
+    vkDestroyShaderModule = (PFN_vkDestroyShaderModule) load("vkDestroyShaderModule", userptr);
+    vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle) load("vkDeviceWaitIdle", userptr);
+    vkEndCommandBuffer = (PFN_vkEndCommandBuffer) load("vkEndCommandBuffer", userptr);
+    vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) load("vkEnumerateDeviceExtensionProperties", userptr);
+    vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) load("vkEnumerateDeviceLayerProperties", userptr);
+    vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) load("vkEnumerateInstanceExtensionProperties", userptr);
+    vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties) load("vkEnumerateInstanceLayerProperties", userptr);
+    vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) load("vkEnumeratePhysicalDevices", userptr);
+    vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) load("vkFlushMappedMemoryRanges", userptr);
+    vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers) load("vkFreeCommandBuffers", userptr);
+    vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets) load("vkFreeDescriptorSets", userptr);
+    vkFreeMemory = (PFN_vkFreeMemory) load("vkFreeMemory", userptr);
+    vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) load("vkGetBufferMemoryRequirements", userptr);
+    vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) load("vkGetDeviceMemoryCommitment", userptr);
+    vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr) load("vkGetDeviceProcAddr", userptr);
+    vkGetDeviceQueue = (PFN_vkGetDeviceQueue) load("vkGetDeviceQueue", userptr);
+    vkGetEventStatus = (PFN_vkGetEventStatus) load("vkGetEventStatus", userptr);
+    vkGetFenceStatus = (PFN_vkGetFenceStatus) load("vkGetFenceStatus", userptr);
+    vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) load("vkGetImageMemoryRequirements", userptr);
+    vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) load("vkGetImageSparseMemoryRequirements", userptr);
+    vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) load("vkGetImageSubresourceLayout", userptr);
+    vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) load("vkGetInstanceProcAddr", userptr);
+    vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) load("vkGetPhysicalDeviceFeatures", userptr);
+    vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) load("vkGetPhysicalDeviceFormatProperties", userptr);
+    vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) load("vkGetPhysicalDeviceImageFormatProperties", userptr);
+    vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) load("vkGetPhysicalDeviceMemoryProperties", userptr);
+    vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) load("vkGetPhysicalDeviceProperties", userptr);
+    vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) load("vkGetPhysicalDeviceQueueFamilyProperties", userptr);
+    vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) load("vkGetPhysicalDeviceSparseImageFormatProperties", userptr);
+    vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData) load("vkGetPipelineCacheData", userptr);
+    vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults) load("vkGetQueryPoolResults", userptr);
+    vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) load("vkGetRenderAreaGranularity", userptr);
+    vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) load("vkInvalidateMappedMemoryRanges", userptr);
+    vkMapMemory = (PFN_vkMapMemory) load("vkMapMemory", userptr);
+    vkMergePipelineCaches = (PFN_vkMergePipelineCaches) load("vkMergePipelineCaches", userptr);
+    vkQueueBindSparse = (PFN_vkQueueBindSparse) load("vkQueueBindSparse", userptr);
+    vkQueueSubmit = (PFN_vkQueueSubmit) load("vkQueueSubmit", userptr);
+    vkQueueWaitIdle = (PFN_vkQueueWaitIdle) load("vkQueueWaitIdle", userptr);
+    vkResetCommandBuffer = (PFN_vkResetCommandBuffer) load("vkResetCommandBuffer", userptr);
+    vkResetCommandPool = (PFN_vkResetCommandPool) load("vkResetCommandPool", userptr);
+    vkResetDescriptorPool = (PFN_vkResetDescriptorPool) load("vkResetDescriptorPool", userptr);
+    vkResetEvent = (PFN_vkResetEvent) load("vkResetEvent", userptr);
+    vkResetFences = (PFN_vkResetFences) load("vkResetFences", userptr);
+    vkSetEvent = (PFN_vkSetEvent) load("vkSetEvent", userptr);
+    vkUnmapMemory = (PFN_vkUnmapMemory) load("vkUnmapMemory", userptr);
+    vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) load("vkUpdateDescriptorSets", userptr);
+    vkWaitForFences = (PFN_vkWaitForFences) load("vkWaitForFences", userptr);
+}
+static void glad_vk_load_VK_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) {
+    if(!GLAD_VK_VERSION_1_1) return;
+    vkBindBufferMemory2 = (PFN_vkBindBufferMemory2) load("vkBindBufferMemory2", userptr);
+    vkBindImageMemory2 = (PFN_vkBindImageMemory2) load("vkBindImageMemory2", userptr);
+    vkCmdDispatchBase = (PFN_vkCmdDispatchBase) load("vkCmdDispatchBase", userptr);
+    vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) load("vkCmdSetDeviceMask", userptr);
+    vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) load("vkCreateDescriptorUpdateTemplate", userptr);
+    vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) load("vkCreateSamplerYcbcrConversion", userptr);
+    vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) load("vkDestroyDescriptorUpdateTemplate", userptr);
+    vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) load("vkDestroySamplerYcbcrConversion", userptr);
+    vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
+    vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) load("vkEnumeratePhysicalDeviceGroups", userptr);
+    vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) load("vkGetBufferMemoryRequirements2", userptr);
+    vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) load("vkGetDescriptorSetLayoutSupport", userptr);
+    vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) load("vkGetDeviceGroupPeerMemoryFeatures", userptr);
+    vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2) load("vkGetDeviceQueue2", userptr);
+    vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) load("vkGetImageMemoryRequirements2", userptr);
+    vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) load("vkGetImageSparseMemoryRequirements2", userptr);
+    vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) load("vkGetPhysicalDeviceExternalBufferProperties", userptr);
+    vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) load("vkGetPhysicalDeviceExternalFenceProperties", userptr);
+    vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) load("vkGetPhysicalDeviceExternalSemaphoreProperties", userptr);
+    vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) load("vkGetPhysicalDeviceFeatures2", userptr);
+    vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) load("vkGetPhysicalDeviceFormatProperties2", userptr);
+    vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) load("vkGetPhysicalDeviceImageFormatProperties2", userptr);
+    vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) load("vkGetPhysicalDeviceMemoryProperties2", userptr);
+    vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) load("vkGetPhysicalDeviceProperties2", userptr);
+    vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) load("vkGetPhysicalDeviceQueueFamilyProperties2", userptr);
+    vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) load("vkGetPhysicalDeviceSparseImageFormatProperties2", userptr);
+    vkTrimCommandPool = (PFN_vkTrimCommandPool) load("vkTrimCommandPool", userptr);
+    vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) load("vkUpdateDescriptorSetWithTemplate", userptr);
+}
+static void glad_vk_load_VK_EXT_debug_report( GLADuserptrloadfunc load, void* userptr) {
+    if(!GLAD_VK_EXT_debug_report) return;
+    vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) load("vkCreateDebugReportCallbackEXT", userptr);
+    vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) load("vkDebugReportMessageEXT", userptr);
+    vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) load("vkDestroyDebugReportCallbackEXT", userptr);
+}
+static void glad_vk_load_VK_KHR_surface( GLADuserptrloadfunc load, void* userptr) {
+    if(!GLAD_VK_KHR_surface) return;
+    vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) load("vkDestroySurfaceKHR", userptr);
+    vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) load("vkGetPhysicalDeviceSurfaceCapabilitiesKHR", userptr);
+    vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) load("vkGetPhysicalDeviceSurfaceFormatsKHR", userptr);
+    vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) load("vkGetPhysicalDeviceSurfacePresentModesKHR", userptr);
+    vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) load("vkGetPhysicalDeviceSurfaceSupportKHR", userptr);
+}
+static void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userptr) {
+    if(!GLAD_VK_KHR_swapchain) return;
+    vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) load("vkAcquireNextImage2KHR", userptr);
+    vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) load("vkAcquireNextImageKHR", userptr);
+    vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) load("vkCreateSwapchainKHR", userptr);
+    vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load("vkDestroySwapchainKHR", userptr);
+    vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load("vkGetDeviceGroupPresentCapabilitiesKHR", userptr);
+    vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load("vkGetDeviceGroupSurfacePresentModesKHR", userptr);
+    vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load("vkGetPhysicalDevicePresentRectanglesKHR", userptr);
+    vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load("vkGetSwapchainImagesKHR", userptr);
+    vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load("vkQueuePresentKHR", userptr);
+}
+
+
+
+static int glad_vk_get_extensions( VkPhysicalDevice physical_device, uint32_t *out_extension_count, char ***out_extensions) {
+    uint32_t i;
+    uint32_t instance_extension_count = 0;
+    uint32_t device_extension_count = 0;
+    uint32_t max_extension_count;
+    uint32_t total_extension_count;
+    char **extensions;
+    VkExtensionProperties *ext_properties;
+    VkResult result;
+
+    if (vkEnumerateInstanceExtensionProperties == NULL || (physical_device != NULL && vkEnumerateDeviceExtensionProperties == NULL)) {
+        return 0;
+    }
+
+    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, NULL);
+    if (result != VK_SUCCESS) {
+        return 0;
+    }
+
+    if (physical_device != NULL) {
+        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, NULL);
+        if (result != VK_SUCCESS) {
+            return 0;
+        }
+    }
+
+    total_extension_count = instance_extension_count + device_extension_count;
+    max_extension_count = instance_extension_count > device_extension_count
+        ? instance_extension_count : device_extension_count;
+
+    ext_properties = (VkExtensionProperties*) malloc(max_extension_count * sizeof(VkExtensionProperties));
+    if (ext_properties == NULL) {
+        return 0;
+    }
+
+    result = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, ext_properties);
+    if (result != VK_SUCCESS) {
+        free((void*) ext_properties);
+        return 0;
+    }
+
+    extensions = (char**) calloc(total_extension_count, sizeof(char*));
+    if (extensions == NULL) {
+        free((void*) ext_properties);
+        return 0;
+    }
+
+    for (i = 0; i < instance_extension_count; ++i) {
+        VkExtensionProperties ext = ext_properties[i];
+
+        size_t extension_name_length = strlen(ext.extensionName) + 1;
+        extensions[i] = (char*) malloc(extension_name_length * sizeof(char));
+        memcpy(extensions[i], ext.extensionName, extension_name_length * sizeof(char));
+    }
+
+    if (physical_device != NULL) {
+        result = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, ext_properties);
+        if (result != VK_SUCCESS) {
+            for (i = 0; i < instance_extension_count; ++i) {
+                free((void*) extensions[i]);
+            }
+            free(extensions);
+            return 0;
+        }
+
+        for (i = 0; i < device_extension_count; ++i) {
+            VkExtensionProperties ext = ext_properties[i];
+
+            size_t extension_name_length = strlen(ext.extensionName) + 1;
+            extensions[instance_extension_count + i] = (char*) malloc(extension_name_length * sizeof(char));
+            memcpy(extensions[instance_extension_count + i], ext.extensionName, extension_name_length * sizeof(char));
+        }
+    }
+
+    free((void*) ext_properties);
+
+    *out_extension_count = total_extension_count;
+    *out_extensions = extensions;
+
+    return 1;
+}
+
+static void glad_vk_free_extensions(uint32_t extension_count, char **extensions) {
+    uint32_t i;
+
+    for(i = 0; i < extension_count ; ++i) {
+        free((void*) (extensions[i]));
+    }
+
+    free((void*) extensions);
+}
+
+static int glad_vk_has_extension(const char *name, uint32_t extension_count, char **extensions) {
+    uint32_t i;
+
+    for (i = 0; i < extension_count; ++i) {
+        if(strcmp(name, extensions[i]) == 0) {
+            return 1;
+        }
+    }
+
+    return 0;
+}
+
+static GLADapiproc glad_vk_get_proc_from_userptr(const char* name, void *userptr) {
+    return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name);
+}
+
+static int glad_vk_find_extensions_vulkan( VkPhysicalDevice physical_device) {
+    uint32_t extension_count = 0;
+    char **extensions = NULL;
+    if (!glad_vk_get_extensions(physical_device, &extension_count, &extensions)) return 0;
+
+    GLAD_VK_EXT_debug_report = glad_vk_has_extension("VK_EXT_debug_report", extension_count, extensions);
+    GLAD_VK_KHR_surface = glad_vk_has_extension("VK_KHR_surface", extension_count, extensions);
+    GLAD_VK_KHR_swapchain = glad_vk_has_extension("VK_KHR_swapchain", extension_count, extensions);
+
+    glad_vk_free_extensions(extension_count, extensions);
+
+    return 1;
+}
+
+static int glad_vk_find_core_vulkan( VkPhysicalDevice physical_device) {
+    int major = 1;
+    int minor = 0;
+
+#ifdef VK_VERSION_1_1
+    if (vkEnumerateInstanceVersion  != NULL) {
+        uint32_t version;
+        VkResult result;
+
+        result = vkEnumerateInstanceVersion(&version);
+        if (result == VK_SUCCESS) {
+            major = (int) VK_VERSION_MAJOR(version);
+            minor = (int) VK_VERSION_MINOR(version);
+        }
+    }
+#endif
+
+    if (physical_device != NULL && vkGetPhysicalDeviceProperties  != NULL) {
+        VkPhysicalDeviceProperties properties;
+        vkGetPhysicalDeviceProperties(physical_device, &properties);
+
+        major = (int) VK_VERSION_MAJOR(properties.apiVersion);
+        minor = (int) VK_VERSION_MINOR(properties.apiVersion);
+    }
+
+    GLAD_VK_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
+    GLAD_VK_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
+
+    return GLAD_MAKE_VERSION(major, minor);
+}
+
+int gladLoadVulkanUserPtr( VkPhysicalDevice physical_device, GLADuserptrloadfunc load, void *userptr) {
+    int version;
+
+#ifdef VK_VERSION_1_1
+    vkEnumerateInstanceVersion  = (PFN_vkEnumerateInstanceVersion) load("vkEnumerateInstanceVersion", userptr);
+#endif
+    version = glad_vk_find_core_vulkan( physical_device);
+    if (!version) {
+        return 0;
+    }
+
+    glad_vk_load_VK_VERSION_1_0(load, userptr);
+    glad_vk_load_VK_VERSION_1_1(load, userptr);
+
+    if (!glad_vk_find_extensions_vulkan( physical_device)) return 0;
+    glad_vk_load_VK_EXT_debug_report(load, userptr);
+    glad_vk_load_VK_KHR_surface(load, userptr);
+    glad_vk_load_VK_KHR_swapchain(load, userptr);
+
+
+    return version;
+}
+
+
+int gladLoadVulkan( VkPhysicalDevice physical_device, GLADloadfunc load) {
+    return gladLoadVulkanUserPtr( physical_device, glad_vk_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
+}
+
+
+
+
diff --git a/glfw/deps/mingw/_mingw_dxhelper.h b/glfw/deps/mingw/_mingw_dxhelper.h
--- a/glfw/deps/mingw/_mingw_dxhelper.h
+++ b/glfw/deps/mingw/_mingw_dxhelper.h
@@ -1,117 +1,117 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER within this package.
- */
-
-#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
-#define NONAMELESSUNION		1
-#endif
-#if defined(NONAMELESSSTRUCT) && \
-   !defined(NONAMELESSUNION)
-#define NONAMELESSUNION		1
-#endif
-#if defined(NONAMELESSUNION)  && \
-   !defined(NONAMELESSSTRUCT)
-#define NONAMELESSSTRUCT	1
-#endif
-#if !defined(__GNU_EXTENSION)
-#if defined(__GNUC__) || defined(__GNUG__)
-#define __GNU_EXTENSION		__extension__
-#else
-#define __GNU_EXTENSION
-#endif
-#endif /* __extension__ */
-
-#ifndef __ANONYMOUS_DEFINED
-#define __ANONYMOUS_DEFINED
-#if defined(__GNUC__) || defined(__GNUG__)
-#define _ANONYMOUS_UNION	__extension__
-#define _ANONYMOUS_STRUCT	__extension__
-#else
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#endif
-#ifndef NONAMELESSUNION
-#define _UNION_NAME(x)
-#define _STRUCT_NAME(x)
-#else /* NONAMELESSUNION */
-#define _UNION_NAME(x)  x
-#define _STRUCT_NAME(x) x
-#endif
-#endif	/* __ANONYMOUS_DEFINED */
-
-#ifndef DUMMYUNIONNAME
-# ifdef NONAMELESSUNION
-#  define DUMMYUNIONNAME  u
-#  define DUMMYUNIONNAME1 u1	/* Wine uses this variant */
-#  define DUMMYUNIONNAME2 u2
-#  define DUMMYUNIONNAME3 u3
-#  define DUMMYUNIONNAME4 u4
-#  define DUMMYUNIONNAME5 u5
-#  define DUMMYUNIONNAME6 u6
-#  define DUMMYUNIONNAME7 u7
-#  define DUMMYUNIONNAME8 u8
-#  define DUMMYUNIONNAME9 u9
-# else /* NONAMELESSUNION */
-#  define DUMMYUNIONNAME
-#  define DUMMYUNIONNAME1	/* Wine uses this variant */
-#  define DUMMYUNIONNAME2
-#  define DUMMYUNIONNAME3
-#  define DUMMYUNIONNAME4
-#  define DUMMYUNIONNAME5
-#  define DUMMYUNIONNAME6
-#  define DUMMYUNIONNAME7
-#  define DUMMYUNIONNAME8
-#  define DUMMYUNIONNAME9
-# endif
-#endif	/* DUMMYUNIONNAME */
-
-#if !defined(DUMMYUNIONNAME1)	/* MinGW does not define this one */
-# ifdef NONAMELESSUNION
-#  define DUMMYUNIONNAME1 u1	/* Wine uses this variant */
-# else
-#  define DUMMYUNIONNAME1	/* Wine uses this variant */
-# endif
-#endif	/* DUMMYUNIONNAME1 */
-
-#ifndef DUMMYSTRUCTNAME
-# ifdef NONAMELESSUNION
-#  define DUMMYSTRUCTNAME  s
-#  define DUMMYSTRUCTNAME1 s1	/* Wine uses this variant */
-#  define DUMMYSTRUCTNAME2 s2
-#  define DUMMYSTRUCTNAME3 s3
-#  define DUMMYSTRUCTNAME4 s4
-#  define DUMMYSTRUCTNAME5 s5
-# else
-#  define DUMMYSTRUCTNAME
-#  define DUMMYSTRUCTNAME1	/* Wine uses this variant */
-#  define DUMMYSTRUCTNAME2
-#  define DUMMYSTRUCTNAME3
-#  define DUMMYSTRUCTNAME4
-#  define DUMMYSTRUCTNAME5
-# endif
-#endif /* DUMMYSTRUCTNAME */
-
-/* These are for compatibility with the Wine source tree */
-
-#ifndef WINELIB_NAME_AW
-# ifdef __MINGW_NAME_AW
-#   define WINELIB_NAME_AW  __MINGW_NAME_AW
-# else
-#  ifdef UNICODE
-#   define WINELIB_NAME_AW(func) func##W
-#  else
-#   define WINELIB_NAME_AW(func) func##A
-#  endif
-# endif
-#endif	/* WINELIB_NAME_AW */
-
-#ifndef DECL_WINELIB_TYPE_AW
-# ifdef __MINGW_TYPEDEF_AW
-#  define DECL_WINELIB_TYPE_AW  __MINGW_TYPEDEF_AW
-# else
-#  define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
-# endif
-#endif	/* DECL_WINELIB_TYPE_AW */
-
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
+#define NONAMELESSUNION		1
+#endif
+#if defined(NONAMELESSSTRUCT) && \
+   !defined(NONAMELESSUNION)
+#define NONAMELESSUNION		1
+#endif
+#if defined(NONAMELESSUNION)  && \
+   !defined(NONAMELESSSTRUCT)
+#define NONAMELESSSTRUCT	1
+#endif
+#if !defined(__GNU_EXTENSION)
+#if defined(__GNUC__) || defined(__GNUG__)
+#define __GNU_EXTENSION		__extension__
+#else
+#define __GNU_EXTENSION
+#endif
+#endif /* __extension__ */
+
+#ifndef __ANONYMOUS_DEFINED
+#define __ANONYMOUS_DEFINED
+#if defined(__GNUC__) || defined(__GNUG__)
+#define _ANONYMOUS_UNION	__extension__
+#define _ANONYMOUS_STRUCT	__extension__
+#else
+#define _ANONYMOUS_UNION
+#define _ANONYMOUS_STRUCT
+#endif
+#ifndef NONAMELESSUNION
+#define _UNION_NAME(x)
+#define _STRUCT_NAME(x)
+#else /* NONAMELESSUNION */
+#define _UNION_NAME(x)  x
+#define _STRUCT_NAME(x) x
+#endif
+#endif	/* __ANONYMOUS_DEFINED */
+
+#ifndef DUMMYUNIONNAME
+# ifdef NONAMELESSUNION
+#  define DUMMYUNIONNAME  u
+#  define DUMMYUNIONNAME1 u1	/* Wine uses this variant */
+#  define DUMMYUNIONNAME2 u2
+#  define DUMMYUNIONNAME3 u3
+#  define DUMMYUNIONNAME4 u4
+#  define DUMMYUNIONNAME5 u5
+#  define DUMMYUNIONNAME6 u6
+#  define DUMMYUNIONNAME7 u7
+#  define DUMMYUNIONNAME8 u8
+#  define DUMMYUNIONNAME9 u9
+# else /* NONAMELESSUNION */
+#  define DUMMYUNIONNAME
+#  define DUMMYUNIONNAME1	/* Wine uses this variant */
+#  define DUMMYUNIONNAME2
+#  define DUMMYUNIONNAME3
+#  define DUMMYUNIONNAME4
+#  define DUMMYUNIONNAME5
+#  define DUMMYUNIONNAME6
+#  define DUMMYUNIONNAME7
+#  define DUMMYUNIONNAME8
+#  define DUMMYUNIONNAME9
+# endif
+#endif	/* DUMMYUNIONNAME */
+
+#if !defined(DUMMYUNIONNAME1)	/* MinGW does not define this one */
+# ifdef NONAMELESSUNION
+#  define DUMMYUNIONNAME1 u1	/* Wine uses this variant */
+# else
+#  define DUMMYUNIONNAME1	/* Wine uses this variant */
+# endif
+#endif	/* DUMMYUNIONNAME1 */
+
+#ifndef DUMMYSTRUCTNAME
+# ifdef NONAMELESSUNION
+#  define DUMMYSTRUCTNAME  s
+#  define DUMMYSTRUCTNAME1 s1	/* Wine uses this variant */
+#  define DUMMYSTRUCTNAME2 s2
+#  define DUMMYSTRUCTNAME3 s3
+#  define DUMMYSTRUCTNAME4 s4
+#  define DUMMYSTRUCTNAME5 s5
+# else
+#  define DUMMYSTRUCTNAME
+#  define DUMMYSTRUCTNAME1	/* Wine uses this variant */
+#  define DUMMYSTRUCTNAME2
+#  define DUMMYSTRUCTNAME3
+#  define DUMMYSTRUCTNAME4
+#  define DUMMYSTRUCTNAME5
+# endif
+#endif /* DUMMYSTRUCTNAME */
+
+/* These are for compatibility with the Wine source tree */
+
+#ifndef WINELIB_NAME_AW
+# ifdef __MINGW_NAME_AW
+#   define WINELIB_NAME_AW  __MINGW_NAME_AW
+# else
+#  ifdef UNICODE
+#   define WINELIB_NAME_AW(func) func##W
+#  else
+#   define WINELIB_NAME_AW(func) func##A
+#  endif
+# endif
+#endif	/* WINELIB_NAME_AW */
+
+#ifndef DECL_WINELIB_TYPE_AW
+# ifdef __MINGW_TYPEDEF_AW
+#  define DECL_WINELIB_TYPE_AW  __MINGW_TYPEDEF_AW
+# else
+#  define DECL_WINELIB_TYPE_AW(type)  typedef WINELIB_NAME_AW(type) type;
+# endif
+#endif	/* DECL_WINELIB_TYPE_AW */
+
diff --git a/glfw/deps/mingw/dinput.h b/glfw/deps/mingw/dinput.h
--- a/glfw/deps/mingw/dinput.h
+++ b/glfw/deps/mingw/dinput.h
@@ -1,2467 +1,2467 @@
-/*
- * Copyright (C) the Wine project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef __DINPUT_INCLUDED__
-#define __DINPUT_INCLUDED__
-
-#define COM_NO_WINDOWS_H
-#include <objbase.h>
-#include <_mingw_dxhelper.h>
-
-#ifndef DIRECTINPUT_VERSION
-#define DIRECTINPUT_VERSION	0x0800
-#endif
-
-/* Classes */
-DEFINE_GUID(CLSID_DirectInput,		0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(CLSID_DirectInputDevice,	0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-
-DEFINE_GUID(CLSID_DirectInput8,		0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(CLSID_DirectInputDevice8,	0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-
-/* Interfaces */
-DEFINE_GUID(IID_IDirectInputA,		0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputW,		0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInput2A,		0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInput2W,		0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInput7A,		0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
-DEFINE_GUID(IID_IDirectInput7W,		0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
-DEFINE_GUID(IID_IDirectInput8A,		0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
-DEFINE_GUID(IID_IDirectInput8W,		0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
-DEFINE_GUID(IID_IDirectInputDeviceA,	0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDeviceW,	0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice2A,	0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice2W,	0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice7A,	0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
-DEFINE_GUID(IID_IDirectInputDevice7W,	0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
-DEFINE_GUID(IID_IDirectInputDevice8A,	0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
-DEFINE_GUID(IID_IDirectInputDevice8W,	0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
-DEFINE_GUID(IID_IDirectInputEffect,	0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-
-/* Predefined object types */
-DEFINE_GUID(GUID_XAxis,	0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_YAxis,	0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_ZAxis,	0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Key,	0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_POV,	0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-
-/* Predefined product GUIDs */
-DEFINE_GUID(GUID_SysMouse,	0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysKeyboard,	0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Joystick,	0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysMouseEm,	0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysMouseEm2,	0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysKeyboardEm,	0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-
-/* predefined forcefeedback effects */
-DEFINE_GUID(GUID_ConstantForce,	0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_RampForce,	0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Square,	0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Sine,		0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Triangle,	0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_SawtoothUp,	0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_SawtoothDown,	0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Spring,	0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Damper,	0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Inertia,	0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Friction,	0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_CustomForce,	0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-
-typedef struct IDirectInputA *LPDIRECTINPUTA;
-typedef struct IDirectInputW *LPDIRECTINPUTW;
-typedef struct IDirectInput2A *LPDIRECTINPUT2A;
-typedef struct IDirectInput2W *LPDIRECTINPUT2W;
-typedef struct IDirectInput7A *LPDIRECTINPUT7A;
-typedef struct IDirectInput7W *LPDIRECTINPUT7W;
-#if DIRECTINPUT_VERSION >= 0x0800
-typedef struct IDirectInput8A *LPDIRECTINPUT8A;
-typedef struct IDirectInput8W *LPDIRECTINPUT8W;
-#endif /* DI8 */
-typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
-typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
-#if DIRECTINPUT_VERSION >= 0x0500
-typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
-typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
-#endif /* DI5 */
-#if DIRECTINPUT_VERSION >= 0x0700
-typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
-typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
-#endif /* DI7 */
-#if DIRECTINPUT_VERSION >= 0x0800
-typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
-typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
-#endif /* DI8 */
-#if DIRECTINPUT_VERSION >= 0x0500
-typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
-#endif /* DI5 */
-typedef struct SysKeyboardA *LPSYSKEYBOARDA;
-typedef struct SysMouseA *LPSYSMOUSEA;
-
-#define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
-#define IDirectInput WINELIB_NAME_AW(IDirectInput)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
-#define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
-#define IDirectInput2 WINELIB_NAME_AW(IDirectInput2)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
-#define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
-#define IDirectInput7 WINELIB_NAME_AW(IDirectInput7)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
-#if DIRECTINPUT_VERSION >= 0x0800
-#define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)
-#define IDirectInput8 WINELIB_NAME_AW(IDirectInput8)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)
-#endif /* DI8 */
-#define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
-#define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
-#if DIRECTINPUT_VERSION >= 0x0500
-#define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
-#define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
-#endif /* DI5 */
-#if DIRECTINPUT_VERSION >= 0x0700
-#define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
-#define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
-#endif /* DI7 */
-#if DIRECTINPUT_VERSION >= 0x0800
-#define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
-#define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8)
-DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
-#endif /* DI8 */
-
-#define DI_OK                           S_OK
-#define DI_NOTATTACHED                  S_FALSE
-#define DI_BUFFEROVERFLOW               S_FALSE
-#define DI_PROPNOEFFECT                 S_FALSE
-#define DI_NOEFFECT                     S_FALSE
-#define DI_POLLEDDEVICE                 ((HRESULT)0x00000002L)
-#define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003L)
-#define DI_EFFECTRESTARTED              ((HRESULT)0x00000004L)
-#define DI_TRUNCATED                    ((HRESULT)0x00000008L)
-#define DI_SETTINGSNOTSAVED             ((HRESULT)0x0000000BL)
-#define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000CL)
-#define DI_WRITEPROTECT                 ((HRESULT)0x00000013L)
-
-#define DIERR_OLDDIRECTINPUTVERSION     \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
-#define DIERR_BETADIRECTINPUTVERSION    \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
-#define DIERR_BADDRIVERVER              \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
-#define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG
-#define DIERR_NOTFOUND                  \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
-#define DIERR_OBJECTNOTFOUND            \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
-#define DIERR_INVALIDPARAM              E_INVALIDARG
-#define DIERR_NOINTERFACE               E_NOINTERFACE
-#define DIERR_GENERIC                   E_FAIL
-#define DIERR_OUTOFMEMORY               E_OUTOFMEMORY
-#define DIERR_UNSUPPORTED               E_NOTIMPL
-#define DIERR_NOTINITIALIZED            \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
-#define DIERR_ALREADYINITIALIZED        \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
-#define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
-#define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED
-#define DIERR_INPUTLOST                 \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
-#define DIERR_ACQUIRED                  \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
-#define DIERR_NOTACQUIRED               \
-    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
-#define DIERR_READONLY                  E_ACCESSDENIED
-#define DIERR_HANDLEEXISTS              E_ACCESSDENIED
-#ifndef E_PENDING
-#define E_PENDING                       0x8000000AL
-#endif
-#define DIERR_INSUFFICIENTPRIVS         0x80040200L
-#define DIERR_DEVICEFULL                0x80040201L
-#define DIERR_MOREDATA                  0x80040202L
-#define DIERR_NOTDOWNLOADED             0x80040203L
-#define DIERR_HASEFFECTS                0x80040204L
-#define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L
-#define DIERR_INCOMPLETEEFFECT          0x80040206L
-#define DIERR_NOTBUFFERED               0x80040207L
-#define DIERR_EFFECTPLAYING             0x80040208L
-#define DIERR_UNPLUGGED                 0x80040209L
-#define DIERR_REPORTFULL                0x8004020AL
-#define DIERR_MAPFILEFAIL               0x8004020BL
-
-#define DIENUM_STOP                     0
-#define DIENUM_CONTINUE                 1
-
-#define DIEDFL_ALLDEVICES               0x00000000
-#define DIEDFL_ATTACHEDONLY             0x00000001
-#define DIEDFL_FORCEFEEDBACK            0x00000100
-#define DIEDFL_INCLUDEALIASES           0x00010000
-#define DIEDFL_INCLUDEPHANTOMS          0x00020000
-#define DIEDFL_INCLUDEHIDDEN		0x00040000
-
-#define DIDEVTYPE_DEVICE                1
-#define DIDEVTYPE_MOUSE                 2
-#define DIDEVTYPE_KEYBOARD              3
-#define DIDEVTYPE_JOYSTICK              4
-#define DIDEVTYPE_HID                   0x00010000
-
-#define DI8DEVCLASS_ALL             0
-#define DI8DEVCLASS_DEVICE          1
-#define DI8DEVCLASS_POINTER         2
-#define DI8DEVCLASS_KEYBOARD        3
-#define DI8DEVCLASS_GAMECTRL        4
-
-#define DI8DEVTYPE_DEVICE           0x11
-#define DI8DEVTYPE_MOUSE            0x12
-#define DI8DEVTYPE_KEYBOARD         0x13
-#define DI8DEVTYPE_JOYSTICK         0x14
-#define DI8DEVTYPE_GAMEPAD          0x15
-#define DI8DEVTYPE_DRIVING          0x16
-#define DI8DEVTYPE_FLIGHT           0x17
-#define DI8DEVTYPE_1STPERSON        0x18
-#define DI8DEVTYPE_DEVICECTRL       0x19
-#define DI8DEVTYPE_SCREENPOINTER    0x1A
-#define DI8DEVTYPE_REMOTE           0x1B
-#define DI8DEVTYPE_SUPPLEMENTAL     0x1C
-	
-#define DIDEVTYPEMOUSE_UNKNOWN          1
-#define DIDEVTYPEMOUSE_TRADITIONAL      2
-#define DIDEVTYPEMOUSE_FINGERSTICK      3
-#define DIDEVTYPEMOUSE_TOUCHPAD         4
-#define DIDEVTYPEMOUSE_TRACKBALL        5
-
-#define DIDEVTYPEKEYBOARD_UNKNOWN       0
-#define DIDEVTYPEKEYBOARD_PCXT          1
-#define DIDEVTYPEKEYBOARD_OLIVETTI      2
-#define DIDEVTYPEKEYBOARD_PCAT          3
-#define DIDEVTYPEKEYBOARD_PCENH         4
-#define DIDEVTYPEKEYBOARD_NOKIA1050     5
-#define DIDEVTYPEKEYBOARD_NOKIA9140     6
-#define DIDEVTYPEKEYBOARD_NEC98         7
-#define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
-#define DIDEVTYPEKEYBOARD_NEC98106      9
-#define DIDEVTYPEKEYBOARD_JAPAN106     10
-#define DIDEVTYPEKEYBOARD_JAPANAX      11
-#define DIDEVTYPEKEYBOARD_J3100        12
-
-#define DIDEVTYPEJOYSTICK_UNKNOWN       1
-#define DIDEVTYPEJOYSTICK_TRADITIONAL   2
-#define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
-#define DIDEVTYPEJOYSTICK_GAMEPAD       4
-#define DIDEVTYPEJOYSTICK_RUDDER        5
-#define DIDEVTYPEJOYSTICK_WHEEL         6
-#define DIDEVTYPEJOYSTICK_HEADTRACKER   7
-
-#define DI8DEVTYPEMOUSE_UNKNOWN                     1
-#define DI8DEVTYPEMOUSE_TRADITIONAL                 2
-#define DI8DEVTYPEMOUSE_FINGERSTICK                 3
-#define DI8DEVTYPEMOUSE_TOUCHPAD                    4
-#define DI8DEVTYPEMOUSE_TRACKBALL                   5
-#define DI8DEVTYPEMOUSE_ABSOLUTE                    6
-
-#define DI8DEVTYPEKEYBOARD_UNKNOWN                  0
-#define DI8DEVTYPEKEYBOARD_PCXT                     1
-#define DI8DEVTYPEKEYBOARD_OLIVETTI                 2
-#define DI8DEVTYPEKEYBOARD_PCAT                     3
-#define DI8DEVTYPEKEYBOARD_PCENH                    4
-#define DI8DEVTYPEKEYBOARD_NOKIA1050                5
-#define DI8DEVTYPEKEYBOARD_NOKIA9140                6
-#define DI8DEVTYPEKEYBOARD_NEC98                    7
-#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8
-#define DI8DEVTYPEKEYBOARD_NEC98106                 9
-#define DI8DEVTYPEKEYBOARD_JAPAN106                10
-#define DI8DEVTYPEKEYBOARD_JAPANAX                 11
-#define DI8DEVTYPEKEYBOARD_J3100                   12
-
-#define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1
-
-#define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE
-#define DI8DEVTYPEJOYSTICK_STANDARD                 2
-
-#define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
-#define DI8DEVTYPEGAMEPAD_STANDARD                  2
-#define DI8DEVTYPEGAMEPAD_TILT                      3
-
-#define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
-#define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2
-#define DI8DEVTYPEDRIVING_DUALPEDALS                3
-#define DI8DEVTYPEDRIVING_THREEPEDALS               4
-#define DI8DEVTYPEDRIVING_HANDHELD                  5
-
-#define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE
-#define DI8DEVTYPEFLIGHT_STICK                      2
-#define DI8DEVTYPEFLIGHT_YOKE                       3
-#define DI8DEVTYPEFLIGHT_RC                         4
-
-#define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE
-#define DI8DEVTYPE1STPERSON_UNKNOWN                 2
-#define DI8DEVTYPE1STPERSON_SIXDOF                  3
-#define DI8DEVTYPE1STPERSON_SHOOTER                 4
-
-#define DI8DEVTYPESCREENPTR_UNKNOWN                 2
-#define DI8DEVTYPESCREENPTR_LIGHTGUN                3
-#define DI8DEVTYPESCREENPTR_LIGHTPEN                4
-#define DI8DEVTYPESCREENPTR_TOUCH                   5
-
-#define DI8DEVTYPEREMOTE_UNKNOWN                    2
-
-#define DI8DEVTYPEDEVICECTRL_UNKNOWN                2
-#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3
-#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
-
-#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2
-#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3
-#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4
-#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5
-#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6
-#define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7
-#define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8
-#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9
-#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10
-#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11
-#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12
-#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13
-	
-#define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
-#define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
-
-typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
-    DWORD   dwSize;
-    GUID    guidType;
-    DWORD   dwOfs;
-    DWORD   dwType;
-    DWORD   dwFlags;
-    CHAR    tszName[MAX_PATH];
-} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
-typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
-typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
-    DWORD   dwSize;
-    GUID    guidType;
-    DWORD   dwOfs;
-    DWORD   dwType;
-    DWORD   dwFlags;
-    WCHAR   tszName[MAX_PATH];
-} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
-typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
-
-typedef struct DIDEVICEOBJECTINSTANCEA {
-    DWORD	dwSize;
-    GUID	guidType;
-    DWORD	dwOfs;
-    DWORD	dwType;
-    DWORD	dwFlags;
-    CHAR	tszName[MAX_PATH];
-#if(DIRECTINPUT_VERSION >= 0x0500)
-    DWORD	dwFFMaxForce;
-    DWORD	dwFFForceResolution;
-    WORD	wCollectionNumber;
-    WORD	wDesignatorIndex;
-    WORD	wUsagePage;
-    WORD	wUsage;
-    DWORD	dwDimension;
-    WORD	wExponent;
-    WORD	wReserved;
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
-typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
-
-typedef struct DIDEVICEOBJECTINSTANCEW {
-    DWORD	dwSize;
-    GUID	guidType;
-    DWORD	dwOfs;
-    DWORD	dwType;
-    DWORD	dwFlags;
-    WCHAR	tszName[MAX_PATH];
-#if(DIRECTINPUT_VERSION >= 0x0500)
-    DWORD	dwFFMaxForce;
-    DWORD	dwFFForceResolution;
-    WORD	wCollectionNumber;
-    WORD	wDesignatorIndex;
-    WORD	wUsagePage;
-    WORD	wUsage;
-    DWORD	dwDimension;
-    WORD	wExponent;
-    WORD	wReserved;
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
-typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
-
-typedef struct DIDEVICEINSTANCE_DX3A {
-    DWORD   dwSize;
-    GUID    guidInstance;
-    GUID    guidProduct;
-    DWORD   dwDevType;
-    CHAR    tszInstanceName[MAX_PATH];
-    CHAR    tszProductName[MAX_PATH];
-} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
-typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
-typedef struct DIDEVICEINSTANCE_DX3W {
-    DWORD   dwSize;
-    GUID    guidInstance;
-    GUID    guidProduct;
-    DWORD   dwDevType;
-    WCHAR   tszInstanceName[MAX_PATH];
-    WCHAR   tszProductName[MAX_PATH];
-} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
-typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
-
-typedef struct DIDEVICEINSTANCEA {
-    DWORD	dwSize;
-    GUID	guidInstance;
-    GUID	guidProduct;
-    DWORD	dwDevType;
-    CHAR	tszInstanceName[MAX_PATH];
-    CHAR	tszProductName[MAX_PATH];
-#if(DIRECTINPUT_VERSION >= 0x0500)
-    GUID	guidFFDriver;
-    WORD	wUsagePage;
-    WORD	wUsage;
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
-typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
-
-typedef struct DIDEVICEINSTANCEW {
-    DWORD	dwSize;
-    GUID	guidInstance;
-    GUID	guidProduct;
-    DWORD	dwDevType;
-    WCHAR	tszInstanceName[MAX_PATH];
-    WCHAR	tszProductName[MAX_PATH];
-#if(DIRECTINPUT_VERSION >= 0x0500)
-    GUID	guidFFDriver;
-    WORD	wUsagePage;
-    WORD	wUsage;
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
-typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
-
-typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
-typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
-DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
-
-#define DIEDBS_MAPPEDPRI1		0x00000001
-#define DIEDBS_MAPPEDPRI2		0x00000002
-#define DIEDBS_RECENTDEVICE		0x00000010
-#define DIEDBS_NEWDEVICE		0x00000020
-
-#define DIEDBSFL_ATTACHEDONLY		0x00000000
-#define DIEDBSFL_THISUSER		0x00000010
-#define DIEDBSFL_FORCEFEEDBACK		DIEDFL_FORCEFEEDBACK
-#define DIEDBSFL_AVAILABLEDEVICES	0x00001000
-#define DIEDBSFL_MULTIMICEKEYBOARDS	0x00002000
-#define DIEDBSFL_NONGAMINGDEVICES	0x00004000
-#define DIEDBSFL_VALID			0x00007110
-
-#if DIRECTINPUT_VERSION >= 0x0800
-typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
-typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
-DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
-#endif
-
-typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
-
-typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
-typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
-DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
-
-#if DIRECTINPUT_VERSION >= 0x0500
-typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
-#endif
-
-#define DIK_ESCAPE          0x01
-#define DIK_1               0x02
-#define DIK_2               0x03
-#define DIK_3               0x04
-#define DIK_4               0x05
-#define DIK_5               0x06
-#define DIK_6               0x07
-#define DIK_7               0x08
-#define DIK_8               0x09
-#define DIK_9               0x0A
-#define DIK_0               0x0B
-#define DIK_MINUS           0x0C    /* - on main keyboard */
-#define DIK_EQUALS          0x0D
-#define DIK_BACK            0x0E    /* backspace */
-#define DIK_TAB             0x0F
-#define DIK_Q               0x10
-#define DIK_W               0x11
-#define DIK_E               0x12
-#define DIK_R               0x13
-#define DIK_T               0x14
-#define DIK_Y               0x15
-#define DIK_U               0x16
-#define DIK_I               0x17
-#define DIK_O               0x18
-#define DIK_P               0x19
-#define DIK_LBRACKET        0x1A
-#define DIK_RBRACKET        0x1B
-#define DIK_RETURN          0x1C    /* Enter on main keyboard */
-#define DIK_LCONTROL        0x1D
-#define DIK_A               0x1E
-#define DIK_S               0x1F
-#define DIK_D               0x20
-#define DIK_F               0x21
-#define DIK_G               0x22
-#define DIK_H               0x23
-#define DIK_J               0x24
-#define DIK_K               0x25
-#define DIK_L               0x26
-#define DIK_SEMICOLON       0x27
-#define DIK_APOSTROPHE      0x28
-#define DIK_GRAVE           0x29    /* accent grave */
-#define DIK_LSHIFT          0x2A
-#define DIK_BACKSLASH       0x2B
-#define DIK_Z               0x2C
-#define DIK_X               0x2D
-#define DIK_C               0x2E
-#define DIK_V               0x2F
-#define DIK_B               0x30
-#define DIK_N               0x31
-#define DIK_M               0x32
-#define DIK_COMMA           0x33
-#define DIK_PERIOD          0x34    /* . on main keyboard */
-#define DIK_SLASH           0x35    /* / on main keyboard */
-#define DIK_RSHIFT          0x36
-#define DIK_MULTIPLY        0x37    /* * on numeric keypad */
-#define DIK_LMENU           0x38    /* left Alt */
-#define DIK_SPACE           0x39
-#define DIK_CAPITAL         0x3A
-#define DIK_F1              0x3B
-#define DIK_F2              0x3C
-#define DIK_F3              0x3D
-#define DIK_F4              0x3E
-#define DIK_F5              0x3F
-#define DIK_F6              0x40
-#define DIK_F7              0x41
-#define DIK_F8              0x42
-#define DIK_F9              0x43
-#define DIK_F10             0x44
-#define DIK_NUMLOCK         0x45
-#define DIK_SCROLL          0x46    /* Scroll Lock */
-#define DIK_NUMPAD7         0x47
-#define DIK_NUMPAD8         0x48
-#define DIK_NUMPAD9         0x49
-#define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
-#define DIK_NUMPAD4         0x4B
-#define DIK_NUMPAD5         0x4C
-#define DIK_NUMPAD6         0x4D
-#define DIK_ADD             0x4E    /* + on numeric keypad */
-#define DIK_NUMPAD1         0x4F
-#define DIK_NUMPAD2         0x50
-#define DIK_NUMPAD3         0x51
-#define DIK_NUMPAD0         0x52
-#define DIK_DECIMAL         0x53    /* . on numeric keypad */
-#define DIK_OEM_102         0x56    /* < > | on UK/Germany keyboards */
-#define DIK_F11             0x57
-#define DIK_F12             0x58
-#define DIK_F13             0x64    /*                     (NEC PC98) */
-#define DIK_F14             0x65    /*                     (NEC PC98) */
-#define DIK_F15             0x66    /*                     (NEC PC98) */
-#define DIK_KANA            0x70    /* (Japanese keyboard)            */
-#define DIK_ABNT_C1         0x73    /* / ? on Portugese (Brazilian) keyboards */
-#define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
-#define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
-#define DIK_YEN             0x7D    /* (Japanese keyboard)            */
-#define DIK_ABNT_C2         0x7E    /* Numpad . on Portugese (Brazilian) keyboards */
-#define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
-#define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */
-#define DIK_AT              0x91    /*                     (NEC PC98) */
-#define DIK_COLON           0x92    /*                     (NEC PC98) */
-#define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
-#define DIK_KANJI           0x94    /* (Japanese keyboard)            */
-#define DIK_STOP            0x95    /*                     (NEC PC98) */
-#define DIK_AX              0x96    /*                     (Japan AX) */
-#define DIK_UNLABELED       0x97    /*                        (J3100) */
-#define DIK_NEXTTRACK       0x99    /* Next Track */
-#define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
-#define DIK_RCONTROL        0x9D
-#define DIK_MUTE	    0xA0    /* Mute */
-#define DIK_CALCULATOR      0xA1    /* Calculator */
-#define DIK_PLAYPAUSE       0xA2    /* Play / Pause */
-#define DIK_MEDIASTOP       0xA4    /* Media Stop */
-#define DIK_VOLUMEDOWN      0xAE    /* Volume - */
-#define DIK_VOLUMEUP        0xB0    /* Volume + */
-#define DIK_WEBHOME         0xB2    /* Web home */
-#define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
-#define DIK_DIVIDE          0xB5    /* / on numeric keypad */
-#define DIK_SYSRQ           0xB7
-#define DIK_RMENU           0xB8    /* right Alt */
-#define DIK_PAUSE           0xC5    /* Pause */
-#define DIK_HOME            0xC7    /* Home on arrow keypad */
-#define DIK_UP              0xC8    /* UpArrow on arrow keypad */
-#define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
-#define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
-#define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
-#define DIK_END             0xCF    /* End on arrow keypad */
-#define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
-#define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
-#define DIK_INSERT          0xD2    /* Insert on arrow keypad */
-#define DIK_DELETE          0xD3    /* Delete on arrow keypad */
-#define DIK_LWIN            0xDB    /* Left Windows key */
-#define DIK_RWIN            0xDC    /* Right Windows key */
-#define DIK_APPS            0xDD    /* AppMenu key */
-#define DIK_POWER           0xDE
-#define DIK_SLEEP           0xDF
-#define DIK_WAKE            0xE3    /* System Wake */
-#define DIK_WEBSEARCH       0xE5    /* Web Search */
-#define DIK_WEBFAVORITES    0xE6    /* Web Favorites */
-#define DIK_WEBREFRESH      0xE7    /* Web Refresh */
-#define DIK_WEBSTOP         0xE8    /* Web Stop */
-#define DIK_WEBFORWARD      0xE9    /* Web Forward */
-#define DIK_WEBBACK         0xEA    /* Web Back */
-#define DIK_MYCOMPUTER      0xEB    /* My Computer */
-#define DIK_MAIL            0xEC    /* Mail */
-#define DIK_MEDIASELECT     0xED    /* Media Select */
-
-#define DIK_BACKSPACE       DIK_BACK            /* backspace */
-#define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
-#define DIK_LALT            DIK_LMENU           /* left Alt */
-#define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
-#define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
-#define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
-#define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
-#define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
-#define DIK_RALT            DIK_RMENU           /* right Alt */
-#define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
-#define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
-#define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
-#define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
-#define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
-#define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
-
-#define DIDFT_ALL		0x00000000
-#define DIDFT_RELAXIS		0x00000001
-#define DIDFT_ABSAXIS		0x00000002
-#define DIDFT_AXIS		0x00000003
-#define DIDFT_PSHBUTTON		0x00000004
-#define DIDFT_TGLBUTTON		0x00000008
-#define DIDFT_BUTTON		0x0000000C
-#define DIDFT_POV		0x00000010
-#define DIDFT_COLLECTION	0x00000040
-#define DIDFT_NODATA		0x00000080
-#define DIDFT_ANYINSTANCE	0x00FFFF00
-#define DIDFT_INSTANCEMASK	DIDFT_ANYINSTANCE
-#define DIDFT_MAKEINSTANCE(n)	((WORD)(n) << 8)
-#define DIDFT_GETTYPE(n)	LOBYTE(n)
-#define DIDFT_GETINSTANCE(n)	LOWORD((n) >> 8)
-#define DIDFT_FFACTUATOR	0x01000000
-#define DIDFT_FFEFFECTTRIGGER	0x02000000
-#if DIRECTINPUT_VERSION >= 0x050a
-#define DIDFT_OUTPUT		0x10000000
-#define DIDFT_VENDORDEFINED	0x04000000
-#define DIDFT_ALIAS		0x08000000
-#endif /* DI5a */
-#ifndef DIDFT_OPTIONAL
-#define DIDFT_OPTIONAL		0x80000000
-#endif
-#define DIDFT_ENUMCOLLECTION(n)	((WORD)(n) << 8)
-#define DIDFT_NOCOLLECTION	0x00FFFF00
-
-#define DIDF_ABSAXIS		0x00000001
-#define DIDF_RELAXIS		0x00000002
-
-#define DIGDD_PEEK		0x00000001
-
-#define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)
-
-typedef struct DIDEVICEOBJECTDATA_DX3 {
-    DWORD	dwOfs;
-    DWORD	dwData;
-    DWORD	dwTimeStamp;
-    DWORD	dwSequence;
-} DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
-typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
-
-typedef struct DIDEVICEOBJECTDATA {
-    DWORD	dwOfs;
-    DWORD	dwData;
-    DWORD	dwTimeStamp;
-    DWORD	dwSequence;
-#if(DIRECTINPUT_VERSION >= 0x0800)
-    UINT_PTR	uAppData;
-#endif /* DIRECTINPUT_VERSION >= 0x0800 */
-} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
-typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
-
-typedef struct _DIOBJECTDATAFORMAT {
-    const GUID *pguid;
-    DWORD	dwOfs;
-    DWORD	dwType;
-    DWORD	dwFlags;
-} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
-typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
-
-typedef struct _DIDATAFORMAT {
-    DWORD			dwSize;
-    DWORD			dwObjSize;
-    DWORD			dwFlags;
-    DWORD			dwDataSize;
-    DWORD			dwNumObjs;
-    LPDIOBJECTDATAFORMAT	rgodf;
-} DIDATAFORMAT, *LPDIDATAFORMAT;
-typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
-
-#if DIRECTINPUT_VERSION >= 0x0500
-#define DIDOI_FFACTUATOR	0x00000001
-#define DIDOI_FFEFFECTTRIGGER	0x00000002
-#define DIDOI_POLLED		0x00008000
-#define DIDOI_ASPECTPOSITION	0x00000100
-#define DIDOI_ASPECTVELOCITY	0x00000200
-#define DIDOI_ASPECTACCEL	0x00000300
-#define DIDOI_ASPECTFORCE	0x00000400
-#define DIDOI_ASPECTMASK	0x00000F00
-#endif /* DI5 */
-#if DIRECTINPUT_VERSION >= 0x050a
-#define DIDOI_GUIDISUSAGE	0x00010000
-#endif /* DI5a */
-
-typedef struct DIPROPHEADER {
-    DWORD	dwSize;
-    DWORD	dwHeaderSize;
-    DWORD	dwObj;
-    DWORD	dwHow;
-} DIPROPHEADER,*LPDIPROPHEADER;
-typedef const DIPROPHEADER *LPCDIPROPHEADER;
-
-#define DIPH_DEVICE	0
-#define DIPH_BYOFFSET	1
-#define DIPH_BYID	2
-#if DIRECTINPUT_VERSION >= 0x050a
-#define DIPH_BYUSAGE	3
-
-#define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
-#endif /* DI5a */
-
-typedef struct DIPROPDWORD {
-	DIPROPHEADER	diph;
-	DWORD		dwData;
-} DIPROPDWORD, *LPDIPROPDWORD;
-typedef const DIPROPDWORD *LPCDIPROPDWORD;
-
-typedef struct DIPROPRANGE {
-	DIPROPHEADER	diph;
-	LONG		lMin;
-	LONG		lMax;
-} DIPROPRANGE, *LPDIPROPRANGE;
-typedef const DIPROPRANGE *LPCDIPROPRANGE;
-
-#define DIPROPRANGE_NOMIN	((LONG)0x80000000)
-#define DIPROPRANGE_NOMAX	((LONG)0x7FFFFFFF)
-
-#if DIRECTINPUT_VERSION >= 0x050a
-typedef struct DIPROPCAL {
-	DIPROPHEADER diph;
-	LONG	lMin;
-	LONG	lCenter;
-	LONG	lMax;
-} DIPROPCAL, *LPDIPROPCAL;
-typedef const DIPROPCAL *LPCDIPROPCAL;
-
-typedef struct DIPROPCALPOV {
-	DIPROPHEADER	diph;
-	LONG		lMin[5];
-	LONG		lMax[5];
-} DIPROPCALPOV, *LPDIPROPCALPOV;
-typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
-
-typedef struct DIPROPGUIDANDPATH {
-	DIPROPHEADER diph;
-	GUID    guidClass;
-	WCHAR   wszPath[MAX_PATH];
-} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
-typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
-
-typedef struct DIPROPSTRING {
-        DIPROPHEADER diph;
-        WCHAR        wsz[MAX_PATH];
-} DIPROPSTRING, *LPDIPROPSTRING;
-typedef const DIPROPSTRING *LPCDIPROPSTRING;
-#endif /* DI5a */
-
-#if DIRECTINPUT_VERSION >= 0x0800
-typedef struct DIPROPPOINTER {
-	DIPROPHEADER diph;
-	UINT_PTR     uData;
-} DIPROPPOINTER, *LPDIPROPPOINTER;
-typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
-#endif /* DI8 */
-
-/* special property GUIDs */
-#ifdef __cplusplus
-#define MAKEDIPROP(prop)	(*(const GUID *)(prop))
-#else
-#define MAKEDIPROP(prop)	((REFGUID)(prop))
-#endif
-#define DIPROP_BUFFERSIZE	MAKEDIPROP(1)
-#define DIPROP_AXISMODE		MAKEDIPROP(2)
-
-#define DIPROPAXISMODE_ABS	0
-#define DIPROPAXISMODE_REL	1
-
-#define DIPROP_GRANULARITY	MAKEDIPROP(3)
-#define DIPROP_RANGE		MAKEDIPROP(4)
-#define DIPROP_DEADZONE		MAKEDIPROP(5)
-#define DIPROP_SATURATION	MAKEDIPROP(6)
-#define DIPROP_FFGAIN		MAKEDIPROP(7)
-#define DIPROP_FFLOAD		MAKEDIPROP(8)
-#define DIPROP_AUTOCENTER	MAKEDIPROP(9)
-
-#define DIPROPAUTOCENTER_OFF	0
-#define DIPROPAUTOCENTER_ON	1
-
-#define DIPROP_CALIBRATIONMODE	MAKEDIPROP(10)
-
-#define DIPROPCALIBRATIONMODE_COOKED	0
-#define DIPROPCALIBRATIONMODE_RAW	1
-
-#if DIRECTINPUT_VERSION >= 0x050a
-#define DIPROP_CALIBRATION	MAKEDIPROP(11)
-#define DIPROP_GUIDANDPATH	MAKEDIPROP(12)
-#define DIPROP_INSTANCENAME	MAKEDIPROP(13)
-#define DIPROP_PRODUCTNAME	MAKEDIPROP(14)
-#endif
-
-#if DIRECTINPUT_VERSION >= 0x5B2
-#define DIPROP_JOYSTICKID	MAKEDIPROP(15)
-#define DIPROP_GETPORTDISPLAYNAME	MAKEDIPROP(16)
-#endif
-
-#if DIRECTINPUT_VERSION >= 0x0700
-#define DIPROP_PHYSICALRANGE	MAKEDIPROP(18)
-#define DIPROP_LOGICALRANGE	MAKEDIPROP(19)
-#endif
-
-#if(DIRECTINPUT_VERSION >= 0x0800)
-#define DIPROP_KEYNAME		MAKEDIPROP(20)
-#define DIPROP_CPOINTS		MAKEDIPROP(21)
-#define DIPROP_APPDATA		MAKEDIPROP(22)
-#define DIPROP_SCANCODE		MAKEDIPROP(23)
-#define DIPROP_VIDPID		MAKEDIPROP(24)
-#define DIPROP_USERNAME		MAKEDIPROP(25)
-#define DIPROP_TYPENAME		MAKEDIPROP(26)
-
-#define MAXCPOINTSNUM		8
-
-typedef struct _CPOINT {
-    LONG	lP;
-    DWORD	dwLog;
-} CPOINT, *PCPOINT;
-
-typedef struct DIPROPCPOINTS {
-    DIPROPHEADER diph;
-    DWORD	dwCPointsNum;
-    CPOINT	cp[MAXCPOINTSNUM];
-} DIPROPCPOINTS, *LPDIPROPCPOINTS;
-typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
-#endif /* DI8 */
-
-
-typedef struct DIDEVCAPS_DX3 {
-    DWORD	dwSize;
-    DWORD	dwFlags;
-    DWORD	dwDevType;
-    DWORD	dwAxes;
-    DWORD	dwButtons;
-    DWORD	dwPOVs;
-} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
-
-typedef struct DIDEVCAPS {
-    DWORD	dwSize;
-    DWORD	dwFlags;
-    DWORD	dwDevType;
-    DWORD	dwAxes;
-    DWORD	dwButtons;
-    DWORD	dwPOVs;
-#if(DIRECTINPUT_VERSION >= 0x0500)
-    DWORD	dwFFSamplePeriod;
-    DWORD	dwFFMinTimeResolution;
-    DWORD	dwFirmwareRevision;
-    DWORD	dwHardwareRevision;
-    DWORD	dwFFDriverVersion;
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-} DIDEVCAPS,*LPDIDEVCAPS;
-
-#define DIDC_ATTACHED		0x00000001
-#define DIDC_POLLEDDEVICE	0x00000002
-#define DIDC_EMULATED		0x00000004
-#define DIDC_POLLEDDATAFORMAT	0x00000008
-#define DIDC_FORCEFEEDBACK	0x00000100
-#define DIDC_FFATTACK		0x00000200
-#define DIDC_FFFADE		0x00000400
-#define DIDC_SATURATION		0x00000800
-#define DIDC_POSNEGCOEFFICIENTS	0x00001000
-#define DIDC_POSNEGSATURATION	0x00002000
-#define DIDC_DEADBAND		0x00004000
-#define DIDC_STARTDELAY		0x00008000
-#define DIDC_ALIAS		0x00010000
-#define DIDC_PHANTOM		0x00020000
-#define DIDC_HIDDEN		0x00040000
-
-
-/* SetCooperativeLevel dwFlags */
-#define DISCL_EXCLUSIVE		0x00000001
-#define DISCL_NONEXCLUSIVE	0x00000002
-#define DISCL_FOREGROUND	0x00000004
-#define DISCL_BACKGROUND	0x00000008
-#define DISCL_NOWINKEY          0x00000010
-
-#if (DIRECTINPUT_VERSION >= 0x0500)
-/* Device FF flags */
-#define DISFFC_RESET            0x00000001
-#define DISFFC_STOPALL          0x00000002
-#define DISFFC_PAUSE            0x00000004
-#define DISFFC_CONTINUE         0x00000008
-#define DISFFC_SETACTUATORSON   0x00000010
-#define DISFFC_SETACTUATORSOFF  0x00000020
-
-#define DIGFFS_EMPTY            0x00000001
-#define DIGFFS_STOPPED          0x00000002
-#define DIGFFS_PAUSED           0x00000004
-#define DIGFFS_ACTUATORSON      0x00000010
-#define DIGFFS_ACTUATORSOFF     0x00000020
-#define DIGFFS_POWERON          0x00000040
-#define DIGFFS_POWEROFF         0x00000080
-#define DIGFFS_SAFETYSWITCHON   0x00000100
-#define DIGFFS_SAFETYSWITCHOFF  0x00000200
-#define DIGFFS_USERFFSWITCHON   0x00000400
-#define DIGFFS_USERFFSWITCHOFF  0x00000800
-#define DIGFFS_DEVICELOST       0x80000000
-
-/* Effect flags */
-#define DIEFT_ALL		0x00000000
-
-#define DIEFT_CONSTANTFORCE	0x00000001
-#define DIEFT_RAMPFORCE		0x00000002
-#define DIEFT_PERIODIC		0x00000003
-#define DIEFT_CONDITION		0x00000004
-#define DIEFT_CUSTOMFORCE	0x00000005
-#define DIEFT_HARDWARE		0x000000FF
-#define DIEFT_FFATTACK		0x00000200
-#define DIEFT_FFFADE		0x00000400
-#define DIEFT_SATURATION	0x00000800
-#define DIEFT_POSNEGCOEFFICIENTS 0x00001000
-#define DIEFT_POSNEGSATURATION	0x00002000
-#define DIEFT_DEADBAND		0x00004000
-#define DIEFT_STARTDELAY	0x00008000
-#define DIEFT_GETTYPE(n)	LOBYTE(n)
-
-#define DIEFF_OBJECTIDS         0x00000001
-#define DIEFF_OBJECTOFFSETS     0x00000002
-#define DIEFF_CARTESIAN         0x00000010
-#define DIEFF_POLAR             0x00000020
-#define DIEFF_SPHERICAL         0x00000040
-
-#define DIEP_DURATION           0x00000001
-#define DIEP_SAMPLEPERIOD       0x00000002
-#define DIEP_GAIN               0x00000004
-#define DIEP_TRIGGERBUTTON      0x00000008
-#define DIEP_TRIGGERREPEATINTERVAL 0x00000010
-#define DIEP_AXES               0x00000020
-#define DIEP_DIRECTION          0x00000040
-#define DIEP_ENVELOPE           0x00000080
-#define DIEP_TYPESPECIFICPARAMS 0x00000100
-#if(DIRECTINPUT_VERSION >= 0x0600)
-#define DIEP_STARTDELAY         0x00000200
-#define DIEP_ALLPARAMS_DX5      0x000001FF
-#define DIEP_ALLPARAMS          0x000003FF
-#else
-#define DIEP_ALLPARAMS          0x000001FF
-#endif /* DIRECTINPUT_VERSION >= 0x0600 */
-#define DIEP_START              0x20000000
-#define DIEP_NORESTART          0x40000000
-#define DIEP_NODOWNLOAD         0x80000000
-#define DIEB_NOTRIGGER          0xFFFFFFFF
-
-#define DIES_SOLO               0x00000001
-#define DIES_NODOWNLOAD         0x80000000
-
-#define DIEGES_PLAYING          0x00000001
-#define DIEGES_EMULATED         0x00000002
-
-#define DI_DEGREES		100
-#define DI_FFNOMINALMAX		10000
-#define DI_SECONDS		1000000
-
-typedef struct DICONSTANTFORCE {
-	LONG			lMagnitude;
-} DICONSTANTFORCE, *LPDICONSTANTFORCE;
-typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
-
-typedef struct DIRAMPFORCE {
-	LONG			lStart;
-	LONG			lEnd;
-} DIRAMPFORCE, *LPDIRAMPFORCE;
-typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
-
-typedef struct DIPERIODIC {
-	DWORD			dwMagnitude;
-	LONG			lOffset;
-	DWORD			dwPhase;
-	DWORD			dwPeriod;
-} DIPERIODIC, *LPDIPERIODIC;
-typedef const DIPERIODIC *LPCDIPERIODIC;
-
-typedef struct DICONDITION {
-	LONG			lOffset;
-	LONG			lPositiveCoefficient;
-	LONG			lNegativeCoefficient;
-	DWORD			dwPositiveSaturation;
-	DWORD			dwNegativeSaturation;
-	LONG			lDeadBand;
-} DICONDITION, *LPDICONDITION;
-typedef const DICONDITION *LPCDICONDITION;
-
-typedef struct DICUSTOMFORCE {
-	DWORD			cChannels;
-	DWORD			dwSamplePeriod;
-	DWORD			cSamples;
-	LPLONG			rglForceData;
-} DICUSTOMFORCE, *LPDICUSTOMFORCE;
-typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
-
-typedef struct DIENVELOPE {
-	DWORD			dwSize;
-	DWORD			dwAttackLevel;
-	DWORD			dwAttackTime;
-	DWORD			dwFadeLevel;
-	DWORD			dwFadeTime;
-} DIENVELOPE, *LPDIENVELOPE;
-typedef const DIENVELOPE *LPCDIENVELOPE;
-
-typedef struct DIEFFECT_DX5 {
-	DWORD			dwSize;
-	DWORD			dwFlags;
-	DWORD			dwDuration;
-	DWORD			dwSamplePeriod;
-	DWORD			dwGain;
-	DWORD			dwTriggerButton;
-	DWORD			dwTriggerRepeatInterval;
-	DWORD			cAxes;
-	LPDWORD			rgdwAxes;
-	LPLONG			rglDirection;
-	LPDIENVELOPE		lpEnvelope;
-	DWORD			cbTypeSpecificParams;
-	LPVOID			lpvTypeSpecificParams;
-} DIEFFECT_DX5, *LPDIEFFECT_DX5;
-typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
-
-typedef struct DIEFFECT {
-	DWORD			dwSize;
-	DWORD			dwFlags;
-	DWORD			dwDuration;
-	DWORD			dwSamplePeriod;
-	DWORD			dwGain;
-	DWORD			dwTriggerButton;
-	DWORD			dwTriggerRepeatInterval;
-	DWORD			cAxes;
-	LPDWORD			rgdwAxes;
-	LPLONG			rglDirection;
-	LPDIENVELOPE		lpEnvelope;
-	DWORD			cbTypeSpecificParams;
-	LPVOID			lpvTypeSpecificParams;
-#if(DIRECTINPUT_VERSION >= 0x0600)
-	DWORD			dwStartDelay;
-#endif /* DIRECTINPUT_VERSION >= 0x0600 */
-} DIEFFECT, *LPDIEFFECT;
-typedef const DIEFFECT *LPCDIEFFECT;
-typedef DIEFFECT DIEFFECT_DX6;
-typedef LPDIEFFECT LPDIEFFECT_DX6;
-
-typedef struct DIEFFECTINFOA {
-	DWORD			dwSize;
-	GUID			guid;
-	DWORD			dwEffType;
-	DWORD			dwStaticParams;
-	DWORD			dwDynamicParams;
-	CHAR			tszName[MAX_PATH];
-} DIEFFECTINFOA, *LPDIEFFECTINFOA;
-typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
-
-typedef struct DIEFFECTINFOW {
-	DWORD			dwSize;
-	GUID			guid;
-	DWORD			dwEffType;
-	DWORD			dwStaticParams;
-	DWORD			dwDynamicParams;
-	WCHAR			tszName[MAX_PATH];
-} DIEFFECTINFOW, *LPDIEFFECTINFOW;
-typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
-
-DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
-DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
-DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
-
-typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
-typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
-
-typedef struct DIEFFESCAPE {
-	DWORD	dwSize;
-	DWORD	dwCommand;
-	LPVOID	lpvInBuffer;
-	DWORD	cbInBuffer;
-	LPVOID	lpvOutBuffer;
-	DWORD	cbOutBuffer;
-} DIEFFESCAPE, *LPDIEFFESCAPE;
-
-typedef struct DIJOYSTATE {
-	LONG	lX;
-	LONG	lY;
-	LONG	lZ;
-	LONG	lRx;
-	LONG	lRy;
-	LONG	lRz;
-	LONG	rglSlider[2];
-	DWORD	rgdwPOV[4];
-	BYTE	rgbButtons[32];
-} DIJOYSTATE, *LPDIJOYSTATE;
-
-typedef struct DIJOYSTATE2 {
-	LONG	lX;
-	LONG	lY;
-	LONG	lZ;
-	LONG	lRx;
-	LONG	lRy;
-	LONG	lRz;
-	LONG	rglSlider[2];
-	DWORD	rgdwPOV[4];
-	BYTE	rgbButtons[128];
-	LONG	lVX;		/* 'v' as in velocity */
-	LONG	lVY;
-	LONG	lVZ;
-	LONG	lVRx;
-	LONG	lVRy;
-	LONG	lVRz;
-	LONG	rglVSlider[2];
-	LONG	lAX;		/* 'a' as in acceleration */
-	LONG	lAY;
-	LONG	lAZ;
-	LONG	lARx;
-	LONG	lARy;
-	LONG	lARz;
-	LONG	rglASlider[2];
-	LONG	lFX;		/* 'f' as in force */
-	LONG	lFY;
-	LONG	lFZ;
-	LONG	lFRx;		/* 'fr' as in rotational force aka torque */
-	LONG	lFRy;
-	LONG	lFRz;
-	LONG	rglFSlider[2];
-} DIJOYSTATE2, *LPDIJOYSTATE2;
-
-#define DIJOFS_X		FIELD_OFFSET(DIJOYSTATE, lX)
-#define DIJOFS_Y		FIELD_OFFSET(DIJOYSTATE, lY)
-#define DIJOFS_Z		FIELD_OFFSET(DIJOYSTATE, lZ)
-#define DIJOFS_RX		FIELD_OFFSET(DIJOYSTATE, lRx)
-#define DIJOFS_RY		FIELD_OFFSET(DIJOYSTATE, lRy)
-#define DIJOFS_RZ		FIELD_OFFSET(DIJOYSTATE, lRz)
-#define DIJOFS_SLIDER(n)	(FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
-                                                        (n) * sizeof(LONG))
-#define DIJOFS_POV(n)		(FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
-                                                        (n) * sizeof(DWORD))
-#define DIJOFS_BUTTON(n)	(FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
-#define DIJOFS_BUTTON0		DIJOFS_BUTTON(0)
-#define DIJOFS_BUTTON1		DIJOFS_BUTTON(1)
-#define DIJOFS_BUTTON2		DIJOFS_BUTTON(2)
-#define DIJOFS_BUTTON3		DIJOFS_BUTTON(3)
-#define DIJOFS_BUTTON4		DIJOFS_BUTTON(4)
-#define DIJOFS_BUTTON5		DIJOFS_BUTTON(5)
-#define DIJOFS_BUTTON6		DIJOFS_BUTTON(6)
-#define DIJOFS_BUTTON7		DIJOFS_BUTTON(7)
-#define DIJOFS_BUTTON8		DIJOFS_BUTTON(8)
-#define DIJOFS_BUTTON9		DIJOFS_BUTTON(9)
-#define DIJOFS_BUTTON10		DIJOFS_BUTTON(10)
-#define DIJOFS_BUTTON11		DIJOFS_BUTTON(11)
-#define DIJOFS_BUTTON12		DIJOFS_BUTTON(12)
-#define DIJOFS_BUTTON13		DIJOFS_BUTTON(13)
-#define DIJOFS_BUTTON14		DIJOFS_BUTTON(14)
-#define DIJOFS_BUTTON15		DIJOFS_BUTTON(15)
-#define DIJOFS_BUTTON16		DIJOFS_BUTTON(16)
-#define DIJOFS_BUTTON17		DIJOFS_BUTTON(17)
-#define DIJOFS_BUTTON18		DIJOFS_BUTTON(18)
-#define DIJOFS_BUTTON19		DIJOFS_BUTTON(19)
-#define DIJOFS_BUTTON20		DIJOFS_BUTTON(20)
-#define DIJOFS_BUTTON21		DIJOFS_BUTTON(21)
-#define DIJOFS_BUTTON22		DIJOFS_BUTTON(22)
-#define DIJOFS_BUTTON23		DIJOFS_BUTTON(23)
-#define DIJOFS_BUTTON24		DIJOFS_BUTTON(24)
-#define DIJOFS_BUTTON25		DIJOFS_BUTTON(25)
-#define DIJOFS_BUTTON26		DIJOFS_BUTTON(26)
-#define DIJOFS_BUTTON27		DIJOFS_BUTTON(27)
-#define DIJOFS_BUTTON28		DIJOFS_BUTTON(28)
-#define DIJOFS_BUTTON29		DIJOFS_BUTTON(29)
-#define DIJOFS_BUTTON30		DIJOFS_BUTTON(30)
-#define DIJOFS_BUTTON31		DIJOFS_BUTTON(31)
-#endif /* DIRECTINPUT_VERSION >= 0x0500 */
-
-/* DInput 7 structures, types */
-#if(DIRECTINPUT_VERSION >= 0x0700)
-typedef struct DIFILEEFFECT {
-  DWORD       dwSize;
-  GUID        GuidEffect;
-  LPCDIEFFECT lpDiEffect;
-  CHAR        szFriendlyName[MAX_PATH];
-} DIFILEEFFECT, *LPDIFILEEFFECT;
-
-typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
-typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
-#endif /* DIRECTINPUT_VERSION >= 0x0700 */
-
-/* DInput 8 structures and types */
-#if DIRECTINPUT_VERSION >= 0x0800
-typedef struct _DIACTIONA {
-	UINT_PTR	uAppData;
-	DWORD		dwSemantic;
-	DWORD		dwFlags;
-	__GNU_EXTENSION union {
-		LPCSTR	lptszActionName;
-		UINT	uResIdString;
-	} DUMMYUNIONNAME;
-	GUID		guidInstance;
-	DWORD		dwObjID;
-	DWORD		dwHow;
-} DIACTIONA, *LPDIACTIONA;
-typedef const DIACTIONA *LPCDIACTIONA;
-
-typedef struct _DIACTIONW {
-	UINT_PTR	uAppData;
-	DWORD		dwSemantic;
-	DWORD		dwFlags;
-	__GNU_EXTENSION union {
-		LPCWSTR	lptszActionName;
-		UINT	uResIdString;
-	} DUMMYUNIONNAME;
-	GUID		guidInstance;
-	DWORD		dwObjID;
-	DWORD		dwHow;
-} DIACTIONW, *LPDIACTIONW;
-typedef const DIACTIONW *LPCDIACTIONW;
-
-DECL_WINELIB_TYPE_AW(DIACTION)
-DECL_WINELIB_TYPE_AW(LPDIACTION)
-DECL_WINELIB_TYPE_AW(LPCDIACTION)
-
-#define DIA_FORCEFEEDBACK	0x00000001
-#define DIA_APPMAPPED		0x00000002
-#define DIA_APPNOMAP		0x00000004
-#define DIA_NORANGE		0x00000008
-#define DIA_APPFIXED		0x00000010
-
-#define DIAH_UNMAPPED		0x00000000
-#define DIAH_USERCONFIG		0x00000001
-#define DIAH_APPREQUESTED	0x00000002
-#define DIAH_HWAPP		0x00000004
-#define DIAH_HWDEFAULT		0x00000008
-#define DIAH_DEFAULT		0x00000020
-#define DIAH_ERROR		0x80000000
-
-typedef struct _DIACTIONFORMATA {
-	DWORD		dwSize;
-	DWORD		dwActionSize;
-	DWORD		dwDataSize;
-	DWORD		dwNumActions;
-	LPDIACTIONA	rgoAction;
-	GUID		guidActionMap;
-	DWORD		dwGenre;
-	DWORD		dwBufferSize;
-	LONG		lAxisMin;
-	LONG		lAxisMax;
-	HINSTANCE	hInstString;
-	FILETIME	ftTimeStamp;
-	DWORD		dwCRC;
-	CHAR		tszActionMap[MAX_PATH];
-} DIACTIONFORMATA, *LPDIACTIONFORMATA;
-typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
-
-typedef struct _DIACTIONFORMATW {
-	DWORD		dwSize;
-	DWORD		dwActionSize;
-	DWORD		dwDataSize;
-	DWORD		dwNumActions;
-	LPDIACTIONW	rgoAction;
-	GUID		guidActionMap;
-	DWORD		dwGenre;
-	DWORD		dwBufferSize;
-	LONG		lAxisMin;
-	LONG		lAxisMax;
-	HINSTANCE	hInstString;
-	FILETIME	ftTimeStamp;
-	DWORD		dwCRC;
-	WCHAR		tszActionMap[MAX_PATH];
-} DIACTIONFORMATW, *LPDIACTIONFORMATW;
-typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
-
-DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
-DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
-DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
-
-#define DIAFTS_NEWDEVICELOW	0xFFFFFFFF
-#define DIAFTS_NEWDEVICEHIGH	0xFFFFFFFF
-#define DIAFTS_UNUSEDDEVICELOW	0x00000000
-#define DIAFTS_UNUSEDDEVICEHIGH	0x00000000
-
-#define DIDBAM_DEFAULT		0x00000000
-#define DIDBAM_PRESERVE		0x00000001
-#define DIDBAM_INITIALIZE	0x00000002
-#define DIDBAM_HWDEFAULTS	0x00000004
-
-#define DIDSAM_DEFAULT		0x00000000
-#define DIDSAM_NOUSER		0x00000001
-#define DIDSAM_FORCESAVE	0x00000002
-
-#define DICD_DEFAULT		0x00000000
-#define DICD_EDIT		0x00000001
-
-#ifndef D3DCOLOR_DEFINED
-typedef DWORD D3DCOLOR;
-#define D3DCOLOR_DEFINED
-#endif
-
-typedef struct _DICOLORSET {
-	DWORD		dwSize;
-	D3DCOLOR	cTextFore;
-	D3DCOLOR	cTextHighlight;
-	D3DCOLOR	cCalloutLine;
-	D3DCOLOR	cCalloutHighlight;
-	D3DCOLOR	cBorder;
-	D3DCOLOR	cControlFill;
-	D3DCOLOR	cHighlightFill;
-	D3DCOLOR	cAreaFill;
-} DICOLORSET, *LPDICOLORSET;
-typedef const DICOLORSET *LPCDICOLORSET;
-
-typedef struct _DICONFIGUREDEVICESPARAMSA {
-	DWORD			dwSize;
-	DWORD			dwcUsers;
-	LPSTR			lptszUserNames;
-	DWORD			dwcFormats;
-	LPDIACTIONFORMATA	lprgFormats;
-	HWND			hwnd;
-	DICOLORSET		dics;
-	LPUNKNOWN		lpUnkDDSTarget;
-} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
-typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
-
-typedef struct _DICONFIGUREDEVICESPARAMSW {
-	DWORD			dwSize;
-	DWORD			dwcUsers;
-	LPWSTR			lptszUserNames;
-	DWORD			dwcFormats;
-	LPDIACTIONFORMATW	lprgFormats;
-	HWND			hwnd;
-	DICOLORSET		dics;
-	LPUNKNOWN		lpUnkDDSTarget;
-} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
-typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
-
-DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
-DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
-DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
-
-#define DIDIFT_CONFIGURATION	0x00000001
-#define DIDIFT_OVERLAY		0x00000002
-
-#define DIDAL_CENTERED		0x00000000
-#define DIDAL_LEFTALIGNED	0x00000001
-#define DIDAL_RIGHTALIGNED	0x00000002
-#define DIDAL_MIDDLE		0x00000000
-#define DIDAL_TOPALIGNED	0x00000004
-#define DIDAL_BOTTOMALIGNED	0x00000008
-
-typedef struct _DIDEVICEIMAGEINFOA {
-	CHAR	tszImagePath[MAX_PATH];
-	DWORD	dwFlags;
-	DWORD	dwViewID;
-	RECT	rcOverlay;
-	DWORD	dwObjID;
-	DWORD	dwcValidPts;
-	POINT	rgptCalloutLine[5];
-	RECT	rcCalloutRect;
-	DWORD	dwTextAlign;
-} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
-typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
-
-typedef struct _DIDEVICEIMAGEINFOW {
-	WCHAR	tszImagePath[MAX_PATH];
-	DWORD	dwFlags;
-	DWORD	dwViewID;
-	RECT	rcOverlay;
-	DWORD	dwObjID;
-	DWORD	dwcValidPts;
-	POINT	rgptCalloutLine[5];
-	RECT	rcCalloutRect;
-	DWORD	dwTextAlign;
-} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
-typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
-
-typedef struct _DIDEVICEIMAGEINFOHEADERA {
-	DWORD	dwSize;
-	DWORD	dwSizeImageInfo;
-	DWORD	dwcViews;
-	DWORD	dwcButtons;
-	DWORD	dwcAxes;
-	DWORD	dwcPOVs;
-	DWORD	dwBufferSize;
-	DWORD	dwBufferUsed;
-	LPDIDEVICEIMAGEINFOA	lprgImageInfoArray;
-} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
-typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
-
-typedef struct _DIDEVICEIMAGEINFOHEADERW {
-	DWORD	dwSize;
-	DWORD	dwSizeImageInfo;
-	DWORD	dwcViews;
-	DWORD	dwcButtons;
-	DWORD	dwcAxes;
-	DWORD	dwcPOVs;
-	DWORD	dwBufferSize;
-	DWORD	dwBufferUsed;
-	LPDIDEVICEIMAGEINFOW	lprgImageInfoArray;
-} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
-typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
-
-DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
-DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
-DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
-
-#endif /* DI8 */
-
-
-/*****************************************************************************
- * IDirectInputEffect interface
- */
-#if (DIRECTINPUT_VERSION >= 0x0500)
-#undef INTERFACE
-#define INTERFACE IDirectInputEffect
-DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputEffect methods ***/
-    STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
-    STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
-    STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
-    STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
-    STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
-    STDMETHOD(Stop)(THIS) PURE;
-    STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
-    STDMETHOD(Download)(THIS) PURE;
-    STDMETHOD(Unload)(THIS) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputEffect_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputEffect_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInputEffect methods ***/
-#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->lpVtbl->Initialize(p,a,b,c)
-#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->lpVtbl->GetEffectGuid(p,a)
-#define IDirectInputEffect_GetParameters(p,a,b)   (p)->lpVtbl->GetParameters(p,a,b)
-#define IDirectInputEffect_SetParameters(p,a,b)   (p)->lpVtbl->SetParameters(p,a,b)
-#define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)
-#define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)
-#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->lpVtbl->GetEffectStatus(p,a)
-#define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)
-#define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)
-#define IDirectInputEffect_Escape(p,a)            (p)->lpVtbl->Escape(p,a)
-#else
-/*** IUnknown methods ***/
-#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInputEffect_AddRef(p)             (p)->AddRef()
-#define IDirectInputEffect_Release(p)            (p)->Release()
-/*** IDirectInputEffect methods ***/
-#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->Initialize(a,b,c)
-#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->GetEffectGuid(a)
-#define IDirectInputEffect_GetParameters(p,a,b)   (p)->GetParameters(a,b)
-#define IDirectInputEffect_SetParameters(p,a,b)   (p)->SetParameters(a,b)
-#define IDirectInputEffect_Start(p,a,b)           (p)->Start(a,b)
-#define IDirectInputEffect_Stop(p)                (p)->Stop()
-#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->GetEffectStatus(a)
-#define IDirectInputEffect_Download(p)            (p)->Download()
-#define IDirectInputEffect_Unload(p)              (p)->Unload()
-#define IDirectInputEffect_Escape(p,a)            (p)->Escape(a)
-#endif
-
-#endif /* DI5 */
-
-
-/*****************************************************************************
- * IDirectInputDeviceA interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDeviceA
-DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceA methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-};
-
-/*****************************************************************************
- * IDirectInputDeviceW interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDeviceW
-DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceW methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputDevice_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
-#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
-#define IDirectInputDevice_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
-#define IDirectInputDevice_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
-#define IDirectInputDevice_Acquire(p)                 (p)->lpVtbl->Acquire(p)
-#define IDirectInputDevice_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
-#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
-#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
-#define IDirectInputDevice_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
-#define IDirectInputDevice_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
-#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
-#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
-#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
-#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
-#else
-/*** IUnknown methods ***/
-#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInputDevice_AddRef(p)             (p)->AddRef()
-#define IDirectInputDevice_Release(p)            (p)->Release()
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice_GetCapabilities(p,a)       (p)->GetCapabilities(a)
-#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
-#define IDirectInputDevice_GetProperty(p,a,b)         (p)->GetProperty(a,b)
-#define IDirectInputDevice_SetProperty(p,a,b)         (p)->SetProperty(a,b)
-#define IDirectInputDevice_Acquire(p)                 (p)->Acquire()
-#define IDirectInputDevice_Unacquire(p)               (p)->Unacquire()
-#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
-#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
-#define IDirectInputDevice_SetDataFormat(p,a)         (p)->SetDataFormat(a)
-#define IDirectInputDevice_SetEventNotification(p,a)  (p)->SetEventNotification(a)
-#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
-#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
-#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
-#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
-#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
-#endif
-
-
-#if (DIRECTINPUT_VERSION >= 0x0500)
-/*****************************************************************************
- * IDirectInputDevice2A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice2A
-DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceA methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2A methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-};
-
-/*****************************************************************************
- * IDirectInputDevice2W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice2W
-DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceW methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2W methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputDevice2_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
-#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
-#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
-#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
-#define IDirectInputDevice2_Acquire(p)                 (p)->lpVtbl->Acquire(p)
-#define IDirectInputDevice2_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
-#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
-#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
-#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
-#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
-#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
-#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
-#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
-#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
-#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
-#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
-#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
-#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
-#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
-#define IDirectInputDevice2_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
-#define IDirectInputDevice2_Poll(p)                           (p)->lpVtbl->Poll(p)
-#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
-#else
-/*** IUnknown methods ***/
-#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInputDevice2_AddRef(p)             (p)->AddRef()
-#define IDirectInputDevice2_Release(p)            (p)->Release()
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->GetCapabilities(a)
-#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
-#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->GetProperty(a,b)
-#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->SetProperty(a,b)
-#define IDirectInputDevice2_Acquire(p)                 (p)->Acquire()
-#define IDirectInputDevice2_Unacquire(p)               (p)->Unacquire()
-#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
-#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
-#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->SetDataFormat(a)
-#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->SetEventNotification(a)
-#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
-#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
-#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
-#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
-#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
-#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
-#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
-#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
-#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
-#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
-#define IDirectInputDevice2_Escape(p,a)                       (p)->Escape(a)
-#define IDirectInputDevice2_Poll(p)                           (p)->Poll()
-#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
-#endif
-#endif /* DI5 */
-
-#if DIRECTINPUT_VERSION >= 0x0700
-/*****************************************************************************
- * IDirectInputDevice7A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice7A
-DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceA methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2A methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-    /*** IDirectInputDevice7A methods ***/
-    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
-    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
-};
-
-/*****************************************************************************
- * IDirectInputDevice7W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice7W
-DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceW methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2W methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-    /*** IDirectInputDevice7W methods ***/
-    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
-    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputDevice7_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputDevice7_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
-#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
-#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
-#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
-#define IDirectInputDevice7_Acquire(p)                 (p)->lpVtbl->Acquire(p)
-#define IDirectInputDevice7_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
-#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
-#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
-#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
-#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
-#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
-#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
-#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
-#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
-#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
-#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
-#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
-#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
-#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
-#define IDirectInputDevice7_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
-#define IDirectInputDevice7_Poll(p)                           (p)->lpVtbl->Poll(p)
-#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
-/*** IDirectInputDevice7 methods ***/
-#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
-#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
-#else
-/*** IUnknown methods ***/
-#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInputDevice7_AddRef(p)             (p)->AddRef()
-#define IDirectInputDevice7_Release(p)            (p)->Release()
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->GetCapabilities(a)
-#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
-#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->GetProperty(a,b)
-#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->SetProperty(a,b)
-#define IDirectInputDevice7_Acquire(p)                 (p)->Acquire()
-#define IDirectInputDevice7_Unacquire(p)               (p)->Unacquire()
-#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
-#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
-#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->SetDataFormat(a)
-#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->SetEventNotification(a)
-#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
-#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
-#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
-#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
-#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
-#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
-#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
-#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
-#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
-#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
-#define IDirectInputDevice7_Escape(p,a)                       (p)->Escape(a)
-#define IDirectInputDevice7_Poll(p)                           (p)->Poll()
-#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
-/*** IDirectInputDevice7 methods ***/
-#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
-#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
-#endif
-
-#endif /* DI7 */
-
-#if DIRECTINPUT_VERSION >= 0x0800
-/*****************************************************************************
- * IDirectInputDevice8A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice8A
-DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceA methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2A methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-    /*** IDirectInputDevice7A methods ***/
-    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
-    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
-    /*** IDirectInputDevice8A methods ***/
-    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
-    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
-    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
-};
-
-/*****************************************************************************
- * IDirectInputDevice8W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputDevice8W
-DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputDeviceW methods ***/
-    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
-    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
-    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
-    STDMETHOD(Acquire)(THIS) PURE;
-    STDMETHOD(Unacquire)(THIS) PURE;
-    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
-    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
-    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
-    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
-    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
-    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
-    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
-    /*** IDirectInputDevice2W methods ***/
-    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
-    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
-    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
-    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
-    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
-    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
-    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
-    STDMETHOD(Poll)(THIS) PURE;
-    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
-    /*** IDirectInputDevice7W methods ***/
-    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
-    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
-    /*** IDirectInputDevice8W methods ***/
-    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
-    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
-    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputDevice8_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputDevice8_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
-#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
-#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
-#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
-#define IDirectInputDevice8_Acquire(p)                 (p)->lpVtbl->Acquire(p)
-#define IDirectInputDevice8_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
-#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
-#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
-#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
-#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
-#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
-#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
-#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
-#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
-#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
-#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
-#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
-#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
-#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
-#define IDirectInputDevice8_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
-#define IDirectInputDevice8_Poll(p)                           (p)->lpVtbl->Poll(p)
-#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
-/*** IDirectInputDevice7 methods ***/
-#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
-#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
-/*** IDirectInputDevice8 methods ***/
-#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
-#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->lpVtbl->SetActionMap(p,a,b,c)
-#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->lpVtbl->GetImageInfo(p,a)
-#else
-/*** IUnknown methods ***/
-#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInputDevice8_AddRef(p)             (p)->AddRef()
-#define IDirectInputDevice8_Release(p)            (p)->Release()
-/*** IDirectInputDevice methods ***/
-#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->GetCapabilities(a)
-#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
-#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->GetProperty(a,b)
-#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->SetProperty(a,b)
-#define IDirectInputDevice8_Acquire(p)                 (p)->Acquire()
-#define IDirectInputDevice8_Unacquire(p)               (p)->Unacquire()
-#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
-#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
-#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->SetDataFormat(a)
-#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->SetEventNotification(a)
-#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
-#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
-#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
-#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
-#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
-/*** IDirectInputDevice2 methods ***/
-#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
-#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
-#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
-#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
-#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
-#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
-#define IDirectInputDevice8_Escape(p,a)                       (p)->Escape(a)
-#define IDirectInputDevice8_Poll(p)                           (p)->Poll()
-#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
-/*** IDirectInputDevice7 methods ***/
-#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
-#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
-/*** IDirectInputDevice8 methods ***/
-#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
-#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->SetActionMap(a,b,c)
-#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->GetImageInfo(a)
-#endif
-
-#endif /* DI8 */
-
-/* "Standard" Mouse report... */
-typedef struct DIMOUSESTATE {
-  LONG lX;
-  LONG lY;
-  LONG lZ;
-  BYTE rgbButtons[4];
-} DIMOUSESTATE;
-
-#if DIRECTINPUT_VERSION >= 0x0700
-/* "Standard" Mouse report for DInput 7... */
-typedef struct DIMOUSESTATE2 {
-  LONG lX;
-  LONG lY;
-  LONG lZ;
-  BYTE rgbButtons[8];
-} DIMOUSESTATE2;
-#endif /* DI7 */
-
-#define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
-#define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
-#define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
-#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
-#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
-#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
-#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
-#if DIRECTINPUT_VERSION >= 0x0700
-#define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
-#define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
-#define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
-#define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
-#endif /* DI7 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const DIDATAFORMAT c_dfDIMouse;
-#if DIRECTINPUT_VERSION >= 0x0700
-extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
-#endif /* DI7 */
-extern const DIDATAFORMAT c_dfDIKeyboard;
-#if DIRECTINPUT_VERSION >= 0x0500
-extern const DIDATAFORMAT c_dfDIJoystick;
-extern const DIDATAFORMAT c_dfDIJoystick2;
-#endif /* DI5 */
-#ifdef __cplusplus
-};
-#endif
-
-/*****************************************************************************
- * IDirectInputA interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputA
-DECLARE_INTERFACE_(IDirectInputA,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputA methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-};
-
-/*****************************************************************************
- * IDirectInputW interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInputW
-DECLARE_INTERFACE_(IDirectInputW,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputW methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInput methods ***/
-#define IDirectInput_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-#else
-/*** IUnknown methods ***/
-#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInput_AddRef(p)             (p)->AddRef()
-#define IDirectInput_Release(p)            (p)->Release()
-/*** IDirectInput methods ***/
-#define IDirectInput_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
-#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
-#define IDirectInput_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
-#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
-#define IDirectInput_Initialize(p,a,b)      (p)->Initialize(a,b)
-#endif
-
-/*****************************************************************************
- * IDirectInput2A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput2A
-DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputA methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    /*** IDirectInput2A methods ***/
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
-};
-
-/*****************************************************************************
- * IDirectInput2W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput2W
-DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputW methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    /*** IDirectInput2W methods ***/
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput2_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput2_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInput methods ***/
-#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput2_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput2_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-/*** IDirectInput2 methods ***/
-#define IDirectInput2_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
-#else
-/*** IUnknown methods ***/
-#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInput2_AddRef(p)             (p)->AddRef()
-#define IDirectInput2_Release(p)            (p)->Release()
-/*** IDirectInput methods ***/
-#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
-#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
-#define IDirectInput2_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
-#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
-#define IDirectInput2_Initialize(p,a,b)      (p)->Initialize(a,b)
-/*** IDirectInput2 methods ***/
-#define IDirectInput2_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
-#endif
-
-/*****************************************************************************
- * IDirectInput7A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput7A
-DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputA methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    /*** IDirectInput2A methods ***/
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
-    /*** IDirectInput7A methods ***/
-    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
-};
-
-/*****************************************************************************
- * IDirectInput7W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput7W
-DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInputW methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    /*** IDirectInput2W methods ***/
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
-    /*** IDirectInput7W methods ***/
-    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
-};
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput7_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput7_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInput methods ***/
-#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput7_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput7_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-/*** IDirectInput2 methods ***/
-#define IDirectInput7_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
-/*** IDirectInput7 methods ***/
-#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
-#else
-/*** IUnknown methods ***/
-#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInput7_AddRef(p)             (p)->AddRef()
-#define IDirectInput7_Release(p)            (p)->Release()
-/*** IDirectInput methods ***/
-#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
-#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
-#define IDirectInput7_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
-#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
-#define IDirectInput7_Initialize(p,a,b)      (p)->Initialize(a,b)
-/*** IDirectInput2 methods ***/
-#define IDirectInput7_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
-/*** IDirectInput7 methods ***/
-#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
-#endif
-
-
-#if DIRECTINPUT_VERSION >= 0x0800
-/*****************************************************************************
- * IDirectInput8A interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput8A
-DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInput8A methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
-    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
-};
-
-/*****************************************************************************
- * IDirectInput8W interface
- */
-#undef INTERFACE
-#define INTERFACE IDirectInput8W
-DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
-{
-    /*** IUnknown methods ***/
-    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
-    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirectInput8W methods ***/
-    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
-    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
-    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
-    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
-    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
-    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
-    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
-};
-#undef INTERFACE
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-/*** IUnknown methods ***/
-#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput8_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput8_Release(p)            (p)->lpVtbl->Release(p)
-/*** IDirectInput8 methods ***/
-#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput8_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput8_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
-#define IDirectInput8_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
-#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
-#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
-#else
-/*** IUnknown methods ***/
-#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirectInput8_AddRef(p)             (p)->AddRef()
-#define IDirectInput8_Release(p)            (p)->Release()
-/*** IDirectInput8 methods ***/
-#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->CreateDevice(a,b,c)
-#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->EnumDevices(a,b,c,d)
-#define IDirectInput8_GetDeviceStatus(p,a)        (p)->GetDeviceStatus(a)
-#define IDirectInput8_RunControlPanel(p,a,b)      (p)->RunControlPanel(a,b)
-#define IDirectInput8_Initialize(p,a,b)           (p)->Initialize(a,b)
-#define IDirectInput8_FindDevice(p,a,b,c)         (p)->FindDevice(a,b,c)
-#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
-#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
-#endif
-
-#endif /* DI8 */
-
-/* Export functions */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if DIRECTINPUT_VERSION >= 0x0800
-HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
-#else /* DI < 8 */
-HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
-HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
-#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
-
-HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
-#endif /* DI8 */
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* __DINPUT_INCLUDED__ */
+/*
+ * Copyright (C) the Wine project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __DINPUT_INCLUDED__
+#define __DINPUT_INCLUDED__
+
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#include <_mingw_dxhelper.h>
+
+#ifndef DIRECTINPUT_VERSION
+#define DIRECTINPUT_VERSION	0x0800
+#endif
+
+/* Classes */
+DEFINE_GUID(CLSID_DirectInput,		0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectInputDevice,	0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+DEFINE_GUID(CLSID_DirectInput8,		0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(CLSID_DirectInputDevice8,	0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* Interfaces */
+DEFINE_GUID(IID_IDirectInputA,		0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputW,		0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput2A,		0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput2W,		0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInput7A,		0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInput7W,		0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInput8A,		0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInput8W,		0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
+DEFINE_GUID(IID_IDirectInputDeviceA,	0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDeviceW,	0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2A,	0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice2W,	0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(IID_IDirectInputDevice7A,	0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInputDevice7W,	0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
+DEFINE_GUID(IID_IDirectInputDevice8A,	0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputDevice8W,	0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
+DEFINE_GUID(IID_IDirectInputEffect,	0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+
+/* Predefined object types */
+DEFINE_GUID(GUID_XAxis,	0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_YAxis,	0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_ZAxis,	0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RxAxis,0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RyAxis,0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_RzAxis,0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Key,	0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_POV,	0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* Predefined product GUIDs */
+DEFINE_GUID(GUID_SysMouse,	0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboard,	0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_Joystick,	0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm,	0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysMouseEm2,	0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm,	0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+
+/* predefined forcefeedback effects */
+DEFINE_GUID(GUID_ConstantForce,	0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_RampForce,	0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Square,	0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Sine,		0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Triangle,	0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_SawtoothUp,	0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_SawtoothDown,	0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Spring,	0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Damper,	0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Inertia,	0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_Friction,	0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+DEFINE_GUID(GUID_CustomForce,	0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
+
+typedef struct IDirectInputA *LPDIRECTINPUTA;
+typedef struct IDirectInputW *LPDIRECTINPUTW;
+typedef struct IDirectInput2A *LPDIRECTINPUT2A;
+typedef struct IDirectInput2W *LPDIRECTINPUT2W;
+typedef struct IDirectInput7A *LPDIRECTINPUT7A;
+typedef struct IDirectInput7W *LPDIRECTINPUT7W;
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct IDirectInput8A *LPDIRECTINPUT8A;
+typedef struct IDirectInput8W *LPDIRECTINPUT8W;
+#endif /* DI8 */
+typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
+typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
+typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x0700
+typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
+typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
+#endif /* DI7 */
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
+typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
+#endif /* DI8 */
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
+#endif /* DI5 */
+typedef struct SysKeyboardA *LPSYSKEYBOARDA;
+typedef struct SysMouseA *LPSYSMOUSEA;
+
+#define IID_IDirectInput WINELIB_NAME_AW(IID_IDirectInput)
+#define IDirectInput WINELIB_NAME_AW(IDirectInput)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT)
+#define IID_IDirectInput2 WINELIB_NAME_AW(IID_IDirectInput2)
+#define IDirectInput2 WINELIB_NAME_AW(IDirectInput2)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT2)
+#define IID_IDirectInput7 WINELIB_NAME_AW(IID_IDirectInput7)
+#define IDirectInput7 WINELIB_NAME_AW(IDirectInput7)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT7)
+#if DIRECTINPUT_VERSION >= 0x0800
+#define IID_IDirectInput8 WINELIB_NAME_AW(IID_IDirectInput8)
+#define IDirectInput8 WINELIB_NAME_AW(IDirectInput8)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUT8)
+#endif /* DI8 */
+#define IID_IDirectInputDevice WINELIB_NAME_AW(IID_IDirectInputDevice)
+#define IDirectInputDevice WINELIB_NAME_AW(IDirectInputDevice)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE)
+#if DIRECTINPUT_VERSION >= 0x0500
+#define IID_IDirectInputDevice2 WINELIB_NAME_AW(IID_IDirectInputDevice2)
+#define IDirectInputDevice2 WINELIB_NAME_AW(IDirectInputDevice2)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE2)
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x0700
+#define IID_IDirectInputDevice7 WINELIB_NAME_AW(IID_IDirectInputDevice7)
+#define IDirectInputDevice7 WINELIB_NAME_AW(IDirectInputDevice7)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE7)
+#endif /* DI7 */
+#if DIRECTINPUT_VERSION >= 0x0800
+#define IID_IDirectInputDevice8 WINELIB_NAME_AW(IID_IDirectInputDevice8)
+#define IDirectInputDevice8 WINELIB_NAME_AW(IDirectInputDevice8)
+DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
+#endif /* DI8 */
+
+#define DI_OK                           S_OK
+#define DI_NOTATTACHED                  S_FALSE
+#define DI_BUFFEROVERFLOW               S_FALSE
+#define DI_PROPNOEFFECT                 S_FALSE
+#define DI_NOEFFECT                     S_FALSE
+#define DI_POLLEDDEVICE                 ((HRESULT)0x00000002L)
+#define DI_DOWNLOADSKIPPED              ((HRESULT)0x00000003L)
+#define DI_EFFECTRESTARTED              ((HRESULT)0x00000004L)
+#define DI_TRUNCATED                    ((HRESULT)0x00000008L)
+#define DI_SETTINGSNOTSAVED             ((HRESULT)0x0000000BL)
+#define DI_TRUNCATEDANDRESTARTED        ((HRESULT)0x0000000CL)
+#define DI_WRITEPROTECT                 ((HRESULT)0x00000013L)
+
+#define DIERR_OLDDIRECTINPUTVERSION     \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
+#define DIERR_BETADIRECTINPUTVERSION    \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
+#define DIERR_BADDRIVERVER              \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
+#define DIERR_DEVICENOTREG              REGDB_E_CLASSNOTREG
+#define DIERR_NOTFOUND                  \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
+#define DIERR_OBJECTNOTFOUND            \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
+#define DIERR_INVALIDPARAM              E_INVALIDARG
+#define DIERR_NOINTERFACE               E_NOINTERFACE
+#define DIERR_GENERIC                   E_FAIL
+#define DIERR_OUTOFMEMORY               E_OUTOFMEMORY
+#define DIERR_UNSUPPORTED               E_NOTIMPL
+#define DIERR_NOTINITIALIZED            \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
+#define DIERR_ALREADYINITIALIZED        \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
+#define DIERR_NOAGGREGATION             CLASS_E_NOAGGREGATION
+#define DIERR_OTHERAPPHASPRIO           E_ACCESSDENIED
+#define DIERR_INPUTLOST                 \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
+#define DIERR_ACQUIRED                  \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
+#define DIERR_NOTACQUIRED               \
+    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
+#define DIERR_READONLY                  E_ACCESSDENIED
+#define DIERR_HANDLEEXISTS              E_ACCESSDENIED
+#ifndef E_PENDING
+#define E_PENDING                       0x8000000AL
+#endif
+#define DIERR_INSUFFICIENTPRIVS         0x80040200L
+#define DIERR_DEVICEFULL                0x80040201L
+#define DIERR_MOREDATA                  0x80040202L
+#define DIERR_NOTDOWNLOADED             0x80040203L
+#define DIERR_HASEFFECTS                0x80040204L
+#define DIERR_NOTEXCLUSIVEACQUIRED      0x80040205L
+#define DIERR_INCOMPLETEEFFECT          0x80040206L
+#define DIERR_NOTBUFFERED               0x80040207L
+#define DIERR_EFFECTPLAYING             0x80040208L
+#define DIERR_UNPLUGGED                 0x80040209L
+#define DIERR_REPORTFULL                0x8004020AL
+#define DIERR_MAPFILEFAIL               0x8004020BL
+
+#define DIENUM_STOP                     0
+#define DIENUM_CONTINUE                 1
+
+#define DIEDFL_ALLDEVICES               0x00000000
+#define DIEDFL_ATTACHEDONLY             0x00000001
+#define DIEDFL_FORCEFEEDBACK            0x00000100
+#define DIEDFL_INCLUDEALIASES           0x00010000
+#define DIEDFL_INCLUDEPHANTOMS          0x00020000
+#define DIEDFL_INCLUDEHIDDEN		0x00040000
+
+#define DIDEVTYPE_DEVICE                1
+#define DIDEVTYPE_MOUSE                 2
+#define DIDEVTYPE_KEYBOARD              3
+#define DIDEVTYPE_JOYSTICK              4
+#define DIDEVTYPE_HID                   0x00010000
+
+#define DI8DEVCLASS_ALL             0
+#define DI8DEVCLASS_DEVICE          1
+#define DI8DEVCLASS_POINTER         2
+#define DI8DEVCLASS_KEYBOARD        3
+#define DI8DEVCLASS_GAMECTRL        4
+
+#define DI8DEVTYPE_DEVICE           0x11
+#define DI8DEVTYPE_MOUSE            0x12
+#define DI8DEVTYPE_KEYBOARD         0x13
+#define DI8DEVTYPE_JOYSTICK         0x14
+#define DI8DEVTYPE_GAMEPAD          0x15
+#define DI8DEVTYPE_DRIVING          0x16
+#define DI8DEVTYPE_FLIGHT           0x17
+#define DI8DEVTYPE_1STPERSON        0x18
+#define DI8DEVTYPE_DEVICECTRL       0x19
+#define DI8DEVTYPE_SCREENPOINTER    0x1A
+#define DI8DEVTYPE_REMOTE           0x1B
+#define DI8DEVTYPE_SUPPLEMENTAL     0x1C
+	
+#define DIDEVTYPEMOUSE_UNKNOWN          1
+#define DIDEVTYPEMOUSE_TRADITIONAL      2
+#define DIDEVTYPEMOUSE_FINGERSTICK      3
+#define DIDEVTYPEMOUSE_TOUCHPAD         4
+#define DIDEVTYPEMOUSE_TRACKBALL        5
+
+#define DIDEVTYPEKEYBOARD_UNKNOWN       0
+#define DIDEVTYPEKEYBOARD_PCXT          1
+#define DIDEVTYPEKEYBOARD_OLIVETTI      2
+#define DIDEVTYPEKEYBOARD_PCAT          3
+#define DIDEVTYPEKEYBOARD_PCENH         4
+#define DIDEVTYPEKEYBOARD_NOKIA1050     5
+#define DIDEVTYPEKEYBOARD_NOKIA9140     6
+#define DIDEVTYPEKEYBOARD_NEC98         7
+#define DIDEVTYPEKEYBOARD_NEC98LAPTOP   8
+#define DIDEVTYPEKEYBOARD_NEC98106      9
+#define DIDEVTYPEKEYBOARD_JAPAN106     10
+#define DIDEVTYPEKEYBOARD_JAPANAX      11
+#define DIDEVTYPEKEYBOARD_J3100        12
+
+#define DIDEVTYPEJOYSTICK_UNKNOWN       1
+#define DIDEVTYPEJOYSTICK_TRADITIONAL   2
+#define DIDEVTYPEJOYSTICK_FLIGHTSTICK   3
+#define DIDEVTYPEJOYSTICK_GAMEPAD       4
+#define DIDEVTYPEJOYSTICK_RUDDER        5
+#define DIDEVTYPEJOYSTICK_WHEEL         6
+#define DIDEVTYPEJOYSTICK_HEADTRACKER   7
+
+#define DI8DEVTYPEMOUSE_UNKNOWN                     1
+#define DI8DEVTYPEMOUSE_TRADITIONAL                 2
+#define DI8DEVTYPEMOUSE_FINGERSTICK                 3
+#define DI8DEVTYPEMOUSE_TOUCHPAD                    4
+#define DI8DEVTYPEMOUSE_TRACKBALL                   5
+#define DI8DEVTYPEMOUSE_ABSOLUTE                    6
+
+#define DI8DEVTYPEKEYBOARD_UNKNOWN                  0
+#define DI8DEVTYPEKEYBOARD_PCXT                     1
+#define DI8DEVTYPEKEYBOARD_OLIVETTI                 2
+#define DI8DEVTYPEKEYBOARD_PCAT                     3
+#define DI8DEVTYPEKEYBOARD_PCENH                    4
+#define DI8DEVTYPEKEYBOARD_NOKIA1050                5
+#define DI8DEVTYPEKEYBOARD_NOKIA9140                6
+#define DI8DEVTYPEKEYBOARD_NEC98                    7
+#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP              8
+#define DI8DEVTYPEKEYBOARD_NEC98106                 9
+#define DI8DEVTYPEKEYBOARD_JAPAN106                10
+#define DI8DEVTYPEKEYBOARD_JAPANAX                 11
+#define DI8DEVTYPEKEYBOARD_J3100                   12
+
+#define DI8DEVTYPE_LIMITEDGAMESUBTYPE               1
+
+#define DI8DEVTYPEJOYSTICK_LIMITED                  DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEJOYSTICK_STANDARD                 2
+
+#define DI8DEVTYPEGAMEPAD_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEGAMEPAD_STANDARD                  2
+#define DI8DEVTYPEGAMEPAD_TILT                      3
+
+#define DI8DEVTYPEDRIVING_LIMITED                   DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEDRIVING_COMBINEDPEDALS            2
+#define DI8DEVTYPEDRIVING_DUALPEDALS                3
+#define DI8DEVTYPEDRIVING_THREEPEDALS               4
+#define DI8DEVTYPEDRIVING_HANDHELD                  5
+
+#define DI8DEVTYPEFLIGHT_LIMITED                    DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPEFLIGHT_STICK                      2
+#define DI8DEVTYPEFLIGHT_YOKE                       3
+#define DI8DEVTYPEFLIGHT_RC                         4
+
+#define DI8DEVTYPE1STPERSON_LIMITED                 DI8DEVTYPE_LIMITEDGAMESUBTYPE
+#define DI8DEVTYPE1STPERSON_UNKNOWN                 2
+#define DI8DEVTYPE1STPERSON_SIXDOF                  3
+#define DI8DEVTYPE1STPERSON_SHOOTER                 4
+
+#define DI8DEVTYPESCREENPTR_UNKNOWN                 2
+#define DI8DEVTYPESCREENPTR_LIGHTGUN                3
+#define DI8DEVTYPESCREENPTR_LIGHTPEN                4
+#define DI8DEVTYPESCREENPTR_TOUCH                   5
+
+#define DI8DEVTYPEREMOTE_UNKNOWN                    2
+
+#define DI8DEVTYPEDEVICECTRL_UNKNOWN                2
+#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION         3
+#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
+
+#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN              2
+#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER    3
+#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER          4
+#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER          5
+#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE       6
+#define DI8DEVTYPESUPPLEMENTAL_SHIFTER              7
+#define DI8DEVTYPESUPPLEMENTAL_THROTTLE             8
+#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE        9
+#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS      10
+#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS          11
+#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS         12
+#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS        13
+	
+#define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
+#define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
+
+typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
+    DWORD   dwSize;
+    GUID    guidType;
+    DWORD   dwOfs;
+    DWORD   dwType;
+    DWORD   dwFlags;
+    CHAR    tszName[MAX_PATH];
+} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
+typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
+typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
+    DWORD   dwSize;
+    GUID    guidType;
+    DWORD   dwOfs;
+    DWORD   dwType;
+    DWORD   dwFlags;
+    WCHAR   tszName[MAX_PATH];
+} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
+typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE_DX3)
+
+typedef struct DIDEVICEOBJECTINSTANCEA {
+    DWORD	dwSize;
+    GUID	guidType;
+    DWORD	dwOfs;
+    DWORD	dwType;
+    DWORD	dwFlags;
+    CHAR	tszName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+    DWORD	dwFFMaxForce;
+    DWORD	dwFFForceResolution;
+    WORD	wCollectionNumber;
+    WORD	wDesignatorIndex;
+    WORD	wUsagePage;
+    WORD	wUsage;
+    DWORD	dwDimension;
+    WORD	wExponent;
+    WORD	wReserved;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
+typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
+
+typedef struct DIDEVICEOBJECTINSTANCEW {
+    DWORD	dwSize;
+    GUID	guidType;
+    DWORD	dwOfs;
+    DWORD	dwType;
+    DWORD	dwFlags;
+    WCHAR	tszName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+    DWORD	dwFFMaxForce;
+    DWORD	dwFFForceResolution;
+    WORD	wCollectionNumber;
+    WORD	wDesignatorIndex;
+    WORD	wUsagePage;
+    WORD	wUsage;
+    DWORD	dwDimension;
+    WORD	wExponent;
+    WORD	wReserved;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
+typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE)
+
+typedef struct DIDEVICEINSTANCE_DX3A {
+    DWORD   dwSize;
+    GUID    guidInstance;
+    GUID    guidProduct;
+    DWORD   dwDevType;
+    CHAR    tszInstanceName[MAX_PATH];
+    CHAR    tszProductName[MAX_PATH];
+} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
+typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
+typedef struct DIDEVICEINSTANCE_DX3W {
+    DWORD   dwSize;
+    GUID    guidInstance;
+    GUID    guidProduct;
+    DWORD   dwDevType;
+    WCHAR   tszInstanceName[MAX_PATH];
+    WCHAR   tszProductName[MAX_PATH];
+} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
+typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE_DX3)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE_DX3)
+
+typedef struct DIDEVICEINSTANCEA {
+    DWORD	dwSize;
+    GUID	guidInstance;
+    GUID	guidProduct;
+    DWORD	dwDevType;
+    CHAR	tszInstanceName[MAX_PATH];
+    CHAR	tszProductName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+    GUID	guidFFDriver;
+    WORD	wUsagePage;
+    WORD	wUsage;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
+typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
+
+typedef struct DIDEVICEINSTANCEW {
+    DWORD	dwSize;
+    GUID	guidInstance;
+    GUID	guidProduct;
+    DWORD	dwDevType;
+    WCHAR	tszInstanceName[MAX_PATH];
+    WCHAR	tszProductName[MAX_PATH];
+#if(DIRECTINPUT_VERSION >= 0x0500)
+    GUID	guidFFDriver;
+    WORD	wUsagePage;
+    WORD	wUsage;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
+typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE)
+
+typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESCALLBACK)
+
+#define DIEDBS_MAPPEDPRI1		0x00000001
+#define DIEDBS_MAPPEDPRI2		0x00000002
+#define DIEDBS_RECENTDEVICE		0x00000010
+#define DIEDBS_NEWDEVICE		0x00000020
+
+#define DIEDBSFL_ATTACHEDONLY		0x00000000
+#define DIEDBSFL_THISUSER		0x00000010
+#define DIEDBSFL_FORCEFEEDBACK		DIEDFL_FORCEFEEDBACK
+#define DIEDBSFL_AVAILABLEDEVICES	0x00001000
+#define DIEDBSFL_MULTIMICEKEYBOARDS	0x00002000
+#define DIEDBSFL_NONGAMINGDEVICES	0x00004000
+#define DIEDBSFL_VALID			0x00007110
+
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA,LPDIRECTINPUTDEVICE8A,DWORD,DWORD,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW,LPDIRECTINPUTDEVICE8W,DWORD,DWORD,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICESBYSEMANTICSCB)
+#endif
+
+typedef BOOL (CALLBACK *LPDICONFIGUREDEVICESCALLBACK)(LPUNKNOWN,LPVOID);
+
+typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA,LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW,LPVOID);
+DECL_WINELIB_TYPE_AW(LPDIENUMDEVICEOBJECTSCALLBACK)
+
+#if DIRECTINPUT_VERSION >= 0x0500
+typedef BOOL (CALLBACK *LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
+#endif
+
+#define DIK_ESCAPE          0x01
+#define DIK_1               0x02
+#define DIK_2               0x03
+#define DIK_3               0x04
+#define DIK_4               0x05
+#define DIK_5               0x06
+#define DIK_6               0x07
+#define DIK_7               0x08
+#define DIK_8               0x09
+#define DIK_9               0x0A
+#define DIK_0               0x0B
+#define DIK_MINUS           0x0C    /* - on main keyboard */
+#define DIK_EQUALS          0x0D
+#define DIK_BACK            0x0E    /* backspace */
+#define DIK_TAB             0x0F
+#define DIK_Q               0x10
+#define DIK_W               0x11
+#define DIK_E               0x12
+#define DIK_R               0x13
+#define DIK_T               0x14
+#define DIK_Y               0x15
+#define DIK_U               0x16
+#define DIK_I               0x17
+#define DIK_O               0x18
+#define DIK_P               0x19
+#define DIK_LBRACKET        0x1A
+#define DIK_RBRACKET        0x1B
+#define DIK_RETURN          0x1C    /* Enter on main keyboard */
+#define DIK_LCONTROL        0x1D
+#define DIK_A               0x1E
+#define DIK_S               0x1F
+#define DIK_D               0x20
+#define DIK_F               0x21
+#define DIK_G               0x22
+#define DIK_H               0x23
+#define DIK_J               0x24
+#define DIK_K               0x25
+#define DIK_L               0x26
+#define DIK_SEMICOLON       0x27
+#define DIK_APOSTROPHE      0x28
+#define DIK_GRAVE           0x29    /* accent grave */
+#define DIK_LSHIFT          0x2A
+#define DIK_BACKSLASH       0x2B
+#define DIK_Z               0x2C
+#define DIK_X               0x2D
+#define DIK_C               0x2E
+#define DIK_V               0x2F
+#define DIK_B               0x30
+#define DIK_N               0x31
+#define DIK_M               0x32
+#define DIK_COMMA           0x33
+#define DIK_PERIOD          0x34    /* . on main keyboard */
+#define DIK_SLASH           0x35    /* / on main keyboard */
+#define DIK_RSHIFT          0x36
+#define DIK_MULTIPLY        0x37    /* * on numeric keypad */
+#define DIK_LMENU           0x38    /* left Alt */
+#define DIK_SPACE           0x39
+#define DIK_CAPITAL         0x3A
+#define DIK_F1              0x3B
+#define DIK_F2              0x3C
+#define DIK_F3              0x3D
+#define DIK_F4              0x3E
+#define DIK_F5              0x3F
+#define DIK_F6              0x40
+#define DIK_F7              0x41
+#define DIK_F8              0x42
+#define DIK_F9              0x43
+#define DIK_F10             0x44
+#define DIK_NUMLOCK         0x45
+#define DIK_SCROLL          0x46    /* Scroll Lock */
+#define DIK_NUMPAD7         0x47
+#define DIK_NUMPAD8         0x48
+#define DIK_NUMPAD9         0x49
+#define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
+#define DIK_NUMPAD4         0x4B
+#define DIK_NUMPAD5         0x4C
+#define DIK_NUMPAD6         0x4D
+#define DIK_ADD             0x4E    /* + on numeric keypad */
+#define DIK_NUMPAD1         0x4F
+#define DIK_NUMPAD2         0x50
+#define DIK_NUMPAD3         0x51
+#define DIK_NUMPAD0         0x52
+#define DIK_DECIMAL         0x53    /* . on numeric keypad */
+#define DIK_OEM_102         0x56    /* < > | on UK/Germany keyboards */
+#define DIK_F11             0x57
+#define DIK_F12             0x58
+#define DIK_F13             0x64    /*                     (NEC PC98) */
+#define DIK_F14             0x65    /*                     (NEC PC98) */
+#define DIK_F15             0x66    /*                     (NEC PC98) */
+#define DIK_KANA            0x70    /* (Japanese keyboard)            */
+#define DIK_ABNT_C1         0x73    /* / ? on Portugese (Brazilian) keyboards */
+#define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
+#define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
+#define DIK_YEN             0x7D    /* (Japanese keyboard)            */
+#define DIK_ABNT_C2         0x7E    /* Numpad . on Portugese (Brazilian) keyboards */
+#define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
+#define DIK_CIRCUMFLEX      0x90    /* (Japanese keyboard)            */
+#define DIK_AT              0x91    /*                     (NEC PC98) */
+#define DIK_COLON           0x92    /*                     (NEC PC98) */
+#define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
+#define DIK_KANJI           0x94    /* (Japanese keyboard)            */
+#define DIK_STOP            0x95    /*                     (NEC PC98) */
+#define DIK_AX              0x96    /*                     (Japan AX) */
+#define DIK_UNLABELED       0x97    /*                        (J3100) */
+#define DIK_NEXTTRACK       0x99    /* Next Track */
+#define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
+#define DIK_RCONTROL        0x9D
+#define DIK_MUTE	    0xA0    /* Mute */
+#define DIK_CALCULATOR      0xA1    /* Calculator */
+#define DIK_PLAYPAUSE       0xA2    /* Play / Pause */
+#define DIK_MEDIASTOP       0xA4    /* Media Stop */
+#define DIK_VOLUMEDOWN      0xAE    /* Volume - */
+#define DIK_VOLUMEUP        0xB0    /* Volume + */
+#define DIK_WEBHOME         0xB2    /* Web home */
+#define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
+#define DIK_DIVIDE          0xB5    /* / on numeric keypad */
+#define DIK_SYSRQ           0xB7
+#define DIK_RMENU           0xB8    /* right Alt */
+#define DIK_PAUSE           0xC5    /* Pause */
+#define DIK_HOME            0xC7    /* Home on arrow keypad */
+#define DIK_UP              0xC8    /* UpArrow on arrow keypad */
+#define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
+#define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
+#define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
+#define DIK_END             0xCF    /* End on arrow keypad */
+#define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
+#define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
+#define DIK_INSERT          0xD2    /* Insert on arrow keypad */
+#define DIK_DELETE          0xD3    /* Delete on arrow keypad */
+#define DIK_LWIN            0xDB    /* Left Windows key */
+#define DIK_RWIN            0xDC    /* Right Windows key */
+#define DIK_APPS            0xDD    /* AppMenu key */
+#define DIK_POWER           0xDE
+#define DIK_SLEEP           0xDF
+#define DIK_WAKE            0xE3    /* System Wake */
+#define DIK_WEBSEARCH       0xE5    /* Web Search */
+#define DIK_WEBFAVORITES    0xE6    /* Web Favorites */
+#define DIK_WEBREFRESH      0xE7    /* Web Refresh */
+#define DIK_WEBSTOP         0xE8    /* Web Stop */
+#define DIK_WEBFORWARD      0xE9    /* Web Forward */
+#define DIK_WEBBACK         0xEA    /* Web Back */
+#define DIK_MYCOMPUTER      0xEB    /* My Computer */
+#define DIK_MAIL            0xEC    /* Mail */
+#define DIK_MEDIASELECT     0xED    /* Media Select */
+
+#define DIK_BACKSPACE       DIK_BACK            /* backspace */
+#define DIK_NUMPADSTAR      DIK_MULTIPLY        /* * on numeric keypad */
+#define DIK_LALT            DIK_LMENU           /* left Alt */
+#define DIK_CAPSLOCK        DIK_CAPITAL         /* CapsLock */
+#define DIK_NUMPADMINUS     DIK_SUBTRACT        /* - on numeric keypad */
+#define DIK_NUMPADPLUS      DIK_ADD             /* + on numeric keypad */
+#define DIK_NUMPADPERIOD    DIK_DECIMAL         /* . on numeric keypad */
+#define DIK_NUMPADSLASH     DIK_DIVIDE          /* / on numeric keypad */
+#define DIK_RALT            DIK_RMENU           /* right Alt */
+#define DIK_UPARROW         DIK_UP              /* UpArrow on arrow keypad */
+#define DIK_PGUP            DIK_PRIOR           /* PgUp on arrow keypad */
+#define DIK_LEFTARROW       DIK_LEFT            /* LeftArrow on arrow keypad */
+#define DIK_RIGHTARROW      DIK_RIGHT           /* RightArrow on arrow keypad */
+#define DIK_DOWNARROW       DIK_DOWN            /* DownArrow on arrow keypad */
+#define DIK_PGDN            DIK_NEXT            /* PgDn on arrow keypad */
+
+#define DIDFT_ALL		0x00000000
+#define DIDFT_RELAXIS		0x00000001
+#define DIDFT_ABSAXIS		0x00000002
+#define DIDFT_AXIS		0x00000003
+#define DIDFT_PSHBUTTON		0x00000004
+#define DIDFT_TGLBUTTON		0x00000008
+#define DIDFT_BUTTON		0x0000000C
+#define DIDFT_POV		0x00000010
+#define DIDFT_COLLECTION	0x00000040
+#define DIDFT_NODATA		0x00000080
+#define DIDFT_ANYINSTANCE	0x00FFFF00
+#define DIDFT_INSTANCEMASK	DIDFT_ANYINSTANCE
+#define DIDFT_MAKEINSTANCE(n)	((WORD)(n) << 8)
+#define DIDFT_GETTYPE(n)	LOBYTE(n)
+#define DIDFT_GETINSTANCE(n)	LOWORD((n) >> 8)
+#define DIDFT_FFACTUATOR	0x01000000
+#define DIDFT_FFEFFECTTRIGGER	0x02000000
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIDFT_OUTPUT		0x10000000
+#define DIDFT_VENDORDEFINED	0x04000000
+#define DIDFT_ALIAS		0x08000000
+#endif /* DI5a */
+#ifndef DIDFT_OPTIONAL
+#define DIDFT_OPTIONAL		0x80000000
+#endif
+#define DIDFT_ENUMCOLLECTION(n)	((WORD)(n) << 8)
+#define DIDFT_NOCOLLECTION	0x00FFFF00
+
+#define DIDF_ABSAXIS		0x00000001
+#define DIDF_RELAXIS		0x00000002
+
+#define DIGDD_PEEK		0x00000001
+
+#define DISEQUENCE_COMPARE(dwSq1,cmp,dwSq2) ((int)((dwSq1) - (dwSq2)) cmp 0)
+
+typedef struct DIDEVICEOBJECTDATA_DX3 {
+    DWORD	dwOfs;
+    DWORD	dwData;
+    DWORD	dwTimeStamp;
+    DWORD	dwSequence;
+} DIDEVICEOBJECTDATA_DX3,*LPDIDEVICEOBJECTDATA_DX3;
+typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX3;
+
+typedef struct DIDEVICEOBJECTDATA {
+    DWORD	dwOfs;
+    DWORD	dwData;
+    DWORD	dwTimeStamp;
+    DWORD	dwSequence;
+#if(DIRECTINPUT_VERSION >= 0x0800)
+    UINT_PTR	uAppData;
+#endif /* DIRECTINPUT_VERSION >= 0x0800 */
+} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
+typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
+
+typedef struct _DIOBJECTDATAFORMAT {
+    const GUID *pguid;
+    DWORD	dwOfs;
+    DWORD	dwType;
+    DWORD	dwFlags;
+} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
+typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
+
+typedef struct _DIDATAFORMAT {
+    DWORD			dwSize;
+    DWORD			dwObjSize;
+    DWORD			dwFlags;
+    DWORD			dwDataSize;
+    DWORD			dwNumObjs;
+    LPDIOBJECTDATAFORMAT	rgodf;
+} DIDATAFORMAT, *LPDIDATAFORMAT;
+typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
+
+#if DIRECTINPUT_VERSION >= 0x0500
+#define DIDOI_FFACTUATOR	0x00000001
+#define DIDOI_FFEFFECTTRIGGER	0x00000002
+#define DIDOI_POLLED		0x00008000
+#define DIDOI_ASPECTPOSITION	0x00000100
+#define DIDOI_ASPECTVELOCITY	0x00000200
+#define DIDOI_ASPECTACCEL	0x00000300
+#define DIDOI_ASPECTFORCE	0x00000400
+#define DIDOI_ASPECTMASK	0x00000F00
+#endif /* DI5 */
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIDOI_GUIDISUSAGE	0x00010000
+#endif /* DI5a */
+
+typedef struct DIPROPHEADER {
+    DWORD	dwSize;
+    DWORD	dwHeaderSize;
+    DWORD	dwObj;
+    DWORD	dwHow;
+} DIPROPHEADER,*LPDIPROPHEADER;
+typedef const DIPROPHEADER *LPCDIPROPHEADER;
+
+#define DIPH_DEVICE	0
+#define DIPH_BYOFFSET	1
+#define DIPH_BYID	2
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIPH_BYUSAGE	3
+
+#define DIMAKEUSAGEDWORD(UsagePage, Usage) (DWORD)MAKELONG(Usage, UsagePage)
+#endif /* DI5a */
+
+typedef struct DIPROPDWORD {
+	DIPROPHEADER	diph;
+	DWORD		dwData;
+} DIPROPDWORD, *LPDIPROPDWORD;
+typedef const DIPROPDWORD *LPCDIPROPDWORD;
+
+typedef struct DIPROPRANGE {
+	DIPROPHEADER	diph;
+	LONG		lMin;
+	LONG		lMax;
+} DIPROPRANGE, *LPDIPROPRANGE;
+typedef const DIPROPRANGE *LPCDIPROPRANGE;
+
+#define DIPROPRANGE_NOMIN	((LONG)0x80000000)
+#define DIPROPRANGE_NOMAX	((LONG)0x7FFFFFFF)
+
+#if DIRECTINPUT_VERSION >= 0x050a
+typedef struct DIPROPCAL {
+	DIPROPHEADER diph;
+	LONG	lMin;
+	LONG	lCenter;
+	LONG	lMax;
+} DIPROPCAL, *LPDIPROPCAL;
+typedef const DIPROPCAL *LPCDIPROPCAL;
+
+typedef struct DIPROPCALPOV {
+	DIPROPHEADER	diph;
+	LONG		lMin[5];
+	LONG		lMax[5];
+} DIPROPCALPOV, *LPDIPROPCALPOV;
+typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
+
+typedef struct DIPROPGUIDANDPATH {
+	DIPROPHEADER diph;
+	GUID    guidClass;
+	WCHAR   wszPath[MAX_PATH];
+} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
+typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
+
+typedef struct DIPROPSTRING {
+        DIPROPHEADER diph;
+        WCHAR        wsz[MAX_PATH];
+} DIPROPSTRING, *LPDIPROPSTRING;
+typedef const DIPROPSTRING *LPCDIPROPSTRING;
+#endif /* DI5a */
+
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct DIPROPPOINTER {
+	DIPROPHEADER diph;
+	UINT_PTR     uData;
+} DIPROPPOINTER, *LPDIPROPPOINTER;
+typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
+#endif /* DI8 */
+
+/* special property GUIDs */
+#ifdef __cplusplus
+#define MAKEDIPROP(prop)	(*(const GUID *)(prop))
+#else
+#define MAKEDIPROP(prop)	((REFGUID)(prop))
+#endif
+#define DIPROP_BUFFERSIZE	MAKEDIPROP(1)
+#define DIPROP_AXISMODE		MAKEDIPROP(2)
+
+#define DIPROPAXISMODE_ABS	0
+#define DIPROPAXISMODE_REL	1
+
+#define DIPROP_GRANULARITY	MAKEDIPROP(3)
+#define DIPROP_RANGE		MAKEDIPROP(4)
+#define DIPROP_DEADZONE		MAKEDIPROP(5)
+#define DIPROP_SATURATION	MAKEDIPROP(6)
+#define DIPROP_FFGAIN		MAKEDIPROP(7)
+#define DIPROP_FFLOAD		MAKEDIPROP(8)
+#define DIPROP_AUTOCENTER	MAKEDIPROP(9)
+
+#define DIPROPAUTOCENTER_OFF	0
+#define DIPROPAUTOCENTER_ON	1
+
+#define DIPROP_CALIBRATIONMODE	MAKEDIPROP(10)
+
+#define DIPROPCALIBRATIONMODE_COOKED	0
+#define DIPROPCALIBRATIONMODE_RAW	1
+
+#if DIRECTINPUT_VERSION >= 0x050a
+#define DIPROP_CALIBRATION	MAKEDIPROP(11)
+#define DIPROP_GUIDANDPATH	MAKEDIPROP(12)
+#define DIPROP_INSTANCENAME	MAKEDIPROP(13)
+#define DIPROP_PRODUCTNAME	MAKEDIPROP(14)
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x5B2
+#define DIPROP_JOYSTICKID	MAKEDIPROP(15)
+#define DIPROP_GETPORTDISPLAYNAME	MAKEDIPROP(16)
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x0700
+#define DIPROP_PHYSICALRANGE	MAKEDIPROP(18)
+#define DIPROP_LOGICALRANGE	MAKEDIPROP(19)
+#endif
+
+#if(DIRECTINPUT_VERSION >= 0x0800)
+#define DIPROP_KEYNAME		MAKEDIPROP(20)
+#define DIPROP_CPOINTS		MAKEDIPROP(21)
+#define DIPROP_APPDATA		MAKEDIPROP(22)
+#define DIPROP_SCANCODE		MAKEDIPROP(23)
+#define DIPROP_VIDPID		MAKEDIPROP(24)
+#define DIPROP_USERNAME		MAKEDIPROP(25)
+#define DIPROP_TYPENAME		MAKEDIPROP(26)
+
+#define MAXCPOINTSNUM		8
+
+typedef struct _CPOINT {
+    LONG	lP;
+    DWORD	dwLog;
+} CPOINT, *PCPOINT;
+
+typedef struct DIPROPCPOINTS {
+    DIPROPHEADER diph;
+    DWORD	dwCPointsNum;
+    CPOINT	cp[MAXCPOINTSNUM];
+} DIPROPCPOINTS, *LPDIPROPCPOINTS;
+typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
+#endif /* DI8 */
+
+
+typedef struct DIDEVCAPS_DX3 {
+    DWORD	dwSize;
+    DWORD	dwFlags;
+    DWORD	dwDevType;
+    DWORD	dwAxes;
+    DWORD	dwButtons;
+    DWORD	dwPOVs;
+} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
+
+typedef struct DIDEVCAPS {
+    DWORD	dwSize;
+    DWORD	dwFlags;
+    DWORD	dwDevType;
+    DWORD	dwAxes;
+    DWORD	dwButtons;
+    DWORD	dwPOVs;
+#if(DIRECTINPUT_VERSION >= 0x0500)
+    DWORD	dwFFSamplePeriod;
+    DWORD	dwFFMinTimeResolution;
+    DWORD	dwFirmwareRevision;
+    DWORD	dwHardwareRevision;
+    DWORD	dwFFDriverVersion;
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+} DIDEVCAPS,*LPDIDEVCAPS;
+
+#define DIDC_ATTACHED		0x00000001
+#define DIDC_POLLEDDEVICE	0x00000002
+#define DIDC_EMULATED		0x00000004
+#define DIDC_POLLEDDATAFORMAT	0x00000008
+#define DIDC_FORCEFEEDBACK	0x00000100
+#define DIDC_FFATTACK		0x00000200
+#define DIDC_FFFADE		0x00000400
+#define DIDC_SATURATION		0x00000800
+#define DIDC_POSNEGCOEFFICIENTS	0x00001000
+#define DIDC_POSNEGSATURATION	0x00002000
+#define DIDC_DEADBAND		0x00004000
+#define DIDC_STARTDELAY		0x00008000
+#define DIDC_ALIAS		0x00010000
+#define DIDC_PHANTOM		0x00020000
+#define DIDC_HIDDEN		0x00040000
+
+
+/* SetCooperativeLevel dwFlags */
+#define DISCL_EXCLUSIVE		0x00000001
+#define DISCL_NONEXCLUSIVE	0x00000002
+#define DISCL_FOREGROUND	0x00000004
+#define DISCL_BACKGROUND	0x00000008
+#define DISCL_NOWINKEY          0x00000010
+
+#if (DIRECTINPUT_VERSION >= 0x0500)
+/* Device FF flags */
+#define DISFFC_RESET            0x00000001
+#define DISFFC_STOPALL          0x00000002
+#define DISFFC_PAUSE            0x00000004
+#define DISFFC_CONTINUE         0x00000008
+#define DISFFC_SETACTUATORSON   0x00000010
+#define DISFFC_SETACTUATORSOFF  0x00000020
+
+#define DIGFFS_EMPTY            0x00000001
+#define DIGFFS_STOPPED          0x00000002
+#define DIGFFS_PAUSED           0x00000004
+#define DIGFFS_ACTUATORSON      0x00000010
+#define DIGFFS_ACTUATORSOFF     0x00000020
+#define DIGFFS_POWERON          0x00000040
+#define DIGFFS_POWEROFF         0x00000080
+#define DIGFFS_SAFETYSWITCHON   0x00000100
+#define DIGFFS_SAFETYSWITCHOFF  0x00000200
+#define DIGFFS_USERFFSWITCHON   0x00000400
+#define DIGFFS_USERFFSWITCHOFF  0x00000800
+#define DIGFFS_DEVICELOST       0x80000000
+
+/* Effect flags */
+#define DIEFT_ALL		0x00000000
+
+#define DIEFT_CONSTANTFORCE	0x00000001
+#define DIEFT_RAMPFORCE		0x00000002
+#define DIEFT_PERIODIC		0x00000003
+#define DIEFT_CONDITION		0x00000004
+#define DIEFT_CUSTOMFORCE	0x00000005
+#define DIEFT_HARDWARE		0x000000FF
+#define DIEFT_FFATTACK		0x00000200
+#define DIEFT_FFFADE		0x00000400
+#define DIEFT_SATURATION	0x00000800
+#define DIEFT_POSNEGCOEFFICIENTS 0x00001000
+#define DIEFT_POSNEGSATURATION	0x00002000
+#define DIEFT_DEADBAND		0x00004000
+#define DIEFT_STARTDELAY	0x00008000
+#define DIEFT_GETTYPE(n)	LOBYTE(n)
+
+#define DIEFF_OBJECTIDS         0x00000001
+#define DIEFF_OBJECTOFFSETS     0x00000002
+#define DIEFF_CARTESIAN         0x00000010
+#define DIEFF_POLAR             0x00000020
+#define DIEFF_SPHERICAL         0x00000040
+
+#define DIEP_DURATION           0x00000001
+#define DIEP_SAMPLEPERIOD       0x00000002
+#define DIEP_GAIN               0x00000004
+#define DIEP_TRIGGERBUTTON      0x00000008
+#define DIEP_TRIGGERREPEATINTERVAL 0x00000010
+#define DIEP_AXES               0x00000020
+#define DIEP_DIRECTION          0x00000040
+#define DIEP_ENVELOPE           0x00000080
+#define DIEP_TYPESPECIFICPARAMS 0x00000100
+#if(DIRECTINPUT_VERSION >= 0x0600)
+#define DIEP_STARTDELAY         0x00000200
+#define DIEP_ALLPARAMS_DX5      0x000001FF
+#define DIEP_ALLPARAMS          0x000003FF
+#else
+#define DIEP_ALLPARAMS          0x000001FF
+#endif /* DIRECTINPUT_VERSION >= 0x0600 */
+#define DIEP_START              0x20000000
+#define DIEP_NORESTART          0x40000000
+#define DIEP_NODOWNLOAD         0x80000000
+#define DIEB_NOTRIGGER          0xFFFFFFFF
+
+#define DIES_SOLO               0x00000001
+#define DIES_NODOWNLOAD         0x80000000
+
+#define DIEGES_PLAYING          0x00000001
+#define DIEGES_EMULATED         0x00000002
+
+#define DI_DEGREES		100
+#define DI_FFNOMINALMAX		10000
+#define DI_SECONDS		1000000
+
+typedef struct DICONSTANTFORCE {
+	LONG			lMagnitude;
+} DICONSTANTFORCE, *LPDICONSTANTFORCE;
+typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
+
+typedef struct DIRAMPFORCE {
+	LONG			lStart;
+	LONG			lEnd;
+} DIRAMPFORCE, *LPDIRAMPFORCE;
+typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
+
+typedef struct DIPERIODIC {
+	DWORD			dwMagnitude;
+	LONG			lOffset;
+	DWORD			dwPhase;
+	DWORD			dwPeriod;
+} DIPERIODIC, *LPDIPERIODIC;
+typedef const DIPERIODIC *LPCDIPERIODIC;
+
+typedef struct DICONDITION {
+	LONG			lOffset;
+	LONG			lPositiveCoefficient;
+	LONG			lNegativeCoefficient;
+	DWORD			dwPositiveSaturation;
+	DWORD			dwNegativeSaturation;
+	LONG			lDeadBand;
+} DICONDITION, *LPDICONDITION;
+typedef const DICONDITION *LPCDICONDITION;
+
+typedef struct DICUSTOMFORCE {
+	DWORD			cChannels;
+	DWORD			dwSamplePeriod;
+	DWORD			cSamples;
+	LPLONG			rglForceData;
+} DICUSTOMFORCE, *LPDICUSTOMFORCE;
+typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
+
+typedef struct DIENVELOPE {
+	DWORD			dwSize;
+	DWORD			dwAttackLevel;
+	DWORD			dwAttackTime;
+	DWORD			dwFadeLevel;
+	DWORD			dwFadeTime;
+} DIENVELOPE, *LPDIENVELOPE;
+typedef const DIENVELOPE *LPCDIENVELOPE;
+
+typedef struct DIEFFECT_DX5 {
+	DWORD			dwSize;
+	DWORD			dwFlags;
+	DWORD			dwDuration;
+	DWORD			dwSamplePeriod;
+	DWORD			dwGain;
+	DWORD			dwTriggerButton;
+	DWORD			dwTriggerRepeatInterval;
+	DWORD			cAxes;
+	LPDWORD			rgdwAxes;
+	LPLONG			rglDirection;
+	LPDIENVELOPE		lpEnvelope;
+	DWORD			cbTypeSpecificParams;
+	LPVOID			lpvTypeSpecificParams;
+} DIEFFECT_DX5, *LPDIEFFECT_DX5;
+typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
+
+typedef struct DIEFFECT {
+	DWORD			dwSize;
+	DWORD			dwFlags;
+	DWORD			dwDuration;
+	DWORD			dwSamplePeriod;
+	DWORD			dwGain;
+	DWORD			dwTriggerButton;
+	DWORD			dwTriggerRepeatInterval;
+	DWORD			cAxes;
+	LPDWORD			rgdwAxes;
+	LPLONG			rglDirection;
+	LPDIENVELOPE		lpEnvelope;
+	DWORD			cbTypeSpecificParams;
+	LPVOID			lpvTypeSpecificParams;
+#if(DIRECTINPUT_VERSION >= 0x0600)
+	DWORD			dwStartDelay;
+#endif /* DIRECTINPUT_VERSION >= 0x0600 */
+} DIEFFECT, *LPDIEFFECT;
+typedef const DIEFFECT *LPCDIEFFECT;
+typedef DIEFFECT DIEFFECT_DX6;
+typedef LPDIEFFECT LPDIEFFECT_DX6;
+
+typedef struct DIEFFECTINFOA {
+	DWORD			dwSize;
+	GUID			guid;
+	DWORD			dwEffType;
+	DWORD			dwStaticParams;
+	DWORD			dwDynamicParams;
+	CHAR			tszName[MAX_PATH];
+} DIEFFECTINFOA, *LPDIEFFECTINFOA;
+typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
+
+typedef struct DIEFFECTINFOW {
+	DWORD			dwSize;
+	GUID			guid;
+	DWORD			dwEffType;
+	DWORD			dwStaticParams;
+	DWORD			dwDynamicParams;
+	WCHAR			tszName[MAX_PATH];
+} DIEFFECTINFOW, *LPDIEFFECTINFOW;
+typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
+
+DECL_WINELIB_TYPE_AW(DIEFFECTINFO)
+DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO)
+DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO)
+
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
+
+typedef struct DIEFFESCAPE {
+	DWORD	dwSize;
+	DWORD	dwCommand;
+	LPVOID	lpvInBuffer;
+	DWORD	cbInBuffer;
+	LPVOID	lpvOutBuffer;
+	DWORD	cbOutBuffer;
+} DIEFFESCAPE, *LPDIEFFESCAPE;
+
+typedef struct DIJOYSTATE {
+	LONG	lX;
+	LONG	lY;
+	LONG	lZ;
+	LONG	lRx;
+	LONG	lRy;
+	LONG	lRz;
+	LONG	rglSlider[2];
+	DWORD	rgdwPOV[4];
+	BYTE	rgbButtons[32];
+} DIJOYSTATE, *LPDIJOYSTATE;
+
+typedef struct DIJOYSTATE2 {
+	LONG	lX;
+	LONG	lY;
+	LONG	lZ;
+	LONG	lRx;
+	LONG	lRy;
+	LONG	lRz;
+	LONG	rglSlider[2];
+	DWORD	rgdwPOV[4];
+	BYTE	rgbButtons[128];
+	LONG	lVX;		/* 'v' as in velocity */
+	LONG	lVY;
+	LONG	lVZ;
+	LONG	lVRx;
+	LONG	lVRy;
+	LONG	lVRz;
+	LONG	rglVSlider[2];
+	LONG	lAX;		/* 'a' as in acceleration */
+	LONG	lAY;
+	LONG	lAZ;
+	LONG	lARx;
+	LONG	lARy;
+	LONG	lARz;
+	LONG	rglASlider[2];
+	LONG	lFX;		/* 'f' as in force */
+	LONG	lFY;
+	LONG	lFZ;
+	LONG	lFRx;		/* 'fr' as in rotational force aka torque */
+	LONG	lFRy;
+	LONG	lFRz;
+	LONG	rglFSlider[2];
+} DIJOYSTATE2, *LPDIJOYSTATE2;
+
+#define DIJOFS_X		FIELD_OFFSET(DIJOYSTATE, lX)
+#define DIJOFS_Y		FIELD_OFFSET(DIJOYSTATE, lY)
+#define DIJOFS_Z		FIELD_OFFSET(DIJOYSTATE, lZ)
+#define DIJOFS_RX		FIELD_OFFSET(DIJOYSTATE, lRx)
+#define DIJOFS_RY		FIELD_OFFSET(DIJOYSTATE, lRy)
+#define DIJOFS_RZ		FIELD_OFFSET(DIJOYSTATE, lRz)
+#define DIJOFS_SLIDER(n)	(FIELD_OFFSET(DIJOYSTATE, rglSlider) + \
+                                                        (n) * sizeof(LONG))
+#define DIJOFS_POV(n)		(FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \
+                                                        (n) * sizeof(DWORD))
+#define DIJOFS_BUTTON(n)	(FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n))
+#define DIJOFS_BUTTON0		DIJOFS_BUTTON(0)
+#define DIJOFS_BUTTON1		DIJOFS_BUTTON(1)
+#define DIJOFS_BUTTON2		DIJOFS_BUTTON(2)
+#define DIJOFS_BUTTON3		DIJOFS_BUTTON(3)
+#define DIJOFS_BUTTON4		DIJOFS_BUTTON(4)
+#define DIJOFS_BUTTON5		DIJOFS_BUTTON(5)
+#define DIJOFS_BUTTON6		DIJOFS_BUTTON(6)
+#define DIJOFS_BUTTON7		DIJOFS_BUTTON(7)
+#define DIJOFS_BUTTON8		DIJOFS_BUTTON(8)
+#define DIJOFS_BUTTON9		DIJOFS_BUTTON(9)
+#define DIJOFS_BUTTON10		DIJOFS_BUTTON(10)
+#define DIJOFS_BUTTON11		DIJOFS_BUTTON(11)
+#define DIJOFS_BUTTON12		DIJOFS_BUTTON(12)
+#define DIJOFS_BUTTON13		DIJOFS_BUTTON(13)
+#define DIJOFS_BUTTON14		DIJOFS_BUTTON(14)
+#define DIJOFS_BUTTON15		DIJOFS_BUTTON(15)
+#define DIJOFS_BUTTON16		DIJOFS_BUTTON(16)
+#define DIJOFS_BUTTON17		DIJOFS_BUTTON(17)
+#define DIJOFS_BUTTON18		DIJOFS_BUTTON(18)
+#define DIJOFS_BUTTON19		DIJOFS_BUTTON(19)
+#define DIJOFS_BUTTON20		DIJOFS_BUTTON(20)
+#define DIJOFS_BUTTON21		DIJOFS_BUTTON(21)
+#define DIJOFS_BUTTON22		DIJOFS_BUTTON(22)
+#define DIJOFS_BUTTON23		DIJOFS_BUTTON(23)
+#define DIJOFS_BUTTON24		DIJOFS_BUTTON(24)
+#define DIJOFS_BUTTON25		DIJOFS_BUTTON(25)
+#define DIJOFS_BUTTON26		DIJOFS_BUTTON(26)
+#define DIJOFS_BUTTON27		DIJOFS_BUTTON(27)
+#define DIJOFS_BUTTON28		DIJOFS_BUTTON(28)
+#define DIJOFS_BUTTON29		DIJOFS_BUTTON(29)
+#define DIJOFS_BUTTON30		DIJOFS_BUTTON(30)
+#define DIJOFS_BUTTON31		DIJOFS_BUTTON(31)
+#endif /* DIRECTINPUT_VERSION >= 0x0500 */
+
+/* DInput 7 structures, types */
+#if(DIRECTINPUT_VERSION >= 0x0700)
+typedef struct DIFILEEFFECT {
+  DWORD       dwSize;
+  GUID        GuidEffect;
+  LPCDIEFFECT lpDiEffect;
+  CHAR        szFriendlyName[MAX_PATH];
+} DIFILEEFFECT, *LPDIFILEEFFECT;
+
+typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
+typedef BOOL (CALLBACK *LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
+#endif /* DIRECTINPUT_VERSION >= 0x0700 */
+
+/* DInput 8 structures and types */
+#if DIRECTINPUT_VERSION >= 0x0800
+typedef struct _DIACTIONA {
+	UINT_PTR	uAppData;
+	DWORD		dwSemantic;
+	DWORD		dwFlags;
+	__GNU_EXTENSION union {
+		LPCSTR	lptszActionName;
+		UINT	uResIdString;
+	} DUMMYUNIONNAME;
+	GUID		guidInstance;
+	DWORD		dwObjID;
+	DWORD		dwHow;
+} DIACTIONA, *LPDIACTIONA;
+typedef const DIACTIONA *LPCDIACTIONA;
+
+typedef struct _DIACTIONW {
+	UINT_PTR	uAppData;
+	DWORD		dwSemantic;
+	DWORD		dwFlags;
+	__GNU_EXTENSION union {
+		LPCWSTR	lptszActionName;
+		UINT	uResIdString;
+	} DUMMYUNIONNAME;
+	GUID		guidInstance;
+	DWORD		dwObjID;
+	DWORD		dwHow;
+} DIACTIONW, *LPDIACTIONW;
+typedef const DIACTIONW *LPCDIACTIONW;
+
+DECL_WINELIB_TYPE_AW(DIACTION)
+DECL_WINELIB_TYPE_AW(LPDIACTION)
+DECL_WINELIB_TYPE_AW(LPCDIACTION)
+
+#define DIA_FORCEFEEDBACK	0x00000001
+#define DIA_APPMAPPED		0x00000002
+#define DIA_APPNOMAP		0x00000004
+#define DIA_NORANGE		0x00000008
+#define DIA_APPFIXED		0x00000010
+
+#define DIAH_UNMAPPED		0x00000000
+#define DIAH_USERCONFIG		0x00000001
+#define DIAH_APPREQUESTED	0x00000002
+#define DIAH_HWAPP		0x00000004
+#define DIAH_HWDEFAULT		0x00000008
+#define DIAH_DEFAULT		0x00000020
+#define DIAH_ERROR		0x80000000
+
+typedef struct _DIACTIONFORMATA {
+	DWORD		dwSize;
+	DWORD		dwActionSize;
+	DWORD		dwDataSize;
+	DWORD		dwNumActions;
+	LPDIACTIONA	rgoAction;
+	GUID		guidActionMap;
+	DWORD		dwGenre;
+	DWORD		dwBufferSize;
+	LONG		lAxisMin;
+	LONG		lAxisMax;
+	HINSTANCE	hInstString;
+	FILETIME	ftTimeStamp;
+	DWORD		dwCRC;
+	CHAR		tszActionMap[MAX_PATH];
+} DIACTIONFORMATA, *LPDIACTIONFORMATA;
+typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
+
+typedef struct _DIACTIONFORMATW {
+	DWORD		dwSize;
+	DWORD		dwActionSize;
+	DWORD		dwDataSize;
+	DWORD		dwNumActions;
+	LPDIACTIONW	rgoAction;
+	GUID		guidActionMap;
+	DWORD		dwGenre;
+	DWORD		dwBufferSize;
+	LONG		lAxisMin;
+	LONG		lAxisMax;
+	HINSTANCE	hInstString;
+	FILETIME	ftTimeStamp;
+	DWORD		dwCRC;
+	WCHAR		tszActionMap[MAX_PATH];
+} DIACTIONFORMATW, *LPDIACTIONFORMATW;
+typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
+
+DECL_WINELIB_TYPE_AW(DIACTIONFORMAT)
+DECL_WINELIB_TYPE_AW(LPDIACTIONFORMAT)
+DECL_WINELIB_TYPE_AW(LPCDIACTIONFORMAT)
+
+#define DIAFTS_NEWDEVICELOW	0xFFFFFFFF
+#define DIAFTS_NEWDEVICEHIGH	0xFFFFFFFF
+#define DIAFTS_UNUSEDDEVICELOW	0x00000000
+#define DIAFTS_UNUSEDDEVICEHIGH	0x00000000
+
+#define DIDBAM_DEFAULT		0x00000000
+#define DIDBAM_PRESERVE		0x00000001
+#define DIDBAM_INITIALIZE	0x00000002
+#define DIDBAM_HWDEFAULTS	0x00000004
+
+#define DIDSAM_DEFAULT		0x00000000
+#define DIDSAM_NOUSER		0x00000001
+#define DIDSAM_FORCESAVE	0x00000002
+
+#define DICD_DEFAULT		0x00000000
+#define DICD_EDIT		0x00000001
+
+#ifndef D3DCOLOR_DEFINED
+typedef DWORD D3DCOLOR;
+#define D3DCOLOR_DEFINED
+#endif
+
+typedef struct _DICOLORSET {
+	DWORD		dwSize;
+	D3DCOLOR	cTextFore;
+	D3DCOLOR	cTextHighlight;
+	D3DCOLOR	cCalloutLine;
+	D3DCOLOR	cCalloutHighlight;
+	D3DCOLOR	cBorder;
+	D3DCOLOR	cControlFill;
+	D3DCOLOR	cHighlightFill;
+	D3DCOLOR	cAreaFill;
+} DICOLORSET, *LPDICOLORSET;
+typedef const DICOLORSET *LPCDICOLORSET;
+
+typedef struct _DICONFIGUREDEVICESPARAMSA {
+	DWORD			dwSize;
+	DWORD			dwcUsers;
+	LPSTR			lptszUserNames;
+	DWORD			dwcFormats;
+	LPDIACTIONFORMATA	lprgFormats;
+	HWND			hwnd;
+	DICOLORSET		dics;
+	LPUNKNOWN		lpUnkDDSTarget;
+} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
+typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
+
+typedef struct _DICONFIGUREDEVICESPARAMSW {
+	DWORD			dwSize;
+	DWORD			dwcUsers;
+	LPWSTR			lptszUserNames;
+	DWORD			dwcFormats;
+	LPDIACTIONFORMATW	lprgFormats;
+	HWND			hwnd;
+	DICOLORSET		dics;
+	LPUNKNOWN		lpUnkDDSTarget;
+} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
+typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
+
+DECL_WINELIB_TYPE_AW(DICONFIGUREDEVICESPARAMS)
+DECL_WINELIB_TYPE_AW(LPDICONFIGUREDEVICESPARAMS)
+DECL_WINELIB_TYPE_AW(LPCDICONFIGUREDEVICESPARAMS)
+
+#define DIDIFT_CONFIGURATION	0x00000001
+#define DIDIFT_OVERLAY		0x00000002
+
+#define DIDAL_CENTERED		0x00000000
+#define DIDAL_LEFTALIGNED	0x00000001
+#define DIDAL_RIGHTALIGNED	0x00000002
+#define DIDAL_MIDDLE		0x00000000
+#define DIDAL_TOPALIGNED	0x00000004
+#define DIDAL_BOTTOMALIGNED	0x00000008
+
+typedef struct _DIDEVICEIMAGEINFOA {
+	CHAR	tszImagePath[MAX_PATH];
+	DWORD	dwFlags;
+	DWORD	dwViewID;
+	RECT	rcOverlay;
+	DWORD	dwObjID;
+	DWORD	dwcValidPts;
+	POINT	rgptCalloutLine[5];
+	RECT	rcCalloutRect;
+	DWORD	dwTextAlign;
+} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
+typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
+
+typedef struct _DIDEVICEIMAGEINFOW {
+	WCHAR	tszImagePath[MAX_PATH];
+	DWORD	dwFlags;
+	DWORD	dwViewID;
+	RECT	rcOverlay;
+	DWORD	dwObjID;
+	DWORD	dwcValidPts;
+	POINT	rgptCalloutLine[5];
+	RECT	rcCalloutRect;
+	DWORD	dwTextAlign;
+} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
+typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFO)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFO)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFO)
+
+typedef struct _DIDEVICEIMAGEINFOHEADERA {
+	DWORD	dwSize;
+	DWORD	dwSizeImageInfo;
+	DWORD	dwcViews;
+	DWORD	dwcButtons;
+	DWORD	dwcAxes;
+	DWORD	dwcPOVs;
+	DWORD	dwBufferSize;
+	DWORD	dwBufferUsed;
+	LPDIDEVICEIMAGEINFOA	lprgImageInfoArray;
+} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
+typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
+
+typedef struct _DIDEVICEIMAGEINFOHEADERW {
+	DWORD	dwSize;
+	DWORD	dwSizeImageInfo;
+	DWORD	dwcViews;
+	DWORD	dwcButtons;
+	DWORD	dwcAxes;
+	DWORD	dwcPOVs;
+	DWORD	dwBufferSize;
+	DWORD	dwBufferUsed;
+	LPDIDEVICEIMAGEINFOW	lprgImageInfoArray;
+} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
+typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
+
+DECL_WINELIB_TYPE_AW(DIDEVICEIMAGEINFOHEADER)
+DECL_WINELIB_TYPE_AW(LPDIDEVICEIMAGEINFOHEADER)
+DECL_WINELIB_TYPE_AW(LPCDIDEVICEIMAGEINFOHEADER)
+
+#endif /* DI8 */
+
+
+/*****************************************************************************
+ * IDirectInputEffect interface
+ */
+#if (DIRECTINPUT_VERSION >= 0x0500)
+#undef INTERFACE
+#define INTERFACE IDirectInputEffect
+DECLARE_INTERFACE_(IDirectInputEffect,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputEffect methods ***/
+    STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID) PURE;
+    STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
+    STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD) PURE;
+    STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD) PURE;
+    STDMETHOD(Start)(THIS_ DWORD, DWORD) PURE;
+    STDMETHOD(Stop)(THIS) PURE;
+    STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
+    STDMETHOD(Download)(THIS) PURE;
+    STDMETHOD(Unload)(THIS) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputEffect_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInputEffect_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInputEffect methods ***/
+#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->lpVtbl->Initialize(p,a,b,c)
+#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->lpVtbl->GetEffectGuid(p,a)
+#define IDirectInputEffect_GetParameters(p,a,b)   (p)->lpVtbl->GetParameters(p,a,b)
+#define IDirectInputEffect_SetParameters(p,a,b)   (p)->lpVtbl->SetParameters(p,a,b)
+#define IDirectInputEffect_Start(p,a,b)           (p)->lpVtbl->Start(p,a,b)
+#define IDirectInputEffect_Stop(p)                (p)->lpVtbl->Stop(p)
+#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->lpVtbl->GetEffectStatus(p,a)
+#define IDirectInputEffect_Download(p)            (p)->lpVtbl->Download(p)
+#define IDirectInputEffect_Unload(p)              (p)->lpVtbl->Unload(p)
+#define IDirectInputEffect_Escape(p,a)            (p)->lpVtbl->Escape(p,a)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputEffect_AddRef(p)             (p)->AddRef()
+#define IDirectInputEffect_Release(p)            (p)->Release()
+/*** IDirectInputEffect methods ***/
+#define IDirectInputEffect_Initialize(p,a,b,c)    (p)->Initialize(a,b,c)
+#define IDirectInputEffect_GetEffectGuid(p,a)     (p)->GetEffectGuid(a)
+#define IDirectInputEffect_GetParameters(p,a,b)   (p)->GetParameters(a,b)
+#define IDirectInputEffect_SetParameters(p,a,b)   (p)->SetParameters(a,b)
+#define IDirectInputEffect_Start(p,a,b)           (p)->Start(a,b)
+#define IDirectInputEffect_Stop(p)                (p)->Stop()
+#define IDirectInputEffect_GetEffectStatus(p,a)   (p)->GetEffectStatus(a)
+#define IDirectInputEffect_Download(p)            (p)->Download()
+#define IDirectInputEffect_Unload(p)              (p)->Unload()
+#define IDirectInputEffect_Escape(p,a)            (p)->Escape(a)
+#endif
+
+#endif /* DI5 */
+
+
+/*****************************************************************************
+ * IDirectInputDeviceA interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDeviceA
+DECLARE_INTERFACE_(IDirectInputDeviceA,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceA methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDeviceW interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDeviceW
+DECLARE_INTERFACE_(IDirectInputDeviceW,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceW methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice_Acquire(p)                 (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice_AddRef(p)             (p)->AddRef()
+#define IDirectInputDevice_Release(p)            (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice_GetCapabilities(p,a)       (p)->GetCapabilities(a)
+#define IDirectInputDevice_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice_GetProperty(p,a,b)         (p)->GetProperty(a,b)
+#define IDirectInputDevice_SetProperty(p,a,b)         (p)->SetProperty(a,b)
+#define IDirectInputDevice_Acquire(p)                 (p)->Acquire()
+#define IDirectInputDevice_Unacquire(p)               (p)->Unacquire()
+#define IDirectInputDevice_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
+#define IDirectInputDevice_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice_SetDataFormat(p,a)         (p)->SetDataFormat(a)
+#define IDirectInputDevice_SetEventNotification(p,a)  (p)->SetEventNotification(a)
+#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
+#define IDirectInputDevice_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
+#define IDirectInputDevice_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
+#endif
+
+
+#if (DIRECTINPUT_VERSION >= 0x0500)
+/*****************************************************************************
+ * IDirectInputDevice2A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice2A
+DECLARE_INTERFACE_(IDirectInputDevice2A,IDirectInputDeviceA)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceA methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2A methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice2W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice2W
+DECLARE_INTERFACE_(IDirectInputDevice2W,IDirectInputDeviceW)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceW methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2W methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice2_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice2_Acquire(p)                 (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice2_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice2_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice2_Poll(p)                           (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice2_AddRef(p)             (p)->AddRef()
+#define IDirectInputDevice2_Release(p)            (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice2_GetCapabilities(p,a)       (p)->GetCapabilities(a)
+#define IDirectInputDevice2_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice2_GetProperty(p,a,b)         (p)->GetProperty(a,b)
+#define IDirectInputDevice2_SetProperty(p,a,b)         (p)->SetProperty(a,b)
+#define IDirectInputDevice2_Acquire(p)                 (p)->Acquire()
+#define IDirectInputDevice2_Unacquire(p)               (p)->Unacquire()
+#define IDirectInputDevice2_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
+#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice2_SetDataFormat(p,a)         (p)->SetDataFormat(a)
+#define IDirectInputDevice2_SetEventNotification(p,a)  (p)->SetEventNotification(a)
+#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice2_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice2_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
+#define IDirectInputDevice2_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
+#define IDirectInputDevice2_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice2_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice2_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice2_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice2_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice2_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice2_Escape(p,a)                       (p)->Escape(a)
+#define IDirectInputDevice2_Poll(p)                           (p)->Poll()
+#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
+#endif
+#endif /* DI5 */
+
+#if DIRECTINPUT_VERSION >= 0x0700
+/*****************************************************************************
+ * IDirectInputDevice7A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice7A
+DECLARE_INTERFACE_(IDirectInputDevice7A,IDirectInputDevice2A)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceA methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2A methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+    /*** IDirectInputDevice7A methods ***/
+    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice7W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice7W
+DECLARE_INTERFACE_(IDirectInputDevice7W,IDirectInputDevice2W)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceW methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2W methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+    /*** IDirectInputDevice7W methods ***/
+    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice7_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice7_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice7_Acquire(p)                 (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice7_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice7_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice7_Poll(p)                           (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
+#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice7_AddRef(p)             (p)->AddRef()
+#define IDirectInputDevice7_Release(p)            (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice7_GetCapabilities(p,a)       (p)->GetCapabilities(a)
+#define IDirectInputDevice7_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice7_GetProperty(p,a,b)         (p)->GetProperty(a,b)
+#define IDirectInputDevice7_SetProperty(p,a,b)         (p)->SetProperty(a,b)
+#define IDirectInputDevice7_Acquire(p)                 (p)->Acquire()
+#define IDirectInputDevice7_Unacquire(p)               (p)->Unacquire()
+#define IDirectInputDevice7_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
+#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice7_SetDataFormat(p,a)         (p)->SetDataFormat(a)
+#define IDirectInputDevice7_SetEventNotification(p,a)  (p)->SetEventNotification(a)
+#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice7_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice7_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
+#define IDirectInputDevice7_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
+#define IDirectInputDevice7_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice7_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice7_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice7_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice7_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice7_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice7_Escape(p,a)                       (p)->Escape(a)
+#define IDirectInputDevice7_Poll(p)                           (p)->Poll()
+#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
+#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
+#endif
+
+#endif /* DI7 */
+
+#if DIRECTINPUT_VERSION >= 0x0800
+/*****************************************************************************
+ * IDirectInputDevice8A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice8A
+DECLARE_INTERFACE_(IDirectInputDevice8A,IDirectInputDevice7A)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceA methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2A methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+    /*** IDirectInputDevice7A methods ***/
+    STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+    STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+    /*** IDirectInputDevice8A methods ***/
+    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
+    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) PURE;
+    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA lpdiDevImageInfoHeader) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputDevice8W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputDevice8W
+DECLARE_INTERFACE_(IDirectInputDevice8W,IDirectInputDevice7W)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputDeviceW methods ***/
+    STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS lpDIDevCaps) PURE;
+    STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetProperty)(THIS_ REFGUID rguidProp, LPDIPROPHEADER pdiph) PURE;
+    STDMETHOD(SetProperty)(THIS_ REFGUID rguidProp, LPCDIPROPHEADER pdiph) PURE;
+    STDMETHOD(Acquire)(THIS) PURE;
+    STDMETHOD(Unacquire)(THIS) PURE;
+    STDMETHOD(GetDeviceState)(THIS_ DWORD cbData, LPVOID lpvData) PURE;
+    STDMETHOD(GetDeviceData)(THIS_ DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags) PURE;
+    STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT lpdf) PURE;
+    STDMETHOD(SetEventNotification)(THIS_ HANDLE hEvent) PURE;
+    STDMETHOD(SetCooperativeLevel)(THIS_ HWND hwnd, DWORD dwFlags) PURE;
+    STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) PURE;
+    STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW pdidi) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) PURE;
+    /*** IDirectInputDevice2W methods ***/
+    STDMETHOD(CreateEffect)(THIS_ REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT *ppdeff, LPUNKNOWN punkOuter) PURE;
+    STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType) PURE;
+    STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW pdei, REFGUID rguid) PURE;
+    STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD pdwOut) PURE;
+    STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl) PURE;
+    STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE pesc) PURE;
+    STDMETHOD(Poll)(THIS) PURE;
+    STDMETHOD(SendDeviceData)(THIS_ DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl) PURE;
+    /*** IDirectInputDevice7W methods ***/
+    STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR lpszFileName,LPDIENUMEFFECTSINFILECALLBACK pec,LPVOID pvRef,DWORD dwFlags) PURE;
+    STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR lpszFileName,DWORD dwEntries,LPDIFILEEFFECT rgDiFileEft,DWORD dwFlags) PURE;
+    /*** IDirectInputDevice8W methods ***/
+    STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
+    STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) PURE;
+    STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW lpdiDevImageInfoHeader) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInputDevice8_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInputDevice8_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->lpVtbl->GetCapabilities(p,a)
+#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->lpVtbl->EnumObjects(p,a,b,c)
+#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->lpVtbl->GetProperty(p,a,b)
+#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->lpVtbl->SetProperty(p,a,b)
+#define IDirectInputDevice8_Acquire(p)                 (p)->lpVtbl->Acquire(p)
+#define IDirectInputDevice8_Unacquire(p)               (p)->lpVtbl->Unacquire(p)
+#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->lpVtbl->GetDeviceState(p,a,b)
+#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
+#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->lpVtbl->SetDataFormat(p,a)
+#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->lpVtbl->SetEventNotification(p,a)
+#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->lpVtbl->GetObjectInfo(p,a,b,c)
+#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->lpVtbl->GetDeviceInfo(p,a)
+#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->lpVtbl->Initialize(p,a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->lpVtbl->CreateEffect(p,a,b,c,d)
+#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->lpVtbl->EnumEffects(p,a,b,c)
+#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->lpVtbl->GetEffectInfo(p,a,b)
+#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->lpVtbl->GetForceFeedbackState(p,a)
+#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->lpVtbl->SendForceFeedbackCommand(p,a)
+#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
+#define IDirectInputDevice8_Escape(p,a)                       (p)->lpVtbl->Escape(p,a)
+#define IDirectInputDevice8_Poll(p)                           (p)->lpVtbl->Poll(p)
+#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
+#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
+/*** IDirectInputDevice8 methods ***/
+#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
+#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->lpVtbl->SetActionMap(p,a,b,c)
+#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->lpVtbl->GetImageInfo(p,a)
+#else
+/*** IUnknown methods ***/
+#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInputDevice8_AddRef(p)             (p)->AddRef()
+#define IDirectInputDevice8_Release(p)            (p)->Release()
+/*** IDirectInputDevice methods ***/
+#define IDirectInputDevice8_GetCapabilities(p,a)       (p)->GetCapabilities(a)
+#define IDirectInputDevice8_EnumObjects(p,a,b,c)       (p)->EnumObjects(a,b,c)
+#define IDirectInputDevice8_GetProperty(p,a,b)         (p)->GetProperty(a,b)
+#define IDirectInputDevice8_SetProperty(p,a,b)         (p)->SetProperty(a,b)
+#define IDirectInputDevice8_Acquire(p)                 (p)->Acquire()
+#define IDirectInputDevice8_Unacquire(p)               (p)->Unacquire()
+#define IDirectInputDevice8_GetDeviceState(p,a,b)      (p)->GetDeviceState(a,b)
+#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d)   (p)->GetDeviceData(a,b,c,d)
+#define IDirectInputDevice8_SetDataFormat(p,a)         (p)->SetDataFormat(a)
+#define IDirectInputDevice8_SetEventNotification(p,a)  (p)->SetEventNotification(a)
+#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
+#define IDirectInputDevice8_GetObjectInfo(p,a,b,c)     (p)->GetObjectInfo(a,b,c)
+#define IDirectInputDevice8_GetDeviceInfo(p,a)         (p)->GetDeviceInfo(a)
+#define IDirectInputDevice8_RunControlPanel(p,a,b)     (p)->RunControlPanel(a,b)
+#define IDirectInputDevice8_Initialize(p,a,b,c)        (p)->Initialize(a,b,c)
+/*** IDirectInputDevice2 methods ***/
+#define IDirectInputDevice8_CreateEffect(p,a,b,c,d)           (p)->CreateEffect(a,b,c,d)
+#define IDirectInputDevice8_EnumEffects(p,a,b,c)              (p)->EnumEffects(a,b,c)
+#define IDirectInputDevice8_GetEffectInfo(p,a,b)              (p)->GetEffectInfo(a,b)
+#define IDirectInputDevice8_GetForceFeedbackState(p,a)        (p)->GetForceFeedbackState(a)
+#define IDirectInputDevice8_SendForceFeedbackCommand(p,a)     (p)->SendForceFeedbackCommand(a)
+#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
+#define IDirectInputDevice8_Escape(p,a)                       (p)->Escape(a)
+#define IDirectInputDevice8_Poll(p)                           (p)->Poll()
+#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d)         (p)->SendDeviceData(a,b,c,d)
+/*** IDirectInputDevice7 methods ***/
+#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
+#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
+/*** IDirectInputDevice8 methods ***/
+#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
+#define IDirectInputDevice8_SetActionMap(p,a,b,c)   (p)->SetActionMap(a,b,c)
+#define IDirectInputDevice8_GetImageInfo(p,a)       (p)->GetImageInfo(a)
+#endif
+
+#endif /* DI8 */
+
+/* "Standard" Mouse report... */
+typedef struct DIMOUSESTATE {
+  LONG lX;
+  LONG lY;
+  LONG lZ;
+  BYTE rgbButtons[4];
+} DIMOUSESTATE;
+
+#if DIRECTINPUT_VERSION >= 0x0700
+/* "Standard" Mouse report for DInput 7... */
+typedef struct DIMOUSESTATE2 {
+  LONG lX;
+  LONG lY;
+  LONG lZ;
+  BYTE rgbButtons[8];
+} DIMOUSESTATE2;
+#endif /* DI7 */
+
+#define DIMOFS_X        FIELD_OFFSET(DIMOUSESTATE, lX)
+#define DIMOFS_Y        FIELD_OFFSET(DIMOUSESTATE, lY)
+#define DIMOFS_Z        FIELD_OFFSET(DIMOUSESTATE, lZ)
+#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
+#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
+#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
+#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
+#if DIRECTINPUT_VERSION >= 0x0700
+#define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
+#define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
+#define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
+#define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
+#endif /* DI7 */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern const DIDATAFORMAT c_dfDIMouse;
+#if DIRECTINPUT_VERSION >= 0x0700
+extern const DIDATAFORMAT c_dfDIMouse2; /* DX 7 */
+#endif /* DI7 */
+extern const DIDATAFORMAT c_dfDIKeyboard;
+#if DIRECTINPUT_VERSION >= 0x0500
+extern const DIDATAFORMAT c_dfDIJoystick;
+extern const DIDATAFORMAT c_dfDIJoystick2;
+#endif /* DI5 */
+#ifdef __cplusplus
+};
+#endif
+
+/*****************************************************************************
+ * IDirectInputA interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputA
+DECLARE_INTERFACE_(IDirectInputA,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputA methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInputW interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInputW
+DECLARE_INTERFACE_(IDirectInputW,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputW methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput_AddRef(p)             (p)->AddRef()
+#define IDirectInput_Release(p)            (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
+#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
+#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput_Initialize(p,a,b)      (p)->Initialize(a,b)
+#endif
+
+/*****************************************************************************
+ * IDirectInput2A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput2A
+DECLARE_INTERFACE_(IDirectInput2A,IDirectInputA)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputA methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    /*** IDirectInput2A methods ***/
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput2W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput2W
+DECLARE_INTERFACE_(IDirectInput2W,IDirectInputW)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputW methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    /*** IDirectInput2W methods ***/
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput2_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput2_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput2_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput2_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput2_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput2_AddRef(p)             (p)->AddRef()
+#define IDirectInput2_Release(p)            (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
+#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput2_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
+#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput2_Initialize(p,a,b)      (p)->Initialize(a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput2_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
+#endif
+
+/*****************************************************************************
+ * IDirectInput7A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput7A
+DECLARE_INTERFACE_(IDirectInput7A,IDirectInput2A)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputA methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEA *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    /*** IDirectInput2A methods ***/
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+    /*** IDirectInput7A methods ***/
+    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput7W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput7W
+DECLARE_INTERFACE_(IDirectInput7W,IDirectInput2W)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInputW methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICEW *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    /*** IDirectInput2W methods ***/
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+    /*** IDirectInput7W methods ***/
+    STDMETHOD(CreateDeviceEx)(THIS_ REFGUID rguid, REFIID riid, LPVOID *pvOut, LPUNKNOWN lpUnknownOuter) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput7_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput7_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInput methods ***/
+#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput7_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput7_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput7_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
+/*** IDirectInput7 methods ***/
+#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput7_AddRef(p)             (p)->AddRef()
+#define IDirectInput7_Release(p)            (p)->Release()
+/*** IDirectInput methods ***/
+#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->CreateDevice(a,b,c)
+#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
+#define IDirectInput7_GetDeviceStatus(p,a)   (p)->GetDeviceStatus(a)
+#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
+#define IDirectInput7_Initialize(p,a,b)      (p)->Initialize(a,b)
+/*** IDirectInput2 methods ***/
+#define IDirectInput7_FindDevice(p,a,b,c)    (p)->FindDevice(a,b,c)
+/*** IDirectInput7 methods ***/
+#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
+#endif
+
+
+#if DIRECTINPUT_VERSION >= 0x0800
+/*****************************************************************************
+ * IDirectInput8A interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput8A
+DECLARE_INTERFACE_(IDirectInput8A,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInput8A methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCSTR pszName, LPGUID pguidInstance) PURE;
+    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR ptszUserName, LPDIACTIONFORMATA lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBA lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSA lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
+};
+
+/*****************************************************************************
+ * IDirectInput8W interface
+ */
+#undef INTERFACE
+#define INTERFACE IDirectInput8W
+DECLARE_INTERFACE_(IDirectInput8W,IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
+    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+    STDMETHOD_(ULONG,Release)(THIS) PURE;
+    /*** IDirectInput8W methods ***/
+    STDMETHOD(CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8W *lplpDirectInputDevice, LPUNKNOWN pUnkOuter) PURE;
+    STDMETHOD(EnumDevices)(THIS_ DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(GetDeviceStatus)(THIS_ REFGUID rguidInstance) PURE;
+    STDMETHOD(RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags) PURE;
+    STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
+    STDMETHOD(FindDevice)(THIS_ REFGUID rguid, LPCWSTR pszName, LPGUID pguidInstance) PURE;
+    STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags) PURE;
+    STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData) PURE;
+};
+#undef INTERFACE
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+/*** IUnknown methods ***/
+#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput8_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput8_Release(p)            (p)->lpVtbl->Release(p)
+/*** IDirectInput8 methods ***/
+#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput8_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput8_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
+#define IDirectInput8_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
+#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
+#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
+#else
+/*** IUnknown methods ***/
+#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IDirectInput8_AddRef(p)             (p)->AddRef()
+#define IDirectInput8_Release(p)            (p)->Release()
+/*** IDirectInput8 methods ***/
+#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->CreateDevice(a,b,c)
+#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->EnumDevices(a,b,c,d)
+#define IDirectInput8_GetDeviceStatus(p,a)        (p)->GetDeviceStatus(a)
+#define IDirectInput8_RunControlPanel(p,a,b)      (p)->RunControlPanel(a,b)
+#define IDirectInput8_Initialize(p,a,b)           (p)->Initialize(a,b)
+#define IDirectInput8_FindDevice(p,a,b,c)         (p)->FindDevice(a,b,c)
+#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
+#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
+#endif
+
+#endif /* DI8 */
+
+/* Export functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if DIRECTINPUT_VERSION >= 0x0800
+HRESULT WINAPI DirectInput8Create(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
+#else /* DI < 8 */
+HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN);
+HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTW *,LPUNKNOWN);
+#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate)
+
+HRESULT WINAPI DirectInputCreateEx(HINSTANCE,DWORD,REFIID,LPVOID *,LPUNKNOWN);
+#endif /* DI8 */
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __DINPUT_INCLUDED__ */
diff --git a/glfw/deps/mingw/xinput.h b/glfw/deps/mingw/xinput.h
--- a/glfw/deps/mingw/xinput.h
+++ b/glfw/deps/mingw/xinput.h
@@ -1,239 +1,239 @@
-/*
- * The Wine project - Xinput Joystick Library
- * Copyright 2008 Andrew Fenn
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef __WINE_XINPUT_H
-#define __WINE_XINPUT_H
-
-#include <windef.h>
-
-/*
- * Bitmasks for the joysticks buttons, determines what has
- * been pressed on the joystick, these need to be mapped
- * to whatever device you're using instead of an xbox 360
- * joystick
- */
-
-#define XINPUT_GAMEPAD_DPAD_UP          0x0001
-#define XINPUT_GAMEPAD_DPAD_DOWN        0x0002
-#define XINPUT_GAMEPAD_DPAD_LEFT        0x0004
-#define XINPUT_GAMEPAD_DPAD_RIGHT       0x0008
-#define XINPUT_GAMEPAD_START            0x0010
-#define XINPUT_GAMEPAD_BACK             0x0020
-#define XINPUT_GAMEPAD_LEFT_THUMB       0x0040
-#define XINPUT_GAMEPAD_RIGHT_THUMB      0x0080
-#define XINPUT_GAMEPAD_LEFT_SHOULDER    0x0100
-#define XINPUT_GAMEPAD_RIGHT_SHOULDER   0x0200
-#define XINPUT_GAMEPAD_A                0x1000
-#define XINPUT_GAMEPAD_B                0x2000
-#define XINPUT_GAMEPAD_X                0x4000
-#define XINPUT_GAMEPAD_Y                0x8000
-
-/*
- * Defines the flags used to determine if the user is pushing
- * down on a button, not holding a button, etc
- */
-
-#define XINPUT_KEYSTROKE_KEYDOWN        0x0001
-#define XINPUT_KEYSTROKE_KEYUP          0x0002
-#define XINPUT_KEYSTROKE_REPEAT         0x0004
-
-/*
- * Defines the codes which are returned by XInputGetKeystroke
- */
-
-#define VK_PAD_A                        0x5800
-#define VK_PAD_B                        0x5801
-#define VK_PAD_X                        0x5802
-#define VK_PAD_Y                        0x5803
-#define VK_PAD_RSHOULDER                0x5804
-#define VK_PAD_LSHOULDER                0x5805
-#define VK_PAD_LTRIGGER                 0x5806
-#define VK_PAD_RTRIGGER                 0x5807
-#define VK_PAD_DPAD_UP                  0x5810
-#define VK_PAD_DPAD_DOWN                0x5811
-#define VK_PAD_DPAD_LEFT                0x5812
-#define VK_PAD_DPAD_RIGHT               0x5813
-#define VK_PAD_START                    0x5814
-#define VK_PAD_BACK                     0x5815
-#define VK_PAD_LTHUMB_PRESS             0x5816
-#define VK_PAD_RTHUMB_PRESS             0x5817
-#define VK_PAD_LTHUMB_UP                0x5820
-#define VK_PAD_LTHUMB_DOWN              0x5821
-#define VK_PAD_LTHUMB_RIGHT             0x5822
-#define VK_PAD_LTHUMB_LEFT              0x5823
-#define VK_PAD_LTHUMB_UPLEFT            0x5824
-#define VK_PAD_LTHUMB_UPRIGHT           0x5825
-#define VK_PAD_LTHUMB_DOWNRIGHT         0x5826
-#define VK_PAD_LTHUMB_DOWNLEFT          0x5827
-#define VK_PAD_RTHUMB_UP                0x5830
-#define VK_PAD_RTHUMB_DOWN              0x5831
-#define VK_PAD_RTHUMB_RIGHT             0x5832
-#define VK_PAD_RTHUMB_LEFT              0x5833
-#define VK_PAD_RTHUMB_UPLEFT            0x5834
-#define VK_PAD_RTHUMB_UPRIGHT           0x5835
-#define VK_PAD_RTHUMB_DOWNRIGHT         0x5836
-#define VK_PAD_RTHUMB_DOWNLEFT          0x5837
-
-/*
- * Deadzones are for analogue joystick controls on the joypad
- * which determine when input should be assumed to be in the
- * middle of the pad. This is a threshold to stop a joypad
- * controlling the game when the player isn't touching the
- * controls.
- */
-
-#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE  7849
-#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
-#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD    30
-
-
-/*
- * Defines what type of abilities the type of joystick has
- * DEVTYPE_GAMEPAD is available for all joysticks, however
- * there may be more specific identifiers for other joysticks
- * which are being used.
- */
-
-#define XINPUT_DEVTYPE_GAMEPAD          0x01
-#define XINPUT_DEVSUBTYPE_GAMEPAD       0x01
-#define XINPUT_DEVSUBTYPE_WHEEL         0x02
-#define XINPUT_DEVSUBTYPE_ARCADE_STICK  0x03
-#define XINPUT_DEVSUBTYPE_FLIGHT_SICK   0x04
-#define XINPUT_DEVSUBTYPE_DANCE_PAD     0x05
-#define XINPUT_DEVSUBTYPE_GUITAR        0x06
-#define XINPUT_DEVSUBTYPE_DRUM_KIT      0x08
-
-/*
- * These are used with the XInputGetCapabilities function to
- * determine the abilities to the joystick which has been
- * plugged in.
- */
-
-#define XINPUT_CAPS_VOICE_SUPPORTED     0x0004
-#define XINPUT_FLAG_GAMEPAD             0x00000001
-
-/*
- * Defines the status of the battery if one is used in the
- * attached joystick. The first two define if the joystick
- * supports a battery. Disconnected means that the joystick
- * isn't connected. Wired shows that the joystick is a wired
- * joystick.
- */
-
-#define BATTERY_DEVTYPE_GAMEPAD         0x00
-#define BATTERY_DEVTYPE_HEADSET         0x01
-#define BATTERY_TYPE_DISCONNECTED       0x00
-#define BATTERY_TYPE_WIRED              0x01
-#define BATTERY_TYPE_ALKALINE           0x02
-#define BATTERY_TYPE_NIMH               0x03
-#define BATTERY_TYPE_UNKNOWN            0xFF
-#define BATTERY_LEVEL_EMPTY             0x00
-#define BATTERY_LEVEL_LOW               0x01
-#define BATTERY_LEVEL_MEDIUM            0x02
-#define BATTERY_LEVEL_FULL              0x03
-
-/*
- * How many joysticks can be used with this library. Games that
- * use the xinput library will not go over this number.
- */
-
-#define XUSER_MAX_COUNT                 4
-#define XUSER_INDEX_ANY                 0x000000FF
-
-/*
- * Defines the structure of an xbox 360 joystick.
- */
-
-typedef struct _XINPUT_GAMEPAD {
-    WORD wButtons;
-    BYTE bLeftTrigger;
-    BYTE bRightTrigger;
-    SHORT sThumbLX;
-    SHORT sThumbLY;
-    SHORT sThumbRX;
-    SHORT sThumbRY;
-} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
-
-typedef struct _XINPUT_STATE {
-    DWORD dwPacketNumber;
-    XINPUT_GAMEPAD Gamepad;
-} XINPUT_STATE, *PXINPUT_STATE;
-
-/*
- * Defines the structure of how much vibration is set on both the
- * right and left motors in a joystick. If you're not using a 360
- * joystick you will have to map these to your device.
- */
-
-typedef struct _XINPUT_VIBRATION {
-    WORD wLeftMotorSpeed;
-    WORD wRightMotorSpeed;
-} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
-
-/*
- * Defines the structure for what kind of abilities the joystick has
- * such abilities are things such as if the joystick has the ability
- * to send and receive audio, if the joystick is in fact a driving
- * wheel or perhaps if the joystick is some kind of dance pad or
- * guitar.
- */
-
-typedef struct _XINPUT_CAPABILITIES {
-    BYTE Type;
-    BYTE SubType;
-    WORD Flags;
-    XINPUT_GAMEPAD Gamepad;
-    XINPUT_VIBRATION Vibration;
-} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
-
-/*
- * Defines the structure for a joystick input event which is
- * retrieved using the function XInputGetKeystroke
- */
-typedef struct _XINPUT_KEYSTROKE {
-    WORD VirtualKey;
-    WCHAR Unicode;
-    WORD Flags;
-    BYTE UserIndex;
-    BYTE HidCode;
-} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
-
-typedef struct _XINPUT_BATTERY_INFORMATION
-{
-    BYTE BatteryType;
-    BYTE BatteryLevel;
-} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void WINAPI XInputEnable(WINBOOL);
-DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
-DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
-DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
-DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
-DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
-DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINE_XINPUT_H */
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_XINPUT_H
+#define __WINE_XINPUT_H
+
+#include <windef.h>
+
+/*
+ * Bitmasks for the joysticks buttons, determines what has
+ * been pressed on the joystick, these need to be mapped
+ * to whatever device you're using instead of an xbox 360
+ * joystick
+ */
+
+#define XINPUT_GAMEPAD_DPAD_UP          0x0001
+#define XINPUT_GAMEPAD_DPAD_DOWN        0x0002
+#define XINPUT_GAMEPAD_DPAD_LEFT        0x0004
+#define XINPUT_GAMEPAD_DPAD_RIGHT       0x0008
+#define XINPUT_GAMEPAD_START            0x0010
+#define XINPUT_GAMEPAD_BACK             0x0020
+#define XINPUT_GAMEPAD_LEFT_THUMB       0x0040
+#define XINPUT_GAMEPAD_RIGHT_THUMB      0x0080
+#define XINPUT_GAMEPAD_LEFT_SHOULDER    0x0100
+#define XINPUT_GAMEPAD_RIGHT_SHOULDER   0x0200
+#define XINPUT_GAMEPAD_A                0x1000
+#define XINPUT_GAMEPAD_B                0x2000
+#define XINPUT_GAMEPAD_X                0x4000
+#define XINPUT_GAMEPAD_Y                0x8000
+
+/*
+ * Defines the flags used to determine if the user is pushing
+ * down on a button, not holding a button, etc
+ */
+
+#define XINPUT_KEYSTROKE_KEYDOWN        0x0001
+#define XINPUT_KEYSTROKE_KEYUP          0x0002
+#define XINPUT_KEYSTROKE_REPEAT         0x0004
+
+/*
+ * Defines the codes which are returned by XInputGetKeystroke
+ */
+
+#define VK_PAD_A                        0x5800
+#define VK_PAD_B                        0x5801
+#define VK_PAD_X                        0x5802
+#define VK_PAD_Y                        0x5803
+#define VK_PAD_RSHOULDER                0x5804
+#define VK_PAD_LSHOULDER                0x5805
+#define VK_PAD_LTRIGGER                 0x5806
+#define VK_PAD_RTRIGGER                 0x5807
+#define VK_PAD_DPAD_UP                  0x5810
+#define VK_PAD_DPAD_DOWN                0x5811
+#define VK_PAD_DPAD_LEFT                0x5812
+#define VK_PAD_DPAD_RIGHT               0x5813
+#define VK_PAD_START                    0x5814
+#define VK_PAD_BACK                     0x5815
+#define VK_PAD_LTHUMB_PRESS             0x5816
+#define VK_PAD_RTHUMB_PRESS             0x5817
+#define VK_PAD_LTHUMB_UP                0x5820
+#define VK_PAD_LTHUMB_DOWN              0x5821
+#define VK_PAD_LTHUMB_RIGHT             0x5822
+#define VK_PAD_LTHUMB_LEFT              0x5823
+#define VK_PAD_LTHUMB_UPLEFT            0x5824
+#define VK_PAD_LTHUMB_UPRIGHT           0x5825
+#define VK_PAD_LTHUMB_DOWNRIGHT         0x5826
+#define VK_PAD_LTHUMB_DOWNLEFT          0x5827
+#define VK_PAD_RTHUMB_UP                0x5830
+#define VK_PAD_RTHUMB_DOWN              0x5831
+#define VK_PAD_RTHUMB_RIGHT             0x5832
+#define VK_PAD_RTHUMB_LEFT              0x5833
+#define VK_PAD_RTHUMB_UPLEFT            0x5834
+#define VK_PAD_RTHUMB_UPRIGHT           0x5835
+#define VK_PAD_RTHUMB_DOWNRIGHT         0x5836
+#define VK_PAD_RTHUMB_DOWNLEFT          0x5837
+
+/*
+ * Deadzones are for analogue joystick controls on the joypad
+ * which determine when input should be assumed to be in the
+ * middle of the pad. This is a threshold to stop a joypad
+ * controlling the game when the player isn't touching the
+ * controls.
+ */
+
+#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE  7849
+#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
+#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD    30
+
+
+/*
+ * Defines what type of abilities the type of joystick has
+ * DEVTYPE_GAMEPAD is available for all joysticks, however
+ * there may be more specific identifiers for other joysticks
+ * which are being used.
+ */
+
+#define XINPUT_DEVTYPE_GAMEPAD          0x01
+#define XINPUT_DEVSUBTYPE_GAMEPAD       0x01
+#define XINPUT_DEVSUBTYPE_WHEEL         0x02
+#define XINPUT_DEVSUBTYPE_ARCADE_STICK  0x03
+#define XINPUT_DEVSUBTYPE_FLIGHT_SICK   0x04
+#define XINPUT_DEVSUBTYPE_DANCE_PAD     0x05
+#define XINPUT_DEVSUBTYPE_GUITAR        0x06
+#define XINPUT_DEVSUBTYPE_DRUM_KIT      0x08
+
+/*
+ * These are used with the XInputGetCapabilities function to
+ * determine the abilities to the joystick which has been
+ * plugged in.
+ */
+
+#define XINPUT_CAPS_VOICE_SUPPORTED     0x0004
+#define XINPUT_FLAG_GAMEPAD             0x00000001
+
+/*
+ * Defines the status of the battery if one is used in the
+ * attached joystick. The first two define if the joystick
+ * supports a battery. Disconnected means that the joystick
+ * isn't connected. Wired shows that the joystick is a wired
+ * joystick.
+ */
+
+#define BATTERY_DEVTYPE_GAMEPAD         0x00
+#define BATTERY_DEVTYPE_HEADSET         0x01
+#define BATTERY_TYPE_DISCONNECTED       0x00
+#define BATTERY_TYPE_WIRED              0x01
+#define BATTERY_TYPE_ALKALINE           0x02
+#define BATTERY_TYPE_NIMH               0x03
+#define BATTERY_TYPE_UNKNOWN            0xFF
+#define BATTERY_LEVEL_EMPTY             0x00
+#define BATTERY_LEVEL_LOW               0x01
+#define BATTERY_LEVEL_MEDIUM            0x02
+#define BATTERY_LEVEL_FULL              0x03
+
+/*
+ * How many joysticks can be used with this library. Games that
+ * use the xinput library will not go over this number.
+ */
+
+#define XUSER_MAX_COUNT                 4
+#define XUSER_INDEX_ANY                 0x000000FF
+
+/*
+ * Defines the structure of an xbox 360 joystick.
+ */
+
+typedef struct _XINPUT_GAMEPAD {
+    WORD wButtons;
+    BYTE bLeftTrigger;
+    BYTE bRightTrigger;
+    SHORT sThumbLX;
+    SHORT sThumbLY;
+    SHORT sThumbRX;
+    SHORT sThumbRY;
+} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
+
+typedef struct _XINPUT_STATE {
+    DWORD dwPacketNumber;
+    XINPUT_GAMEPAD Gamepad;
+} XINPUT_STATE, *PXINPUT_STATE;
+
+/*
+ * Defines the structure of how much vibration is set on both the
+ * right and left motors in a joystick. If you're not using a 360
+ * joystick you will have to map these to your device.
+ */
+
+typedef struct _XINPUT_VIBRATION {
+    WORD wLeftMotorSpeed;
+    WORD wRightMotorSpeed;
+} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
+
+/*
+ * Defines the structure for what kind of abilities the joystick has
+ * such abilities are things such as if the joystick has the ability
+ * to send and receive audio, if the joystick is in fact a driving
+ * wheel or perhaps if the joystick is some kind of dance pad or
+ * guitar.
+ */
+
+typedef struct _XINPUT_CAPABILITIES {
+    BYTE Type;
+    BYTE SubType;
+    WORD Flags;
+    XINPUT_GAMEPAD Gamepad;
+    XINPUT_VIBRATION Vibration;
+} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
+
+/*
+ * Defines the structure for a joystick input event which is
+ * retrieved using the function XInputGetKeystroke
+ */
+typedef struct _XINPUT_KEYSTROKE {
+    WORD VirtualKey;
+    WCHAR Unicode;
+    WORD Flags;
+    BYTE UserIndex;
+    BYTE HidCode;
+} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
+
+typedef struct _XINPUT_BATTERY_INFORMATION
+{
+    BYTE BatteryType;
+    BYTE BatteryLevel;
+} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void WINAPI XInputEnable(WINBOOL);
+DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
+DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
+DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
+DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
+DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
+DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WINE_XINPUT_H */
diff --git a/glfw/include/GLFW/glfw3.h b/glfw/include/GLFW/glfw3.h
--- a/glfw/include/GLFW/glfw3.h
+++ b/glfw/include/GLFW/glfw3.h
@@ -96,11 +96,30 @@
  #define _WIN32
 #endif /* _WIN32 */
 
+/* Include because most Windows GLU headers need wchar_t and
+ * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
+ * Include it unconditionally to avoid surprising side-effects.
+ */
+#include <stddef.h>
+
+/* Include because it is needed by Vulkan and related functions.
+ * Include it unconditionally to avoid surprising side-effects.
+ */
+#include <stdint.h>
+
+#if defined(GLFW_INCLUDE_VULKAN)
+  #include <vulkan/vulkan.h>
+#endif /* Vulkan header */
+
+/* The Vulkan header may have indirectly included windows.h (because of
+ * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it.
+ */
+
 /* It is customary to use APIENTRY for OpenGL function pointer declarations on
  * all platforms.  Additionally, the Windows OpenGL header needs APIENTRY.
  */
-#ifndef APIENTRY
- #ifdef _WIN32
+#if !defined(APIENTRY)
+ #if defined(_WIN32)
   #define APIENTRY __stdcall
  #else
   #define APIENTRY
@@ -122,17 +141,6 @@
  #define GLFW_CALLBACK_DEFINED
 #endif /* CALLBACK */
 
-/* Include because most Windows GLU headers need wchar_t and
- * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h.
- * Include it unconditionally to avoid surprising side-effects.
- */
-#include <stddef.h>
-
-/* Include because it is needed by Vulkan and related functions.
- * Include it unconditionally to avoid surprising side-effects.
- */
-#include <stdint.h>
-
 /* Include the chosen OpenGL or OpenGL ES headers.
  */
 #if defined(GLFW_INCLUDE_ES1)
@@ -211,10 +219,6 @@
 
 #endif /* OpenGL and OpenGL ES headers */
 
-#if defined(GLFW_INCLUDE_VULKAN)
-  #include <vulkan/vulkan.h>
-#endif /* Vulkan header */
-
 #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
  /* GLFW_DLL must be defined by applications that are linking against the DLL
   * version of the GLFW library.  _GLFW_BUILD_DLL is defined by the GLFW
@@ -266,7 +270,7 @@
  *  API changes.
  *  @ingroup init
  */
-#define GLFW_VERSION_REVISION       0
+#define GLFW_VERSION_REVISION       1
 /*! @} */
 
 /*! @brief One.
@@ -917,62 +921,62 @@
 #define GLFW_CLIENT_API             0x00022001
 /*! @brief Context client API major version hint and attribute.
  *
- *  Context client API major version [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint)
+ *  and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib).
  */
 #define GLFW_CONTEXT_VERSION_MAJOR  0x00022002
 /*! @brief Context client API minor version hint and attribute.
  *
- *  Context client API minor version [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint)
+ *  and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib).
  */
 #define GLFW_CONTEXT_VERSION_MINOR  0x00022003
 /*! @brief Context client API revision number hint and attribute.
  *
- *  Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context client API revision number
+ *  [attribute](@ref GLFW_CONTEXT_REVISION_attrib).
  */
 #define GLFW_CONTEXT_REVISION       0x00022004
 /*! @brief Context robustness hint and attribute.
  *
- *  Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint)
+ *  and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib).
  */
 #define GLFW_CONTEXT_ROBUSTNESS     0x00022005
 /*! @brief OpenGL forward-compatibility hint and attribute.
  *
- *  OpenGL forward-compatibility [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint)
+ *  and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib).
  */
 #define GLFW_OPENGL_FORWARD_COMPAT  0x00022006
 /*! @brief OpenGL debug context hint and attribute.
  *
- *  OpenGL debug context [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  OpenGL debug context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and
+ *  [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib).
  */
 #define GLFW_OPENGL_DEBUG_CONTEXT   0x00022007
 /*! @brief OpenGL profile hint and attribute.
  *
- *  OpenGL profile [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and
+ *  [attribute](@ref GLFW_OPENGL_PROFILE_attrib).
  */
 #define GLFW_OPENGL_PROFILE         0x00022008
 /*! @brief Context flush-on-release hint and attribute.
  *
- *  Context flush-on-release [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and
+ *  [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib).
  */
 #define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009
 /*! @brief Context error suppression hint and attribute.
  *
- *  Context error suppression [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and
+ *  [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib).
  */
 #define GLFW_CONTEXT_NO_ERROR       0x0002200A
 /*! @brief Context creation API hint and attribute.
  *
- *  Context creation API [hint](@ref GLFW_CLIENT_API_hint) and
- *  [attribute](@ref GLFW_CLIENT_API_attrib).
+ *  Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and
+ *  [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib).
  */
 #define GLFW_CONTEXT_CREATION_API   0x0002200B
 /*! @brief Window content area scaling window
@@ -1164,13 +1168,21 @@
  */
 typedef struct GLFWcursor GLFWcursor;
 
-/*! @brief The function signature for error callbacks.
+/*! @brief The function pointer type for error callbacks.
  *
- *  This is the function signature for error callback functions.
+ *  This is the function pointer type for error callbacks.  An error callback
+ *  function has the following signature:
+ *  @code
+ *  void callback_name(int error_code, const char* description)
+ *  @endcode
  *
- *  @param[in] error An [error code](@ref errors).
+ *  @param[in] error_code An [error code](@ref errors).  Future releases may add
+ *  more error codes.
  *  @param[in] description A UTF-8 encoded string describing the error.
  *
+ *  @pointer_lifetime The error description string is valid until the callback
+ *  function returns.
+ *
  *  @sa @ref error_handling
  *  @sa @ref glfwSetErrorCallback
  *
@@ -1180,9 +1192,13 @@
  */
 typedef void (* GLFWerrorfun)(int,const char*);
 
-/*! @brief The function signature for window position callbacks.
+/*! @brief The function pointer type for window position callbacks.
  *
- *  This is the function signature for window position callback functions.
+ *  This is the function pointer type for window position callbacks.  A window
+ *  position callback function has the following signature:
+ *  @code
+ *  void callback_name(GLFWwindow* window, int xpos, int ypos)
+ *  @endcode
  *
  *  @param[in] window The window that was moved.
  *  @param[in] xpos The new x-coordinate, in screen coordinates, of the
@@ -1199,9 +1215,13 @@
  */
 typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int);
 
-/*! @brief The function signature for window resize callbacks.
+/*! @brief The function pointer type for window size callbacks.
  *
- *  This is the function signature for window size callback functions.
+ *  This is the function pointer type for window size callbacks.  A window size
+ *  callback function has the following signature:
+ *  @code
+ *  void callback_name(GLFWwindow* window, int width, int height)
+ *  @endcode
  *
  *  @param[in] window The window that was resized.
  *  @param[in] width The new width, in screen coordinates, of the window.
@@ -1217,9 +1237,13 @@
  */
 typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int);
 
-/*! @brief The function signature for window close callbacks.
+/*! @brief The function pointer type for window close callbacks.
  *
- *  This is the function signature for window close callback functions.
+ *  This is the function pointer type for window close callbacks.  A window
+ *  close callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window)
+ *  @endcode
  *
  *  @param[in] window The window that the user attempted to close.
  *
@@ -1233,9 +1257,13 @@
  */
 typedef void (* GLFWwindowclosefun)(GLFWwindow*);
 
-/*! @brief The function signature for window content refresh callbacks.
+/*! @brief The function pointer type for window content refresh callbacks.
  *
- *  This is the function signature for window refresh callback functions.
+ *  This is the function pointer type for window content refresh callbacks.
+ *  A window content refresh callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window);
+ *  @endcode
  *
  *  @param[in] window The window whose content needs to be refreshed.
  *
@@ -1249,9 +1277,13 @@
  */
 typedef void (* GLFWwindowrefreshfun)(GLFWwindow*);
 
-/*! @brief The function signature for window focus/defocus callbacks.
+/*! @brief The function pointer type for window focus callbacks.
  *
- *  This is the function signature for window focus callback functions.
+ *  This is the function pointer type for window focus callbacks.  A window
+ *  focus callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int focused)
+ *  @endcode
  *
  *  @param[in] window The window that gained or lost input focus.
  *  @param[in] focused `GLFW_TRUE` if the window was given input focus, or
@@ -1266,10 +1298,13 @@
  */
 typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);
 
-/*! @brief The function signature for window iconify/restore callbacks.
+/*! @brief The function pointer type for window iconify callbacks.
  *
- *  This is the function signature for window iconify/restore callback
- *  functions.
+ *  This is the function pointer type for window iconify callbacks.  A window
+ *  iconify callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int iconified)
+ *  @endcode
  *
  *  @param[in] window The window that was iconified or restored.
  *  @param[in] iconified `GLFW_TRUE` if the window was iconified, or
@@ -1284,10 +1319,13 @@
  */
 typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);
 
-/*! @brief The function signature for window maximize/restore callbacks.
+/*! @brief The function pointer type for window maximize callbacks.
  *
- *  This is the function signature for window maximize/restore callback
- *  functions.
+ *  This is the function pointer type for window maximize callbacks.  A window
+ *  maximize callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int maximized)
+ *  @endcode
  *
  *  @param[in] window The window that was maximized or restored.
  *  @param[in] iconified `GLFW_TRUE` if the window was maximized, or
@@ -1302,10 +1340,13 @@
  */
 typedef void (* GLFWwindowmaximizefun)(GLFWwindow*,int);
 
-/*! @brief The function signature for framebuffer resize callbacks.
+/*! @brief The function pointer type for framebuffer size callbacks.
  *
- *  This is the function signature for framebuffer resize callback
- *  functions.
+ *  This is the function pointer type for framebuffer size callbacks.
+ *  A framebuffer size callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int width, int height)
+ *  @endcode
  *
  *  @param[in] window The window whose framebuffer was resized.
  *  @param[in] width The new width, in pixels, of the framebuffer.
@@ -1320,10 +1361,13 @@
  */
 typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int);
 
-/*! @brief The function signature for window content scale callbacks.
+/*! @brief The function pointer type for window content scale callbacks.
  *
- *  This is the function signature for window content scale callback
- *  functions.
+ *  This is the function pointer type for window content scale callbacks.
+ *  A window content scale callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, float xscale, float yscale)
+ *  @endcode
  *
  *  @param[in] window The window whose content scale changed.
  *  @param[in] xscale The new x-axis content scale of the window.
@@ -1338,14 +1382,19 @@
  */
 typedef void (* GLFWwindowcontentscalefun)(GLFWwindow*,float,float);
 
-/*! @brief The function signature for mouse button callbacks.
+/*! @brief The function pointer type for mouse button callbacks.
  *
- *  This is the function signature for mouse button callback functions.
+ *  This is the function pointer type for mouse button callback functions.
+ *  A mouse button callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int button, int action, int mods)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] button The [mouse button](@ref buttons) that was pressed or
  *  released.
- *  @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.
+ *  @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`.  Future releases
+ *  may add more actions.
  *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were
  *  held down.
  *
@@ -1359,9 +1408,13 @@
  */
 typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);
 
-/*! @brief The function signature for cursor position callbacks.
+/*! @brief The function pointer type for cursor position callbacks.
  *
- *  This is the function signature for cursor position callback functions.
+ *  This is the function pointer type for cursor position callbacks.  A cursor
+ *  position callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, double xpos, double ypos);
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] xpos The new cursor x-coordinate, relative to the left edge of
@@ -1378,9 +1431,13 @@
  */
 typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);
 
-/*! @brief The function signature for cursor enter/leave callbacks.
+/*! @brief The function pointer type for cursor enter/leave callbacks.
  *
- *  This is the function signature for cursor enter/leave callback functions.
+ *  This is the function pointer type for cursor enter/leave callbacks.
+ *  A cursor enter/leave callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int entered)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] entered `GLFW_TRUE` if the cursor entered the window's content
@@ -1395,9 +1452,13 @@
  */
 typedef void (* GLFWcursorenterfun)(GLFWwindow*,int);
 
-/*! @brief The function signature for scroll callbacks.
+/*! @brief The function pointer type for scroll callbacks.
  *
- *  This is the function signature for scroll callback functions.
+ *  This is the function pointer type for scroll callbacks.  A scroll callback
+ *  function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, double xoffset, double yoffset)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] xoffset The scroll offset along the x-axis.
@@ -1412,14 +1473,19 @@
  */
 typedef void (* GLFWscrollfun)(GLFWwindow*,double,double);
 
-/*! @brief The function signature for keyboard key callbacks.
+/*! @brief The function pointer type for keyboard key callbacks.
  *
- *  This is the function signature for keyboard key callback functions.
+ *  This is the function pointer type for keyboard key callbacks.  A keyboard
+ *  key callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] key The [keyboard key](@ref keys) that was pressed or released.
  *  @param[in] scancode The system-specific scancode of the key.
- *  @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`.
+ *  @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`.  Future
+ *  releases may add more actions.
  *  @param[in] mods Bit field describing which [modifier keys](@ref mods) were
  *  held down.
  *
@@ -1433,9 +1499,13 @@
  */
 typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int);
 
-/*! @brief The function signature for Unicode character callbacks.
+/*! @brief The function pointer type for Unicode character callbacks.
  *
- *  This is the function signature for Unicode character callback functions.
+ *  This is the function pointer type for Unicode character callbacks.
+ *  A Unicode character callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, unsigned int codepoint)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] codepoint The Unicode code point of the character.
@@ -1450,12 +1520,16 @@
  */
 typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int);
 
-/*! @brief The function signature for Unicode character with modifiers
+/*! @brief The function pointer type for Unicode character with modifiers
  *  callbacks.
  *
- *  This is the function signature for Unicode character with modifiers callback
- *  functions.  It is called for each input character, regardless of what
- *  modifier keys are held down.
+ *  This is the function pointer type for Unicode character with modifiers
+ *  callbacks.  It is called for each input character, regardless of what
+ *  modifier keys are held down.  A Unicode character with modifiers callback
+ *  function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
  *  @param[in] codepoint The Unicode code point of the character.
@@ -1473,14 +1547,21 @@
  */
 typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int);
 
-/*! @brief The function signature for file drop callbacks.
+/*! @brief The function pointer type for path drop callbacks.
  *
- *  This is the function signature for file drop callbacks.
+ *  This is the function pointer type for path drop callbacks.  A path drop
+ *  callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWwindow* window, int path_count, const char* paths[])
+ *  @endcode
  *
  *  @param[in] window The window that received the event.
- *  @param[in] count The number of dropped files.
+ *  @param[in] path_count The number of dropped paths.
  *  @param[in] paths The UTF-8 encoded file and/or directory path names.
  *
+ *  @pointer_lifetime The path array and its strings are valid until the
+ *  callback function returns.
+ *
  *  @sa @ref path_drop
  *  @sa @ref glfwSetDropCallback
  *
@@ -1488,15 +1569,19 @@
  *
  *  @ingroup input
  */
-typedef void (* GLFWdropfun)(GLFWwindow*,int,const char**);
+typedef void (* GLFWdropfun)(GLFWwindow*,int,const char*[]);
 
-/*! @brief The function signature for monitor configuration callbacks.
+/*! @brief The function pointer type for monitor configuration callbacks.
  *
- *  This is the function signature for monitor configuration callback functions.
+ *  This is the function pointer type for monitor configuration callbacks.
+ *  A monitor callback function has the following signature:
+ *  @code
+ *  void function_name(GLFWmonitor* monitor, int event)
+ *  @endcode
  *
  *  @param[in] monitor The monitor that was connected or disconnected.
- *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Remaining
- *  values reserved for future use.
+ *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future
+ *  releases may add more events.
  *
  *  @sa @ref monitor_event
  *  @sa @ref glfwSetMonitorCallback
@@ -1507,14 +1592,17 @@
  */
 typedef void (* GLFWmonitorfun)(GLFWmonitor*,int);
 
-/*! @brief The function signature for joystick configuration callbacks.
+/*! @brief The function pointer type for joystick configuration callbacks.
  *
- *  This is the function signature for joystick configuration callback
- *  functions.
+ *  This is the function pointer type for joystick configuration callbacks.
+ *  A joystick configuration callback function has the following signature:
+ *  @code
+ *  void function_name(int jid, int event)
+ *  @endcode
  *
  *  @param[in] jid The joystick that was connected or disconnected.
- *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Remaining
- *  values reserved for future use.
+ *  @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.  Future
+ *  releases may add more events.
  *
  *  @sa @ref joystick_event
  *  @sa @ref glfwSetJoystickCallback
@@ -1849,10 +1937,17 @@
  *  Once set, the error callback remains set even after the library has been
  *  terminated.
  *
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set.
  *
+ *  @callback_signature
+ *  @code
+ *  void callback_name(int error_code, const char* description)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [callback pointer type](@ref GLFWerrorfun).
+ *
  *  @errors None.
  *
  *  @remark This function may be called before @ref glfwInit.
@@ -1866,7 +1961,7 @@
  *
  *  @ingroup init
  */
-GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun);
+GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
 
 /*! @brief Returns the currently connected monitors.
  *
@@ -1946,7 +2041,7 @@
  */
 GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
 
-/*! @brief Retrives the work area of the monitor.
+/*! @brief Retrieves the work area of the monitor.
  *
  *  This function returns the position, in screen coordinates, of the upper-left
  *  corner of the work area of the specified monitor along with the work area
@@ -2125,11 +2220,18 @@
  *  currently set callback.  This is called when a monitor is connected to or
  *  disconnected from the system.
  *
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWmonitor* monitor, int event)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWmonitorfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -2140,7 +2242,7 @@
  *
  *  @ingroup monitor
  */
-GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun);
+GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
 
 /*! @brief Returns the available video modes for the specified monitor.
  *
@@ -2223,7 +2325,7 @@
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
  *  GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
  *
- *  @remark @wayland Gamma handling is a priviledged protocol, this function
+ *  @remark @wayland Gamma handling is a privileged protocol, this function
  *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -2247,7 +2349,7 @@
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
  *  GLFW_PLATFORM_ERROR.
  *
- *  @remark @wayland Gamma handling is a priviledged protocol, this function
+ *  @remark @wayland Gamma handling is a privileged protocol, this function
  *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while
  *  returning `NULL`.
  *
@@ -2291,7 +2393,7 @@
  *
  *  @remark @win32 The gamma ramp size must be 256.
  *
- *  @remark @wayland Gamma handling is a priviledged protocol, this function
+ *  @remark @wayland Gamma handling is a privileged protocol, this function
  *  will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.
  *
  *  @pointer_lifetime The specified gamma ramp is copied before this function
@@ -2510,7 +2612,7 @@
  *
  *  @remark @macos When activating frame autosaving with
  *  [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified
- *  window size and position may be overriden by previously saved values.
+ *  window size and position may be overridden by previously saved values.
  *
  *  @remark @x11 Some window managers will not respect the placement of
  *  initially hidden windows.
@@ -3477,11 +3579,18 @@
  *  area of the window.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int xpos, int ypos)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowposfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @remark @wayland This callback will never be called, as there is no way for
@@ -3495,7 +3604,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun);
+GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback);
 
 /*! @brief Sets the size callback for the specified window.
  *
@@ -3504,11 +3613,18 @@
  *  in screen coordinates, of the content area of the window.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int width, int height)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowsizefun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3520,7 +3636,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun);
+GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback);
 
 /*! @brief Sets the close callback for the specified window.
  *
@@ -3534,11 +3650,18 @@
  *  The close callback is not triggered by @ref glfwDestroyWindow.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowclosefun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @remark @macos Selecting Quit from the application menu will trigger the
@@ -3553,7 +3676,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun);
+GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback);
 
 /*! @brief Sets the refresh callback for the specified window.
  *
@@ -3566,11 +3689,18 @@
  *  very infrequently or never at all.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window);
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowrefreshfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3582,7 +3712,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun);
+GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback);
 
 /*! @brief Sets the focus callback for the specified window.
  *
@@ -3595,11 +3725,18 @@
  *  and @ref glfwSetMouseButtonCallback.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int focused)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowfocusfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3610,7 +3747,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun);
+GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback);
 
 /*! @brief Sets the iconify callback for the specified window.
  *
@@ -3618,11 +3755,18 @@
  *  is called when the window is iconified or restored.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int iconified)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowiconifyfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @remark @wayland The wl_shell protocol has no concept of iconification,
@@ -3636,7 +3780,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun);
+GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback);
 
 /*! @brief Sets the maximize callback for the specified window.
  *
@@ -3644,11 +3788,18 @@
  *  is called when the window is maximized or restored.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int maximized)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowmaximizefun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3659,7 +3810,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun cbfun);
+GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback);
 
 /*! @brief Sets the framebuffer resize callback for the specified window.
  *
@@ -3667,11 +3818,18 @@
  *  which is called when the framebuffer of the specified window is resized.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int width, int height)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWframebuffersizefun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3682,7 +3840,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun);
+GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback);
 
 /*! @brief Sets the window content scale callback for the specified window.
  *
@@ -3690,11 +3848,18 @@
  *  which is called when the content scale of the specified window changes.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, float xscale, float yscale)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWwindowcontentscalefun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -3706,7 +3871,7 @@
  *
  *  @ingroup window
  */
-GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun cbfun);
+GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback);
 
 /*! @brief Processes all pending events.
  *
@@ -4028,9 +4193,11 @@
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
  *  GLFW_PLATFORM_ERROR.
  *
+ *  @remark The contents of the returned string may change when a keyboard
+ *  layout change event is received.
+ *
  *  @pointer_lifetime The returned string is allocated and freed by GLFW.  You
- *  should not free it yourself.  It is valid until the next call to @ref
- *  glfwGetKeyName, or until the library is terminated.
+ *  should not free it yourself.  It is valid until the library is terminated.
  *
  *  @thread_safety This function must only be called from the main thread.
  *
@@ -4353,11 +4520,18 @@
  *  scancode may be zero.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new key callback, or `NULL` to remove the currently
+ *  @param[in] callback The new key callback, or `NULL` to remove the currently
  *  set callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWkeyfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4369,7 +4543,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
+GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback);
 
 /*! @brief Sets the Unicode character callback.
  *
@@ -4389,11 +4563,18 @@
  *  on Windows.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, unsigned int codepoint)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWcharfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4405,7 +4586,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
+GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback);
 
 /*! @brief Sets the Unicode character with modifiers callback.
  *
@@ -4423,11 +4604,18 @@
  *  [key callback](@ref glfwSetKeyCallback) instead.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or an
  *  [error](@ref error_handling) occurred.
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, unsigned int codepoint, int mods)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWcharmodsfun).
+ *
  *  @deprecated Scheduled for removal in version 4.0.
  *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
@@ -4440,7 +4628,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun);
+GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback);
 
 /*! @brief Sets the mouse button callback.
  *
@@ -4454,11 +4642,18 @@
  *  [window focus callback](@ref glfwSetWindowFocusCallback) has been called.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int button, int action, int mods)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWmousebuttonfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4470,7 +4665,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun);
+GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback);
 
 /*! @brief Sets the cursor position callback.
  *
@@ -4480,11 +4675,18 @@
  *  content area of the window.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, double xpos, double ypos);
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWcursorposfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4495,20 +4697,27 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun);
+GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback);
 
-/*! @brief Sets the cursor enter/exit callback.
+/*! @brief Sets the cursor enter/leave callback.
  *
  *  This function sets the cursor boundary crossing callback of the specified
  *  window, which is called when the cursor enters or leaves the content area of
  *  the window.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int entered)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWcursorenterfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4519,7 +4728,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun);
+GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback);
 
 /*! @brief Sets the scroll callback.
  *
@@ -4531,11 +4740,18 @@
  *  wheel or a touchpad scrolling area.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new scroll callback, or `NULL` to remove the currently
- *  set callback.
+ *  @param[in] callback The new scroll callback, or `NULL` to remove the
+ *  currently set callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, double xoffset, double yoffset)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWscrollfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4546,12 +4762,12 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun);
+GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback);
 
-/*! @brief Sets the file drop callback.
+/*! @brief Sets the path drop callback.
  *
- *  This function sets the file drop callback of the specified window, which is
- *  called when one or more dragged files are dropped on the window.
+ *  This function sets the path drop callback of the specified window, which is
+ *  called when one or more dragged paths are dropped on the window.
  *
  *  Because the path array and its strings may have been generated specifically
  *  for that event, they are not guaranteed to be valid after the callback has
@@ -4559,11 +4775,18 @@
  *  make a deep copy.
  *
  *  @param[in] window The window whose callback to set.
- *  @param[in] cbfun The new file drop callback, or `NULL` to remove the
+ *  @param[in] callback The new file drop callback, or `NULL` to remove the
  *  currently set callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(GLFWwindow* window, int path_count, const char* paths[])
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWdropfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @remark @wayland File drop is currently unimplemented.
@@ -4576,7 +4799,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun);
+GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback);
 
 /*! @brief Returns whether the specified joystick is present.
  *
@@ -4764,7 +4987,7 @@
  */
 GLFWAPI const char* glfwGetJoystickName(int jid);
 
-/*! @brief Returns the SDL comaptible GUID of the specified joystick.
+/*! @brief Returns the SDL compatible GUID of the specified joystick.
  *
  *  This function returns the SDL compatible GUID, as a UTF-8 encoded
  *  hexadecimal string, of the specified joystick.  The returned string is
@@ -4895,11 +5118,18 @@
  *  called by joystick functions.  The function will then return whatever it
  *  returns if the joystick is not present.
  *
- *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
+ *  @param[in] callback The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or the
  *  library had not been [initialized](@ref intro_init).
  *
+ *  @callback_signature
+ *  @code
+ *  void function_name(int jid, int event)
+ *  @endcode
+ *  For more information about the callback parameters, see the
+ *  [function pointer type](@ref GLFWjoystickfun).
+ *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function must only be called from the main thread.
@@ -4910,7 +5140,7 @@
  *
  *  @ingroup input
  */
-GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun);
+GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
 
 /*! @brief Adds the specified SDL_GameControllerDB gamepad mappings.
  *
@@ -4978,7 +5208,7 @@
 
 /*! @brief Retrieves the state of the specified joystick remapped as a gamepad.
  *
- *  This function retrives the state of the specified joystick remapped to
+ *  This function retrieves the state of the specified joystick remapped to
  *  an Xbox-like gamepad.
  *
  *  If the specified joystick is not present or does not have a gamepad mapping
@@ -5069,23 +5299,26 @@
  */
 GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
 
-/*! @brief Returns the value of the GLFW timer.
+/*! @brief Returns the GLFW time.
  *
- *  This function returns the value of the GLFW timer.  Unless the timer has
- *  been set using @ref glfwSetTime, the timer measures time elapsed since GLFW
- *  was initialized.
+ *  This function returns the current GLFW time, in seconds.  Unless the time
+ *  has been set using @ref glfwSetTime it measures time elapsed since GLFW was
+ *  initialized.
  *
+ *  This function and @ref glfwSetTime are helper functions on top of @ref
+ *  glfwGetTimerFrequency and @ref glfwGetTimerValue.
+ *
  *  The resolution of the timer is system dependent, but is usually on the order
  *  of a few micro- or nanoseconds.  It uses the highest-resolution monotonic
  *  time source on each supported platform.
  *
- *  @return The current value, in seconds, or zero if an
+ *  @return The current time, in seconds, or zero if an
  *  [error](@ref error_handling) occurred.
  *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
  *
  *  @thread_safety This function may be called from any thread.  Reading and
- *  writing of the internal timer offset is not atomic, so it needs to be
+ *  writing of the internal base time is not atomic, so it needs to be
  *  externally synchronized with calls to @ref glfwSetTime.
  *
  *  @sa @ref time
@@ -5096,23 +5329,26 @@
  */
 GLFWAPI double glfwGetTime(void);
 
-/*! @brief Sets the GLFW timer.
+/*! @brief Sets the GLFW time.
  *
- *  This function sets the value of the GLFW timer.  It then continues to count
- *  up from that value.  The value must be a positive finite number less than
- *  or equal to 18446744073.0, which is approximately 584.5 years.
+ *  This function sets the current GLFW time, in seconds.  The value must be
+ *  a positive finite number less than or equal to 18446744073.0, which is
+ *  approximately 584.5 years.
  *
+ *  This function and @ref glfwGetTime are helper functions on top of @ref
+ *  glfwGetTimerFrequency and @ref glfwGetTimerValue.
+ *
  *  @param[in] time The new value, in seconds.
  *
  *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
  *  GLFW_INVALID_VALUE.
  *
- *  @remark The upper limit of the timer is calculated as
+ *  @remark The upper limit of GLFW time is calculated as
  *  floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations
  *  storing nanoseconds in 64 bits.  The limit may be increased in the future.
  *
  *  @thread_safety This function may be called from any thread.  Reading and
- *  writing of the internal timer offset is not atomic, so it needs to be
+ *  writing of the internal base time is not atomic, so it needs to be
  *  externally synchronized with calls to @ref glfwGetTime.
  *
  *  @sa @ref time
@@ -5416,7 +5652,7 @@
  *
  *  This function returns an array of names of Vulkan instance extensions required
  *  by GLFW for creating Vulkan surfaces for GLFW windows.  If successful, the
- *  list will always contains `VK_KHR_surface`, so if you don't require any
+ *  list will always contain `VK_KHR_surface`, so if you don't require any
  *  additional extensions you can pass this list directly to the
  *  `VkInstanceCreateInfo` struct.
  *
diff --git a/glfw/include/GLFW/glfw3native.h b/glfw/include/GLFW/glfw3native.h
--- a/glfw/include/GLFW/glfw3native.h
+++ b/glfw/include/GLFW/glfw3native.h
@@ -1,525 +1,525 @@
-/*************************************************************************
- * GLFW 3.3 - www.glfw.org
- * A library for OpenGL, window and input
- *------------------------------------------------------------------------
- * Copyright (c) 2002-2006 Marcus Geelnard
- * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- *    claim that you wrote the original software. If you use this software
- *    in a product, an acknowledgment in the product documentation would
- *    be appreciated but is not required.
- *
- * 2. Altered source versions must be plainly marked as such, and must not
- *    be misrepresented as being the original software.
- *
- * 3. This notice may not be removed or altered from any source
- *    distribution.
- *
- *************************************************************************/
-
-#ifndef _glfw3_native_h_
-#define _glfw3_native_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*************************************************************************
- * Doxygen documentation
- *************************************************************************/
-
-/*! @file glfw3native.h
- *  @brief The header of the native access functions.
- *
- *  This is the header file of the native access functions.  See @ref native for
- *  more information.
- */
-/*! @defgroup native Native access
- *  @brief Functions related to accessing native handles.
- *
- *  **By using the native access functions you assert that you know what you're
- *  doing and how to fix problems caused by using them.  If you don't, you
- *  shouldn't be using them.**
- *
- *  Before the inclusion of @ref glfw3native.h, you may define zero or more
- *  window system API macro and zero or more context creation API macros.
- *
- *  The chosen backends must match those the library was compiled for.  Failure
- *  to do this will cause a link-time error.
- *
- *  The available window API macros are:
- *  * `GLFW_EXPOSE_NATIVE_WIN32`
- *  * `GLFW_EXPOSE_NATIVE_COCOA`
- *  * `GLFW_EXPOSE_NATIVE_X11`
- *  * `GLFW_EXPOSE_NATIVE_WAYLAND`
- *
- *  The available context API macros are:
- *  * `GLFW_EXPOSE_NATIVE_WGL`
- *  * `GLFW_EXPOSE_NATIVE_NSGL`
- *  * `GLFW_EXPOSE_NATIVE_GLX`
- *  * `GLFW_EXPOSE_NATIVE_EGL`
- *  * `GLFW_EXPOSE_NATIVE_OSMESA`
- *
- *  These macros select which of the native access functions that are declared
- *  and which platform-specific headers to include.  It is then up your (by
- *  definition platform-specific) code to handle which of these should be
- *  defined.
- */
-
-
-/*************************************************************************
- * System headers and types
- *************************************************************************/
-
-#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
- // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
- // example to allow applications to correctly declare a GL_ARB_debug_output
- // callback) but windows.h assumes no one will define APIENTRY before it does
- #if defined(GLFW_APIENTRY_DEFINED)
-  #undef APIENTRY
-  #undef GLFW_APIENTRY_DEFINED
- #endif
- #include <windows.h>
-#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
- #if defined(__OBJC__)
-  #import <Cocoa/Cocoa.h>
- #else
-  #include <ApplicationServices/ApplicationServices.h>
-  typedef void* id;
- #endif
-#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
- #include <X11/Xlib.h>
- #include <X11/extensions/Xrandr.h>
-#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
- #include <wayland-client.h>
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WGL)
- /* WGL is declared by windows.h */
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_NSGL)
- /* NSGL is declared by Cocoa.h */
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_GLX)
- #include <GL/glx.h>
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_EGL)
- #include <EGL/egl.h>
-#endif
-#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
- #include <GL/osmesa.h>
-#endif
-
-
-/*************************************************************************
- * Functions
- *************************************************************************/
-
-#if defined(GLFW_EXPOSE_NATIVE_WIN32)
-/*! @brief Returns the adapter device name of the specified monitor.
- *
- *  @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
- *  of the specified monitor, or `NULL` if an [error](@ref error_handling)
- *  occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.1.
- *
- *  @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the display device name of the specified monitor.
- *
- *  @return The UTF-8 encoded display device name (for example
- *  `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.1.
- *
- *  @ingroup native
- */
-GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `HWND` of the specified window.
- *
- *  @return The `HWND` of the specified window, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WGL)
-/*! @brief Returns the `HGLRC` of the specified window.
- *
- *  @return The `HGLRC` of the specified window, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_COCOA)
-/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
- *
- *  @return The `CGDirectDisplayID` of the specified monitor, or
- *  `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.1.
- *
- *  @ingroup native
- */
-GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `NSWindow` of the specified window.
- *
- *  @return The `NSWindow` of the specified window, or `nil` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_NSGL)
-/*! @brief Returns the `NSOpenGLContext` of the specified window.
- *
- *  @return The `NSOpenGLContext` of the specified window, or `nil` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_X11)
-/*! @brief Returns the `Display` used by GLFW.
- *
- *  @return The `Display` used by GLFW, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI Display* glfwGetX11Display(void);
-
-/*! @brief Returns the `RRCrtc` of the specified monitor.
- *
- *  @return The `RRCrtc` of the specified monitor, or `None` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.1.
- *
- *  @ingroup native
- */
-GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
-
-/*! @brief Returns the `RROutput` of the specified monitor.
- *
- *  @return The `RROutput` of the specified monitor, or `None` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.1.
- *
- *  @ingroup native
- */
-GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the `Window` of the specified window.
- *
- *  @return The `Window` of the specified window, or `None` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
-
-/*! @brief Sets the current primary selection to the specified string.
- *
- *  @param[in] string A UTF-8 encoded string.
- *
- *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- *  GLFW_PLATFORM_ERROR.
- *
- *  @pointer_lifetime The specified string is copied before this function
- *  returns.
- *
- *  @thread_safety This function must only be called from the main thread.
- *
- *  @sa @ref clipboard
- *  @sa glfwGetX11SelectionString
- *  @sa glfwSetClipboardString
- *
- *  @since Added in version 3.3.
- *
- *  @ingroup native
- */
-GLFWAPI void glfwSetX11SelectionString(const char* string);
-
-/*! @brief Returns the contents of the current primary selection as a string.
- *
- *  If the selection is empty or if its contents cannot be converted, `NULL`
- *  is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
- *
- *  @return The contents of the selection as a UTF-8 encoded string, or `NULL`
- *  if an [error](@ref error_handling) occurred.
- *
- *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
- *  GLFW_PLATFORM_ERROR.
- *
- *  @pointer_lifetime The returned string is allocated and freed by GLFW. You
- *  should not free it yourself. It is valid until the next call to @ref
- *  glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
- *  library is terminated.
- *
- *  @thread_safety This function must only be called from the main thread.
- *
- *  @sa @ref clipboard
- *  @sa glfwSetX11SelectionString
- *  @sa glfwGetClipboardString
- *
- *  @since Added in version 3.3.
- *
- *  @ingroup native
- */
-GLFWAPI const char* glfwGetX11SelectionString(void);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_GLX)
-/*! @brief Returns the `GLXContext` of the specified window.
- *
- *  @return The `GLXContext` of the specified window, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
-
-/*! @brief Returns the `GLXWindow` of the specified window.
- *
- *  @return The `GLXWindow` of the specified window, or `None` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.2.
- *
- *  @ingroup native
- */
-GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
-/*! @brief Returns the `struct wl_display*` used by GLFW.
- *
- *  @return The `struct wl_display*` used by GLFW, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.2.
- *
- *  @ingroup native
- */
-GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
-
-/*! @brief Returns the `struct wl_output*` of the specified monitor.
- *
- *  @return The `struct wl_output*` of the specified monitor, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.2.
- *
- *  @ingroup native
- */
-GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
-
-/*! @brief Returns the main `struct wl_surface*` of the specified window.
- *
- *  @return The main `struct wl_surface*` of the specified window, or `NULL` if
- *  an [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.2.
- *
- *  @ingroup native
- */
-GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_EGL)
-/*! @brief Returns the `EGLDisplay` used by GLFW.
- *
- *  @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
-
-/*! @brief Returns the `EGLContext` of the specified window.
- *
- *  @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
-
-/*! @brief Returns the `EGLSurface` of the specified window.
- *
- *  @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.0.
- *
- *  @ingroup native
- */
-GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
-#endif
-
-#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
-/*! @brief Retrieves the color buffer associated with the specified window.
- *
- *  @param[in] window The window whose color buffer to retrieve.
- *  @param[out] width Where to store the width of the color buffer, or `NULL`.
- *  @param[out] height Where to store the height of the color buffer, or `NULL`.
- *  @param[out] format Where to store the OSMesa pixel format of the color
- *  buffer, or `NULL`.
- *  @param[out] buffer Where to store the address of the color buffer, or
- *  `NULL`.
- *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.3.
- *
- *  @ingroup native
- */
-GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
-
-/*! @brief Retrieves the depth buffer associated with the specified window.
- *
- *  @param[in] window The window whose depth buffer to retrieve.
- *  @param[out] width Where to store the width of the depth buffer, or `NULL`.
- *  @param[out] height Where to store the height of the depth buffer, or `NULL`.
- *  @param[out] bytesPerValue Where to store the number of bytes per depth
- *  buffer element, or `NULL`.
- *  @param[out] buffer Where to store the address of the depth buffer, or
- *  `NULL`.
- *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.3.
- *
- *  @ingroup native
- */
-GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
-
-/*! @brief Returns the `OSMesaContext` of the specified window.
- *
- *  @return The `OSMesaContext` of the specified window, or `NULL` if an
- *  [error](@ref error_handling) occurred.
- *
- *  @thread_safety This function may be called from any thread.  Access is not
- *  synchronized.
- *
- *  @since Added in version 3.3.
- *
- *  @ingroup native
- */
-GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _glfw3_native_h_ */
-
+/*************************************************************************
+ * GLFW 3.3 - www.glfw.org
+ * A library for OpenGL, window and input
+ *------------------------------------------------------------------------
+ * Copyright (c) 2002-2006 Marcus Geelnard
+ * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would
+ *    be appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not
+ *    be misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ *    distribution.
+ *
+ *************************************************************************/
+
+#ifndef _glfw3_native_h_
+#define _glfw3_native_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*************************************************************************
+ * Doxygen documentation
+ *************************************************************************/
+
+/*! @file glfw3native.h
+ *  @brief The header of the native access functions.
+ *
+ *  This is the header file of the native access functions.  See @ref native for
+ *  more information.
+ */
+/*! @defgroup native Native access
+ *  @brief Functions related to accessing native handles.
+ *
+ *  **By using the native access functions you assert that you know what you're
+ *  doing and how to fix problems caused by using them.  If you don't, you
+ *  shouldn't be using them.**
+ *
+ *  Before the inclusion of @ref glfw3native.h, you may define zero or more
+ *  window system API macro and zero or more context creation API macros.
+ *
+ *  The chosen backends must match those the library was compiled for.  Failure
+ *  to do this will cause a link-time error.
+ *
+ *  The available window API macros are:
+ *  * `GLFW_EXPOSE_NATIVE_WIN32`
+ *  * `GLFW_EXPOSE_NATIVE_COCOA`
+ *  * `GLFW_EXPOSE_NATIVE_X11`
+ *  * `GLFW_EXPOSE_NATIVE_WAYLAND`
+ *
+ *  The available context API macros are:
+ *  * `GLFW_EXPOSE_NATIVE_WGL`
+ *  * `GLFW_EXPOSE_NATIVE_NSGL`
+ *  * `GLFW_EXPOSE_NATIVE_GLX`
+ *  * `GLFW_EXPOSE_NATIVE_EGL`
+ *  * `GLFW_EXPOSE_NATIVE_OSMESA`
+ *
+ *  These macros select which of the native access functions that are declared
+ *  and which platform-specific headers to include.  It is then up your (by
+ *  definition platform-specific) code to handle which of these should be
+ *  defined.
+ */
+
+
+/*************************************************************************
+ * System headers and types
+ *************************************************************************/
+
+#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
+ // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
+ // example to allow applications to correctly declare a GL_ARB_debug_output
+ // callback) but windows.h assumes no one will define APIENTRY before it does
+ #if defined(GLFW_APIENTRY_DEFINED)
+  #undef APIENTRY
+  #undef GLFW_APIENTRY_DEFINED
+ #endif
+ #include <windows.h>
+#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
+ #if defined(__OBJC__)
+  #import <Cocoa/Cocoa.h>
+ #else
+  #include <ApplicationServices/ApplicationServices.h>
+  typedef void* id;
+ #endif
+#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
+ #include <X11/Xlib.h>
+ #include <X11/extensions/Xrandr.h>
+#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
+ #include <wayland-client.h>
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WGL)
+ /* WGL is declared by windows.h */
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_NSGL)
+ /* NSGL is declared by Cocoa.h */
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_GLX)
+ #include <GL/glx.h>
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_EGL)
+ #include <EGL/egl.h>
+#endif
+#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
+ #include <GL/osmesa.h>
+#endif
+
+
+/*************************************************************************
+ * Functions
+ *************************************************************************/
+
+#if defined(GLFW_EXPOSE_NATIVE_WIN32)
+/*! @brief Returns the adapter device name of the specified monitor.
+ *
+ *  @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
+ *  of the specified monitor, or `NULL` if an [error](@ref error_handling)
+ *  occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.1.
+ *
+ *  @ingroup native
+ */
+GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
+
+/*! @brief Returns the display device name of the specified monitor.
+ *
+ *  @return The UTF-8 encoded display device name (for example
+ *  `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.1.
+ *
+ *  @ingroup native
+ */
+GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `HWND` of the specified window.
+ *
+ *  @return The `HWND` of the specified window, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WGL)
+/*! @brief Returns the `HGLRC` of the specified window.
+ *
+ *  @return The `HGLRC` of the specified window, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_COCOA)
+/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
+ *
+ *  @return The `CGDirectDisplayID` of the specified monitor, or
+ *  `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.1.
+ *
+ *  @ingroup native
+ */
+GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `NSWindow` of the specified window.
+ *
+ *  @return The `NSWindow` of the specified window, or `nil` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_NSGL)
+/*! @brief Returns the `NSOpenGLContext` of the specified window.
+ *
+ *  @return The `NSOpenGLContext` of the specified window, or `nil` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_X11)
+/*! @brief Returns the `Display` used by GLFW.
+ *
+ *  @return The `Display` used by GLFW, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI Display* glfwGetX11Display(void);
+
+/*! @brief Returns the `RRCrtc` of the specified monitor.
+ *
+ *  @return The `RRCrtc` of the specified monitor, or `None` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.1.
+ *
+ *  @ingroup native
+ */
+GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
+
+/*! @brief Returns the `RROutput` of the specified monitor.
+ *
+ *  @return The `RROutput` of the specified monitor, or `None` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.1.
+ *
+ *  @ingroup native
+ */
+GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the `Window` of the specified window.
+ *
+ *  @return The `Window` of the specified window, or `None` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
+
+/*! @brief Sets the current primary selection to the specified string.
+ *
+ *  @param[in] string A UTF-8 encoded string.
+ *
+ *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ *  GLFW_PLATFORM_ERROR.
+ *
+ *  @pointer_lifetime The specified string is copied before this function
+ *  returns.
+ *
+ *  @thread_safety This function must only be called from the main thread.
+ *
+ *  @sa @ref clipboard
+ *  @sa glfwGetX11SelectionString
+ *  @sa glfwSetClipboardString
+ *
+ *  @since Added in version 3.3.
+ *
+ *  @ingroup native
+ */
+GLFWAPI void glfwSetX11SelectionString(const char* string);
+
+/*! @brief Returns the contents of the current primary selection as a string.
+ *
+ *  If the selection is empty or if its contents cannot be converted, `NULL`
+ *  is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
+ *
+ *  @return The contents of the selection as a UTF-8 encoded string, or `NULL`
+ *  if an [error](@ref error_handling) occurred.
+ *
+ *  @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
+ *  GLFW_PLATFORM_ERROR.
+ *
+ *  @pointer_lifetime The returned string is allocated and freed by GLFW. You
+ *  should not free it yourself. It is valid until the next call to @ref
+ *  glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
+ *  library is terminated.
+ *
+ *  @thread_safety This function must only be called from the main thread.
+ *
+ *  @sa @ref clipboard
+ *  @sa glfwSetX11SelectionString
+ *  @sa glfwGetClipboardString
+ *
+ *  @since Added in version 3.3.
+ *
+ *  @ingroup native
+ */
+GLFWAPI const char* glfwGetX11SelectionString(void);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_GLX)
+/*! @brief Returns the `GLXContext` of the specified window.
+ *
+ *  @return The `GLXContext` of the specified window, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
+
+/*! @brief Returns the `GLXWindow` of the specified window.
+ *
+ *  @return The `GLXWindow` of the specified window, or `None` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.2.
+ *
+ *  @ingroup native
+ */
+GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
+/*! @brief Returns the `struct wl_display*` used by GLFW.
+ *
+ *  @return The `struct wl_display*` used by GLFW, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.2.
+ *
+ *  @ingroup native
+ */
+GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
+
+/*! @brief Returns the `struct wl_output*` of the specified monitor.
+ *
+ *  @return The `struct wl_output*` of the specified monitor, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.2.
+ *
+ *  @ingroup native
+ */
+GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
+
+/*! @brief Returns the main `struct wl_surface*` of the specified window.
+ *
+ *  @return The main `struct wl_surface*` of the specified window, or `NULL` if
+ *  an [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.2.
+ *
+ *  @ingroup native
+ */
+GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_EGL)
+/*! @brief Returns the `EGLDisplay` used by GLFW.
+ *
+ *  @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
+
+/*! @brief Returns the `EGLContext` of the specified window.
+ *
+ *  @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
+
+/*! @brief Returns the `EGLSurface` of the specified window.
+ *
+ *  @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.0.
+ *
+ *  @ingroup native
+ */
+GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
+#endif
+
+#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
+/*! @brief Retrieves the color buffer associated with the specified window.
+ *
+ *  @param[in] window The window whose color buffer to retrieve.
+ *  @param[out] width Where to store the width of the color buffer, or `NULL`.
+ *  @param[out] height Where to store the height of the color buffer, or `NULL`.
+ *  @param[out] format Where to store the OSMesa pixel format of the color
+ *  buffer, or `NULL`.
+ *  @param[out] buffer Where to store the address of the color buffer, or
+ *  `NULL`.
+ *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.3.
+ *
+ *  @ingroup native
+ */
+GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
+
+/*! @brief Retrieves the depth buffer associated with the specified window.
+ *
+ *  @param[in] window The window whose depth buffer to retrieve.
+ *  @param[out] width Where to store the width of the depth buffer, or `NULL`.
+ *  @param[out] height Where to store the height of the depth buffer, or `NULL`.
+ *  @param[out] bytesPerValue Where to store the number of bytes per depth
+ *  buffer element, or `NULL`.
+ *  @param[out] buffer Where to store the address of the depth buffer, or
+ *  `NULL`.
+ *  @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.3.
+ *
+ *  @ingroup native
+ */
+GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
+
+/*! @brief Returns the `OSMesaContext` of the specified window.
+ *
+ *  @return The `OSMesaContext` of the specified window, or `NULL` if an
+ *  [error](@ref error_handling) occurred.
+ *
+ *  @thread_safety This function may be called from any thread.  Access is not
+ *  synchronized.
+ *
+ *  @since Added in version 3.3.
+ *
+ *  @ingroup native
+ */
+GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _glfw3_native_h_ */
+
diff --git a/glfw/src/cocoa_init.m b/glfw/src/cocoa_init.m
--- a/glfw/src/cocoa_init.m
+++ b/glfw/src/cocoa_init.m
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 #include <sys/param.h> // For MAXPATHLEN
@@ -429,9 +431,8 @@
         // In case we are unbundled, make us a proper UI application
         [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
 
-        // Menu bar setup must go between sharedApplication above and
-        // finishLaunching below, in order to properly emulate the behavior
-        // of NSApplicationMain
+        // Menu bar setup must go between sharedApplication and finishLaunching
+        // in order to properly emulate the behavior of NSApplicationMain
 
         if ([[NSBundle mainBundle] pathForResource:@"MainMenu" ofType:@"nib"])
         {
@@ -446,9 +447,9 @@
 
 - (void)applicationDidFinishLaunching:(NSNotification *)notification
 {
-    [NSApp stop:nil];
-
+    _glfw.ns.finishedLaunching = GLFW_TRUE;
     _glfwPlatformPostEmptyEvent();
+    [NSApp stop:nil];
 }
 
 - (void)applicationDidHide:(NSNotification *)notification
diff --git a/glfw/src/cocoa_joystick.h b/glfw/src/cocoa_joystick.h
--- a/glfw/src/cocoa_joystick.h
+++ b/glfw/src/cocoa_joystick.h
@@ -30,7 +30,7 @@
 #include <IOKit/hid/IOHIDKeys.h>
 
 #define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickNS ns
-#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyJoystick; }
 
 #define _GLFW_PLATFORM_MAPPING_NAME "Mac OS X"
 
diff --git a/glfw/src/cocoa_joystick.m b/glfw/src/cocoa_joystick.m
--- a/glfw/src/cocoa_joystick.m
+++ b/glfw/src/cocoa_joystick.m
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -329,7 +331,7 @@
         return;
     }
 
-    for (int i = 0;  i < sizeof(usages) / sizeof(long);  i++)
+    for (size_t i = 0;  i < sizeof(usages) / sizeof(long);  i++)
     {
         const long page = kHIDPage_GenericDesktop;
 
diff --git a/glfw/src/cocoa_monitor.m b/glfw/src/cocoa_monitor.m
--- a/glfw/src/cocoa_monitor.m
+++ b/glfw/src/cocoa_monitor.m
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -142,7 +144,7 @@
 // Convert Core Graphics display mode to GLFW video mode
 //
 static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode,
-                                            CVDisplayLinkRef link)
+                                            double fallbackRefreshRate)
 {
     GLFWvidmode result;
     result.width = (int) CGDisplayModeGetWidth(mode);
@@ -150,11 +152,7 @@
     result.refreshRate = (int) round(CGDisplayModeGetRefreshRate(mode));
 
     if (result.refreshRate == 0)
-    {
-        const CVTime time = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(link);
-        if (!(time.flags & kCVTimeIsIndefinite))
-            result.refreshRate = (int) (time.timeScale / (double) time.timeValue);
-    }
+        result.refreshRate = (int) round(fallbackRefreshRate);
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100
     CFStringRef format = CGDisplayModeCopyPixelEncoding(mode);
@@ -213,7 +211,7 @@
 
 // Finds and caches the NSScreen corresponding to the specified monitor
 //
-GLFWbool refreshMonitorScreen(_GLFWmonitor* monitor)
+static GLFWbool refreshMonitorScreen(_GLFWmonitor* monitor)
 {
     if (monitor->ns.screen)
         return GLFW_TRUE;
@@ -236,7 +234,69 @@
     return GLFW_FALSE;
 }
 
+// Returns the display refresh rate queried from the I/O registry
+//
+static double getFallbackRefreshRate(CGDirectDisplayID displayID)
+{
+    double refreshRate = 60.0;
 
+    io_iterator_t it;
+    io_service_t service;
+
+    if (IOServiceGetMatchingServices(kIOMasterPortDefault,
+                                     IOServiceMatching("IOFramebuffer"),
+                                     &it) != 0)
+    {
+        return refreshRate;
+    }
+
+    while ((service = IOIteratorNext(it)) != 0)
+    {
+        const CFNumberRef indexRef =
+            IORegistryEntryCreateCFProperty(service,
+                                            CFSTR("IOFramebufferOpenGLIndex"),
+                                            kCFAllocatorDefault,
+                                            kNilOptions);
+        if (!indexRef)
+            continue;
+
+        uint32_t index = 0;
+        CFNumberGetValue(indexRef, kCFNumberIntType, &index);
+        CFRelease(indexRef);
+
+        if (CGOpenGLDisplayMaskToDisplayID(1 << index) != displayID)
+            continue;
+
+        const CFNumberRef clockRef =
+            IORegistryEntryCreateCFProperty(service,
+                                            CFSTR("IOFBCurrentPixelClock"),
+                                            kCFAllocatorDefault,
+                                            kNilOptions);
+        const CFNumberRef countRef =
+            IORegistryEntryCreateCFProperty(service,
+                                            CFSTR("IOFBCurrentPixelCount"),
+                                            kCFAllocatorDefault,
+                                            kNilOptions);
+        if (!clockRef || !countRef)
+            break;
+
+        uint32_t clock = 0, count = 0;
+        CFNumberGetValue(clockRef, kCFNumberIntType, &clock);
+        CFNumberGetValue(countRef, kCFNumberIntType, &count);
+        CFRelease(clockRef);
+        CFRelease(countRef);
+
+        if (clock > 0 && count > 0)
+            refreshRate = clock / (double) count;
+
+        break;
+    }
+
+    IOObjectRelease(it);
+    return refreshRate;
+}
+
+
 //////////////////////////////////////////////////////////////////////////
 //////                       GLFW internal API                      //////
 //////////////////////////////////////////////////////////////////////////
@@ -245,18 +305,16 @@
 //
 void _glfwPollMonitorsNS(void)
 {
-    uint32_t i, j, displayCount, disconnectedCount;
-    CGDirectDisplayID* displays;
-    _GLFWmonitor** disconnected = NULL;
-
+    uint32_t displayCount;
     CGGetOnlineDisplayList(0, NULL, &displayCount);
-    displays = calloc(displayCount, sizeof(CGDirectDisplayID));
+    CGDirectDisplayID* displays = calloc(displayCount, sizeof(CGDirectDisplayID));
     CGGetOnlineDisplayList(displayCount, displays, &displayCount);
 
-    for (i = 0;  i < _glfw.monitorCount;  i++)
+    for (int i = 0;  i < _glfw.monitorCount;  i++)
         _glfw.monitors[i]->ns.screen = nil;
 
-    disconnectedCount = _glfw.monitorCount;
+    _GLFWmonitor** disconnected = NULL;
+    uint32_t disconnectedCount = _glfw.monitorCount;
     if (disconnectedCount)
     {
         disconnected = calloc(_glfw.monitorCount, sizeof(_GLFWmonitor*));
@@ -265,19 +323,17 @@
                _glfw.monitorCount * sizeof(_GLFWmonitor*));
     }
 
-    for (i = 0;  i < displayCount;  i++)
+    for (uint32_t i = 0;  i < displayCount;  i++)
     {
-        _GLFWmonitor* monitor;
-        const uint32_t unitNumber = CGDisplayUnitNumber(displays[i]);
-
         if (CGDisplayIsAsleep(displays[i]))
             continue;
 
-        for (j = 0;  j < disconnectedCount;  j++)
+        // HACK: Compare unit numbers instead of display IDs to work around
+        //       display replacement on machines with automatic graphics
+        //       switching
+        const uint32_t unitNumber = CGDisplayUnitNumber(displays[i]);
+        for (uint32_t j = 0;  j < disconnectedCount;  j++)
         {
-            // HACK: Compare unit numbers instead of display IDs to work around
-            //       display replacement on machines with automatic graphics
-            //       switching
             if (disconnected[j] && disconnected[j]->ns.unitNumber == unitNumber)
             {
                 disconnected[j] = NULL;
@@ -290,16 +346,21 @@
         if (!name)
             name = _glfw_strdup("Unknown");
 
-        monitor = _glfwAllocMonitor(name, size.width, size.height);
+        _GLFWmonitor* monitor = _glfwAllocMonitor(name, size.width, size.height);
         monitor->ns.displayID  = displays[i];
         monitor->ns.unitNumber = unitNumber;
 
         free(name);
 
+        CGDisplayModeRef mode = CGDisplayCopyDisplayMode(displays[i]);
+        if (CGDisplayModeGetRefreshRate(mode) == 0.0)
+            monitor->ns.fallbackRefreshRate = getFallbackRefreshRate(displays[i]);
+        CGDisplayModeRelease(mode);
+
         _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST);
     }
 
-    for (i = 0;  i < disconnectedCount;  i++)
+    for (uint32_t i = 0;  i < disconnectedCount;  i++)
     {
         if (disconnected[i])
             _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);
@@ -313,30 +374,25 @@
 //
 void _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired)
 {
-    CFArrayRef modes;
-    CFIndex count, i;
-    CVDisplayLinkRef link;
-    CGDisplayModeRef native = NULL;
     GLFWvidmode current;
-    const GLFWvidmode* best;
-
-    best = _glfwChooseVideoMode(monitor, desired);
     _glfwPlatformGetVideoMode(monitor, &current);
+
+    const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);
     if (_glfwCompareVideoModes(&current, best) == 0)
         return;
 
-    CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link);
-
-    modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
-    count = CFArrayGetCount(modes);
+    CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
+    const CFIndex count = CFArrayGetCount(modes);
+    CGDisplayModeRef native = NULL;
 
-    for (i = 0;  i < count;  i++)
+    for (CFIndex i = 0;  i < count;  i++)
     {
         CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
         if (!modeIsGood(dm))
             continue;
 
-        const GLFWvidmode mode = vidmodeFromCGDisplayMode(dm, link);
+        const GLFWvidmode mode =
+            vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);
         if (_glfwCompareVideoModes(best, &mode) == 0)
         {
             native = dm;
@@ -355,7 +411,6 @@
     }
 
     CFRelease(modes);
-    CVDisplayLinkRelease(link);
 }
 
 // Restore the previously saved (original) video mode
@@ -443,26 +498,21 @@
 {
     @autoreleasepool {
 
-    CFArrayRef modes;
-    CFIndex found, i, j;
-    GLFWvidmode* result;
-    CVDisplayLinkRef link;
-
     *count = 0;
 
-    CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link);
-
-    modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
-    found = CFArrayGetCount(modes);
-    result = calloc(found, sizeof(GLFWvidmode));
+    CFArrayRef modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
+    const CFIndex found = CFArrayGetCount(modes);
+    GLFWvidmode* result = calloc(found, sizeof(GLFWvidmode));
 
-    for (i = 0;  i < found;  i++)
+    for (CFIndex i = 0;  i < found;  i++)
     {
         CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i);
         if (!modeIsGood(dm))
             continue;
 
-        const GLFWvidmode mode = vidmodeFromCGDisplayMode(dm, link);
+        const GLFWvidmode mode =
+            vidmodeFromCGDisplayMode(dm, monitor->ns.fallbackRefreshRate);
+        CFIndex j;
 
         for (j = 0;  j < *count;  j++)
         {
@@ -479,7 +529,6 @@
     }
 
     CFRelease(modes);
-    CVDisplayLinkRelease(link);
     return result;
 
     } // autoreleasepool
@@ -489,16 +538,9 @@
 {
     @autoreleasepool {
 
-    CGDisplayModeRef displayMode;
-    CVDisplayLinkRef link;
-
-    CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link);
-
-    displayMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);
-    *mode = vidmodeFromCGDisplayMode(displayMode, link);
-    CGDisplayModeRelease(displayMode);
-
-    CVDisplayLinkRelease(link);
+    CGDisplayModeRef native = CGDisplayCopyDisplayMode(monitor->ns.displayID);
+    *mode = vidmodeFromCGDisplayMode(native, monitor->ns.fallbackRefreshRate);
+    CGDisplayModeRelease(native);
 
     } // autoreleasepool
 }
@@ -507,7 +549,7 @@
 {
     @autoreleasepool {
 
-    uint32_t i, size = CGDisplayGammaTableCapacity(monitor->ns.displayID);
+    uint32_t size = CGDisplayGammaTableCapacity(monitor->ns.displayID);
     CGGammaValue* values = calloc(size * 3, sizeof(CGGammaValue));
 
     CGGetDisplayTransferByTable(monitor->ns.displayID,
@@ -519,7 +561,7 @@
 
     _glfwAllocGammaArrays(ramp, size);
 
-    for (i = 0; i < size; i++)
+    for (uint32_t i = 0; i < size; i++)
     {
         ramp->red[i]   = (unsigned short) (values[i] * 65535);
         ramp->green[i] = (unsigned short) (values[i + size] * 65535);
@@ -536,10 +578,9 @@
 {
     @autoreleasepool {
 
-    int i;
     CGGammaValue* values = calloc(ramp->size * 3, sizeof(CGGammaValue));
 
-    for (i = 0;  i < ramp->size;  i++)
+    for (unsigned int i = 0;  i < ramp->size;  i++)
     {
         values[i]                  = ramp->red[i] / 65535.f;
         values[i + ramp->size]     = ramp->green[i] / 65535.f;
diff --git a/glfw/src/cocoa_platform.h b/glfw/src/cocoa_platform.h
--- a/glfw/src/cocoa_platform.h
+++ b/glfw/src/cocoa_platform.h
@@ -28,8 +28,6 @@
 #include <dlfcn.h>
 
 #include <Carbon/Carbon.h>
-#include <CoreVideo/CVBase.h>
-#include <CoreVideo/CVDisplayLink.h>
 
 // NOTE: All of NSGL was deprecated in the 10.14 SDK
 //       This disables the pointless warnings for every symbol we use
@@ -41,6 +39,9 @@
 typedef void* id;
 #endif
 
+// NOTE: Many Cocoa enum values have been renamed and we need to build across
+//       SDK versions where one is unavailable or the other deprecated
+//       We use the newer names in code and these macros to handle compatibility
 #if MAC_OS_X_VERSION_MAX_ALLOWED < 101200
  #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat
  #define NSEventMaskAny NSAnyEventMask
@@ -139,7 +140,7 @@
     id                  keyUpMonitor;
     id                  nibObjects;
 
-    char                keyName[64];
+    char                keynames[GLFW_KEY_LAST + 1][17];
     short int           keycodes[256];
     short int           scancodes[GLFW_KEY_LAST + 1];
     char*               clipboardString;
@@ -167,6 +168,7 @@
     CGDisplayModeRef    previousMode;
     uint32_t            unitNumber;
     id                  screen;
+    double              fallbackRefreshRate;
 
 } _GLFWmonitorNS;
 
diff --git a/glfw/src/cocoa_time.c b/glfw/src/cocoa_time.c
--- a/glfw/src/cocoa_time.c
+++ b/glfw/src/cocoa_time.c
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/cocoa_window.m b/glfw/src/cocoa_window.m
--- a/glfw/src/cocoa_window.m
+++ b/glfw/src/cocoa_window.m
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -33,15 +35,14 @@
 //
 static NSUInteger getStyleMask(_GLFWwindow* window)
 {
-    NSUInteger styleMask = 0;
+    NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;
 
     if (window->monitor || !window->decorated)
         styleMask |= NSWindowStyleMaskBorderless;
     else
     {
         styleMask |= NSWindowStyleMaskTitled |
-                     NSWindowStyleMaskClosable |
-                     NSWindowStyleMaskMiniaturizable;
+                     NSWindowStyleMaskClosable;
 
         if (window->resizable)
             styleMask |= NSWindowStyleMaskResizable;
@@ -321,12 +322,6 @@
     _glfwInputWindowFocus(window, GLFW_FALSE);
 }
 
-- (void)windowDidChangeScreen:(NSNotification *)notification
-{
-    if (window->context.source == GLFW_NATIVE_CONTEXT_API)
-        _glfwUpdateDisplayLinkDisplayNSGL(window);
-}
-
 @end
 
 
@@ -610,10 +605,8 @@
 
 - (void)scrollWheel:(NSEvent *)event
 {
-    double deltaX, deltaY;
-
-    deltaX = [event scrollingDeltaX];
-    deltaY = [event scrollingDeltaY];
+    double deltaX = [event scrollingDeltaX];
+    double deltaY = [event scrollingDeltaY];
 
     if ([event hasPreciseScrollingDeltas])
     {
@@ -730,9 +723,8 @@
     else
         characters = (NSString*) string;
 
-    NSUInteger i, length = [characters length];
-
-    for (i = 0;  i < length;  i++)
+    const NSUInteger length = [characters length];
+    for (NSUInteger i = 0;  i < length;  i++)
     {
         const unichar codepoint = [characters characterAtIndex:i];
         if ((codepoint & 0xff00) == 0xf700)
@@ -817,7 +809,7 @@
         [window->ns.object setLevel:NSMainMenuWindowLevel + 1];
     else
     {
-        [window->ns.object center];
+        [(NSWindow*) window->ns.object center];
         _glfw.ns.cascadePoint =
             NSPointToCGPoint([window->ns.object cascadeTopLeftFromPoint:
                               NSPointFromCGPoint(_glfw.ns.cascadePoint)]);
@@ -893,10 +885,7 @@
     @autoreleasepool {
 
     if (!_glfw.ns.finishedLaunching)
-    {
         [NSApp run];
-        _glfw.ns.finishedLaunching = GLFW_TRUE;
-    }
 
     if (!createNativeWindow(window, wndconfig, fbconfig))
         return GLFW_FALSE;
@@ -963,16 +952,20 @@
     [window->ns.object close];
     window->ns.object = nil;
 
+    // HACK: Allow Cocoa to catch up before returning
+    _glfwPlatformPollEvents();
+
     } // autoreleasepool
 }
 
-void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
+void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
 {
     @autoreleasepool {
-    [window->ns.object setTitle:@(title)];
+    NSString* string = @(title);
+    [window->ns.object setTitle:string];
     // HACK: Set the miniwindow title explicitly as setTitle: doesn't update it
     //       if the window lacks NSWindowStyleMaskTitled
-    [window->ns.object setMiniwindowTitle:@(title)];
+    [window->ns.object setMiniwindowTitle:string];
     } // autoreleasepool
 }
 
@@ -1033,7 +1026,14 @@
             acquireMonitor(window);
     }
     else
-        [window->ns.object setContentSize:NSMakeSize(width, height)];
+    {
+        NSRect contentRect =
+            [window->ns.object contentRectForFrameRect:[window->ns.object frame]];
+        contentRect.origin.y += contentRect.size.height - height;
+        contentRect.size = NSMakeSize(width, height);
+        [window->ns.object setFrame:[window->ns.object frameRectForContentRect:contentRect]
+                            display:YES];
+    }
 
     } // autoreleasepool
 }
@@ -1222,7 +1222,7 @@
     // HACK: Changing the style mask can cause the first responder to be cleared
     [window->ns.object makeFirstResponder:window->ns.view];
 
-    if (monitor)
+    if (window->monitor)
     {
         [window->ns.object setLevel:NSMainMenuWindowLevel + 1];
         [window->ns.object setHasShadow:NO];
@@ -1377,6 +1377,9 @@
 {
     @autoreleasepool {
 
+    if (!_glfw.ns.finishedLaunching)
+        [NSApp run];
+
     for (;;)
     {
         NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
@@ -1396,6 +1399,9 @@
 {
     @autoreleasepool {
 
+    if (!_glfw.ns.finishedLaunching)
+        [NSApp run];
+
     // I wanted to pass NO to dequeue:, and rely on PollEvents to
     // dequeue and send.  For reasons not at all clear to me, passing
     // NO to dequeue: causes this method never to return.
@@ -1414,6 +1420,9 @@
 {
     @autoreleasepool {
 
+    if (!_glfw.ns.finishedLaunching)
+        [NSApp run];
+
     NSDate* date = [NSDate dateWithTimeIntervalSinceNow:timeout];
     NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
                                         untilDate:date
@@ -1431,6 +1440,9 @@
 {
     @autoreleasepool {
 
+    if (!_glfw.ns.finishedLaunching)
+        [NSApp run];
+
     NSEvent* event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
                                         location:NSMakePoint(0, 0)
                                    modifierFlags:0
@@ -1504,8 +1516,10 @@
 {
     @autoreleasepool {
 
+    const int key = _glfw.ns.keycodes[scancode];
+
     UInt32 deadKeyState = 0;
-    UniChar characters[8];
+    UniChar characters[4];
     UniCharCount characterCount = 0;
 
     if (UCKeyTranslate([(NSData*) _glfw.ns.unicodeData bytes],
@@ -1530,12 +1544,12 @@
                                                             characterCount,
                                                             kCFAllocatorNull);
     CFStringGetCString(string,
-                       _glfw.ns.keyName,
-                       sizeof(_glfw.ns.keyName),
+                       _glfw.ns.keynames[key],
+                       sizeof(_glfw.ns.keynames[key]),
                        kCFStringEncodingUTF8);
     CFRelease(string);
 
-    return _glfw.ns.keyName;
+    return _glfw.ns.keynames[key];
 
     } // autoreleasepool
 }
diff --git a/glfw/src/context.c b/glfw/src/context.c
--- a/glfw/src/context.c
+++ b/glfw/src/context.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/egl_context.c b/glfw/src/egl_context.c
--- a/glfw/src/egl_context.c
+++ b/glfw/src/egl_context.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -121,23 +123,24 @@
             continue;
 
 #if defined(_GLFW_X11)
-        XVisualInfo vi = {0};
+        {
+            XVisualInfo vi = {0};
 
-        // Only consider EGLConfigs with associated Visuals
-        vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);
-        if (!vi.visualid)
-            continue;
+            // Only consider EGLConfigs with associated Visuals
+            vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);
+            if (!vi.visualid)
+                continue;
 
-        if (desired->transparent)
-        {
-            int count;
-            XVisualInfo* vis = XGetVisualInfo(_glfw.x11.display,
-                                              VisualIDMask, &vi,
-                                              &count);
-            if (vis)
+            if (desired->transparent)
             {
-                u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
-                XFree(vis);
+                int count;
+                XVisualInfo* vis =
+                    XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);
+                if (vis)
+                {
+                    u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
+                    XFree(vis);
+                }
             }
         }
 #endif // _GLFW_X11
diff --git a/glfw/src/egl_context.h b/glfw/src/egl_context.h
--- a/glfw/src/egl_context.h
+++ b/glfw/src/egl_context.h
@@ -47,26 +47,26 @@
  #error "No supported EGL platform selected"
 #endif
 
-#define EGL_SUCCESS	0x3000
-#define EGL_NOT_INITIALIZED	0x3001
+#define EGL_SUCCESS 0x3000
+#define EGL_NOT_INITIALIZED 0x3001
 #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_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_BAD_SURFACE 0x300d
 #define EGL_CONTEXT_LOST 0x300e
 #define EGL_COLOR_BUFFER_TYPE 0x303f
 #define EGL_RGB_BUFFER 0x308e
 #define EGL_SURFACE_TYPE 0x3033
 #define EGL_WINDOW_BIT 0x0004
-#define EGL_RENDERABLE_TYPE	0x3040
+#define EGL_RENDERABLE_TYPE 0x3040
 #define EGL_OPENGL_ES_BIT 0x0001
 #define EGL_OPENGL_ES2_BIT 0x0004
 #define EGL_OPENGL_BIT 0x0008
@@ -76,7 +76,7 @@
 #define EGL_RED_SIZE 0x3024
 #define EGL_DEPTH_SIZE 0x3025
 #define EGL_STENCIL_SIZE 0x3026
-#define EGL_SAMPLES	0x3031
+#define EGL_SAMPLES 0x3031
 #define EGL_OPENGL_ES_API 0x30a0
 #define EGL_OPENGL_API 0x30a2
 #define EGL_NONE 0x3038
diff --git a/glfw/src/glx_context.c b/glfw/src/glx_context.c
--- a/glfw/src/glx_context.c
+++ b/glfw/src/glx_context.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -226,8 +228,6 @@
         return _glfw_dlsym(_glfw.glx.handle, procname);
 }
 
-// Destroy the OpenGL context
-//
 static void destroyContextGLX(_GLFWwindow* window)
 {
     if (window->context.glx.window)
diff --git a/glfw/src/glx_context.h b/glfw/src/glx_context.h
--- a/glfw/src/glx_context.h
+++ b/glfw/src/glx_context.h
@@ -29,11 +29,11 @@
 #define GLX_RGBA_BIT 0x00000001
 #define GLX_WINDOW_BIT 0x00000001
 #define GLX_DRAWABLE_TYPE 0x8010
-#define GLX_RENDER_TYPE	0x8011
+#define GLX_RENDER_TYPE 0x8011
 #define GLX_RGBA_TYPE 0x8014
 #define GLX_DOUBLEBUFFER 5
 #define GLX_STEREO 6
-#define GLX_AUX_BUFFERS	7
+#define GLX_AUX_BUFFERS 7
 #define GLX_RED_SIZE 8
 #define GLX_GREEN_SIZE 9
 #define GLX_BLUE_SIZE 10
@@ -42,7 +42,7 @@
 #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_BLUE_SIZE 16
 #define GLX_ACCUM_ALPHA_SIZE 17
 #define GLX_SAMPLES 0x186a1
 #define GLX_VISUAL_ID 0x800b
diff --git a/glfw/src/init.c b/glfw/src/init.c
--- a/glfw/src/init.c
+++ b/glfw/src/init.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 #include "mappings.h"
diff --git a/glfw/src/input.c b/glfw/src/input.c
--- a/glfw/src/input.c
+++ b/glfw/src/input.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/internal.h b/glfw/src/internal.h
--- a/glfw/src/internal.h
+++ b/glfw/src/internal.h
@@ -84,8 +84,8 @@
 typedef void (* _GLFWdestroycontextfun)(_GLFWwindow*);
 
 #define GL_VERSION 0x1f02
-#define GL_NONE	0
-#define GL_COLOR_BUFFER_BIT	0x00004000
+#define GL_NONE 0
+#define GL_COLOR_BUFFER_BIT 0x00004000
 #define GL_UNSIGNED_BYTE 0x1401
 #define GL_EXTENSIONS 0x1f03
 #define GL_NUM_EXTENSIONS 0x821d
@@ -102,7 +102,7 @@
 #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc
 #define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
 
-typedef int	GLint;
+typedef int GLint;
 typedef unsigned int GLuint;
 typedef unsigned int GLenum;
 typedef unsigned int GLbitfield;
diff --git a/glfw/src/linux_joystick.c b/glfw/src/linux_joystick.c
--- a/glfw/src/linux_joystick.c
+++ b/glfw/src/linux_joystick.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -104,9 +106,7 @@
 //
 static void pollAbsState(_GLFWjoystick* js)
 {
-    int code;
-
-    for (code = 0;  code < ABS_CNT;  code++)
+    for (int code = 0;  code < ABS_CNT;  code++)
     {
         if (js->linjs.absMap[code] < 0)
             continue;
@@ -126,18 +126,7 @@
 //
 static GLFWbool openJoystickDevice(const char* path)
 {
-    int jid, code;
-    char name[256] = "";
-    char guid[33] = "";
-    char evBits[(EV_CNT + 7) / 8] = {0};
-    char keyBits[(KEY_CNT + 7) / 8] = {0};
-    char absBits[(ABS_CNT + 7) / 8] = {0};
-    int axisCount = 0, buttonCount = 0, hatCount = 0;
-    struct input_id id;
-    _GLFWjoystickLinux linjs = {0};
-    _GLFWjoystick* js = NULL;
-
-    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
+    for (int jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
     {
         if (!_glfw.joysticks[jid].present)
             continue;
@@ -145,10 +134,16 @@
             return GLFW_FALSE;
     }
 
+    _GLFWjoystickLinux linjs = {0};
     linjs.fd = open(path, O_RDONLY | O_NONBLOCK);
     if (linjs.fd == -1)
         return GLFW_FALSE;
 
+    char evBits[(EV_CNT + 7) / 8] = {0};
+    char keyBits[(KEY_CNT + 7) / 8] = {0};
+    char absBits[(ABS_CNT + 7) / 8] = {0};
+    struct input_id id;
+
     if (ioctl(linjs.fd, EVIOCGBIT(0, sizeof(evBits)), evBits) < 0 ||
         ioctl(linjs.fd, EVIOCGBIT(EV_KEY, sizeof(keyBits)), keyBits) < 0 ||
         ioctl(linjs.fd, EVIOCGBIT(EV_ABS, sizeof(absBits)), absBits) < 0 ||
@@ -168,9 +163,13 @@
         return GLFW_FALSE;
     }
 
+    char name[256] = "";
+
     if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
         strncpy(name, "Unknown", sizeof(name));
 
+    char guid[33] = "";
+
     // Generate a joystick GUID that matches the SDL 2.0.5+ one
     if (id.vendor && id.product && id.version)
     {
@@ -189,7 +188,9 @@
                 name[8], name[9], name[10]);
     }
 
-    for (code = BTN_MISC;  code < KEY_CNT;  code++)
+    int axisCount = 0, buttonCount = 0, hatCount = 0;
+
+    for (int code = BTN_MISC;  code < KEY_CNT;  code++)
     {
         if (!isBitSet(code, keyBits))
             continue;
@@ -198,7 +199,7 @@
         buttonCount++;
     }
 
-    for (code = 0;  code < ABS_CNT;  code++)
+    for (int code = 0;  code < ABS_CNT;  code++)
     {
         linjs.absMap[code] = -1;
         if (!isBitSet(code, absBits))
@@ -221,7 +222,8 @@
         }
     }
 
-    js = _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount);
+    _GLFWjoystick* js =
+        _glfwAllocJoystick(name, guid, axisCount, buttonCount, hatCount);
     if (!js)
     {
         close(linjs.fd);
@@ -266,8 +268,6 @@
 //
 GLFWbool _glfwInitJoysticksLinux(void)
 {
-    DIR* dir;
-    int count = 0;
     const char* dirname = "/dev/input";
 
     _glfw.linjs.inotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
@@ -289,7 +289,9 @@
         return GLFW_FALSE;
     }
 
-    dir = opendir(dirname);
+    int count = 0;
+
+    DIR* dir = opendir(dirname);
     if (dir)
     {
         struct dirent* entry;
@@ -344,12 +346,11 @@
 
 void _glfwDetectJoystickConnectionLinux(void)
 {
-    ssize_t offset = 0;
-    char buffer[16384];
-
     if (_glfw.linjs.inotify <= 0)
         return;
 
+    ssize_t offset = 0;
+    char buffer[16384];
     const ssize_t size = read(_glfw.linjs.inotify, buffer, sizeof(buffer));
 
     while (size > offset)
@@ -369,9 +370,7 @@
             openJoystickDevice(path);
         else if (e->mask & IN_DELETE)
         {
-            int jid;
-
-            for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
+            for (int jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
             {
                 if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)
                 {
diff --git a/glfw/src/linux_joystick.h b/glfw/src/linux_joystick.h
--- a/glfw/src/linux_joystick.h
+++ b/glfw/src/linux_joystick.h
@@ -1,62 +1,62 @@
-//========================================================================
-// GLFW 3.3 Linux - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would
-//    be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-//    be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-//    distribution.
-//
-//========================================================================
-
-#include <linux/input.h>
-#include <linux/limits.h>
-#include <regex.h>
-
-#define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickLinux linjs
-#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux  linjs
-
-#define _GLFW_PLATFORM_MAPPING_NAME "Linux"
-
-// Linux-specific joystick data
-//
-typedef struct _GLFWjoystickLinux
-{
-    int                     fd;
-    char                    path[PATH_MAX];
-    int                     keyMap[KEY_CNT - BTN_MISC];
-    int                     absMap[ABS_CNT];
-    struct input_absinfo    absInfo[ABS_CNT];
-    int                     hats[4][2];
-} _GLFWjoystickLinux;
-
-// Linux-specific joystick API data
-//
-typedef struct _GLFWlibraryLinux
-{
-    int                     inotify;
-    int                     watch;
-    regex_t                 regex;
-    GLFWbool                dropped;
-} _GLFWlibraryLinux;
-
-
-GLFWbool _glfwInitJoysticksLinux(void);
-void _glfwTerminateJoysticksLinux(void);
-void _glfwDetectJoystickConnectionLinux(void);
-
+//========================================================================
+// GLFW 3.3 Linux - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//    claim that you wrote the original software. If you use this software
+//    in a product, an acknowledgment in the product documentation would
+//    be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+//    be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+//    distribution.
+//
+//========================================================================
+
+#include <linux/input.h>
+#include <linux/limits.h>
+#include <regex.h>
+
+#define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickLinux linjs
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux  linjs
+
+#define _GLFW_PLATFORM_MAPPING_NAME "Linux"
+
+// Linux-specific joystick data
+//
+typedef struct _GLFWjoystickLinux
+{
+    int                     fd;
+    char                    path[PATH_MAX];
+    int                     keyMap[KEY_CNT - BTN_MISC];
+    int                     absMap[ABS_CNT];
+    struct input_absinfo    absInfo[ABS_CNT];
+    int                     hats[4][2];
+} _GLFWjoystickLinux;
+
+// Linux-specific joystick API data
+//
+typedef struct _GLFWlibraryLinux
+{
+    int                     inotify;
+    int                     watch;
+    regex_t                 regex;
+    GLFWbool                dropped;
+} _GLFWlibraryLinux;
+
+
+GLFWbool _glfwInitJoysticksLinux(void);
+void _glfwTerminateJoysticksLinux(void);
+void _glfwDetectJoystickConnectionLinux(void);
+
diff --git a/glfw/src/mappings.h b/glfw/src/mappings.h
--- a/glfw/src/mappings.h
+++ b/glfw/src/mappings.h
@@ -84,7 +84,6 @@
 "030000000d0f00008700000000000000,Fighting Stick mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
 "030000000d0f00002700000000000000,FIGHTING STICK V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
 "78696e70757403000000000000000000,Fightstick TES,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Windows,",
-"03000000790000000600000000000000,G-Shark GS-GP702,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows,",
 "03000000260900002625000000000000,Gamecube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows,",
 "030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,",
 "03000000280400000140000000000000,GamePad Pro USB,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,",
@@ -207,7 +206,6 @@
 "030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
 "03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X,",
 "03000000a306000022f6000001030000,Cyborg V.3 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X,",
-"03000000790000000600000000000000,G-Shark GP-702,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Mac OS X,",
 "03000000ad1b000001f9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,",
 "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,",
 "030000000d0f00005f00000000010000,Hori Fighting Commander 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,",
diff --git a/glfw/src/monitor.c b/glfw/src/monitor.c
--- a/glfw/src/monitor.c
+++ b/glfw/src/monitor.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -53,6 +55,10 @@
     // Then sort on screen area
     if (farea != sarea)
         return farea - sarea;
+
+    // Then sort on width
+    if (fm->width != sm->width)
+        return fm->width - sm->width;
 
     // Lastly sort on refresh rate
     return fm->refreshRate - sm->refreshRate;
diff --git a/glfw/src/nsgl_context.h b/glfw/src/nsgl_context.h
--- a/glfw/src/nsgl_context.h
+++ b/glfw/src/nsgl_context.h
@@ -24,6 +24,9 @@
 //
 //========================================================================
 
+// NOTE: Many Cocoa enum values have been renamed and we need to build across
+//       SDK versions where one is unavailable or the other deprecated
+//       We use the newer names in code and these macros to handle compatibility
 #if MAC_OS_X_VERSION_MAX_ALLOWED < 101400
  #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval
  #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity
@@ -41,10 +44,6 @@
 {
     id                pixelFormat;
     id                object;
-    CVDisplayLinkRef  displayLink;
-    atomic_int        swapInterval;
-    int               swapIntervalsPassed;
-    id                swapIntervalCond;
 
 } _GLFWcontextNSGL;
 
@@ -64,5 +63,4 @@
                                 const _GLFWctxconfig* ctxconfig,
                                 const _GLFWfbconfig* fbconfig);
 void _glfwDestroyContextNSGL(_GLFWwindow* window);
-void _glfwUpdateDisplayLinkDisplayNSGL(_GLFWwindow* window);
 
diff --git a/glfw/src/nsgl_context.m b/glfw/src/nsgl_context.m
--- a/glfw/src/nsgl_context.m
+++ b/glfw/src/nsgl_context.m
@@ -23,32 +23,13 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
-// Display link callback for manual swap interval implementation
-// This is based on a similar workaround added to SDL2
-//
-static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink,
-                                    const CVTimeStamp* now,
-                                    const CVTimeStamp* outputTime,
-                                    CVOptionFlags flagsIn,
-                                    CVOptionFlags* flagsOut,
-                                    void* userInfo)
-{
-    _GLFWwindow* window = (_GLFWwindow *) userInfo;
-
-    const int interval = atomic_load(&window->context.nsgl.swapInterval);
-    if (interval > 0)
-    {
-        [window->context.nsgl.swapIntervalCond lock];
-        window->context.nsgl.swapIntervalsPassed++;
-        [window->context.nsgl.swapIntervalCond signal];
-        [window->context.nsgl.swapIntervalCond unlock];
-    }
-
-    return kCVReturnSuccess;
-}
+#include <unistd.h>
+#include <math.h>
 
 static void makeContextCurrentNSGL(_GLFWwindow* window)
 {
@@ -68,19 +49,28 @@
 {
     @autoreleasepool {
 
-    const int interval = atomic_load(&window->context.nsgl.swapInterval);
-    if (interval > 0)
+    // HACK: Simulate vsync with usleep as NSGL swap interval does not apply to
+    //       windows with a non-visible occlusion state
+    if (!([window->ns.object occlusionState] & NSWindowOcclusionStateVisible))
     {
-        [window->context.nsgl.swapIntervalCond lock];
-        do
+        int interval = 0;
+        [window->context.nsgl.object getValues:&interval
+                                  forParameter:NSOpenGLContextParameterSwapInterval];
+
+        if (interval > 0)
         {
-            [window->context.nsgl.swapIntervalCond wait];
-        } while (window->context.nsgl.swapIntervalsPassed % interval != 0);
-        window->context.nsgl.swapIntervalsPassed = 0;
-        [window->context.nsgl.swapIntervalCond unlock];
+            const double framerate = 60.0;
+            const uint64_t frequency = _glfwPlatformGetTimerFrequency();
+            const uint64_t value = _glfwPlatformGetTimerValue();
+
+            const double elapsed = value / (double) frequency;
+            const double period = 1.0 / framerate;
+            const double delay = period - fmod(elapsed, period);
+
+            usleep(floorl(delay * 1e6));
+        }
     }
 
-    // ARP appears to be unnecessary, but this is future-proof
     [window->context.nsgl.object flushBuffer];
 
     } // autoreleasepool
@@ -89,11 +79,14 @@
 static void swapIntervalNSGL(int interval)
 {
     @autoreleasepool {
+
     _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
-    atomic_store(&window->context.nsgl.swapInterval, interval);
-    [window->context.nsgl.swapIntervalCond lock];
-    window->context.nsgl.swapIntervalsPassed = 0;
-    [window->context.nsgl.swapIntervalCond unlock];
+    if (window)
+    {
+        [window->context.nsgl.object setValues:&interval
+                                  forParameter:NSOpenGLContextParameterSwapInterval];
+    }
+
     } // autoreleasepool
 }
 
@@ -117,23 +110,10 @@
     return symbol;
 }
 
-// Destroy the OpenGL context
-//
 static void destroyContextNSGL(_GLFWwindow* window)
 {
     @autoreleasepool {
 
-    if (window->context.nsgl.displayLink)
-    {
-        if (CVDisplayLinkIsRunning(window->context.nsgl.displayLink))
-            CVDisplayLinkStop(window->context.nsgl.displayLink);
-
-        CVDisplayLinkRelease(window->context.nsgl.displayLink);
-    }
-
-    [window->context.nsgl.swapIntervalCond release];
-    window->context.nsgl.swapIntervalCond = nil;
-
     [window->context.nsgl.pixelFormat release];
     window->context.nsgl.pixelFormat = nil;
 
@@ -339,7 +319,7 @@
         return GLFW_FALSE;
     }
 
-    NSOpenGLContext* share = NULL;
+    NSOpenGLContext* share = nil;
 
     if (ctxconfig->share)
         share = ctxconfig->share->context.nsgl.object;
@@ -361,17 +341,10 @@
                                   forParameter:NSOpenGLContextParameterSurfaceOpacity];
     }
 
-    if (window->ns.retina)
-        [window->ns.view setWantsBestResolutionOpenGLSurface:YES];
-
-    GLint interval = 0;
-    [window->context.nsgl.object setValues:&interval
-                              forParameter:NSOpenGLContextParameterSwapInterval];
+    [window->ns.view setWantsBestResolutionOpenGLSurface:window->ns.retina];
 
     [window->context.nsgl.object setView:window->ns.view];
 
-    window->context.nsgl.swapIntervalCond = [NSCondition new];
-
     window->context.makeCurrent = makeContextCurrentNSGL;
     window->context.swapBuffers = swapBuffersNSGL;
     window->context.swapInterval = swapIntervalNSGL;
@@ -379,27 +352,10 @@
     window->context.getProcAddress = getProcAddressNSGL;
     window->context.destroy = destroyContextNSGL;
 
-    CVDisplayLinkCreateWithActiveCGDisplays(&window->context.nsgl.displayLink);
-    CVDisplayLinkSetOutputCallback(window->context.nsgl.displayLink,
-                                   &displayLinkCallback,
-                                   window);
-    CVDisplayLinkStart(window->context.nsgl.displayLink);
-
-    _glfwUpdateDisplayLinkDisplayNSGL(window);
     return GLFW_TRUE;
 }
 
-void _glfwUpdateDisplayLinkDisplayNSGL(_GLFWwindow* window)
-{
-    CGDirectDisplayID displayID =
-        [[[window->ns.object screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue];
-    if (!displayID)
-        return;
 
-    CVDisplayLinkSetCurrentCGDisplay(window->context.nsgl.displayLink, displayID);
-}
-
-
 //////////////////////////////////////////////////////////////////////////
 //////                        GLFW native API                       //////
 //////////////////////////////////////////////////////////////////////////
@@ -412,7 +368,7 @@
     if (window->context.client == GLFW_NO_API)
     {
         _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
-        return NULL;
+        return nil;
     }
 
     return window->context.nsgl.object;
diff --git a/glfw/src/null_init.c b/glfw/src/null_init.c
--- a/glfw/src/null_init.c
+++ b/glfw/src/null_init.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/null_joystick.c b/glfw/src/null_joystick.c
--- a/glfw/src/null_joystick.c
+++ b/glfw/src/null_joystick.c
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/null_joystick.h b/glfw/src/null_joystick.h
--- a/glfw/src/null_joystick.h
+++ b/glfw/src/null_joystick.h
@@ -24,8 +24,8 @@
 //
 //========================================================================
 
-#define _GLFW_PLATFORM_JOYSTICK_STATE         int nulljs
-#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE int nulljs
+#define _GLFW_PLATFORM_JOYSTICK_STATE         struct { int dummyJoystick; }
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }
 
 #define _GLFW_PLATFORM_MAPPING_NAME ""
 
diff --git a/glfw/src/null_monitor.c b/glfw/src/null_monitor.c
--- a/glfw/src/null_monitor.c
+++ b/glfw/src/null_monitor.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/null_platform.h b/glfw/src/null_platform.h
--- a/glfw/src/null_platform.h
+++ b/glfw/src/null_platform.h
@@ -29,13 +29,13 @@
 
 #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNull null
 
-#define _GLFW_PLATFORM_CONTEXT_STATE
-#define _GLFW_PLATFORM_MONITOR_STATE
-#define _GLFW_PLATFORM_CURSOR_STATE
-#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE
-#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
-#define _GLFW_EGL_CONTEXT_STATE
-#define _GLFW_EGL_LIBRARY_CONTEXT_STATE
+#define _GLFW_PLATFORM_CONTEXT_STATE         struct { int dummyContext; }
+#define _GLFW_PLATFORM_MONITOR_STATE         struct { int dummyMonitor; }
+#define _GLFW_PLATFORM_CURSOR_STATE          struct { int dummyCursor; }
+#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE  struct { int dummyLibraryWindow; }
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }
+#define _GLFW_EGL_CONTEXT_STATE              struct { int dummyEGLContext; }
+#define _GLFW_EGL_LIBRARY_CONTEXT_STATE      struct { int dummyEGLLibraryContext; }
 
 #include "osmesa_context.h"
 #include "posix_time.h"
diff --git a/glfw/src/null_window.c b/glfw/src/null_window.c
--- a/glfw/src/null_window.c
+++ b/glfw/src/null_window.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/osmesa_context.c b/glfw/src/osmesa_context.c
--- a/glfw/src/osmesa_context.c
+++ b/glfw/src/osmesa_context.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/glfw/src/osmesa_context.h b/glfw/src/osmesa_context.h
--- a/glfw/src/osmesa_context.h
+++ b/glfw/src/osmesa_context.h
@@ -1,94 +1,94 @@
-//========================================================================
-// GLFW 3.3 OSMesa - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2016 Google Inc.
-// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would
-//    be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-//    be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-//    distribution.
-//
-//========================================================================
-
-#define OSMESA_RGBA 0x1908
-#define OSMESA_FORMAT 0x22
-#define OSMESA_DEPTH_BITS 0x30
-#define OSMESA_STENCIL_BITS 0x31
-#define OSMESA_ACCUM_BITS 0x32
-#define OSMESA_PROFILE 0x33
-#define OSMESA_CORE_PROFILE 0x34
-#define OSMESA_COMPAT_PROFILE 0x35
-#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
-#define OSMESA_CONTEXT_MINOR_VERSION 0x37
-
-typedef void* OSMesaContext;
-typedef void (*OSMESAproc)(void);
-
-typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
-typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
-typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);
-typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);
-typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);
-typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);
-typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);
-#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt
-#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs
-#define OSMesaDestroyContext _glfw.osmesa.DestroyContext
-#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent
-#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer
-#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer
-#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress
-
-#define _GLFW_OSMESA_CONTEXT_STATE              _GLFWcontextOSMesa osmesa
-#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE      _GLFWlibraryOSMesa osmesa
-
-
-// OSMesa-specific per-context data
-//
-typedef struct _GLFWcontextOSMesa
-{
-    OSMesaContext       handle;
-    int                 width;
-    int                 height;
-    void*               buffer;
-
-} _GLFWcontextOSMesa;
-
-// OSMesa-specific global data
-//
-typedef struct _GLFWlibraryOSMesa
-{
-    void*           handle;
-
-    PFN_OSMesaCreateContextExt      CreateContextExt;
-    PFN_OSMesaCreateContextAttribs  CreateContextAttribs;
-    PFN_OSMesaDestroyContext        DestroyContext;
-    PFN_OSMesaMakeCurrent           MakeCurrent;
-    PFN_OSMesaGetColorBuffer        GetColorBuffer;
-    PFN_OSMesaGetDepthBuffer        GetDepthBuffer;
-    PFN_OSMesaGetProcAddress        GetProcAddress;
-
-} _GLFWlibraryOSMesa;
-
-
-GLFWbool _glfwInitOSMesa(void);
-void _glfwTerminateOSMesa(void);
-GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,
-                                  const _GLFWctxconfig* ctxconfig,
-                                  const _GLFWfbconfig* fbconfig);
-
+//========================================================================
+// GLFW 3.3 OSMesa - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2016 Google Inc.
+// Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//    claim that you wrote the original software. If you use this software
+//    in a product, an acknowledgment in the product documentation would
+//    be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+//    be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+//    distribution.
+//
+//========================================================================
+
+#define OSMESA_RGBA 0x1908
+#define OSMESA_FORMAT 0x22
+#define OSMESA_DEPTH_BITS 0x30
+#define OSMESA_STENCIL_BITS 0x31
+#define OSMESA_ACCUM_BITS 0x32
+#define OSMESA_PROFILE 0x33
+#define OSMESA_CORE_PROFILE 0x34
+#define OSMESA_COMPAT_PROFILE 0x35
+#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
+#define OSMESA_CONTEXT_MINOR_VERSION 0x37
+
+typedef void* OSMesaContext;
+typedef void (*OSMESAproc)(void);
+
+typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextExt)(GLenum,GLint,GLint,GLint,OSMesaContext);
+typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContextAttribs)(const int*,OSMesaContext);
+typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext);
+typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int);
+typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**);
+typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**);
+typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*);
+#define OSMesaCreateContextExt _glfw.osmesa.CreateContextExt
+#define OSMesaCreateContextAttribs _glfw.osmesa.CreateContextAttribs
+#define OSMesaDestroyContext _glfw.osmesa.DestroyContext
+#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent
+#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer
+#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer
+#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress
+
+#define _GLFW_OSMESA_CONTEXT_STATE              _GLFWcontextOSMesa osmesa
+#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE      _GLFWlibraryOSMesa osmesa
+
+
+// OSMesa-specific per-context data
+//
+typedef struct _GLFWcontextOSMesa
+{
+    OSMesaContext       handle;
+    int                 width;
+    int                 height;
+    void*               buffer;
+
+} _GLFWcontextOSMesa;
+
+// OSMesa-specific global data
+//
+typedef struct _GLFWlibraryOSMesa
+{
+    void*           handle;
+
+    PFN_OSMesaCreateContextExt      CreateContextExt;
+    PFN_OSMesaCreateContextAttribs  CreateContextAttribs;
+    PFN_OSMesaDestroyContext        DestroyContext;
+    PFN_OSMesaMakeCurrent           MakeCurrent;
+    PFN_OSMesaGetColorBuffer        GetColorBuffer;
+    PFN_OSMesaGetDepthBuffer        GetDepthBuffer;
+    PFN_OSMesaGetProcAddress        GetProcAddress;
+
+} _GLFWlibraryOSMesa;
+
+
+GLFWbool _glfwInitOSMesa(void);
+void _glfwTerminateOSMesa(void);
+GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window,
+                                  const _GLFWctxconfig* ctxconfig,
+                                  const _GLFWfbconfig* fbconfig);
+
diff --git a/glfw/src/posix_thread.c b/glfw/src/posix_thread.c
--- a/glfw/src/posix_thread.c
+++ b/glfw/src/posix_thread.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/posix_thread.h b/glfw/src/posix_thread.h
--- a/glfw/src/posix_thread.h
+++ b/glfw/src/posix_thread.h
@@ -1,51 +1,51 @@
-//========================================================================
-// GLFW 3.3 POSIX - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2002-2006 Marcus Geelnard
-// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would
-//    be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-//    be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-//    distribution.
-//
-//========================================================================
-
-#include <pthread.h>
-
-#define _GLFW_PLATFORM_TLS_STATE    _GLFWtlsPOSIX   posix
-#define _GLFW_PLATFORM_MUTEX_STATE  _GLFWmutexPOSIX posix
-
-
-// POSIX-specific thread local storage data
-//
-typedef struct _GLFWtlsPOSIX
-{
-    GLFWbool        allocated;
-    pthread_key_t   key;
-
-} _GLFWtlsPOSIX;
-
-// POSIX-specific mutex data
-//
-typedef struct _GLFWmutexPOSIX
-{
-    GLFWbool        allocated;
-    pthread_mutex_t handle;
-
-} _GLFWmutexPOSIX;
-
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//    claim that you wrote the original software. If you use this software
+//    in a product, an acknowledgment in the product documentation would
+//    be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+//    be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+//    distribution.
+//
+//========================================================================
+
+#include <pthread.h>
+
+#define _GLFW_PLATFORM_TLS_STATE    _GLFWtlsPOSIX   posix
+#define _GLFW_PLATFORM_MUTEX_STATE  _GLFWmutexPOSIX posix
+
+
+// POSIX-specific thread local storage data
+//
+typedef struct _GLFWtlsPOSIX
+{
+    GLFWbool        allocated;
+    pthread_key_t   key;
+
+} _GLFWtlsPOSIX;
+
+// POSIX-specific mutex data
+//
+typedef struct _GLFWmutexPOSIX
+{
+    GLFWbool        allocated;
+    pthread_mutex_t handle;
+
+} _GLFWmutexPOSIX;
+
diff --git a/glfw/src/posix_time.c b/glfw/src/posix_time.c
--- a/glfw/src/posix_time.c
+++ b/glfw/src/posix_time.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/posix_time.h b/glfw/src/posix_time.h
--- a/glfw/src/posix_time.h
+++ b/glfw/src/posix_time.h
@@ -1,44 +1,44 @@
-//========================================================================
-// GLFW 3.3 POSIX - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2002-2006 Marcus Geelnard
-// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would
-//    be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-//    be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-//    distribution.
-//
-//========================================================================
-
-#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix
-
-#include <stdint.h>
-
-
-// POSIX-specific global timer data
-//
-typedef struct _GLFWtimerPOSIX
-{
-    GLFWbool    monotonic;
-    uint64_t    frequency;
-
-} _GLFWtimerPOSIX;
-
-
-void _glfwInitTimerPOSIX(void);
-
+//========================================================================
+// GLFW 3.3 POSIX - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2002-2006 Marcus Geelnard
+// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//    claim that you wrote the original software. If you use this software
+//    in a product, an acknowledgment in the product documentation would
+//    be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+//    be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+//    distribution.
+//
+//========================================================================
+
+#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix
+
+#include <stdint.h>
+
+
+// POSIX-specific global timer data
+//
+typedef struct _GLFWtimerPOSIX
+{
+    GLFWbool    monotonic;
+    uint64_t    frequency;
+
+} _GLFWtimerPOSIX;
+
+
+void _glfwInitTimerPOSIX(void);
+
diff --git a/glfw/src/vulkan.c b/glfw/src/vulkan.c
--- a/glfw/src/vulkan.c
+++ b/glfw/src/vulkan.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/wgl_context.c b/glfw/src/wgl_context.c
--- a/glfw/src/wgl_context.c
+++ b/glfw/src/wgl_context.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -75,8 +77,8 @@
     {
         const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB;
 
-        if (!_glfw.wgl.GetPixelFormatAttribivARB(window->context.wgl.dc,
-                                                 1, 0, 1, &attrib, &nativeCount))
+        if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,
+                                          1, 0, 1, &attrib, &nativeCount))
         {
             _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
                                  "WGL: Failed to retrieve pixel format attribute");
@@ -139,10 +141,10 @@
         {
             // Get pixel format attributes through "modern" extension
 
-            if (!_glfw.wgl.GetPixelFormatAttribivARB(window->context.wgl.dc,
-                                                     pixelFormat, 0,
-                                                     attribCount,
-                                                     attribs, values))
+            if (!wglGetPixelFormatAttribivARB(window->context.wgl.dc,
+                                              pixelFormat, 0,
+                                              attribCount,
+                                              attribs, values))
             {
                 _glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
                                     "WGL: Failed to retrieve pixel format attributes");
@@ -360,7 +362,7 @@
     }
 
     if (_glfw.wgl.EXT_swap_control)
-        _glfw.wgl.SwapIntervalEXT(interval);
+        wglSwapIntervalEXT(interval);
 }
 
 static int extensionSupportedWGL(const char* extension)
@@ -368,9 +370,9 @@
     const char* extensions = NULL;
 
     if (_glfw.wgl.GetExtensionsStringARB)
-        extensions = _glfw.wgl.GetExtensionsStringARB(wglGetCurrentDC());
+        extensions = wglGetExtensionsStringARB(wglGetCurrentDC());
     else if (_glfw.wgl.GetExtensionsStringEXT)
-        extensions = _glfw.wgl.GetExtensionsStringEXT();
+        extensions = wglGetExtensionsStringEXT();
 
     if (!extensions)
         return GLFW_FALSE;
@@ -387,8 +389,6 @@
     return (GLFWglproc) GetProcAddress(_glfw.wgl.instance, procname);
 }
 
-// Destroy the OpenGL context
-//
 static void destroyContextWGL(_GLFWwindow* window)
 {
     if (window->context.wgl.handle)
@@ -693,8 +693,7 @@
         setAttrib(0, 0);
 
         window->context.wgl.handle =
-            _glfw.wgl.CreateContextAttribsARB(window->context.wgl.dc,
-                                              share, attribs);
+            wglCreateContextAttribsARB(window->context.wgl.dc, share, attribs);
         if (!window->context.wgl.handle)
         {
             const DWORD error = GetLastError();
diff --git a/glfw/src/wgl_context.h b/glfw/src/wgl_context.h
--- a/glfw/src/wgl_context.h
+++ b/glfw/src/wgl_context.h
@@ -76,12 +76,19 @@
 #define ERROR_INVALID_PROFILE_ARB 0x2096
 #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
 
+// WGL extension pointer typedefs
 typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
 typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
 typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
 typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
 typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
+#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
+#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
+#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
+#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
+#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
 
+// opengl32.dll function pointer typedefs
 typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
 typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
 typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
@@ -89,8 +96,6 @@
 typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
 typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
 typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
-
-// opengl32.dll function pointer typedefs
 #define wglCreateContext _glfw.wgl.CreateContext
 #define wglDeleteContext _glfw.wgl.DeleteContext
 #define wglGetProcAddress _glfw.wgl.GetProcAddress
diff --git a/glfw/src/win32_init.c b/glfw/src/win32_init.c
--- a/glfw/src/win32_init.c
+++ b/glfw/src/win32_init.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -523,7 +525,7 @@
     cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);
     cond = VerSetConditionMask(cond, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
     // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the
-    //       latter lies unless the user knew to embedd a non-default manifest
+    //       latter lies unless the user knew to embed a non-default manifest
     //       announcing support for Windows 10 via supportedOS GUID
     return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;
 }
@@ -538,7 +540,7 @@
     cond = VerSetConditionMask(cond, VER_MINORVERSION, VER_GREATER_EQUAL);
     cond = VerSetConditionMask(cond, VER_BUILDNUMBER, VER_GREATER_EQUAL);
     // HACK: Use RtlVerifyVersionInfo instead of VerifyVersionInfoW as the
-    //       latter lies unless the user knew to embedd a non-default manifest
+    //       latter lies unless the user knew to embed a non-default manifest
     //       announcing support for Windows 10 via supportedOS GUID
     return RtlVerifyVersionInfo(&osvi, mask, cond) == 0;
 }
diff --git a/glfw/src/win32_joystick.c b/glfw/src/win32_joystick.c
--- a/glfw/src/win32_joystick.c
+++ b/glfw/src/win32_joystick.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/win32_joystick.h b/glfw/src/win32_joystick.h
--- a/glfw/src/win32_joystick.h
+++ b/glfw/src/win32_joystick.h
@@ -25,7 +25,7 @@
 //========================================================================
 
 #define _GLFW_PLATFORM_JOYSTICK_STATE         _GLFWjoystickWin32 win32
-#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE int dummy
+#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; }
 
 #define _GLFW_PLATFORM_MAPPING_NAME "Windows"
 
diff --git a/glfw/src/win32_monitor.c b/glfw/src/win32_monitor.c
--- a/glfw/src/win32_monitor.c
+++ b/glfw/src/win32_monitor.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -31,6 +33,7 @@
 #include <string.h>
 #include <limits.h>
 #include <malloc.h>
+#include <wchar.h>
 
 
 // Callback for EnumDisplayMonitors in createMonitor
@@ -475,7 +478,7 @@
 GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
 {
     HDC dc;
-    WORD values[768];
+    WORD values[3][256];
 
     dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
     GetDeviceGammaRamp(dc, values);
@@ -483,9 +486,9 @@
 
     _glfwAllocGammaArrays(ramp, 256);
 
-    memcpy(ramp->red,   values +   0, 256 * sizeof(unsigned short));
-    memcpy(ramp->green, values + 256, 256 * sizeof(unsigned short));
-    memcpy(ramp->blue,  values + 512, 256 * sizeof(unsigned short));
+    memcpy(ramp->red,   values[0], sizeof(values[0]));
+    memcpy(ramp->green, values[1], sizeof(values[1]));
+    memcpy(ramp->blue,  values[2], sizeof(values[2]));
 
     return GLFW_TRUE;
 }
@@ -493,7 +496,7 @@
 void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
 {
     HDC dc;
-    WORD values[768];
+    WORD values[3][256];
 
     if (ramp->size != 256)
     {
@@ -502,9 +505,9 @@
         return;
     }
 
-    memcpy(values +   0, ramp->red,   256 * sizeof(unsigned short));
-    memcpy(values + 256, ramp->green, 256 * sizeof(unsigned short));
-    memcpy(values + 512, ramp->blue,  256 * sizeof(unsigned short));
+    memcpy(values[0], ramp->red,   sizeof(values[0]));
+    memcpy(values[1], ramp->green, sizeof(values[1]));
+    memcpy(values[2], ramp->blue,  sizeof(values[2]));
 
     dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
     SetDeviceGammaRamp(dc, values);
diff --git a/glfw/src/win32_platform.h b/glfw/src/win32_platform.h
--- a/glfw/src/win32_platform.h
+++ b/glfw/src/win32_platform.h
@@ -212,7 +212,7 @@
 
 // HACK: Define macros that some dinput.h variants don't
 #ifndef DIDFT_OPTIONAL
- #define DIDFT_OPTIONAL	0x80000000
+ #define DIDFT_OPTIONAL 0x80000000
 #endif
 
 // winmm.dll function pointer typedefs
diff --git a/glfw/src/win32_thread.c b/glfw/src/win32_thread.c
--- a/glfw/src/win32_thread.c
+++ b/glfw/src/win32_thread.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/win32_time.c b/glfw/src/win32_time.c
--- a/glfw/src/win32_time.c
+++ b/glfw/src/win32_time.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/win32_window.c b/glfw/src/win32_window.c
--- a/glfw/src/win32_window.c
+++ b/glfw/src/win32_window.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
@@ -409,7 +411,7 @@
             // issue.  When set to black, something is making the hit test
             // not resize with the window frame.
             SetLayeredWindowAttributes(window->win32.handle,
-                                       RGB(0, 193, 48), 255, LWA_COLORKEY);
+                                       RGB(255, 0, 255), 255, LWA_COLORKEY);
         }
 
         DeleteObject(region);
@@ -479,7 +481,7 @@
         DWORD time;
 
         // Right side keys have the extended key bit set
-        if (lParam & 0x01000000)
+        if (HIWORD(lParam) & KF_EXTENDED)
             return GLFW_KEY_RIGHT_CONTROL;
 
         // HACK: Alt Gr sends Left Ctrl and then Right Alt in close sequence
@@ -495,7 +497,7 @@
                 next.message == WM_SYSKEYUP)
             {
                 if (next.wParam == VK_MENU &&
-                    (next.lParam & 0x01000000) &&
+                    (HIWORD(next.lParam) & KF_EXTENDED) &&
                     next.time == time)
                 {
                     // Next message is Right Alt down so discard this
@@ -629,12 +631,8 @@
             //       clicking a caption button
             if (HIWORD(lParam) == WM_LBUTTONDOWN)
             {
-                if (LOWORD(lParam) == HTCLOSE ||
-                    LOWORD(lParam) == HTMINBUTTON ||
-                    LOWORD(lParam) == HTMAXBUTTON)
-                {
+                if (LOWORD(lParam) != HTCLIENT)
                     window->win32.frameAction = GLFW_TRUE;
-                }
             }
 
             break;
@@ -742,8 +740,8 @@
         case WM_SYSKEYUP:
         {
             const int key = translateKey(wParam, lParam);
-            const int scancode = (lParam >> 16) & 0x1ff;
-            const int action = ((lParam >> 31) & 1) ? GLFW_RELEASE : GLFW_PRESS;
+            const int scancode = (HIWORD(lParam) & 0x1ff);
+            const int action = (HIWORD(lParam) & KF_UP) ? GLFW_RELEASE : GLFW_PRESS;
             const int mods = getKeyMods();
 
             if (key == _GLFW_KEY_INVALID)
@@ -830,7 +828,19 @@
             const int x = GET_X_LPARAM(lParam);
             const int y = GET_Y_LPARAM(lParam);
 
-            // Disabled cursor motion input is provided by WM_INPUT
+            if (!window->win32.cursorTracked)
+            {
+                TRACKMOUSEEVENT tme;
+                ZeroMemory(&tme, sizeof(tme));
+                tme.cbSize = sizeof(tme);
+                tme.dwFlags = TME_LEAVE;
+                tme.hwndTrack = window->win32.handle;
+                TrackMouseEvent(&tme);
+
+                window->win32.cursorTracked = GLFW_TRUE;
+                _glfwInputCursorEnter(window, GLFW_TRUE);
+            }
+
             if (window->cursorMode == GLFW_CURSOR_DISABLED)
             {
                 const int dx = x - window->win32.lastCursorPosX;
@@ -851,19 +861,6 @@
             window->win32.lastCursorPosX = x;
             window->win32.lastCursorPosY = y;
 
-            if (!window->win32.cursorTracked)
-            {
-                TRACKMOUSEEVENT tme;
-                ZeroMemory(&tme, sizeof(tme));
-                tme.cbSize = sizeof(tme);
-                tme.dwFlags = TME_LEAVE;
-                tme.hwndTrack = window->win32.handle;
-                TrackMouseEvent(&tme);
-
-                window->win32.cursorTracked = GLFW_TRUE;
-                _glfwInputCursorEnter(window, GLFW_TRUE);
-            }
-
             return 0;
         }
 
@@ -942,6 +939,9 @@
         case WM_ENTERSIZEMOVE:
         case WM_ENTERMENULOOP:
         {
+            if (window->win32.frameAction)
+                break;
+
             // HACK: Enable the cursor while the user is moving or
             //       resizing the window or using the window menu
             if (window->cursorMode == GLFW_CURSOR_DISABLED)
@@ -953,6 +953,9 @@
         case WM_EXITSIZEMOVE:
         case WM_EXITMENULOOP:
         {
+            if (window->win32.frameAction)
+                break;
+
             // HACK: Disable the cursor once the user is done moving or
             //       resizing the window or using the menu
             if (window->cursorMode == GLFW_CURSOR_DISABLED)
@@ -1225,6 +1228,7 @@
         xpos = CW_USEDEFAULT;
         ypos = CW_USEDEFAULT;
 
+        window->win32.maximized = wndconfig->maximized;
         if (wndconfig->maximized)
             style |= WS_MAXIMIZE;
 
@@ -1272,12 +1276,13 @@
 
     window->win32.scaleToMonitor = wndconfig->scaleToMonitor;
 
-    // Adjust window size to account for DPI scaling of the window frame and
-    // optionally DPI scaling of the content area
-    // This cannot be done until we know what monitor it was placed on
+    // Adjust window rect to account for DPI scaling of the window frame and
+    // (if enabled) DPI scaling of the content area
+    // This cannot be done until we know what monitor the window was placed on
     if (!window->monitor)
     {
         RECT rect = { 0, 0, wndconfig->width, wndconfig->height };
+        WINDOWPLACEMENT wp = { sizeof(wp) };
 
         if (wndconfig->scaleToMonitor)
         {
@@ -1298,10 +1303,11 @@
         else
             AdjustWindowRectEx(&rect, style, FALSE, exStyle);
 
-        SetWindowPos(window->win32.handle, NULL,
-                     rect.left, rect.top,
-                     rect.right - rect.left, rect.bottom - rect.top,
-                     SWP_NOACTIVATE | SWP_NOZORDER);
+        // Only update the restored window rect as the window may be maximized
+        GetWindowPlacement(window->win32.handle, &wp);
+        wp.rcNormalPosition = rect;
+        wp.showCmd = SW_HIDE;
+        SetWindowPlacement(window->win32.handle, &wp);
     }
 
     DragAcceptFiles(window->win32.handle, TRUE);
@@ -1722,7 +1728,7 @@
 
     _glfwInputWindowMonitor(window, monitor);
 
-    if (monitor)
+    if (window->monitor)
     {
         MONITORINFO mi = { sizeof(mi) };
         UINT flags = SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOCOPYBITS;
@@ -1928,8 +1934,8 @@
         window = GetPropW(handle, L"GLFW");
         if (window)
         {
-            const GLFWbool lshift = (GetAsyncKeyState(VK_LSHIFT) >> 15) & 1;
-            const GLFWbool rshift = (GetAsyncKeyState(VK_RSHIFT) >> 15) & 1;
+            const GLFWbool lshift = (GetAsyncKeyState(VK_LSHIFT) & 0x8000) != 0;
+            const GLFWbool rshift = (GetAsyncKeyState(VK_RSHIFT) & 0x8000) != 0;
 
             if (!lshift && window->keys[GLFW_KEY_LEFT_SHIFT] == GLFW_PRESS)
             {
diff --git a/glfw/src/window.c b/glfw/src/window.c
--- a/glfw/src/window.c
+++ b/glfw/src/window.c
@@ -25,6 +25,8 @@
 //    distribution.
 //
 //========================================================================
+// Please use C89 style variable declarations in this file because VS 2010
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/wl_init.c b/glfw/src/wl_init.c
--- a/glfw/src/wl_init.c
+++ b/glfw/src/wl_init.c
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -123,6 +125,7 @@
     _glfw.wl.serial = serial;
     _glfw.wl.pointerFocus = NULL;
     _glfwInputCursorEnter(window, GLFW_FALSE);
+    _glfw.wl.cursorPreviousName = NULL;
 }
 
 static void setCursor(_GLFWwindow* window, const char* name)
@@ -167,6 +170,7 @@
     wl_surface_damage(surface, 0, 0,
                       image->width, image->height);
     wl_surface_commit(surface);
+    _glfw.wl.cursorPreviousName = name;
 }
 
 static void pointerHandleMotion(void* data,
@@ -176,48 +180,47 @@
                                 wl_fixed_t sy)
 {
     _GLFWwindow* window = _glfw.wl.pointerFocus;
-    const char* cursorName;
+    const char* cursorName = NULL;
+    double x, y;
 
     if (!window)
         return;
 
     if (window->cursorMode == GLFW_CURSOR_DISABLED)
         return;
-    else
-    {
-        window->wl.cursorPosX = wl_fixed_to_double(sx);
-        window->wl.cursorPosY = wl_fixed_to_double(sy);
-    }
+    x = wl_fixed_to_double(sx);
+    y = wl_fixed_to_double(sy);
 
     switch (window->wl.decorations.focus)
     {
         case mainWindow:
-            _glfwInputCursorPos(window,
-                                wl_fixed_to_double(sx),
-                                wl_fixed_to_double(sy));
+            window->wl.cursorPosX = x;
+            window->wl.cursorPosY = y;
+            _glfwInputCursorPos(window, x, y);
+            _glfw.wl.cursorPreviousName = NULL;
             return;
         case topDecoration:
-            if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+            if (y < _GLFW_DECORATION_WIDTH)
                 cursorName = "n-resize";
             else
                 cursorName = "left_ptr";
             break;
         case leftDecoration:
-            if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+            if (y < _GLFW_DECORATION_WIDTH)
                 cursorName = "nw-resize";
             else
                 cursorName = "w-resize";
             break;
         case rightDecoration:
-            if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)
+            if (y < _GLFW_DECORATION_WIDTH)
                 cursorName = "ne-resize";
             else
                 cursorName = "e-resize";
             break;
         case bottomDecoration:
-            if (window->wl.cursorPosX < _GLFW_DECORATION_WIDTH)
+            if (x < _GLFW_DECORATION_WIDTH)
                 cursorName = "sw-resize";
-            else if (window->wl.cursorPosX > window->wl.width + _GLFW_DECORATION_WIDTH)
+            else if (x > window->wl.width + _GLFW_DECORATION_WIDTH)
                 cursorName = "se-resize";
             else
                 cursorName = "s-resize";
@@ -225,7 +228,8 @@
         default:
             assert(0);
     }
-    setCursor(window, cursorName);
+    if (_glfw.wl.cursorPreviousName != cursorName)
+        setCursor(window, cursorName);
 }
 
 static void pointerHandleButton(void* data,
diff --git a/glfw/src/wl_monitor.c b/glfw/src/wl_monitor.c
--- a/glfw/src/wl_monitor.c
+++ b/glfw/src/wl_monitor.c
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -198,7 +200,7 @@
 GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
 {
     _glfwInputError(GLFW_PLATFORM_ERROR,
-                    "Wayland: Gamma ramp access it not available");
+                    "Wayland: Gamma ramp access is not available");
     return GLFW_FALSE;
 }
 
diff --git a/glfw/src/wl_platform.h b/glfw/src/wl_platform.h
--- a/glfw/src/wl_platform.h
+++ b/glfw/src/wl_platform.h
@@ -75,8 +75,8 @@
 #define _GLFW_PLATFORM_MONITOR_STATE        _GLFWmonitorWayland wl
 #define _GLFW_PLATFORM_CURSOR_STATE         _GLFWcursorWayland  wl
 
-#define _GLFW_PLATFORM_CONTEXT_STATE
-#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
+#define _GLFW_PLATFORM_CONTEXT_STATE         struct { int dummyContext; }
+#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; }
 
 struct wl_cursor_image {
     uint32_t width;
@@ -249,6 +249,7 @@
     struct wl_cursor_theme*     cursorTheme;
     struct wl_cursor_theme*     cursorThemeHiDPI;
     struct wl_surface*          cursorSurface;
+    const char*                 cursorPreviousName;
     int                         cursorTimerfd;
     uint32_t                    serial;
 
@@ -332,7 +333,7 @@
 typedef struct _GLFWmonitorWayland
 {
     struct wl_output*           output;
-    int                         name;
+    uint32_t                    name;
     int                         currentMode;
 
     int                         x;
diff --git a/glfw/src/wl_window.c b/glfw/src/wl_window.c
--- a/glfw/src/wl_window.c
+++ b/glfw/src/wl_window.c
@@ -23,6 +23,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #define _GNU_SOURCE
 
@@ -132,7 +134,7 @@
  * SCM_RIGHTS methods.
  *
  * posix_fallocate() is used to guarantee that disk space is available
- * for the file at the given size. If disk space is insufficent, errno
+ * for the file at the given size. If disk space is insufficient, errno
  * is set to ENOSPC. If posix_fallocate() is not supported, program may
  * receive SIGBUS on accessing mmap()'ed file contents instead.
  */
@@ -902,7 +904,7 @@
         case GLFW_CROSSHAIR_CURSOR:
             return "crosshair";
         case GLFW_HAND_CURSOR:
-            return "grabbing";
+            return "hand2";
         case GLFW_HRESIZE_CURSOR:
             return "sb_h_double_arrow";
         case GLFW_VRESIZE_CURSOR:
diff --git a/glfw/src/x11_init.c b/glfw/src/x11_init.c
--- a/glfw/src/x11_init.c
+++ b/glfw/src/x11_init.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -52,7 +54,7 @@
         // Note: This way we always force "NumLock = ON", which is intentional
         // since the returned key code should correspond to a physical
         // location.
-        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 1);
+        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 1);
         switch (keySym)
         {
             case XK_KP_0:           return GLFW_KEY_KP_0;
@@ -74,7 +76,7 @@
 
         // Now try primary keysym for function keys (non-printable keys)
         // These should not depend on the current keyboard layout
-        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 0);
+        keySym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, _glfw.x11.xkb.group, 0);
     }
     else
     {
@@ -329,14 +331,13 @@
 //
 static GLFWbool hasUsableInputMethodStyle(void)
 {
-    unsigned int i;
     GLFWbool found = GLFW_FALSE;
     XIMStyles* styles = NULL;
 
     if (XGetIMValues(_glfw.x11.im, XNQueryInputStyle, &styles, NULL) != NULL)
         return GLFW_FALSE;
 
-    for (i = 0;  i < styles->count_styles;  i++)
+    for (unsigned int i = 0;  i < styles->count_styles;  i++)
     {
         if (styles->supported_styles[i] == (XIMPreeditNothing | XIMStatusNothing))
         {
@@ -355,10 +356,9 @@
                              unsigned long atomCount,
                              const char* atomName)
 {
-    unsigned long i;
     const Atom atom = XInternAtom(_glfw.x11.display, atomName, False);
 
-    for (i = 0;  i < atomCount;  i++)
+    for (unsigned int i = 0;  i < atomCount;  i++)
     {
         if (supportedAtoms[i] == atom)
             return atom;
@@ -371,18 +371,11 @@
 //
 static void detectEWMH(void)
 {
-    Window* windowFromRoot = NULL;
-    Window* windowFromChild = NULL;
-
-    // First we need a couple of atoms
-    const Atom supportingWmCheck =
-        XInternAtom(_glfw.x11.display, "_NET_SUPPORTING_WM_CHECK", False);
-    const Atom wmSupported =
-        XInternAtom(_glfw.x11.display, "_NET_SUPPORTED", False);
+    // First we read the _NET_SUPPORTING_WM_CHECK property on the root window
 
-    // Then we look for the _NET_SUPPORTING_WM_CHECK property of the root window
+    Window* windowFromRoot = NULL;
     if (!_glfwGetWindowPropertyX11(_glfw.x11.root,
-                                   supportingWmCheck,
+                                   _glfw.x11.NET_SUPPORTING_WM_CHECK,
                                    XA_WINDOW,
                                    (unsigned char**) &windowFromRoot))
     {
@@ -391,10 +384,12 @@
 
     _glfwGrabErrorHandlerX11();
 
-    // It should be the ID of a child window (of the root)
-    // Then we look for the same property on the child window
+    // If it exists, it should be the XID of a top-level window
+    // Then we look for the same property on that window
+
+    Window* windowFromChild = NULL;
     if (!_glfwGetWindowPropertyX11(*windowFromRoot,
-                                   supportingWmCheck,
+                                   _glfw.x11.NET_SUPPORTING_WM_CHECK,
                                    XA_WINDOW,
                                    (unsigned char**) &windowFromChild))
     {
@@ -404,7 +399,8 @@
 
     _glfwReleaseErrorHandlerX11();
 
-    // It should be the ID of that same child window
+    // If the property exists, it should contain the XID of the window
+
     if (*windowFromRoot != *windowFromChild)
     {
         XFree(windowFromRoot);
@@ -415,19 +411,20 @@
     XFree(windowFromRoot);
     XFree(windowFromChild);
 
-    // We are now fairly sure that an EWMH-compliant window manager is running
-
-    Atom* supportedAtoms;
-    unsigned long atomCount;
+    // We are now fairly sure that an EWMH-compliant WM is currently running
+    // We can now start querying the WM about what features it supports by
+    // looking in the _NET_SUPPORTED property on the root window
+    // It should contain a list of supported EWMH protocol and state atoms
 
-    // Now we need to check the _NET_SUPPORTED property of the root window
-    // It should be a list of supported WM protocol and state atoms
-    atomCount = _glfwGetWindowPropertyX11(_glfw.x11.root,
-                                          wmSupported,
-                                          XA_ATOM,
-                                          (unsigned char**) &supportedAtoms);
+    Atom* supportedAtoms = NULL;
+    const unsigned long atomCount =
+        _glfwGetWindowPropertyX11(_glfw.x11.root,
+                                  _glfw.x11.NET_SUPPORTED,
+                                  XA_ATOM,
+                                  (unsigned char**) &supportedAtoms);
 
     // See which of the atoms we support that are supported by the WM
+
     _glfw.x11.NET_WM_STATE =
         getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE");
     _glfw.x11.NET_WM_STATE_ABOVE =
@@ -662,6 +659,14 @@
             if (supported)
                 _glfw.x11.xkb.detectable = GLFW_TRUE;
         }
+
+        _glfw.x11.xkb.group = 0;
+        XkbStateRec state;
+        if (XkbGetState(_glfw.x11.display, XkbUseCoreKbd, &state) == Success)
+        {
+            XkbSelectEventDetails(_glfw.x11.display, XkbUseCoreKbd, XkbStateNotify, XkbAllStateComponentsMask, XkbGroupStateMask);
+            _glfw.x11.xkb.group = (unsigned int)state.group;
+        }
     }
 
 #if defined(__CYGWIN__)
@@ -707,9 +712,6 @@
     // the keyboard mapping.
     createKeyTables();
 
-    // Detect whether an EWMH-conformant window manager is running
-    detectEWMH();
-
     // String format atoms
     _glfw.x11.NULL_ = XInternAtom(_glfw.x11.display, "NULL", False);
     _glfw.x11.UTF8_STRING = XInternAtom(_glfw.x11.display, "UTF8_STRING", False);
@@ -753,6 +755,10 @@
         XInternAtom(_glfw.x11.display, "WM_STATE", False);
     _glfw.x11.WM_DELETE_WINDOW =
         XInternAtom(_glfw.x11.display, "WM_DELETE_WINDOW", False);
+    _glfw.x11.NET_SUPPORTED =
+        XInternAtom(_glfw.x11.display, "_NET_SUPPORTED", False);
+    _glfw.x11.NET_SUPPORTING_WM_CHECK =
+        XInternAtom(_glfw.x11.display, "_NET_SUPPORTING_WM_CHECK", False);
     _glfw.x11.NET_WM_ICON =
         XInternAtom(_glfw.x11.display, "_NET_WM_ICON", False);
     _glfw.x11.NET_WM_PING =
@@ -777,6 +783,9 @@
         _glfw.x11.NET_WM_CM_Sx = XInternAtom(_glfw.x11.display, name, False);
     }
 
+    // Detect whether an EWMH-conformant window manager is running
+    detectEWMH();
+
     return GLFW_TRUE;
 }
 
@@ -784,13 +793,10 @@
 //
 static void getSystemContentScale(float* xscale, float* yscale)
 {
-    // NOTE: Fall back to the display-wide DPI instead of RandR monitor DPI if
-    //       Xft.dpi retrieval below fails as we don't currently have an exact
-    //       policy for which monitor a window is considered to "be on"
-    float xdpi = DisplayWidth(_glfw.x11.display, _glfw.x11.screen) *
-        25.4f / DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen);
-    float ydpi = DisplayHeight(_glfw.x11.display, _glfw.x11.screen) *
-        25.4f / DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);
+    // Start by assuming the default X11 DPI
+    // NOTE: Some desktop environments (KDE) may remove the Xft.dpi field when it
+    //       would be set to 96, so assume that is the case if we cannot find it
+    float xdpi = 96.f, ydpi = 96.f;
 
     // NOTE: Basing the scale on Xft.dpi where available should provide the most
     //       consistent user experience (matches Qt, Gtk, etc), although not
diff --git a/glfw/src/x11_monitor.c b/glfw/src/x11_monitor.c
--- a/glfw/src/x11_monitor.c
+++ b/glfw/src/x11_monitor.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -54,9 +56,7 @@
 //
 static const XRRModeInfo* getModeInfo(const XRRScreenResources* sr, RRMode id)
 {
-    int i;
-
-    for (i = 0;  i < sr->nmode;  i++)
+    for (int i = 0;  i < sr->nmode;  i++)
     {
         if (sr->modes[i].id == id)
             return sr->modes + i;
@@ -102,7 +102,7 @@
 {
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        int i, j, disconnectedCount, screenCount = 0;
+        int disconnectedCount, screenCount = 0;
         _GLFWmonitor** disconnected = NULL;
         XineramaScreenInfo* screens = NULL;
         XRRScreenResources* sr = XRRGetScreenResourcesCurrent(_glfw.x11.display,
@@ -122,14 +122,11 @@
                    _glfw.monitorCount * sizeof(_GLFWmonitor*));
         }
 
-        for (i = 0;  i < sr->noutput;  i++)
+        for (int i = 0;  i < sr->noutput;  i++)
         {
-            int type, widthMM, heightMM;
-            XRROutputInfo* oi;
-            XRRCrtcInfo* ci;
-            _GLFWmonitor* monitor;
+            int j, type, widthMM, heightMM;
 
-            oi = XRRGetOutputInfo(_glfw.x11.display, sr, sr->outputs[i]);
+            XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, sr->outputs[i]);
             if (oi->connection != RR_Connected || oi->crtc == None)
             {
                 XRRFreeOutputInfo(oi);
@@ -152,7 +149,7 @@
                 continue;
             }
 
-            ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc);
+            XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc);
             if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270)
             {
                 widthMM  = oi->mm_height;
@@ -164,7 +161,17 @@
                 heightMM = oi->mm_height;
             }
 
-            monitor = _glfwAllocMonitor(oi->name, widthMM, heightMM);
+            if (widthMM <= 0 || heightMM <= 0)
+            {
+                // HACK: If RandR does not provide a physical size, assume the
+                //       X11 default 96 DPI and calcuate from the CRTC viewport
+                // NOTE: These members are affected by rotation, unlike the mode
+                //       info and output info members
+                widthMM  = (int) (ci->width * 25.4f / 96.f);
+                heightMM = (int) (ci->height * 25.4f / 96.f);
+            }
+
+            _GLFWmonitor* monitor = _glfwAllocMonitor(oi->name, widthMM, heightMM);
             monitor->x11.output = sr->outputs[i];
             monitor->x11.crtc   = oi->crtc;
 
@@ -196,7 +203,7 @@
         if (screens)
             XFree(screens);
 
-        for (i = 0;  i < disconnectedCount;  i++)
+        for (int i = 0;  i < disconnectedCount;  i++)
         {
             if (disconnected[i])
                 _glfwInputMonitor(disconnected[i], GLFW_DISCONNECTED, 0);
@@ -221,24 +228,20 @@
 {
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-        XRROutputInfo* oi;
         GLFWvidmode current;
-        const GLFWvidmode* best;
         RRMode native = None;
-        int i;
 
-        best = _glfwChooseVideoMode(monitor, desired);
+        const GLFWvidmode* best = _glfwChooseVideoMode(monitor, desired);
         _glfwPlatformGetVideoMode(monitor, &current);
         if (_glfwCompareVideoModes(&current, best) == 0)
             return;
 
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
-        oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
 
-        for (i = 0;  i < oi->nmode;  i++)
+        for (int i = 0;  i < oi->nmode;  i++)
         {
             const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);
             if (!modeIsGood(mi))
@@ -279,14 +282,12 @@
 {
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-
         if (monitor->x11.oldMode == None)
             return;
 
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
 
         XRRSetCrtcConfig(_glfw.x11.display,
                          sr, monitor->x11.crtc,
@@ -317,11 +318,9 @@
 {
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
 
         if (xpos)
             *xpos = ci->x;
@@ -348,11 +347,9 @@
 
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
 
         areaX = ci->x;
         areaY = ci->y;
@@ -444,24 +441,21 @@
 
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        int i, j;
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-        XRROutputInfo* oi;
-
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
-        oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRROutputInfo* oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
 
         result = calloc(oi->nmode, sizeof(GLFWvidmode));
 
-        for (i = 0;  i < oi->nmode;  i++)
+        for (int i = 0;  i < oi->nmode;  i++)
         {
             const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);
             if (!modeIsGood(mi))
                 continue;
 
             const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);
+            int j;
 
             for (j = 0;  j < *count;  j++)
             {
@@ -495,11 +489,9 @@
 {
     if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
     {
-        XRRScreenResources* sr;
-        XRRCrtcInfo* ci;
-
-        sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
-        ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
+        XRRScreenResources* sr =
+            XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
+        XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
 
         *mode = vidmodeFromModeInfo(getModeInfo(sr, ci->mode), ci);
 
diff --git a/glfw/src/x11_platform.h b/glfw/src/x11_platform.h
--- a/glfw/src/x11_platform.h
+++ b/glfw/src/x11_platform.h
@@ -180,6 +180,7 @@
 {
     Colormap        colormap;
     Window          handle;
+    Window          parent;
     XIC             ic;
 
     GLFWbool        overrideRedirect;
@@ -228,7 +229,7 @@
     // Clipboard string (while the selection is owned)
     char*           clipboardString;
     // Key name string
-    char            keyName[5];
+    char            keynames[GLFW_KEY_LAST + 1][5];
     // X11 keycode to GLFW key LUT
     short int       keycodes[256];
     // GLFW key to X11 keycode LUT
@@ -239,6 +240,8 @@
     _GLFWwindow*    disabledCursorWindow;
 
     // Window manager atoms
+    Atom            NET_SUPPORTED;
+    Atom            NET_SUPPORTING_WM_CHECK;
     Atom            WM_PROTOCOLS;
     Atom            WM_STATE;
     Atom            WM_DELETE_WINDOW;
@@ -321,13 +324,14 @@
     } randr;
 
     struct {
-        GLFWbool    available;
-        GLFWbool    detectable;
-        int         majorOpcode;
-        int         eventBase;
-        int         errorBase;
-        int         major;
-        int         minor;
+        GLFWbool     available;
+        GLFWbool     detectable;
+        int          majorOpcode;
+        int          eventBase;
+        int          errorBase;
+        int          major;
+        int          minor;
+        unsigned int group;
     } xkb;
 
     struct {
diff --git a/glfw/src/x11_window.c b/glfw/src/x11_window.c
--- a/glfw/src/x11_window.c
+++ b/glfw/src/x11_window.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
@@ -48,6 +50,10 @@
 #define Button6            6
 #define Button7            7
 
+// Motif WM hints flags
+#define MWM_HINTS_DECORATIONS   2
+#define MWM_DECOR_ALL           1
+
 #define _GLFW_XDND_VERSION 5
 
 
@@ -213,10 +219,7 @@
 static void sendEventToWM(_GLFWwindow* window, Atom type,
                           long a, long b, long c, long d, long e)
 {
-    XEvent event;
-    memset(&event, 0, sizeof(event));
-
-    event.type = ClientMessage;
+    XEvent event = { ClientMessage };
     event.xclient.window = window->x11.handle;
     event.xclient.format = 32; // Data is 32-bit longs
     event.xclient.message_type = type;
@@ -610,46 +613,40 @@
 
     window->x11.transparent = _glfwIsVisualTransparentX11(visual);
 
-    // Create the actual window
-    {
-        XSetWindowAttributes wa;
-        const unsigned long wamask = CWBorderPixel | CWColormap | CWEventMask;
-
-        wa.colormap = window->x11.colormap;
-        wa.border_pixel = 0;
-        wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |
-                        PointerMotionMask | ButtonPressMask | ButtonReleaseMask |
-                        ExposureMask | FocusChangeMask | VisibilityChangeMask |
-                        EnterWindowMask | LeaveWindowMask | PropertyChangeMask;
-
-        _glfwGrabErrorHandlerX11();
+    XSetWindowAttributes wa = { 0 };
+    wa.colormap = window->x11.colormap;
+    wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |
+                    PointerMotionMask | ButtonPressMask | ButtonReleaseMask |
+                    ExposureMask | FocusChangeMask | VisibilityChangeMask |
+                    EnterWindowMask | LeaveWindowMask | PropertyChangeMask;
 
-        window->x11.handle = XCreateWindow(_glfw.x11.display,
-                                           _glfw.x11.root,
-                                           0, 0,
-                                           width, height,
-                                           0,      // Border width
-                                           depth,  // Color depth
-                                           InputOutput,
-                                           visual,
-                                           wamask,
-                                           &wa);
+    _glfwGrabErrorHandlerX11();
 
-        _glfwReleaseErrorHandlerX11();
+    window->x11.handle = XCreateWindow(_glfw.x11.display,
+                                       _glfw.x11.root,
+                                       0, 0,   // Position
+                                       width, height,
+                                       0,      // Border width
+                                       depth,  // Color depth
+                                       InputOutput,
+                                       visual,
+                                       CWBorderPixel | CWColormap | CWEventMask,
+                                       &wa);
 
-        if (!window->x11.handle)
-        {
-            _glfwInputErrorX11(GLFW_PLATFORM_ERROR,
-                               "X11: Failed to create window");
-            return GLFW_FALSE;
-        }
+    _glfwReleaseErrorHandlerX11();
 
-        XSaveContext(_glfw.x11.display,
-                     window->x11.handle,
-                     _glfw.x11.context,
-                     (XPointer) window);
+    if (!window->x11.handle)
+    {
+        _glfwInputErrorX11(GLFW_PLATFORM_ERROR,
+                           "X11: Failed to create window");
+        return GLFW_FALSE;
     }
 
+    XSaveContext(_glfw.x11.display,
+                 window->x11.handle,
+                 _glfw.x11.context,
+                 (XPointer) window);
+
     if (!wndconfig->decorated)
         _glfwPlatformSetWindowDecorated(window, GLFW_FALSE);
 
@@ -679,7 +676,7 @@
         {
             XChangeProperty(_glfw.x11.display, window->x11.handle,
                             _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
-                            PropModeReplace, (unsigned char*) &states, count);
+                            PropModeReplace, (unsigned char*) states, count);
         }
     }
 
@@ -784,6 +781,13 @@
                                    NULL);
     }
 
+    if (window->x11.ic)
+    {
+        unsigned long filter = 0;
+        if (XGetICValues(window->x11.ic, XNFilterEvents, &filter, NULL) == NULL)
+            XSelectInput(_glfw.x11.display, window->x11.handle, wa.event_mask | filter);
+    }
+
     _glfwPlatformGetWindowPos(window, &window->x11.xpos, &window->x11.ypos);
     _glfwPlatformGetWindowSize(window, &window->x11.width, &window->x11.height);
 
@@ -944,11 +948,8 @@
 {
     const XSelectionRequestEvent* request = &event->xselectionrequest;
 
-    XEvent reply;
-    memset(&reply, 0, sizeof(reply));
-
+    XEvent reply = { SelectionNotify };
     reply.xselection.property = writeTargetToProperty(request);
-    reply.xselection.type = SelectionNotify;
     reply.xselection.display = request->display;
     reply.xselection.requestor = request->requestor;
     reply.xselection.selection = request->selection;
@@ -960,7 +961,6 @@
 
 static const char* getSelectionString(Atom selection)
 {
-    size_t i;
     char** selectionString = NULL;
     const Atom targets[] = { _glfw.x11.UTF8_STRING, XA_STRING };
     const size_t targetCount = sizeof(targets) / sizeof(targets[0]);
@@ -981,7 +981,7 @@
     free(*selectionString);
     *selectionString = NULL;
 
-    for (i = 0;  i < targetCount;  i++)
+    for (size_t i = 0;  i < targetCount;  i++)
     {
         char* data;
         Atom actualType;
@@ -1165,7 +1165,6 @@
 //
 static void processEvent(XEvent *event)
 {
-    _GLFWwindow* window = NULL;
     int keycode = 0;
     Bool filtered = False;
 
@@ -1186,6 +1185,18 @@
         }
     }
 
+    if (_glfw.x11.xkb.available)
+    {
+        if (event->type == _glfw.x11.xkb.eventBase + XkbEventCode)
+        {
+            if (((XkbEvent*) event)->any.xkb_type == XkbStateNotify &&
+                (((XkbEvent*) event)->state.changed & XkbGroupStateMask))
+            {
+                _glfw.x11.xkb.group = ((XkbEvent*) event)->state.group;
+            }
+        }
+    }
+
     if (event->type == GenericEvent)
     {
         if (_glfw.x11.xi.available)
@@ -1235,6 +1246,7 @@
         return;
     }
 
+    _GLFWwindow* window = NULL;
     if (XFindContext(_glfw.x11.display,
                      event->xany.window,
                      _glfw.x11.context,
@@ -1246,6 +1258,18 @@
 
     switch (event->type)
     {
+        case CreateNotify:
+        {
+            window->x11.parent = event->xcreatewindow.parent;
+            return;
+        }
+
+        case ReparentNotify:
+        {
+            window->x11.parent = event->xreparent.parent;
+            return;
+        }
+
         case KeyPress:
         {
             const int key = translateKey(keycode);
@@ -1530,18 +1554,28 @@
                 window->x11.height = event->xconfigure.height;
             }
 
-            if (event->xconfigure.x != window->x11.xpos ||
-                event->xconfigure.y != window->x11.ypos)
+            int xpos = event->xconfigure.x;
+            int ypos = event->xconfigure.y;
+
+            // NOTE: ConfigureNotify events from the server are in local
+            //       coordinates, so if we are reparented we need to translate
+            //       the position into root (screen) coordinates
+            if (!event->xany.send_event && window->x11.parent != _glfw.x11.root)
             {
-                if (window->x11.overrideRedirect || event->xany.send_event)
-                {
-                    _glfwInputWindowPos(window,
-                                        event->xconfigure.x,
-                                        event->xconfigure.y);
+                Window dummy;
+                XTranslateCoordinates(_glfw.x11.display,
+                                      window->x11.parent,
+                                      _glfw.x11.root,
+                                      xpos, ypos,
+                                      &xpos, &ypos,
+                                      &dummy);
+            }
 
-                    window->x11.xpos = event->xconfigure.x;
-                    window->x11.ypos = event->xconfigure.y;
-                }
+            if (xpos != window->x11.xpos || ypos != window->x11.ypos)
+            {
+                _glfwInputWindowPos(window, xpos, ypos);
+                window->x11.xpos = xpos;
+                window->x11.ypos = ypos;
             }
 
             return;
@@ -1646,10 +1680,7 @@
                 }
                 else if (_glfw.x11.xdnd.version >= 2)
                 {
-                    XEvent reply;
-                    memset(&reply, 0, sizeof(reply));
-
-                    reply.type = ClientMessage;
+                    XEvent reply = { ClientMessage };
                     reply.xclient.window = _glfw.x11.xdnd.source;
                     reply.xclient.message_type = _glfw.x11.XdndFinished;
                     reply.xclient.format = 32;
@@ -1682,10 +1713,7 @@
 
                 _glfwInputCursorPos(window, xpos, ypos);
 
-                XEvent reply;
-                memset(&reply, 0, sizeof(reply));
-
-                reply.type = ClientMessage;
+                XEvent reply = { ClientMessage };
                 reply.xclient.window = _glfw.x11.xdnd.source;
                 reply.xclient.message_type = _glfw.x11.XdndStatus;
                 reply.xclient.format = 32;
@@ -1738,10 +1766,7 @@
 
                 if (_glfw.x11.xdnd.version >= 2)
                 {
-                    XEvent reply;
-                    memset(&reply, 0, sizeof(reply));
-
-                    reply.type = ClientMessage;
+                    XEvent reply = { ClientMessage };
                     reply.xclient.window = _glfw.x11.xdnd.source;
                     reply.xclient.message_type = _glfw.x11.XdndFinished;
                     reply.xclient.format = 32;
@@ -1760,9 +1785,6 @@
 
         case FocusIn:
         {
-            if (window->cursorMode == GLFW_CURSOR_DISABLED)
-                disableCursor(window);
-
             if (event->xfocus.mode == NotifyGrab ||
                 event->xfocus.mode == NotifyUngrab)
             {
@@ -1771,6 +1793,9 @@
                 return;
             }
 
+            if (window->cursorMode == GLFW_CURSOR_DISABLED)
+                disableCursor(window);
+
             if (window->x11.ic)
                 XSetICFocus(window->x11.ic);
 
@@ -1780,9 +1805,6 @@
 
         case FocusOut:
         {
-            if (window->cursorMode == GLFW_CURSOR_DISABLED)
-                enableCursor(window);
-
             if (event->xfocus.mode == NotifyGrab ||
                 event->xfocus.mode == NotifyUngrab)
             {
@@ -1791,6 +1813,9 @@
                 return;
             }
 
+            if (window->cursorMode == GLFW_CURSOR_DISABLED)
+                enableCursor(window);
+
             if (window->x11.ic)
                 XUnsetICFocus(window->x11.ic);
 
@@ -2338,18 +2363,67 @@
 
 void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
 {
-    if (_glfw.x11.NET_WM_STATE &&
-        _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&
-        _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
+    if (!_glfw.x11.NET_WM_STATE ||
+        !_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT ||
+        !_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
     {
+        return;
+    }
+
+    if (_glfwPlatformWindowVisible(window))
+    {
         sendEventToWM(window,
-                      _glfw.x11.NET_WM_STATE,
-                      _NET_WM_STATE_ADD,
-                      _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
-                      _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,
-                      1, 0);
-        XFlush(_glfw.x11.display);
+                    _glfw.x11.NET_WM_STATE,
+                    _NET_WM_STATE_ADD,
+                    _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
+                    _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,
+                    1, 0);
     }
+    else
+    {
+        Atom* states = NULL;
+        unsigned long count =
+            _glfwGetWindowPropertyX11(window->x11.handle,
+                                      _glfw.x11.NET_WM_STATE,
+                                      XA_ATOM,
+                                      (unsigned char**) &states);
+
+        // NOTE: We don't check for failure as this property may not exist yet
+        //       and that's fine (and we'll create it implicitly with append)
+
+        Atom missing[2] =
+        {
+            _glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
+            _glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ
+        };
+        unsigned long missingCount = 2;
+
+        for (unsigned long i = 0;  i < count;  i++)
+        {
+            for (unsigned long j = 0;  j < missingCount;  j++)
+            {
+                if (states[i] == missing[j])
+                {
+                    missing[j] = missing[missingCount - 1];
+                    missingCount--;
+                }
+            }
+        }
+
+        if (states)
+            XFree(states);
+
+        if (!missingCount)
+            return;
+
+        XChangeProperty(_glfw.x11.display, window->x11.handle,
+                        _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+                        PropModeAppend,
+                        (unsigned char*) missing,
+                        missingCount);
+    }
+
+    XFlush(_glfw.x11.display);
 }
 
 void _glfwPlatformShowWindow(_GLFWwindow* window)
@@ -2369,6 +2443,9 @@
 
 void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
 {
+    if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_DEMANDS_ATTENTION)
+        return;
+
     sendEventToWM(window,
                   _glfw.x11.NET_WM_STATE,
                   _NET_WM_STATE_ADD,
@@ -2538,33 +2615,24 @@
 
 void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
 {
-    if (enabled)
-    {
-        XDeleteProperty(_glfw.x11.display,
-                        window->x11.handle,
-                        _glfw.x11.MOTIF_WM_HINTS);
-    }
-    else
+    struct
     {
-        struct
-        {
-            unsigned long flags;
-            unsigned long functions;
-            unsigned long decorations;
-            long input_mode;
-            unsigned long status;
-        } hints;
+        unsigned long flags;
+        unsigned long functions;
+        unsigned long decorations;
+        long input_mode;
+        unsigned long status;
+    } hints = {0};
 
-        hints.flags = 2;       // Set decorations
-        hints.decorations = 0; // No decorations
+    hints.flags = MWM_HINTS_DECORATIONS;
+    hints.decorations = enabled ? MWM_DECOR_ALL : 0;
 
-        XChangeProperty(_glfw.x11.display, window->x11.handle,
-                        _glfw.x11.MOTIF_WM_HINTS,
-                        _glfw.x11.MOTIF_WM_HINTS, 32,
-                        PropModeReplace,
-                        (unsigned char*) &hints,
-                        sizeof(hints) / sizeof(long));
-    }
+    XChangeProperty(_glfw.x11.display, window->x11.handle,
+                    _glfw.x11.MOTIF_WM_HINTS,
+                    _glfw.x11.MOTIF_WM_HINTS, 32,
+                    PropModeReplace,
+                    (unsigned char*) &hints,
+                    sizeof(hints) / sizeof(long));
 }
 
 void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
@@ -2574,7 +2642,7 @@
 
     if (_glfwPlatformWindowVisible(window))
     {
-        const Atom action = enabled ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+        const long action = enabled ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
         sendEventToWM(window,
                       _glfw.x11.NET_WM_STATE,
                       action,
@@ -2583,16 +2651,17 @@
     }
     else
     {
-        Atom* states;
+        Atom* states = NULL;
         unsigned long i, count;
 
         count = _glfwGetWindowPropertyX11(window->x11.handle,
                                           _glfw.x11.NET_WM_STATE,
                                           XA_ATOM,
                                           (unsigned char**) &states);
-        if (!states)
-            return;
 
+        // NOTE: We don't check for failure as this property may not exist yet
+        //       and that's fine (and we'll create it implicitly with append)
+
         if (enabled)
         {
             for (i = 0;  i < count;  i++)
@@ -2601,32 +2670,36 @@
                     break;
             }
 
-            if (i == count)
-            {
-                XChangeProperty(_glfw.x11.display, window->x11.handle,
-                                _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
-                                PropModeAppend,
-                                (unsigned char*) &_glfw.x11.NET_WM_STATE_ABOVE,
-                                1);
-            }
+            if (i < count)
+                return;
+
+            XChangeProperty(_glfw.x11.display, window->x11.handle,
+                            _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
+                            PropModeAppend,
+                            (unsigned char*) &_glfw.x11.NET_WM_STATE_ABOVE,
+                            1);
         }
-        else
+        else if (states)
         {
             for (i = 0;  i < count;  i++)
             {
                 if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
-                {
-                    states[i] = states[count - 1];
-                    count--;
-                }
+                    break;
             }
 
+            if (i == count)
+                return;
+
+            states[i] = states[count - 1];
+            count--;
+
             XChangeProperty(_glfw.x11.display, window->x11.handle,
                             _glfw.x11.NET_WM_STATE, XA_ATOM, 32,
-                            PropModeReplace, (unsigned char*) &states, count);
+                            PropModeReplace, (unsigned char*) states, count);
         }
 
-        XFree(states);
+        if (states)
+            XFree(states);
     }
 
     XFlush(_glfw.x11.display);
@@ -2737,10 +2810,7 @@
 
 void _glfwPlatformPostEmptyEvent(void)
 {
-    XEvent event;
-
-    memset(&event, 0, sizeof(event));
-    event.type = ClientMessage;
+    XEvent event = { ClientMessage };
     event.xclient.window = _glfw.x11.helperWindowHandle;
     event.xclient.format = 32; // Data is 32-bit longs
     event.xclient.message_type = _glfw.x11.NULL_;
@@ -2797,7 +2867,9 @@
     if (!_glfw.x11.xkb.available)
         return NULL;
 
-    const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 0);
+    const int key = _glfw.x11.keycodes[scancode];
+    const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display,
+                                             scancode, _glfw.x11.xkb.group, 0);
     if (keysym == NoSymbol)
         return NULL;
 
@@ -2805,12 +2877,12 @@
     if (ch == -1)
         return NULL;
 
-    const size_t count = encodeUTF8(_glfw.x11.keyName, (unsigned int) ch);
+    const size_t count = encodeUTF8(_glfw.x11.keynames[key], (unsigned int) ch);
     if (count == 0)
         return NULL;
 
-    _glfw.x11.keyName[count] = '\0';
-    return _glfw.x11.keyName;
+    _glfw.x11.keynames[key][count] = '\0';
+    return _glfw.x11.keynames[key];
 }
 
 int _glfwPlatformGetKeyScancode(int key)
diff --git a/glfw/src/xkb_unicode.c b/glfw/src/xkb_unicode.c
--- a/glfw/src/xkb_unicode.c
+++ b/glfw/src/xkb_unicode.c
@@ -24,6 +24,8 @@
 //    distribution.
 //
 //========================================================================
+// It is fine to use C99 in this file because it will not be built with VS
+//========================================================================
 
 #include "internal.h"
 
diff --git a/glfw/src/xkb_unicode.h b/glfw/src/xkb_unicode.h
--- a/glfw/src/xkb_unicode.h
+++ b/glfw/src/xkb_unicode.h
@@ -1,28 +1,28 @@
-//========================================================================
-// GLFW 3.3 Linux - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would
-//    be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-//    be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-//    distribution.
-//
-//========================================================================
-
-long _glfwKeySym2Unicode(unsigned int keysym);
-
+//========================================================================
+// GLFW 3.3 Linux - www.glfw.org
+//------------------------------------------------------------------------
+// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+//    claim that you wrote the original software. If you use this software
+//    in a product, an acknowledgment in the product documentation would
+//    be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not
+//    be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source
+//    distribution.
+//
+//========================================================================
+
+long _glfwKeySym2Unicode(unsigned int keysym);
+
