From 2a4326922201f904c005df2a9ffc12cb8f374a5f Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 27 Nov 2017 20:53:46 -0800 Subject: [PATCH] Add OVR_multiview extension; --- src/lib/glad/glad.c | 19 +++++++++++++++---- src/lib/glad/glad.h | 24 ++++++++++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/lib/glad/glad.c b/src/lib/glad/glad.c index 024d974c..a62485fe 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 Thu Nov 23 08:54:31 2017. + OpenGL, OpenGL ES loader generated by glad 0.1.16a0 on Tue Nov 28 05:52:46 2017. Language/Generator: C/C++ Specification: gl @@ -10,15 +10,16 @@ GL_ARB_texture_storage, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB + GL_EXT_texture_sRGB, + GL_OVR_multiview Loader: False Local files: False Omit khrplatform: False 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" + --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" 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 + 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 */ #include @@ -539,8 +540,10 @@ 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"); @@ -960,12 +963,17 @@ 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; } @@ -1045,6 +1053,7 @@ 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; } @@ -1304,6 +1313,7 @@ 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; } @@ -1362,6 +1372,7 @@ 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 aa5d65f8..2e10b28b 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 Thu Nov 23 08:54:31 2017. + OpenGL, OpenGL ES loader generated by glad 0.1.16a0 on Tue Nov 28 05:52:46 2017. Language/Generator: C/C++ Specification: gl @@ -10,15 +10,16 @@ GL_ARB_texture_storage, GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, - GL_EXT_texture_sRGB + GL_EXT_texture_sRGB, + GL_OVR_multiview Loader: False Local files: False Omit khrplatform: False 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" + --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" 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 + 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 */ @@ -2318,6 +2319,10 @@ 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; @@ -2337,6 +2342,13 @@ 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; @@ -2345,6 +2357,10 @@ 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 }