41#ifndef GLAD_PLATFORM_H_
42#define GLAD_PLATFORM_H_
44#ifndef GLAD_PLATFORM_WIN32
45 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
46 #define GLAD_PLATFORM_WIN32 1
48 #define GLAD_PLATFORM_WIN32 0
52#ifndef GLAD_PLATFORM_APPLE
54 #define GLAD_PLATFORM_APPLE 1
56 #define GLAD_PLATFORM_APPLE 0
60#ifndef GLAD_PLATFORM_EMSCRIPTEN
62 #define GLAD_PLATFORM_EMSCRIPTEN 1
64 #define GLAD_PLATFORM_EMSCRIPTEN 0
68#ifndef GLAD_PLATFORM_UWP
69 #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
71 #if __has_include(<winapifamily.h>)
72 #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
74 #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
75 #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
79 #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
80 #include <winapifamily.h>
81 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
82 #define GLAD_PLATFORM_UWP 1
86 #ifndef GLAD_PLATFORM_UWP
87 #define GLAD_PLATFORM_UWP 0
92 #define GLAD_GNUC_EXTENSION __extension__
94 #define GLAD_GNUC_EXTENSION
97#define GLAD_UNUSED(x) (void)(x)
100 #if defined(GLAD_API_CALL_EXPORT)
101 #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
102 #if defined(GLAD_API_CALL_EXPORT_BUILD)
103 #if defined(__GNUC__)
104 #define GLAD_API_CALL __attribute__ ((dllexport)) extern
106 #define GLAD_API_CALL __declspec(dllexport) extern
109 #if defined(__GNUC__)
110 #define GLAD_API_CALL __attribute__ ((dllimport)) extern
112 #define GLAD_API_CALL __declspec(dllimport) extern
115 #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
116 #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
118 #define GLAD_API_CALL extern
121 #define GLAD_API_CALL extern
126 #define GLAD_API_PTR APIENTRY
127#elif GLAD_PLATFORM_WIN32
128 #define GLAD_API_PTR __stdcall
134#define GLAPI GLAD_API_CALL
138#define GLAPIENTRY GLAD_API_PTR
141#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
142#define GLAD_VERSION_MAJOR(version) (version / 10000)
143#define GLAD_VERSION_MINOR(version) (version % 10000)
145#define GLAD_GENERATOR_VERSION "2.0.7"
157#define WGL_FONT_LINES 0
158#define WGL_FONT_POLYGONS 1
159#define WGL_SWAP_MAIN_PLANE 0x00000001
160#define WGL_SWAP_OVERLAY1 0x00000002
161#define WGL_SWAP_OVERLAY10 0x00000400
162#define WGL_SWAP_OVERLAY11 0x00000800
163#define WGL_SWAP_OVERLAY12 0x00001000
164#define WGL_SWAP_OVERLAY13 0x00002000
165#define WGL_SWAP_OVERLAY14 0x00004000
166#define WGL_SWAP_OVERLAY15 0x00008000
167#define WGL_SWAP_OVERLAY2 0x00000004
168#define WGL_SWAP_OVERLAY3 0x00000008
169#define WGL_SWAP_OVERLAY4 0x00000010
170#define WGL_SWAP_OVERLAY5 0x00000020
171#define WGL_SWAP_OVERLAY6 0x00000040
172#define WGL_SWAP_OVERLAY7 0x00000080
173#define WGL_SWAP_OVERLAY8 0x00000100
174#define WGL_SWAP_OVERLAY9 0x00000200
175#define WGL_SWAP_UNDERLAY1 0x00010000
176#define WGL_SWAP_UNDERLAY10 0x02000000
177#define WGL_SWAP_UNDERLAY11 0x04000000
178#define WGL_SWAP_UNDERLAY12 0x08000000
179#define WGL_SWAP_UNDERLAY13 0x10000000
180#define WGL_SWAP_UNDERLAY14 0x20000000
181#define WGL_SWAP_UNDERLAY15 0x40000000
182#define WGL_SWAP_UNDERLAY2 0x00020000
183#define WGL_SWAP_UNDERLAY3 0x00040000
184#define WGL_SWAP_UNDERLAY4 0x00080000
185#define WGL_SWAP_UNDERLAY5 0x00100000
186#define WGL_SWAP_UNDERLAY6 0x00200000
187#define WGL_SWAP_UNDERLAY7 0x00400000
188#define WGL_SWAP_UNDERLAY8 0x00800000
189#define WGL_SWAP_UNDERLAY9 0x01000000
240#define WGL_VERSION_1_0 1
242#define WGL_ARB_extensions_string 1
244#define WGL_EXT_extensions_string 1
246#define WGL_EXT_swap_control 1
282#define wglGetExtensionsStringARB glad_wglGetExtensionsStringARB
284#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT
286#define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT
288#define wglSwapIntervalEXT glad_wglSwapIntervalEXT
DWORD Flags
Definition: wgl.h:226
CHAR DeviceName[32]
Definition: wgl.h:224
RECT rcVirtualScreen
Definition: wgl.h:227
DWORD cb
Definition: wgl.h:223
CHAR DeviceString[128]
Definition: wgl.h:225
GLADapiproc(* GLADuserptrloadfunc)(void *userptr, const char *name)
Definition: wgl.h:150
BOOL(GLAD_API_PTR * PFNWGLUSEFONTBITMAPSPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
Definition: wgl.h:274
BOOL(GLAD_API_PTR * PFNSWAPBUFFERSPROC)(HDC hdc)
Definition: wgl.h:255
BOOL(GLAD_API_PTR * PFNWGLSHARELISTSPROC)(HGLRC hrcSrvShare, HGLRC hrcSrvSource)
Definition: wgl.h:271
BOOL(GLAD_API_PTR * PFNWGLUSEFONTBITMAPSAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
Definition: wgl.h:275
GLAD_API_CALL int GLAD_WGL_EXT_swap_control
Definition: wgl.h:247
BOOL(GLAD_API_PTR * PFNWGLREALIZELAYERPALETTEPROC)(HDC hdc, int iLayerPlane, BOOL bRealize)
Definition: wgl.h:269
DECLARE_HANDLE(HPBUFFERARB)
BOOL(GLAD_API_PTR * PFNWGLCOPYCONTEXTPROC)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
Definition: wgl.h:256
const char *(GLAD_API_PTR * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc)
Definition: wgl.h:263
BOOL(GLAD_API_PTR * PFNWGLUSEFONTOUTLINESWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
Definition: wgl.h:279
UINT(GLAD_API_PTR * PFNGETENHMETAFILEPIXELFORMATPROC)(HENHMETAFILE hemf, UINT cbBuffer, PIXELFORMATDESCRIPTOR *ppfd)
Definition: wgl.h:252
void(* GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args,...)
Definition: wgl.h:153
void(* GLADapiproc)(void)
Definition: wgl.h:147
int(GLAD_API_PTR * PFNCHOOSEPIXELFORMATPROC)(HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd)
Definition: wgl.h:250
GLAD_API_CALL int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr)
Definition: wgl.cpp:105
BOOL(GLAD_API_PTR * PFNWGLUSEFONTBITMAPSWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
Definition: wgl.h:276
BOOL(GLAD_API_PTR * PFNWGLUSEFONTOUTLINESAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
Definition: wgl.h:278
int(GLAD_API_PTR * PFNWGLGETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr)
Definition: wgl.h:265
GLAD_API_CALL int GLAD_WGL_EXT_extensions_string
Definition: wgl.h:245
HDC(GLAD_API_PTR * PFNWGLGETCURRENTDCPROC)(void)
Definition: wgl.h:262
BOOL(GLAD_API_PTR * PFNSETPIXELFORMATPROC)(HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd)
Definition: wgl.h:254
GLAD_API_CALL PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT
Definition: wgl.h:285
HGLRC(GLAD_API_PTR * PFNWGLGETCURRENTCONTEXTPROC)(void)
Definition: wgl.h:261
HGLRC(GLAD_API_PTR * PFNWGLCREATELAYERCONTEXTPROC)(HDC hDc, int level)
Definition: wgl.h:258
GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB
Definition: wgl.h:281
int(GLAD_API_PTR * PFNDESCRIBEPIXELFORMATPROC)(HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd)
Definition: wgl.h:251
BOOL(GLAD_API_PTR * PFNWGLDESCRIBELAYERPLANEPROC)(HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, LAYERPLANEDESCRIPTOR *plpd)
Definition: wgl.h:260
#define GLAD_API_CALL
Definition: wgl.h:121
GLAD_API_CALL int gladLoadWGL(HDC hdc, GLADloadfunc load)
Definition: wgl.cpp:122
BOOL(GLAD_API_PTR * PFNWGLUSEFONTOUTLINESPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
Definition: wgl.h:277
int(GLAD_API_PTR * PFNWGLSETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr)
Definition: wgl.h:270
GLAD_API_CALL PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT
Definition: wgl.h:283
BOOL(GLAD_API_PTR * PFNWGLMAKECURRENTPROC)(HDC hDc, HGLRC newContext)
Definition: wgl.h:268
HGLRC(GLAD_API_PTR * PFNWGLCREATECONTEXTPROC)(HDC hDc)
Definition: wgl.h:257
BOOL(GLAD_API_PTR * PFNWGLSWAPLAYERBUFFERSPROC)(HDC hdc, UINT fuFlags)
Definition: wgl.h:273
GLAD_API_CALL PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT
Definition: wgl.h:287
GLAD_API_CALL int GLAD_WGL_ARB_extensions_string
Definition: wgl.h:243
PROC(GLAD_API_PTR * PFNWGLGETPROCADDRESSPROC)(LPCSTR lpszProc)
Definition: wgl.h:266
void(* GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args,...)
Definition: wgl.h:152
int(GLAD_API_PTR * PFNGETPIXELFORMATPROC)(HDC hdc)
Definition: wgl.h:253
GLADapiproc(* GLADloadfunc)(const char *name)
Definition: wgl.h:149
const char *(GLAD_API_PTR * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void)
Definition: wgl.h:264
GLAD_API_CALL int GLAD_WGL_VERSION_1_0
Definition: wgl.h:241
#define GLAD_API_PTR
Definition: wgl.h:130
BOOL(GLAD_API_PTR * PFNWGLSWAPINTERVALEXTPROC)(int interval)
Definition: wgl.h:272
int(GLAD_API_PTR * PFNWGLGETSWAPINTERVALEXTPROC)(void)
Definition: wgl.h:267
BOOL(GLAD_API_PTR * PFNWGLDELETECONTEXTPROC)(HGLRC oldContext)
Definition: wgl.h:259
struct _GPU_DEVICE * PGPU_DEVICE
Definition: wgl.h:237