diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-17 17:57:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-17 17:57:51 +0300 |
commit | c7f654988a90f377bea6cf04492c6577246a0549 (patch) | |
tree | 4f1bc6d18bb8774087eb5a34284196f460ccc3ed /src/graphicsmanager.cpp | |
parent | 359b092c19076412081ff083fb999cd50a8f2b81 (diff) | |
download | plus-c7f654988a90f377bea6cf04492c6577246a0549.tar.gz plus-c7f654988a90f377bea6cf04492c6577246a0549.tar.bz2 plus-c7f654988a90f377bea6cf04492c6577246a0549.tar.xz plus-c7f654988a90f377bea6cf04492c6577246a0549.zip |
Add check for OpenGL version 4.5 in extensions detection.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 9b53de3e7..e531a90af 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -858,7 +858,7 @@ void GraphicsManager::initOpenGLFunctions() const bool is42 = checkGLVersion(4, 2); const bool is43 = checkGLVersion(4, 3); const bool is44 = checkGLVersion(4, 4); - const bool isDao = supportExtension("GL_EXT_direct_state_access"); + const bool is45 = checkGLVersion(4, 5); mSupportModernOpengl = true; // Texture sampler @@ -892,7 +892,12 @@ void GraphicsManager::initOpenGLFunctions() return; } - if (isDao) + if (is45) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2D"); + } + else if (supportExtension("GL_EXT_direct_state_access")) { logger->log1("found GL_EXT_direct_state_access"); assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2DEXT"); @@ -979,12 +984,12 @@ void GraphicsManager::initOpenGLFunctions() { logger->log1("GL_GREMEDY_frame_terminator not found"); } - if (supportExtension("GL_EXT_debug_label")) + if (is44 || supportExtension("GL_EXT_debug_label")) { logger->log1("found GL_EXT_debug_label"); - assignFunctionEXT(glLabelObject); + assignFunction2(glLabelObject, "glObjectLabel"); if (isGLNull(mglLabelObject)) - assignFunction2(glLabelObject, "glObjectLabel"); + assignFunctionEXT(glLabelObject); assignFunctionEXT(glGetObjectLabel); } else |