diff --git a/src/lib/glad/glad.c b/src/lib/glad/glad.c index a62485fe..6bf3c894 100644 --- a/src/lib/glad/glad.c +++ b/src/lib/glad/glad.c @@ -1,6 +1,6 @@ /* - OpenGL, OpenGL ES loader generated by glad 0.1.16a0 on Tue Nov 28 05:52:46 2017. + OpenGL, OpenGL ES loader generated by glad 0.1.25 on Sat Jul 21 03:10:14 2018. Language/Generator: C/C++ Specification: gl @@ -10,16 +10,15 @@ GL_ARB_texture_storage, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB, - GL_OVR_multiview + GL_EXT_texture_sRGB Loader: False Local files: False - Omit khrplatform: False + Omit khrplatform: True Commandline: - --profile="core" --api="gl=3.3,gles2=3.0" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_texture_storage,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_OVR_multiview" + --profile="core" --api="gl=3.3,gles2=3.0" --generator="c" --spec="gl" --no-loader --omit-khrplatform --extensions="GL_ARB_texture_storage,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB" Online: - http://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.0&extensions=GL_ARB_texture_storage&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_OVR_multiview + http://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.0&extensions=GL_ARB_texture_storage&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB */ #include @@ -38,7 +37,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 @@ -52,7 +51,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) { @@ -63,13 +62,9 @@ static int get_exts(void) { 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)); + 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; } @@ -540,10 +535,8 @@ PFNGLFRONTFACEPROC glad_glFrontFace; int GLAD_GL_ARB_texture_storage; int GLAD_GL_EXT_texture_compression_s3tc; int GLAD_GL_EXT_texture_filter_anisotropic; -int GLAD_GL_OVR_multiview; int GLAD_GL_EXT_texture_sRGB; PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D; -PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC glad_glFramebufferTextureMultiviewOVR; static void load_GL_VERSION_1_0(GLADloadproc load) { if(!GLAD_GL_VERSION_1_0) return; glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); @@ -963,17 +956,12 @@ static void load_GL_ARB_texture_storage(GLADloadproc load) { glad_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)load("glTexStorage2D"); glad_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)load("glTexStorage3D"); } -static void load_GL_OVR_multiview(GLADloadproc load) { - if(!GLAD_GL_OVR_multiview) return; - glad_glFramebufferTextureMultiviewOVR = (PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)load("glFramebufferTextureMultiviewOVR"); -} static int find_extensionsGL(void) { if (!get_exts()) return 0; GLAD_GL_ARB_texture_storage = has_ext("GL_ARB_texture_storage"); GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc"); GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic"); GLAD_GL_EXT_texture_sRGB = has_ext("GL_EXT_texture_sRGB"); - GLAD_GL_OVR_multiview = has_ext("GL_OVR_multiview"); free_exts(); return 1; } @@ -1053,7 +1041,6 @@ int gladLoadGLLoader(GLADloadproc load) { if (!find_extensionsGL()) return 0; load_GL_ARB_texture_storage(load); - load_GL_OVR_multiview(load); return GLVersion.major != 0 || GLVersion.minor != 0; } @@ -1313,7 +1300,6 @@ static int find_extensionsGLES2(void) { if (!get_exts()) return 0; GLAD_GL_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc"); GLAD_GL_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic"); - GLAD_GL_OVR_multiview = has_ext("GL_OVR_multiview"); free_exts(); return 1; } @@ -1372,7 +1358,6 @@ int gladLoadGLES2Loader(GLADloadproc load) { load_GL_ES_VERSION_3_0(load); if (!find_extensionsGLES2()) return 0; - load_GL_OVR_multiview(load); return GLVersion.major != 0 || GLVersion.minor != 0; } diff --git a/src/lib/glad/glad.h b/src/lib/glad/glad.h index 2e10b28b..33b83411 100644 --- a/src/lib/glad/glad.h +++ b/src/lib/glad/glad.h @@ -1,6 +1,6 @@ /* - OpenGL, OpenGL ES loader generated by glad 0.1.16a0 on Tue Nov 28 05:52:46 2017. + OpenGL, OpenGL ES loader generated by glad 0.1.25 on Sat Jul 21 03:10:14 2018. Language/Generator: C/C++ Specification: gl @@ -10,16 +10,15 @@ GL_ARB_texture_storage, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB, - GL_OVR_multiview + GL_EXT_texture_sRGB Loader: False Local files: False - Omit khrplatform: False + Omit khrplatform: True Commandline: - --profile="core" --api="gl=3.3,gles2=3.0" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_texture_storage,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_OVR_multiview" + --profile="core" --api="gl=3.3,gles2=3.0" --generator="c" --spec="gl" --no-loader --omit-khrplatform --extensions="GL_ARB_texture_storage,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB" Online: - http://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.0&extensions=GL_ARB_texture_storage&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_OVR_multiview + http://glad.dav1d.de/#profile=core&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.0&extensions=GL_ARB_texture_storage&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB */ @@ -167,15 +166,31 @@ 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) +#if defined(__khrplatform_h_) +typedef khronos_intptr_t GLintptr; +#else typedef long GLintptr; +#endif +#else +#if defined(__khrplatform_h_) +typedef khronos_intptr_t GLintptr; #else typedef ptrdiff_t GLintptr; #endif +#endif #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060) +#if defined(__khrplatform_h_) +typedef khronos_ssize_t GLsizeiptr; +#else typedef long GLsizeiptr; +#endif +#else +#if defined(__khrplatform_h_) +typedef khronos_ssize_t GLsizeiptr; #else typedef ptrdiff_t GLsizeiptr; #endif +#endif 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) @@ -1019,7 +1034,17 @@ typedef void (APIENTRY *GLVULKANPROCNV)(void); #define GL_TIME_ELAPSED 0x88BF #define GL_TIMESTAMP 0x8E28 #define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_GENERATE_MIPMAP_HINT 0x8192 #define GL_FIXED 0x140C +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VARYING_VECTORS 0x8DFC #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD @@ -1203,7 +1228,7 @@ GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv; typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap); GLAPI PFNGLISENABLEDPROC glad_glIsEnabled; #define glIsEnabled glad_glIsEnabled -typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble near, GLdouble far); +typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange; #define glDepthRange glad_glDepthRange typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); @@ -2319,10 +2344,6 @@ GLAPI PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ; #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 -#define GL_MAX_VIEWS_OVR 0x9631 -#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 #ifndef GL_ARB_texture_storage #define GL_ARB_texture_storage 1 GLAPI int GLAD_GL_ARB_texture_storage; @@ -2342,13 +2363,6 @@ GLAPI int GLAD_GL_EXT_texture_filter_anisotropic; #define GL_EXT_texture_sRGB 1 GLAPI int GLAD_GL_EXT_texture_sRGB; #endif -#ifndef GL_OVR_multiview -#define GL_OVR_multiview 1 -GLAPI int GLAD_GL_OVR_multiview; -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); -GLAPI PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC glad_glFramebufferTextureMultiviewOVR; -#define glFramebufferTextureMultiviewOVR glad_glFramebufferTextureMultiviewOVR -#endif #ifndef GL_EXT_texture_compression_s3tc #define GL_EXT_texture_compression_s3tc 1 GLAPI int GLAD_GL_EXT_texture_compression_s3tc; @@ -2357,10 +2371,6 @@ GLAPI int GLAD_GL_EXT_texture_compression_s3tc; #define GL_EXT_texture_filter_anisotropic 1 GLAPI int GLAD_GL_EXT_texture_filter_anisotropic; #endif -#ifndef GL_OVR_multiview -#define GL_OVR_multiview 1 -GLAPI int GLAD_GL_OVR_multiview; -#endif #ifdef __cplusplus }