Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 6947 → Rev 6948

/source/glad/include/glad/glad.h
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 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)
/source/glad/include/glad/glad_wgl.h
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
/source/glad/src/glad.c
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,7 → 37,7
 
static void* get_proc(const char *namez);
 
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
static HMODULE libGL;
 
44,14 → 44,34
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
void close_gl(void) {
if(libGL != NULL) {
FreeLibrary((HMODULE) libGL);
libGL = NULL;
libGL = NULL;
}
}
#else
123,7 → 143,7
}
#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 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
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
 
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;
}
/source/glad/src/glad_wgl.c
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,7 → 30,7
 
static void* get_proc(const char *namez);
 
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
static HMODULE libGL;
 
37,14 → 37,34
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
void close_gl(void) {
if(libGL != NULL) {
FreeLibrary((HMODULE) libGL);
libGL = NULL;
libGL = NULL;
}
}
#else
116,7 → 136,7
}
#endif
if(result == NULL) {
#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)
result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else
result = dlsym(libGL, namez);