36#define GLAD_OPTION_WGL_LOADER
42#ifndef GLAD_PLATFORM_H_
43#define GLAD_PLATFORM_H_
45#ifndef GLAD_PLATFORM_WIN32
46 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)
47 #define GLAD_PLATFORM_WIN32 1
49 #define GLAD_PLATFORM_WIN32 0
53#ifndef GLAD_PLATFORM_APPLE
55 #define GLAD_PLATFORM_APPLE 1
57 #define GLAD_PLATFORM_APPLE 0
61#ifndef GLAD_PLATFORM_EMSCRIPTEN
63 #define GLAD_PLATFORM_EMSCRIPTEN 1
65 #define GLAD_PLATFORM_EMSCRIPTEN 0
69#ifndef GLAD_PLATFORM_UWP
70 #if defined(_MSC_VER) && !defined(GLAD_INTERNAL_HAVE_WINAPIFAMILY)
72 #if __has_include(<winapifamily.h>)
73 #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
75 #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
76 #define GLAD_INTERNAL_HAVE_WINAPIFAMILY 1
80 #ifdef GLAD_INTERNAL_HAVE_WINAPIFAMILY
81 #include <winapifamily.h>
82 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
83 #define GLAD_PLATFORM_UWP 1
87 #ifndef GLAD_PLATFORM_UWP
88 #define GLAD_PLATFORM_UWP 0
93 #define GLAD_GNUC_EXTENSION __extension__
95 #define GLAD_GNUC_EXTENSION
98#define GLAD_UNUSED(x) (void)(x)
101 #if defined(GLAD_API_CALL_EXPORT)
102 #if GLAD_PLATFORM_WIN32 || defined(__CYGWIN__)
103 #if defined(GLAD_API_CALL_EXPORT_BUILD)
104 #if defined(__GNUC__)
105 #define GLAD_API_CALL __attribute__ ((dllexport)) extern
107 #define GLAD_API_CALL __declspec(dllexport) extern
110 #if defined(__GNUC__)
111 #define GLAD_API_CALL __attribute__ ((dllimport)) extern
113 #define GLAD_API_CALL __declspec(dllimport) extern
116 #elif defined(__GNUC__) && defined(GLAD_API_CALL_EXPORT_BUILD)
117 #define GLAD_API_CALL __attribute__ ((visibility ("default"))) extern
119 #define GLAD_API_CALL extern
122 #define GLAD_API_CALL extern
127 #define GLAD_API_PTR APIENTRY
128#elif GLAD_PLATFORM_WIN32
129 #define GLAD_API_PTR __stdcall
135#define GLAPI GLAD_API_CALL
139#define GLAPIENTRY GLAD_API_PTR
142#define GLAD_MAKE_VERSION(major, minor) (major * 10000 + minor)
143#define GLAD_VERSION_MAJOR(version) (version / 10000)
144#define GLAD_VERSION_MINOR(version) (version % 10000)
146#define GLAD_GENERATOR_VERSION "2.0.8"
158#define WGL_FONT_LINES 0
159#define WGL_FONT_POLYGONS 1
160#define WGL_SAMPLES_ARB 0x2042
161#define WGL_SAMPLE_BUFFERS_ARB 0x2041
162#define WGL_SWAP_MAIN_PLANE 0x00000001
163#define WGL_SWAP_OVERLAY1 0x00000002
164#define WGL_SWAP_OVERLAY10 0x00000400
165#define WGL_SWAP_OVERLAY11 0x00000800
166#define WGL_SWAP_OVERLAY12 0x00001000
167#define WGL_SWAP_OVERLAY13 0x00002000
168#define WGL_SWAP_OVERLAY14 0x00004000
169#define WGL_SWAP_OVERLAY15 0x00008000
170#define WGL_SWAP_OVERLAY2 0x00000004
171#define WGL_SWAP_OVERLAY3 0x00000008
172#define WGL_SWAP_OVERLAY4 0x00000010
173#define WGL_SWAP_OVERLAY5 0x00000020
174#define WGL_SWAP_OVERLAY6 0x00000040
175#define WGL_SWAP_OVERLAY7 0x00000080
176#define WGL_SWAP_OVERLAY8 0x00000100
177#define WGL_SWAP_OVERLAY9 0x00000200
178#define WGL_SWAP_UNDERLAY1 0x00010000
179#define WGL_SWAP_UNDERLAY10 0x02000000
180#define WGL_SWAP_UNDERLAY11 0x04000000
181#define WGL_SWAP_UNDERLAY12 0x08000000
182#define WGL_SWAP_UNDERLAY13 0x10000000
183#define WGL_SWAP_UNDERLAY14 0x20000000
184#define WGL_SWAP_UNDERLAY15 0x40000000
185#define WGL_SWAP_UNDERLAY2 0x00020000
186#define WGL_SWAP_UNDERLAY3 0x00040000
187#define WGL_SWAP_UNDERLAY4 0x00080000
188#define WGL_SWAP_UNDERLAY5 0x00100000
189#define WGL_SWAP_UNDERLAY6 0x00200000
190#define WGL_SWAP_UNDERLAY7 0x00400000
191#define WGL_SWAP_UNDERLAY8 0x00800000
192#define WGL_SWAP_UNDERLAY9 0x01000000
243#define WGL_VERSION_1_0 1
245#define WGL_ARB_extensions_string 1
247#define WGL_ARB_multisample 1
249#define WGL_EXT_extensions_string 1
283#define wglGetExtensionsStringARB glad_wglGetExtensionsStringARB
285#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT
GLADapiproc(* GLADuserptrloadfunc)(void *userptr, const char *name)
void(* GLADpostcallback)(void *ret, const char *name, GLADapiproc apiproc, int len_args,...)
void(* GLADapiproc)(void)
void(* GLADprecallback)(const char *name, GLADapiproc apiproc, int len_args,...)
GLADapiproc(* GLADloadfunc)(const char *name)
PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB
DECLARE_HANDLE(HPBUFFERARB)
const char *(* PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void)
PROC(* PFNWGLGETPROCADDRESSPROC)(LPCSTR lpszProc)
BOOL(* PFNWGLDELETECONTEXTPROC)(HGLRC oldContext)
void(* GLADapiproc)(void)
BOOL(* PFNWGLMAKECURRENTPROC)(HDC hDc, HGLRC newContext)
BOOL(* PFNWGLDESCRIBELAYERPLANEPROC)(HDC hDc, int pixelFormat, int layerPlane, UINT nBytes, LAYERPLANEDESCRIPTOR *plpd)
BOOL(* PFNWGLSWAPLAYERBUFFERSPROC)(HDC hdc, UINT fuFlags)
BOOL(* PFNSWAPBUFFERSPROC)(HDC hdc)
int(* PFNWGLSETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr)
BOOL(* PFNWGLREALIZELAYERPALETTEPROC)(HDC hdc, int iLayerPlane, BOOL bRealize)
BOOL(* PFNSETPIXELFORMATPROC)(HDC hdc, int ipfd, const PIXELFORMATDESCRIPTOR *ppfd)
int(* PFNCHOOSEPIXELFORMATPROC)(HDC hDc, const PIXELFORMATDESCRIPTOR *pPfd)
UINT(* PFNGETENHMETAFILEPIXELFORMATPROC)(HENHMETAFILE hemf, UINT cbBuffer, PIXELFORMATDESCRIPTOR *ppfd)
PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT
int GLAD_WGL_ARB_multisample
HGLRC(* PFNWGLCREATELAYERCONTEXTPROC)(HDC hDc, int level)
BOOL(* PFNWGLUSEFONTOUTLINESAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
int(* PFNWGLGETLAYERPALETTEENTRIESPROC)(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr)
int(* PFNDESCRIBEPIXELFORMATPROC)(HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd)
BOOL(* PFNWGLCOPYCONTEXTPROC)(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
HDC(* PFNWGLGETCURRENTDCPROC)(void)
BOOL(* PFNWGLSHARELISTSPROC)(HGLRC hrcSrvShare, HGLRC hrcSrvSource)
int gladLoadWGL(HDC hdc, GLADloadfunc load)
int GLAD_WGL_EXT_extensions_string
struct _GPU_DEVICE GPU_DEVICE
BOOL(* PFNWGLUSEFONTBITMAPSPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
BOOL(* PFNWGLUSEFONTBITMAPSWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
int(* PFNGETPIXELFORMATPROC)(HDC hdc)
int gladLoadWGLUserPtr(HDC hdc, GLADuserptrloadfunc load, void *userptr)
BOOL(* PFNWGLUSEFONTOUTLINESWPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
const char *(* PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc)
HGLRC(* PFNWGLGETCURRENTCONTEXTPROC)(void)
BOOL(* PFNWGLUSEFONTBITMAPSAPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase)
BOOL(* PFNWGLUSEFONTOUTLINESPROC)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
HGLRC(* PFNWGLCREATECONTEXTPROC)(HDC hDc)
int gladLoaderLoadWGL(HDC hdc)
int GLAD_WGL_ARB_extensions_string
struct _GPU_DEVICE * PGPU_DEVICE