diff options
-rw-r--r-- | src/graphicsmanager.cpp | 10 | ||||
-rw-r--r-- | src/render/mgl.cpp | 1 | ||||
-rw-r--r-- | src/render/mgl.h | 1 | ||||
-rw-r--r-- | src/render/mgltypes.h | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 358793daa..be16d68e0 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -830,6 +830,7 @@ void GraphicsManager::initOpenGLFunctions() { const bool is10 = checkGLVersion(1, 0); const bool is11 = checkGLVersion(1, 1); + const bool is12 = checkGLVersion(1, 2); const bool is20 = checkGLVersion(2, 0); const bool is21 = checkGLVersion(2, 1); mSupportModernOpengl = true; @@ -856,6 +857,15 @@ void GraphicsManager::initOpenGLFunctions() if (!is11) return; + if (is12 && supportExtension("GL_ARB_texture_storage")) + { + logger->log1("found GL_ARB_texture_storage"); + assignFunction(glTexStorage2D, "glTexStorage2D"); + } + else + { + logger->log1("GL_ARB_texture_storage not found"); + } if (supportExtension("GL_ARB_framebuffer_object")) { // frame buffer supported logger->log1("found GL_ARB_framebuffer_object"); diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp index 55bdc1b84..65064ae84 100644 --- a/src/render/mgl.cpp +++ b/src/render/mgl.cpp @@ -100,6 +100,7 @@ defName(glCopyImageSubData); defName(glPushDebugGroup); defName(glPopDebugGroup); defName(glObjectLabel); +defName(glTexStorage2D); #ifdef WIN32 defName(wglGetExtensionsString); diff --git a/src/render/mgl.h b/src/render/mgl.h index e3271f71b..32d27515f 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -103,6 +103,7 @@ defNameE(glCopyImageSubData); defNameE(glPushDebugGroup); defNameE(glPopDebugGroup); defNameE(glObjectLabel); +defNameE(glTexStorage2D); #ifdef WIN32 defNameE(wglGetExtensionsString); diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 9881ea312..f8f26c978 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -156,6 +156,8 @@ typedef void (APIENTRY *glPushDebugGroup_t) (GLenum source, GLuint id, typedef void (APIENTRY *glPopDebugGroup_t) (void); typedef void (APIENTRY *glObjectLabel_t) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (APIENTRY *glTexStorage2D_t) (GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, |