Update glad to 0.1.25

Includes https://github.com/Dav1dde/glad/pull/140

git-svn-id: https://svn.eduke32.com/eduke32@6948 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-07-23 02:55:49 +00:00
parent 0116b51b2d
commit a0c87b5fda
5 changed files with 60 additions and 38 deletions

View file

@ -129,13 +129,7 @@ glad_src := $(glad_root)/src
glad_inc := $(glad_root)/include
glad_obj := $(obj)/$(glad)
glad__no_cast_qual := -Wno-cast-qual
ifeq (4,$(GCC_MAJOR))
ifneq (,$(filter 0 1 2 3 4,$(GCC_MINOR)))
glad__no_cast_qual :=
endif
endif
glad_cflags := $(glad__no_cast_qual)
glad_cflags :=
ifeq ($(RENDERTYPE),WIN)
glad_objs += glad_wgl.c

View file

@ -1,6 +1,6 @@
/*
OpenGL, OpenGL ES loader generated by glad 0.1.18a0 on Thu Mar 22 01:10:42 2018.
OpenGL, OpenGL ES loader generated by glad 0.1.25 on Mon Jul 23 02:57:25 2018.
Language/Generator: C/C++
Specification: gl
@ -180,16 +180,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)

View file

@ -1,6 +1,6 @@
/*
WGL loader generated by glad 0.1.18a0 on Thu Mar 22 01:11:56 2018.
WGL loader generated by glad 0.1.25 on Mon Jul 23 02:57:35 2018.
Language/Generator: C/C++
Specification: wgl

View file

@ -1,6 +1,6 @@
/*
OpenGL, OpenGL ES loader generated by glad 0.1.18a0 on Thu Mar 22 01:10:42 2018.
OpenGL, OpenGL ES loader generated by glad 0.1.25 on Mon Jul 23 02:57:25 2018.
Language/Generator: C/C++
Specification: gl
@ -37,21 +37,41 @@
static void* get_proc(const char *namez);
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
static HMODULE libGL;
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#ifdef _MSC_VER
#ifdef __has_include
#if __has_include(<winapifamily.h>)
#define HAVE_WINAPIFAMILY 1
#endif
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
#define HAVE_WINAPIFAMILY 1
#endif
#endif
#ifdef HAVE_WINAPIFAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define IS_UWP 1
#endif
#endif
static
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
return 0;
}
@ -60,7 +80,7 @@ static
void close_gl(void) {
if(libGL != NULL) {
FreeLibrary((HMODULE) libGL);
libGL = NULL;
libGL = NULL;
}
}
#else
@ -123,7 +143,7 @@ void* get_proc(const char *namez) {
}
#endif
if(result == NULL) {
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else
result = dlsym(libGL, namez);
@ -155,7 +175,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
@ -169,7 +189,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) {
@ -182,11 +202,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 @@
/*
WGL loader generated by glad 0.1.18a0 on Thu Mar 22 01:11:56 2018.
WGL loader generated by glad 0.1.25 on Mon Jul 23 02:57:35 2018.
Language/Generator: C/C++
Specification: wgl
@ -30,21 +30,41 @@
static void* get_proc(const char *namez);
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
static HMODULE libGL;
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#ifdef _MSC_VER
#ifdef __has_include
#if __has_include(<winapifamily.h>)
#define HAVE_WINAPIFAMILY 1
#endif
#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_
#define HAVE_WINAPIFAMILY 1
#endif
#endif
#ifdef HAVE_WINAPIFAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define IS_UWP 1
#endif
#endif
static
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
return 0;
}
@ -53,7 +73,7 @@ static
void close_gl(void) {
if(libGL != NULL) {
FreeLibrary((HMODULE) libGL);
libGL = NULL;
libGL = NULL;
}
}
#else
@ -116,7 +136,7 @@ void* get_proc(const char *namez) {
}
#endif
if(result == NULL) {
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else
result = dlsym(libGL, namez);