Merge pull request #20537 from akien-mga/glad-0.1.25

glad: Sync with upstream 0.1.25
This commit is contained in:
Rémi Verschelde 2018-07-28 15:40:33 +02:00 committed by GitHub
commit bdbc63c4ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 22 deletions

View file

@ -117,7 +117,7 @@ Files extracted from upstream source:
## glad
- Upstream: https://github.com/Dav1dde/glad
- Version: 0.1.20a0
- Version: 0.1.25
- License: MIT
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++
Specification: gl
@ -56,8 +56,9 @@ int open_gl(void) {
#ifndef IS_UWP
libGL = LoadLibraryW(L"opengl32.dll");
if(libGL != NULL) {
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress(
libGL, "wglGetProcAddress");
void (* tmp)(void);
tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress");
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp;
return gladGetProcAddressPtr != NULL;
}
#endif
@ -164,7 +165,7 @@ static int max_loaded_minor;
static const char *exts = NULL;
static int num_exts_i = 0;
static const char **exts_i = NULL;
static char **exts_i = NULL;
static int get_exts(void) {
#ifdef _GLAD_IS_SOME_NEW_VERSION
@ -178,7 +179,7 @@ static int get_exts(void) {
num_exts_i = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i);
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) {
@ -191,11 +192,7 @@ static int get_exts(void) {
char *local_str = (char*)malloc((len+1) * sizeof(char));
if(local_str != NULL) {
#if _MSC_VER >= 1400
strncpy_s(local_str, len+1, gl_str_tmp, len);
#else
strncpy(local_str, gl_str_tmp, len+1);
#endif
memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char));
}
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++
Specification: gl
@ -156,16 +156,8 @@ typedef unsigned int GLhandleARB;
typedef unsigned short GLhalfARB;
typedef unsigned short GLhalf;
typedef GLint GLfixed;
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
typedef long GLintptr;
#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 khronos_intptr_t GLintptr;
typedef khronos_ssize_t GLsizeiptr;
typedef int64_t GLint64;
typedef uint64_t GLuint64;
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)