You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1140 lines
59 KiB

1 year ago
  1. /*
  2. OpenGL loader generated by glad 0.1.36 on Fri Jan 27 01:11:54 2023.
  3. Language/Generator: C/C++
  4. Specification: gl
  5. APIs: gl=3.3
  6. Profile: core
  7. Extensions:
  8. Loader: True
  9. Local files: False
  10. Omit khrplatform: False
  11. Reproducible: False
  12. Commandline:
  13. --profile="core" --api="gl=3.3" --generator="c" --spec="gl" --extensions=""
  14. Online:
  15. https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D3.3
  16. */
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <string.h>
  20. #include "glad.h"
  21. static void* get_proc(const char *namez);
  22. #if defined(_WIN32) || defined(__CYGWIN__)
  23. #ifndef _WINDOWS_
  24. #undef APIENTRY
  25. #endif
  26. #include <windows.h>
  27. static HMODULE libGL;
  28. typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
  29. static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
  30. #ifdef _MSC_VER
  31. #ifdef __has_include
  32. #if __has_include(<winapifamily.h>)
  33. #define HAVE_WINAPIFAMILY 1
  34. #endif
  35. #elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
  36. #define HAVE_WINAPIFAMILY 1
  37. #endif
  38. #endif
  39. #ifdef HAVE_WINAPIFAMILY
  40. #include <winapifamily.h>
  41. #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
  42. #define IS_UWP 1
  43. #endif
  44. #endif
  45. static
  46. int open_gl(void) {
  47. #ifndef IS_UWP
  48. libGL = LoadLibraryW(L"opengl32.dll");
  49. if(libGL != NULL) {
  50. void (* tmp)(void);
  51. tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
  52. gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
  53. return gladGetProcAddressPtr != NULL;
  54. }
  55. #endif
  56. return 0;
  57. }
  58. static
  59. void close_gl(void) {
  60. if(libGL != NULL) {
  61. FreeLibrary((HMODULE) libGL);
  62. libGL = NULL;
  63. }
  64. }
  65. #else
  66. #include <dlfcn.h>
  67. static void* libGL;
  68. #if !defined(__APPLE__) && !defined(__HAIKU__)
  69. typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
  70. static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
  71. #endif
  72. static
  73. int open_gl(void) {
  74. #ifdef __APPLE__
  75. static const char *NAMES[] = {
  76. "../Frameworks/OpenGL.framework/OpenGL",
  77. "/Library/Frameworks/OpenGL.framework/OpenGL",
  78. "/System/Library/Frameworks/OpenGL.framework/OpenGL",
  79. "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
  80. };
  81. #else
  82. static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
  83. #endif
  84. unsigned int index = 0;
  85. for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
  86. libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
  87. if(libGL != NULL) {
  88. #if defined(__APPLE__) || defined(__HAIKU__)
  89. return 1;
  90. #else
  91. gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
  92. "glXGetProcAddressARB");
  93. return gladGetProcAddressPtr != NULL;
  94. #endif
  95. }
  96. }
  97. return 0;
  98. }
  99. static
  100. void close_gl(void) {
  101. if(libGL != NULL) {
  102. dlclose(libGL);
  103. libGL = NULL;
  104. }
  105. }
  106. #endif
  107. static
  108. void* get_proc(const char *namez) {
  109. void* result = NULL;
  110. if(libGL == NULL) return NULL;
  111. #if !defined(__APPLE__) && !defined(__HAIKU__)
  112. if(gladGetProcAddressPtr != NULL) {
  113. result = gladGetProcAddressPtr(namez);
  114. }
  115. #endif
  116. if(result == NULL) {
  117. #if defined(_WIN32) || defined(__CYGWIN__)
  118. result = (void*)GetProcAddress((HMODULE) libGL, namez);
  119. #else
  120. result = dlsym(libGL, namez);
  121. #endif
  122. }
  123. return result;
  124. }
  125. int gladLoadGL(void) {
  126. int status = 0;
  127. if(open_gl()) {
  128. status = gladLoadGLLoader(&get_proc);
  129. close_gl();
  130. }
  131. return status;
  132. }
  133. struct gladGLversionStruct GLVersion = { 0, 0 };
  134. #if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
  135. #define _GLAD_IS_SOME_NEW_VERSION 1
  136. #endif
  137. static int max_loaded_major;
  138. static int max_loaded_minor;
  139. static const char *exts = NULL;
  140. static int num_exts_i = 0;
  141. static char **exts_i = NULL;
  142. static int get_exts(void) {
  143. #ifdef _GLAD_IS_SOME_NEW_VERSION
  144. if(max_loaded_major < 3) {
  145. #endif
  146. exts = (const char *)glGetString(GL_EXTENSIONS);
  147. #ifdef _GLAD_IS_SOME_NEW_VERSION
  148. } else {
  149. unsigned int index;
  150. num_exts_i = 0;
  151. glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
  152. if (num_exts_i > 0) {
  153. exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i));
  154. }
  155. if (exts_i == NULL) {
  156. return 0;
  157. }
  158. for(index = 0; index < (unsigned)num_exts_i; index++) {
  159. const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index);
  160. size_t len = strlen(gl_str_tmp);
  161. char *local_str = (char*)malloc((len+1) * sizeof(char));
  162. if(local_str != NULL) {
  163. memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char));
  164. }
  165. exts_i[index] = local_str;
  166. }
  167. }
  168. #endif
  169. return 1;
  170. }
  171. static void free_exts(void) {
  172. if (exts_i != NULL) {
  173. int index;
  174. for(index = 0; index < num_exts_i; index++) {
  175. free((char *)exts_i[index]);
  176. }
  177. free((void *)exts_i);
  178. exts_i = NULL;
  179. }
  180. }
  181. static int has_ext(const char *ext) {
  182. #ifdef _GLAD_IS_SOME_NEW_VERSION
  183. if(max_loaded_major < 3) {
  184. #endif
  185. const char *extensions;
  186. const char *loc;
  187. const char *terminator;
  188. extensions = exts;
  189. if(extensions == NULL || ext == NULL) {
  190. return 0;
  191. }
  192. while(1) {
  193. loc = strstr(extensions, ext);
  194. if(loc == NULL) {
  195. return 0;
  196. }
  197. terminator = loc + strlen(ext);
  198. if((loc == extensions || *(loc - 1) == ' ') &&
  199. (*terminator == ' ' || *terminator == '\0')) {
  200. return 1;
  201. }
  202. extensions = terminator;
  203. }
  204. #ifdef _GLAD_IS_SOME_NEW_VERSION
  205. } else {
  206. int index;
  207. if(exts_i == NULL) return 0;
  208. for(index = 0; index < num_exts_i; index++) {
  209. const char *e = exts_i[index];
  210. if(exts_i[index] != NULL && strcmp(e, ext) == 0) {
  211. return 1;
  212. }
  213. }
  214. }
  215. #endif
  216. return 0;
  217. }
  218. int GLAD_GL_VERSION_1_0 = 0;
  219. int GLAD_GL_VERSION_1_1 = 0;
  220. int GLAD_GL_VERSION_1_2 = 0;
  221. int GLAD_GL_VERSION_1_3 = 0;
  222. int GLAD_GL_VERSION_1_4 = 0;
  223. int GLAD_GL_VERSION_1_5 = 0;
  224. int GLAD_GL_VERSION_2_0 = 0;
  225. int GLAD_GL_VERSION_2_1 = 0;
  226. int GLAD_GL_VERSION_3_0 = 0;
  227. int GLAD_GL_VERSION_3_1 = 0;
  228. int GLAD_GL_VERSION_3_2 = 0;
  229. int GLAD_GL_VERSION_3_3 = 0;
  230. PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL;
  231. PFNGLATTACHSHADERPROC glad_glAttachShader = NULL;
  232. PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL;
  233. PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL;
  234. PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL;
  235. PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL;
  236. PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL;
  237. PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL;
  238. PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL;
  239. PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL;
  240. PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL;
  241. PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL;
  242. PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;
  243. PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL;
  244. PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL;
  245. PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL;
  246. PFNGLBLENDCOLORPROC glad_glBlendColor = NULL;
  247. PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL;
  248. PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL;
  249. PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL;
  250. PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL;
  251. PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL;
  252. PFNGLBUFFERDATAPROC glad_glBufferData = NULL;
  253. PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL;
  254. PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL;
  255. PFNGLCLAMPCOLORPROC glad_glClampColor = NULL;
  256. PFNGLCLEARPROC glad_glClear = NULL;
  257. PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL;
  258. PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL;
  259. PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL;
  260. PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL;
  261. PFNGLCLEARCOLORPROC glad_glClearColor = NULL;
  262. PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL;
  263. PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL;
  264. PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL;
  265. PFNGLCOLORMASKPROC glad_glColorMask = NULL;
  266. PFNGLCOLORMASKIPROC glad_glColorMaski = NULL;
  267. PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL;
  268. PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL;
  269. PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL;
  270. PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL;
  271. PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL;
  272. PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL;
  273. PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL;
  274. PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL;
  275. PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL;
  276. PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL;
  277. PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL;
  278. PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL;
  279. PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL;
  280. PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL;
  281. PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL;
  282. PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL;
  283. PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL;
  284. PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL;
  285. PFNGLCREATESHADERPROC glad_glCreateShader = NULL;
  286. PFNGLCULLFACEPROC glad_glCullFace = NULL;
  287. PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL;
  288. PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL;
  289. PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL;
  290. PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL;
  291. PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;
  292. PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL;
  293. PFNGLDELETESHADERPROC glad_glDeleteShader = NULL;
  294. PFNGLDELETESYNCPROC glad_glDeleteSync = NULL;
  295. PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL;
  296. PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL;
  297. PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL;
  298. PFNGLDEPTHMASKPROC glad_glDepthMask = NULL;
  299. PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL;
  300. PFNGLDETACHSHADERPROC glad_glDetachShader = NULL;
  301. PFNGLDISABLEPROC glad_glDisable = NULL;
  302. PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL;
  303. PFNGLDISABLEIPROC glad_glDisablei = NULL;
  304. PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL;
  305. PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL;
  306. PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL;
  307. PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL;
  308. PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL;
  309. PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL;
  310. PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL;
  311. PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL;
  312. PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL;
  313. PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL;
  314. PFNGLENABLEPROC glad_glEnable = NULL;
  315. PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL;
  316. PFNGLENABLEIPROC glad_glEnablei = NULL;
  317. PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL;
  318. PFNGLENDQUERYPROC glad_glEndQuery = NULL;
  319. PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL;
  320. PFNGLFENCESYNCPROC glad_glFenceSync = NULL;
  321. PFNGLFINISHPROC glad_glFinish = NULL;
  322. PFNGLFLUSHPROC glad_glFlush = NULL;
  323. PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL;
  324. PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL;
  325. PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL;
  326. PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL;
  327. PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL;
  328. PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL;
  329. PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL;
  330. PFNGLFRONTFACEPROC glad_glFrontFace = NULL;
  331. PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL;
  332. PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL;
  333. PFNGLGENQUERIESPROC glad_glGenQueries = NULL;
  334. PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL;
  335. PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL;
  336. PFNGLGENTEXTURESPROC glad_glGenTextures = NULL;
  337. PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL;
  338. PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;
  339. PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL;
  340. PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL;
  341. PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL;
  342. PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL;
  343. PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL;
  344. PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL;
  345. PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL;
  346. PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL;
  347. PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL;
  348. PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL;
  349. PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL;
  350. PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL;
  351. PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL;
  352. PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL;
  353. PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL;
  354. PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL;
  355. PFNGLGETERRORPROC glad_glGetError = NULL;
  356. PFNGLGETFLOATVPROC glad_glGetFloatv = NULL;
  357. PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL;
  358. PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL;
  359. PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL;
  360. PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL;
  361. PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL;
  362. PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL;
  363. PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL;
  364. PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL;
  365. PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL;
  366. PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL;
  367. PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL;
  368. PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL;
  369. PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL;
  370. PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL;
  371. PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL;
  372. PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL;
  373. PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL;
  374. PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL;
  375. PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL;
  376. PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL;
  377. PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL;
  378. PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL;
  379. PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL;
  380. PFNGLGETSTRINGPROC glad_glGetString = NULL;
  381. PFNGLGETSTRINGIPROC glad_glGetStringi = NULL;
  382. PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL;
  383. PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL;
  384. PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL;
  385. PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL;
  386. PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL;
  387. PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL;
  388. PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL;
  389. PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL;
  390. PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL;
  391. PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL;
  392. PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL;
  393. PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL;
  394. PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL;
  395. PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL;
  396. PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL;
  397. PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL;
  398. PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL;
  399. PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL;
  400. PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL;
  401. PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL;
  402. PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL;
  403. PFNGLHINTPROC glad_glHint = NULL;
  404. PFNGLISBUFFERPROC glad_glIsBuffer = NULL;
  405. PFNGLISENABLEDPROC glad_glIsEnabled = NULL;
  406. PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL;
  407. PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL;
  408. PFNGLISPROGRAMPROC glad_glIsProgram = NULL;
  409. PFNGLISQUERYPROC glad_glIsQuery = NULL;
  410. PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;
  411. PFNGLISSAMPLERPROC glad_glIsSampler = NULL;
  412. PFNGLISSHADERPROC glad_glIsShader = NULL;
  413. PFNGLISSYNCPROC glad_glIsSync = NULL;
  414. PFNGLISTEXTUREPROC glad_glIsTexture = NULL;
  415. PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL;
  416. PFNGLLINEWIDTHPROC glad_glLineWidth = NULL;
  417. PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL;
  418. PFNGLLOGICOPPROC glad_glLogicOp = NULL;
  419. PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL;
  420. PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL;
  421. PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL;
  422. PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL;
  423. PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL;
  424. PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL;
  425. PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL;
  426. PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL;
  427. PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL;
  428. PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL;
  429. PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL;
  430. PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL;
  431. PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL;
  432. PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL;
  433. PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL;
  434. PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL;
  435. PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL;
  436. PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL;
  437. PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL;
  438. PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL;
  439. PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL;
  440. PFNGLPOINTSIZEPROC glad_glPointSize = NULL;
  441. PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL;
  442. PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL;
  443. PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL;
  444. PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL;
  445. PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL;
  446. PFNGLREADBUFFERPROC glad_glReadBuffer = NULL;
  447. PFNGLREADPIXELSPROC glad_glReadPixels = NULL;
  448. PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL;
  449. PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL;
  450. PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL;
  451. PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL;
  452. PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL;
  453. PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL;
  454. PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL;
  455. PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL;
  456. PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL;
  457. PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL;
  458. PFNGLSCISSORPROC glad_glScissor = NULL;
  459. PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL;
  460. PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL;
  461. PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL;
  462. PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL;
  463. PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL;
  464. PFNGLSTENCILMASKPROC glad_glStencilMask = NULL;
  465. PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL;
  466. PFNGLSTENCILOPPROC glad_glStencilOp = NULL;
  467. PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL;
  468. PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL;
  469. PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL;
  470. PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL;
  471. PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL;
  472. PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL;
  473. PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL;
  474. PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL;
  475. PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL;
  476. PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL;
  477. PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL;
  478. PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL;
  479. PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL;
  480. PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL;
  481. PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL;
  482. PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL;
  483. PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL;
  484. PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL;
  485. PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL;
  486. PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL;
  487. PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL;
  488. PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL;
  489. PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL;
  490. PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL;
  491. PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL;
  492. PFNGLUNIFORM1FPROC glad_glUniform1f = NULL;
  493. PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL;
  494. PFNGLUNIFORM1IPROC glad_glUniform1i = NULL;
  495. PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL;
  496. PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL;
  497. PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL;
  498. PFNGLUNIFORM2FPROC glad_glUniform2f = NULL;
  499. PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL;
  500. PFNGLUNIFORM2IPROC glad_glUniform2i = NULL;
  501. PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL;
  502. PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL;
  503. PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL;
  504. PFNGLUNIFORM3FPROC glad_glUniform3f = NULL;
  505. PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL;
  506. PFNGLUNIFORM3IPROC glad_glUniform3i = NULL;
  507. PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL;
  508. PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL;
  509. PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL;
  510. PFNGLUNIFORM4FPROC glad_glUniform4f = NULL;
  511. PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL;
  512. PFNGLUNIFORM4IPROC glad_glUniform4i = NULL;
  513. PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL;
  514. PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL;
  515. PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL;
  516. PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL;
  517. PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL;
  518. PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL;
  519. PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL;
  520. PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL;
  521. PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL;
  522. PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL;
  523. PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL;
  524. PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL;
  525. PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL;
  526. PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL;
  527. PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL;
  528. PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL;
  529. PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL;
  530. PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL;
  531. PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL;
  532. PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL;
  533. PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL;
  534. PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL;
  535. PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL;
  536. PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL;
  537. PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL;
  538. PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL;
  539. PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL;
  540. PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL;
  541. PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL;
  542. PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL;
  543. PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL;
  544. PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL;
  545. PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL;
  546. PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL;
  547. PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL;
  548. PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL;
  549. PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL;
  550. PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL;
  551. PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL;
  552. PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL;
  553. PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL;
  554. PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL;
  555. PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL;
  556. PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL;
  557. PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL;
  558. PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL;
  559. PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL;
  560. PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL;
  561. PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL;
  562. PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL;
  563. PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL;
  564. PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL;
  565. PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL;
  566. PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL;
  567. PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL;
  568. PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL;
  569. PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL;
  570. PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL;
  571. PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL;
  572. PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL;
  573. PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL;
  574. PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL;
  575. PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL;
  576. PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL;
  577. PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL;
  578. PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL;
  579. PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL;
  580. PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL;
  581. PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL;
  582. PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL;
  583. PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL;
  584. PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL;
  585. PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL;
  586. PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL;
  587. PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL;
  588. PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL;
  589. PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL;
  590. PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL;
  591. PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL;
  592. PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL;
  593. PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL;
  594. PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL;
  595. PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL;
  596. PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL;
  597. PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL;
  598. PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL;
  599. PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL;
  600. PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL;
  601. PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL;
  602. PFNGLVIEWPORTPROC glad_glViewport = NULL;
  603. PFNGLWAITSYNCPROC glad_glWaitSync = NULL;
  604. static void load_GL_VERSION_1_0(GLADloadproc load) {
  605. if(!GLAD_GL_VERSION_1_0) return;
  606. glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
  607. glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
  608. glad_glHint = (PFNGLHINTPROC)load("glHint");
  609. glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
  610. glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize");
  611. glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode");
  612. glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
  613. glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
  614. glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
  615. glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
  616. glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
  617. glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D");
  618. glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
  619. glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer");
  620. glad_glClear = (PFNGLCLEARPROC)load("glClear");
  621. glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
  622. glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
  623. glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth");
  624. glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
  625. glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
  626. glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
  627. glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
  628. glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
  629. glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
  630. glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
  631. glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
  632. glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp");
  633. glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
  634. glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
  635. glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
  636. glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref");
  637. glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
  638. glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer");
  639. glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
  640. glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
  641. glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev");
  642. glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
  643. glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
  644. glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
  645. glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
  646. glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage");
  647. glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
  648. glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
  649. glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv");
  650. glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv");
  651. glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
  652. glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange");
  653. glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
  654. }
  655. static void load_GL_VERSION_1_1(GLADloadproc load) {
  656. if(!GLAD_GL_VERSION_1_1) return;
  657. glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
  658. glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
  659. glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
  660. glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D");
  661. glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
  662. glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D");
  663. glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
  664. glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D");
  665. glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
  666. glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
  667. glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
  668. glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
  669. glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
  670. }
  671. static void load_GL_VERSION_1_2(GLADloadproc load) {
  672. if(!GLAD_GL_VERSION_1_2) return;
  673. glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements");
  674. glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D");
  675. glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D");
  676. glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D");
  677. }
  678. static void load_GL_VERSION_1_3(GLADloadproc load) {
  679. if(!GLAD_GL_VERSION_1_3) return;
  680. glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
  681. glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
  682. glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D");
  683. glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
  684. glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D");
  685. glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D");
  686. glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
  687. glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D");
  688. glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage");
  689. }
  690. static void load_GL_VERSION_1_4(GLADloadproc load) {
  691. if(!GLAD_GL_VERSION_1_4) return;
  692. glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate");
  693. glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays");
  694. glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements");
  695. glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf");
  696. glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv");
  697. glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri");
  698. glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv");
  699. glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor");
  700. glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation");
  701. }
  702. static void load_GL_VERSION_1_5(GLADloadproc load) {
  703. if(!GLAD_GL_VERSION_1_5) return;
  704. glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries");
  705. glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries");
  706. glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery");
  707. glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery");
  708. glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery");
  709. glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv");
  710. glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv");
  711. glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv");
  712. glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer");
  713. glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers");
  714. glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers");
  715. glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer");
  716. glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData");
  717. glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData");
  718. glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData");
  719. glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer");
  720. glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer");
  721. glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv");
  722. glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv");
  723. }
  724. static void load_GL_VERSION_2_0(GLADloadproc load) {
  725. if(!GLAD_GL_VERSION_2_0) return;
  726. glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate");
  727. glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers");
  728. glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate");
  729. glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate");
  730. glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate");
  731. glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader");
  732. glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation");
  733. glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader");
  734. glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram");
  735. glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader");
  736. glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram");
  737. glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader");
  738. glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader");
  739. glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray");
  740. glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray");
  741. glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib");
  742. glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform");
  743. glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders");
  744. glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation");
  745. glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv");
  746. glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog");
  747. glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv");
  748. glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog");
  749. glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource");
  750. glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation");
  751. glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv");
  752. glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv");
  753. glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv");
  754. glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv");
  755. glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv");
  756. glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv");
  757. glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram");
  758. glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader");
  759. glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram");
  760. glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource");
  761. glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram");
  762. glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f");
  763. glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f");
  764. glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f");
  765. glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f");
  766. glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i");
  767. glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i");
  768. glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i");
  769. glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i");
  770. glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv");
  771. glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv");
  772. glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv");
  773. glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv");
  774. glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv");
  775. glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv");
  776. glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv");
  777. glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv");
  778. glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv");
  779. glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv");
  780. glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv");
  781. glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram");
  782. glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d");
  783. glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv");
  784. glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f");
  785. glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv");
  786. glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s");
  787. glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv");
  788. glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d");
  789. glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv");
  790. glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f");
  791. glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv");
  792. glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s");
  793. glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv");
  794. glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d");
  795. glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv");
  796. glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f");
  797. glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv");
  798. glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s");
  799. glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv");
  800. glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv");
  801. glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv");
  802. glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv");
  803. glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub");
  804. glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv");
  805. glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv");
  806. glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv");
  807. glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv");
  808. glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d");
  809. glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv");
  810. glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f");
  811. glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv");
  812. glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv");
  813. glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s");
  814. glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv");
  815. glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv");
  816. glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv");
  817. glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv");
  818. glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer");
  819. }
  820. static void load_GL_VERSION_2_1(GLADloadproc load) {
  821. if(!GLAD_GL_VERSION_2_1) return;
  822. glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv");
  823. glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv");
  824. glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv");
  825. glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv");
  826. glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv");
  827. glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv");
  828. }
  829. static void load_GL_VERSION_3_0(GLADloadproc load) {
  830. if(!GLAD_GL_VERSION_3_0) return;
  831. glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski");
  832. glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v");
  833. glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v");
  834. glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei");
  835. glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei");
  836. glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi");
  837. glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback");
  838. glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback");
  839. glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange");
  840. glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase");
  841. glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings");
  842. glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying");
  843. glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor");
  844. glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender");
  845. glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender");
  846. glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer");
  847. glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv");
  848. glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv");
  849. glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i");
  850. glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i");
  851. glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i");
  852. glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i");
  853. glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui");
  854. glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui");
  855. glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui");
  856. glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui");
  857. glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv");
  858. glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv");
  859. glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv");
  860. glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv");
  861. glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv");
  862. glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv");
  863. glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv");
  864. glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv");
  865. glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv");
  866. glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv");
  867. glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv");
  868. glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv");
  869. glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv");
  870. glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation");
  871. glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation");
  872. glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui");
  873. glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui");
  874. glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui");
  875. glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui");
  876. glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv");
  877. glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv");
  878. glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv");
  879. glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv");
  880. glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv");
  881. glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv");
  882. glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv");
  883. glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv");
  884. glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv");
  885. glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv");
  886. glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv");
  887. glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi");
  888. glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi");
  889. glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer");
  890. glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer");
  891. glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers");
  892. glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers");
  893. glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage");
  894. glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv");
  895. glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer");
  896. glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer");
  897. glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers");
  898. glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers");
  899. glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus");
  900. glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D");
  901. glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D");
  902. glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D");
  903. glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer");
  904. glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv");
  905. glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap");
  906. glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer");
  907. glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample");
  908. glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer");
  909. glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange");
  910. glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange");
  911. glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray");
  912. glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays");
  913. glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays");
  914. glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray");
  915. }
  916. static void load_GL_VERSION_3_1(GLADloadproc load) {
  917. if(!GLAD_GL_VERSION_3_1) return;
  918. glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced");
  919. glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced");
  920. glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer");
  921. glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex");
  922. glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData");
  923. glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices");
  924. glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv");
  925. glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName");
  926. glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex");
  927. glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv");
  928. glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName");
  929. glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding");
  930. glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange");
  931. glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase");
  932. glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v");
  933. }
  934. static void load_GL_VERSION_3_2(GLADloadproc load) {
  935. if(!GLAD_GL_VERSION_3_2) return;
  936. glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex");
  937. glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex");
  938. glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex");
  939. glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex");
  940. glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex");
  941. glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync");
  942. glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync");
  943. glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync");
  944. glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync");
  945. glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync");
  946. glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v");
  947. glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv");
  948. glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v");
  949. glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v");
  950. glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture");
  951. glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample");
  952. glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample");
  953. glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv");
  954. glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski");
  955. }
  956. static void load_GL_VERSION_3_3(GLADloadproc load) {
  957. if(!GLAD_GL_VERSION_3_3) return;
  958. glad_glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)load("glBindFragDataLocationIndexed");
  959. glad_glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)load("glGetFragDataIndex");
  960. glad_glGenSamplers = (PFNGLGENSAMPLERSPROC)load("glGenSamplers");
  961. glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)load("glDeleteSamplers");
  962. glad_glIsSampler = (PFNGLISSAMPLERPROC)load("glIsSampler");
  963. glad_glBindSampler = (PFNGLBINDSAMPLERPROC)load("glBindSampler");
  964. glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)load("glSamplerParameteri");
  965. glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)load("glSamplerParameteriv");
  966. glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)load("glSamplerParameterf");
  967. glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)load("glSamplerParameterfv");
  968. glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)load("glSamplerParameterIiv");
  969. glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)load("glSamplerParameterIuiv");
  970. glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)load("glGetSamplerParameteriv");
  971. glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)load("glGetSamplerParameterIiv");
  972. glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)load("glGetSamplerParameterfv");
  973. glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)load("glGetSamplerParameterIuiv");
  974. glad_glQueryCounter = (PFNGLQUERYCOUNTERPROC)load("glQueryCounter");
  975. glad_glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)load("glGetQueryObjecti64v");
  976. glad_glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)load("glGetQueryObjectui64v");
  977. glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)load("glVertexAttribDivisor");
  978. glad_glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)load("glVertexAttribP1ui");
  979. glad_glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)load("glVertexAttribP1uiv");
  980. glad_glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)load("glVertexAttribP2ui");
  981. glad_glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)load("glVertexAttribP2uiv");
  982. glad_glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)load("glVertexAttribP3ui");
  983. glad_glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)load("glVertexAttribP3uiv");
  984. glad_glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)load("glVertexAttribP4ui");
  985. glad_glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)load("glVertexAttribP4uiv");
  986. glad_glVertexP2ui = (PFNGLVERTEXP2UIPROC)load("glVertexP2ui");
  987. glad_glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)load("glVertexP2uiv");
  988. glad_glVertexP3ui = (PFNGLVERTEXP3UIPROC)load("glVertexP3ui");
  989. glad_glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)load("glVertexP3uiv");
  990. glad_glVertexP4ui = (PFNGLVERTEXP4UIPROC)load("glVertexP4ui");
  991. glad_glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)load("glVertexP4uiv");
  992. glad_glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)load("glTexCoordP1ui");
  993. glad_glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)load("glTexCoordP1uiv");
  994. glad_glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)load("glTexCoordP2ui");
  995. glad_glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)load("glTexCoordP2uiv");
  996. glad_glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)load("glTexCoordP3ui");
  997. glad_glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)load("glTexCoordP3uiv");
  998. glad_glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)load("glTexCoordP4ui");
  999. glad_glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)load("glTexCoordP4uiv");
  1000. glad_glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)load("glMultiTexCoordP1ui");
  1001. glad_glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)load("glMultiTexCoordP1uiv");
  1002. glad_glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)load("glMultiTexCoordP2ui");
  1003. glad_glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)load("glMultiTexCoordP2uiv");
  1004. glad_glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)load("glMultiTexCoordP3ui");
  1005. glad_glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)load("glMultiTexCoordP3uiv");
  1006. glad_glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)load("glMultiTexCoordP4ui");
  1007. glad_glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)load("glMultiTexCoordP4uiv");
  1008. glad_glNormalP3ui = (PFNGLNORMALP3UIPROC)load("glNormalP3ui");
  1009. glad_glNormalP3uiv = (PFNGLNORMALP3UIVPROC)load("glNormalP3uiv");
  1010. glad_glColorP3ui = (PFNGLCOLORP3UIPROC)load("glColorP3ui");
  1011. glad_glColorP3uiv = (PFNGLCOLORP3UIVPROC)load("glColorP3uiv");
  1012. glad_glColorP4ui = (PFNGLCOLORP4UIPROC)load("glColorP4ui");
  1013. glad_glColorP4uiv = (PFNGLCOLORP4UIVPROC)load("glColorP4uiv");
  1014. glad_glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)load("glSecondaryColorP3ui");
  1015. glad_glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)load("glSecondaryColorP3uiv");
  1016. }
  1017. static int find_extensionsGL(void) {
  1018. if (!get_exts()) return 0;
  1019. (void)&has_ext;
  1020. free_exts();
  1021. return 1;
  1022. }
  1023. static void find_coreGL(void) {
  1024. /* Thank you @elmindreda
  1025. * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
  1026. * https://github.com/glfw/glfw/blob/master/src/context.c#L36
  1027. */
  1028. int i, major, minor;
  1029. const char* version;
  1030. const char* prefixes[] = {
  1031. "OpenGL ES-CM ",
  1032. "OpenGL ES-CL ",
  1033. "OpenGL ES ",
  1034. NULL
  1035. };
  1036. version = (const char*) glGetString(GL_VERSION);
  1037. if (!version) return;
  1038. for (i = 0; prefixes[i]; i++) {
  1039. const size_t length = strlen(prefixes[i]);
  1040. if (strncmp(version, prefixes[i], length) == 0) {
  1041. version += length;
  1042. break;
  1043. }
  1044. }
  1045. /* PR #18 */
  1046. #ifdef _MSC_VER
  1047. sscanf_s(version, "%d.%d", &major, &minor);
  1048. #else
  1049. sscanf(version, "%d.%d", &major, &minor);
  1050. #endif
  1051. GLVersion.major = major; GLVersion.minor = minor;
  1052. max_loaded_major = major; max_loaded_minor = minor;
  1053. GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
  1054. GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
  1055. GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
  1056. GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
  1057. GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
  1058. GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;
  1059. GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
  1060. GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2;
  1061. GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3;
  1062. GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3;
  1063. GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3;
  1064. GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3;
  1065. if (GLVersion.major > 3 || (GLVersion.major >= 3 && GLVersion.minor >= 3)) {
  1066. max_loaded_major = 3;
  1067. max_loaded_minor = 3;
  1068. }
  1069. }
  1070. int gladLoadGLLoader(GLADloadproc load) {
  1071. GLVersion.major = 0; GLVersion.minor = 0;
  1072. glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
  1073. if(glGetString == NULL) return 0;
  1074. if(glGetString(GL_VERSION) == NULL) return 0;
  1075. find_coreGL();
  1076. load_GL_VERSION_1_0(load);
  1077. load_GL_VERSION_1_1(load);
  1078. load_GL_VERSION_1_2(load);
  1079. load_GL_VERSION_1_3(load);
  1080. load_GL_VERSION_1_4(load);
  1081. load_GL_VERSION_1_5(load);
  1082. load_GL_VERSION_2_0(load);
  1083. load_GL_VERSION_2_1(load);
  1084. load_GL_VERSION_3_0(load);
  1085. load_GL_VERSION_3_1(load);
  1086. load_GL_VERSION_3_2(load);
  1087. load_GL_VERSION_3_3(load);
  1088. if (!find_extensionsGL()) return 0;
  1089. return GLVersion.major != 0 || GLVersion.minor != 0;
  1090. }