glad: Sync with upstream 0.1.16a0

This commit is contained in:
Indah Sylvia 2017-11-30 14:38:34 +07:00
parent cf50ce86e0
commit 7f68960be5
4 changed files with 49 additions and 29 deletions

View file

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

View file

@ -102,8 +102,7 @@
#elif defined (__SYMBIAN32__) #elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C # define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
# include <sys/cdefs.h> # define KHRONOS_APICALL __attribute__((visibility("default")))
# define KHRONOS_APICALL __attribute__((visibility("default"))) __NDK_FPABI__
#else #else
# define KHRONOS_APICALL # define KHRONOS_APICALL
#endif #endif

View file

@ -1,6 +1,6 @@
/* /*
OpenGL loader generated by glad 0.1.14a0 on Wed Jun 14 20:12:45 2017. OpenGL loader generated by glad 0.1.16a0 on Thu Nov 30 06:21:28 2017.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: gl Specification: gl
@ -92,7 +92,7 @@ int open_gl(void) {
} }
static static
void close_gl() { void close_gl(void) {
if(libGL != NULL) { if(libGL != NULL) {
dlclose(libGL); dlclose(libGL);
libGL = NULL; libGL = NULL;
@ -165,7 +165,18 @@ static int get_exts(void) {
} }
for(index = 0; index < (unsigned)num_exts_i; index++) { for(index = 0; index < (unsigned)num_exts_i; index++) {
exts_i[index] = (const char*)glGetStringi(GL_EXTENSIONS, index); const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index);
size_t len = strlen(gl_str_tmp);
char *local_str = (char*)malloc((len+1) * sizeof(*exts_i));
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
}
exts_i[index] = local_str;
} }
} }
#endif #endif
@ -174,6 +185,10 @@ static int get_exts(void) {
static void free_exts(void) { static void free_exts(void) {
if (exts_i != NULL) { if (exts_i != NULL) {
int index;
for(index = 0; index < num_exts_i; index++) {
free((char *)exts_i[index]);
}
free((void *)exts_i); free((void *)exts_i);
exts_i = NULL; exts_i = NULL;
} }
@ -207,11 +222,11 @@ static int has_ext(const char *ext) {
#ifdef _GLAD_IS_SOME_NEW_VERSION #ifdef _GLAD_IS_SOME_NEW_VERSION
} else { } else {
int index; int index;
if(exts_i == NULL) return 0;
for(index = 0; index < num_exts_i; index++) { for(index = 0; index < num_exts_i; index++) {
const char *e = exts_i[index]; const char *e = exts_i[index];
if(strcmp(e, ext) == 0) { if(exts_i[index] != NULL && strcmp(e, ext) == 0) {
return 1; return 1;
} }
} }

View file

@ -1,6 +1,6 @@
/* /*
OpenGL loader generated by glad 0.1.14a0 on Wed Jun 14 20:12:45 2017. OpenGL loader generated by glad 0.1.16a0 on Thu Nov 30 06:21:28 2017.
Language/Generator: C/C++ Language/Generator: C/C++
Specification: gl Specification: gl
@ -31,6 +31,9 @@
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1 #define WIN32_LEAN_AND_MEAN 1
#endif #endif
#ifndef NOMINMAX
#define NOMINMAX 1
#endif
#include <windows.h> #include <windows.h>
#endif #endif
@ -139,6 +142,7 @@ typedef float GLfloat;
typedef float GLclampf; typedef float GLclampf;
typedef double GLdouble; typedef double GLdouble;
typedef double GLclampd; typedef double GLclampd;
typedef void *GLeglClientBufferEXT;
typedef void *GLeglImageOES; typedef void *GLeglImageOES;
typedef char GLchar; typedef char GLchar;
typedef char GLcharARB; typedef char GLcharARB;
@ -888,15 +892,17 @@ typedef void (APIENTRY *GLVULKANPROCNV)(void);
#define GL_TEXTURE_FILTER_CONTROL 0x8500 #define GL_TEXTURE_FILTER_CONTROL 0x8500
#define GL_DEPTH_TEXTURE_MODE 0x884B #define GL_DEPTH_TEXTURE_MODE 0x884B
#define GL_COMPARE_R_TO_TEXTURE 0x884E #define GL_COMPARE_R_TO_TEXTURE 0x884E
#define GL_FUNC_ADD 0x8006 #define GL_BLEND_COLOR 0x8005
#define GL_FUNC_SUBTRACT 0x800A #define GL_BLEND_EQUATION 0x8009
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_MIN 0x8007
#define GL_MAX 0x8008
#define GL_CONSTANT_COLOR 0x8001 #define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_CONSTANT_ALPHA 0x8003 #define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#define GL_FUNC_ADD 0x8006
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_FUNC_SUBTRACT 0x800A
#define GL_MIN 0x8007
#define GL_MAX 0x8008
#define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765 #define GL_BUFFER_USAGE 0x8765
#define GL_QUERY_COUNTER_BITS 0x8864 #define GL_QUERY_COUNTER_BITS 0x8864
@ -1504,10 +1510,10 @@ GLAPI PFNGLDISABLEPROC glad_glDisable;
typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap); typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap);
GLAPI PFNGLENABLEPROC glad_glEnable; GLAPI PFNGLENABLEPROC glad_glEnable;
#define glEnable glad_glEnable #define glEnable glad_glEnable
typedef void (APIENTRYP PFNGLFINISHPROC)(); typedef void (APIENTRYP PFNGLFINISHPROC)(void);
GLAPI PFNGLFINISHPROC glad_glFinish; GLAPI PFNGLFINISHPROC glad_glFinish;
#define glFinish glad_glFinish #define glFinish glad_glFinish
typedef void (APIENTRYP PFNGLFLUSHPROC)(); typedef void (APIENTRYP PFNGLFLUSHPROC)(void);
GLAPI PFNGLFLUSHPROC glad_glFlush; GLAPI PFNGLFLUSHPROC glad_glFlush;
#define glFlush glad_glFlush #define glFlush glad_glFlush
typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
@ -1543,7 +1549,7 @@ GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data);
GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev; GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev;
#define glGetDoublev glad_glGetDoublev #define glGetDoublev glad_glGetDoublev
typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(); typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void);
GLAPI PFNGLGETERRORPROC glad_glGetError; GLAPI PFNGLGETERRORPROC glad_glGetError;
#define glGetError glad_glGetError #define glGetError glad_glGetError
typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data);
@ -1582,7 +1588,7 @@ GLAPI PFNGLVIEWPORTPROC glad_glViewport;
typedef void (APIENTRYP PFNGLNEWLISTPROC)(GLuint list, GLenum mode); typedef void (APIENTRYP PFNGLNEWLISTPROC)(GLuint list, GLenum mode);
GLAPI PFNGLNEWLISTPROC glad_glNewList; GLAPI PFNGLNEWLISTPROC glad_glNewList;
#define glNewList glad_glNewList #define glNewList glad_glNewList
typedef void (APIENTRYP PFNGLENDLISTPROC)(); typedef void (APIENTRYP PFNGLENDLISTPROC)(void);
GLAPI PFNGLENDLISTPROC glad_glEndList; GLAPI PFNGLENDLISTPROC glad_glEndList;
#define glEndList glad_glEndList #define glEndList glad_glEndList
typedef void (APIENTRYP PFNGLCALLLISTPROC)(GLuint list); typedef void (APIENTRYP PFNGLCALLLISTPROC)(GLuint list);
@ -1708,7 +1714,7 @@ GLAPI PFNGLEDGEFLAGPROC glad_glEdgeFlag;
typedef void (APIENTRYP PFNGLEDGEFLAGVPROC)(const GLboolean *flag); typedef void (APIENTRYP PFNGLEDGEFLAGVPROC)(const GLboolean *flag);
GLAPI PFNGLEDGEFLAGVPROC glad_glEdgeFlagv; GLAPI PFNGLEDGEFLAGVPROC glad_glEdgeFlagv;
#define glEdgeFlagv glad_glEdgeFlagv #define glEdgeFlagv glad_glEdgeFlagv
typedef void (APIENTRYP PFNGLENDPROC)(); typedef void (APIENTRYP PFNGLENDPROC)(void);
GLAPI PFNGLENDPROC glad_glEnd; GLAPI PFNGLENDPROC glad_glEnd;
#define glEnd glad_glEnd #define glEnd glad_glEnd
typedef void (APIENTRYP PFNGLINDEXDPROC)(GLdouble c); typedef void (APIENTRYP PFNGLINDEXDPROC)(GLdouble c);
@ -2131,7 +2137,7 @@ GLAPI PFNGLSELECTBUFFERPROC glad_glSelectBuffer;
typedef GLint (APIENTRYP PFNGLRENDERMODEPROC)(GLenum mode); typedef GLint (APIENTRYP PFNGLRENDERMODEPROC)(GLenum mode);
GLAPI PFNGLRENDERMODEPROC glad_glRenderMode; GLAPI PFNGLRENDERMODEPROC glad_glRenderMode;
#define glRenderMode glad_glRenderMode #define glRenderMode glad_glRenderMode
typedef void (APIENTRYP PFNGLINITNAMESPROC)(); typedef void (APIENTRYP PFNGLINITNAMESPROC)(void);
GLAPI PFNGLINITNAMESPROC glad_glInitNames; GLAPI PFNGLINITNAMESPROC glad_glInitNames;
#define glInitNames glad_glInitNames #define glInitNames glad_glInitNames
typedef void (APIENTRYP PFNGLLOADNAMEPROC)(GLuint name); typedef void (APIENTRYP PFNGLLOADNAMEPROC)(GLuint name);
@ -2140,7 +2146,7 @@ GLAPI PFNGLLOADNAMEPROC glad_glLoadName;
typedef void (APIENTRYP PFNGLPASSTHROUGHPROC)(GLfloat token); typedef void (APIENTRYP PFNGLPASSTHROUGHPROC)(GLfloat token);
GLAPI PFNGLPASSTHROUGHPROC glad_glPassThrough; GLAPI PFNGLPASSTHROUGHPROC glad_glPassThrough;
#define glPassThrough glad_glPassThrough #define glPassThrough glad_glPassThrough
typedef void (APIENTRYP PFNGLPOPNAMEPROC)(); typedef void (APIENTRYP PFNGLPOPNAMEPROC)(void);
GLAPI PFNGLPOPNAMEPROC glad_glPopName; GLAPI PFNGLPOPNAMEPROC glad_glPopName;
#define glPopName glad_glPopName #define glPopName glad_glPopName
typedef void (APIENTRYP PFNGLPUSHNAMEPROC)(GLuint name); typedef void (APIENTRYP PFNGLPUSHNAMEPROC)(GLuint name);
@ -2158,7 +2164,7 @@ GLAPI PFNGLINDEXMASKPROC glad_glIndexMask;
typedef void (APIENTRYP PFNGLACCUMPROC)(GLenum op, GLfloat value); typedef void (APIENTRYP PFNGLACCUMPROC)(GLenum op, GLfloat value);
GLAPI PFNGLACCUMPROC glad_glAccum; GLAPI PFNGLACCUMPROC glad_glAccum;
#define glAccum glad_glAccum #define glAccum glad_glAccum
typedef void (APIENTRYP PFNGLPOPATTRIBPROC)(); typedef void (APIENTRYP PFNGLPOPATTRIBPROC)(void);
GLAPI PFNGLPOPATTRIBPROC glad_glPopAttrib; GLAPI PFNGLPOPATTRIBPROC glad_glPopAttrib;
#define glPopAttrib glad_glPopAttrib #define glPopAttrib glad_glPopAttrib
typedef void (APIENTRYP PFNGLPUSHATTRIBPROC)(GLbitfield mask); typedef void (APIENTRYP PFNGLPUSHATTRIBPROC)(GLbitfield mask);
@ -2308,7 +2314,7 @@ GLAPI PFNGLISLISTPROC glad_glIsList;
typedef void (APIENTRYP PFNGLFRUSTUMPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); typedef void (APIENTRYP PFNGLFRUSTUMPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
GLAPI PFNGLFRUSTUMPROC glad_glFrustum; GLAPI PFNGLFRUSTUMPROC glad_glFrustum;
#define glFrustum glad_glFrustum #define glFrustum glad_glFrustum
typedef void (APIENTRYP PFNGLLOADIDENTITYPROC)(); typedef void (APIENTRYP PFNGLLOADIDENTITYPROC)(void);
GLAPI PFNGLLOADIDENTITYPROC glad_glLoadIdentity; GLAPI PFNGLLOADIDENTITYPROC glad_glLoadIdentity;
#define glLoadIdentity glad_glLoadIdentity #define glLoadIdentity glad_glLoadIdentity
typedef void (APIENTRYP PFNGLLOADMATRIXFPROC)(const GLfloat *m); typedef void (APIENTRYP PFNGLLOADMATRIXFPROC)(const GLfloat *m);
@ -2329,10 +2335,10 @@ GLAPI PFNGLMULTMATRIXDPROC glad_glMultMatrixd;
typedef void (APIENTRYP PFNGLORTHOPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); typedef void (APIENTRYP PFNGLORTHOPROC)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
GLAPI PFNGLORTHOPROC glad_glOrtho; GLAPI PFNGLORTHOPROC glad_glOrtho;
#define glOrtho glad_glOrtho #define glOrtho glad_glOrtho
typedef void (APIENTRYP PFNGLPOPMATRIXPROC)(); typedef void (APIENTRYP PFNGLPOPMATRIXPROC)(void);
GLAPI PFNGLPOPMATRIXPROC glad_glPopMatrix; GLAPI PFNGLPOPMATRIXPROC glad_glPopMatrix;
#define glPopMatrix glad_glPopMatrix #define glPopMatrix glad_glPopMatrix
typedef void (APIENTRYP PFNGLPUSHMATRIXPROC)(); typedef void (APIENTRYP PFNGLPUSHMATRIXPROC)(void);
GLAPI PFNGLPUSHMATRIXPROC glad_glPushMatrix; GLAPI PFNGLPUSHMATRIXPROC glad_glPushMatrix;
#define glPushMatrix glad_glPushMatrix #define glPushMatrix glad_glPushMatrix
typedef void (APIENTRYP PFNGLROTATEDPROC)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLROTATEDPROC)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
@ -2441,7 +2447,7 @@ GLAPI PFNGLINDEXUBPROC glad_glIndexub;
typedef void (APIENTRYP PFNGLINDEXUBVPROC)(const GLubyte *c); typedef void (APIENTRYP PFNGLINDEXUBVPROC)(const GLubyte *c);
GLAPI PFNGLINDEXUBVPROC glad_glIndexubv; GLAPI PFNGLINDEXUBVPROC glad_glIndexubv;
#define glIndexubv glad_glIndexubv #define glIndexubv glad_glIndexubv
typedef void (APIENTRYP PFNGLPOPCLIENTATTRIBPROC)(); typedef void (APIENTRYP PFNGLPOPCLIENTATTRIBPROC)(void);
GLAPI PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib; GLAPI PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib;
#define glPopClientAttrib glad_glPopClientAttrib #define glPopClientAttrib glad_glPopClientAttrib
typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBPROC)(GLbitfield mask); typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBPROC)(GLbitfield mask);
@ -2839,7 +2845,7 @@ GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader); typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader);
GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader; GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader;
#define glCompileShader glad_glCompileShader #define glCompileShader glad_glCompileShader
typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(); typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void);
GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram; GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
#define glCreateProgram glad_glCreateProgram #define glCreateProgram glad_glCreateProgram
typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type); typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type);
@ -3141,7 +3147,7 @@ GLAPI PFNGLISENABLEDIPROC glad_glIsEnabledi;
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode);
GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback; GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
#define glBeginTransformFeedback glad_glBeginTransformFeedback #define glBeginTransformFeedback glad_glBeginTransformFeedback
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(); typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void);
GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback; GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
#define glEndTransformFeedback glad_glEndTransformFeedback #define glEndTransformFeedback glad_glEndTransformFeedback
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
@ -3162,7 +3168,7 @@ GLAPI PFNGLCLAMPCOLORPROC glad_glClampColor;
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode);
GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender; GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;
#define glBeginConditionalRender glad_glBeginConditionalRender #define glBeginConditionalRender glad_glBeginConditionalRender
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(); typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void);
GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender; GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;
#define glEndConditionalRender glad_glEndConditionalRender #define glEndConditionalRender glad_glEndConditionalRender
typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);