glad: Sync with upstream 0.1.25

This commit is contained in:
Rémi Verschelde 2018-07-28 11:01:43 +02:00
parent 4e4702e386
commit a431492b62
3 changed files with 11 additions and 22 deletions

View file

@ -117,7 +117,7 @@ Files extracted from upstream source:
## glad ## glad
- Upstream: https://github.com/Dav1dde/glad - Upstream: https://github.com/Dav1dde/glad
- Version: 0.1.20a0 - Version: 0.1.25
- License: MIT - License: MIT
The files we package are automatically generated. The files we package are automatically generated.

View file

@ -1,6 +1,6 @@
/* /*
OpenGL loader generated by glad 0.1.20a0 on Fri May 4 21:44:11 2018. OpenGL loader generated by glad 0.1.25 on Sat Jul 28 10:59:43 2018.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: gl Specification: gl
@ -56,8 +56,9 @@ int open_gl(void) {
#ifndef IS_UWP #ifndef IS_UWP
libGL = LoadLibraryW(L"opengl32.dll"); libGL = LoadLibraryW(L"opengl32.dll");
if(libGL != NULL) { if(libGL != NULL) {
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress( void (* tmp)(void);
libGL, "wglGetProcAddress"); tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
return gladGetProcAddressPtr != NULL; return gladGetProcAddressPtr != NULL;
} }
#endif #endif
@ -164,7 +165,7 @@ static int max_loaded_minor;
static const char *exts = NULL; static const char *exts = NULL;
static int num_exts_i = 0; static int num_exts_i = 0;
static const char **exts_i = NULL; static char **exts_i = NULL;
static int get_exts(void) { static int get_exts(void) {
#ifdef _GLAD_IS_SOME_NEW_VERSION #ifdef _GLAD_IS_SOME_NEW_VERSION
@ -178,7 +179,7 @@ static int get_exts(void) {
num_exts_i = 0; num_exts_i = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
if (num_exts_i > 0) { if (num_exts_i > 0) {
exts_i = (const char **)realloc((void *)exts_i, (size_t)num_exts_i * (sizeof *exts_i)); exts_i = (char **)realloc((void *)exts_i, (size_t)num_exts_i * (sizeof *exts_i));
} }
if (exts_i == NULL) { if (exts_i == NULL) {
@ -191,11 +192,7 @@ static int get_exts(void) {
char *local_str = (char*)malloc((len+1) * sizeof(char)); char *local_str = (char*)malloc((len+1) * sizeof(char));
if(local_str != NULL) { if(local_str != NULL) {
#if _MSC_VER >= 1400 memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char));
strncpy_s(local_str, len+1, gl_str_tmp, len);
#else
strncpy(local_str, gl_str_tmp, len+1);
#endif
} }
exts_i[index] = local_str; exts_i[index] = local_str;
} }

View file

@ -1,6 +1,6 @@
/* /*
OpenGL loader generated by glad 0.1.20a0 on Fri May 4 21:44:11 2018. OpenGL loader generated by glad 0.1.25 on Sat Jul 28 10:59:43 2018.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: gl Specification: gl
@ -156,16 +156,8 @@ typedef unsigned int GLhandleARB;
typedef unsigned short GLhalfARB; typedef unsigned short GLhalfARB;
typedef unsigned short GLhalf; typedef unsigned short GLhalf;
typedef GLint GLfixed; typedef GLint GLfixed;
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) typedef khronos_intptr_t GLintptr;
typedef long GLintptr; typedef khronos_ssize_t GLsizeiptr;
#else
typedef ptrdiff_t GLintptr;
#endif
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
typedef long GLsizeiptr;
#else
typedef ptrdiff_t GLsizeiptr;
#endif
typedef int64_t GLint64; typedef int64_t GLint64;
typedef uint64_t GLuint64; typedef uint64_t GLuint64;
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)