diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-21 20:29:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-21 20:29:35 +0300 |
commit | 2da60f580cf07d16c0c52d451641bcb0e5698923 (patch) | |
tree | 359bdc950646eba1fd81f2fb9635d1c2ee6645f0 /src | |
parent | bcbf32f0ca331ea766148a534a2551b2e70fcc46 (diff) | |
download | manaplus-2da60f580cf07d16c0c52d451641bcb0e5698923.tar.gz manaplus-2da60f580cf07d16c0c52d451641bcb0e5698923.tar.bz2 manaplus-2da60f580cf07d16c0c52d451641bcb0e5698923.tar.xz manaplus-2da60f580cf07d16c0c52d451641bcb0e5698923.zip |
add Support for OpenGL extension GL_ARB_texture_storage.
Diffstat (limited to 'src')
-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, |