diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-25 15:59:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-25 15:59:05 +0300 |
commit | b873a942a8e78d42d159aa1e307b7c8155d6e755 (patch) | |
tree | 71c5fe8a6fe3f98c22330414323cffb3ee5f400e /src/graphicsmanager.cpp | |
parent | c0b2cd3773c2a7fc6f7ca75c45c106ea04907109 (diff) | |
download | manaplus-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.gz manaplus-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.bz2 manaplus-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.xz manaplus-b873a942a8e78d42d159aa1e307b7c8155d6e755.zip |
Add option for enable/disable DSA OpenGL extension.
By default this option disabled.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 412a4e388..2cc41bb15 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -1058,27 +1058,35 @@ void GraphicsManager::initOpenGLFunctions() */ { // not for NVIDIA. in NVIDIA atleast in windows drivers DSA is broken // Mesa 10.6.3 show support for DSA, but it broken. Works in 10.7 dev - if (is45) + if (config.getBoolValue("enableDSA") == true) { - logger->log1("found GL_EXT_direct_state_access"); - assignFunction(glTextureSubImage2D); - } - else if (supportExtension("GL_EXT_direct_state_access")) - { - logger->log1("found GL_EXT_direct_state_access"); - assignFunctionEmu2(glTextureSubImage2DEXT, - "glTextureSubImage2DEXT"); - } - else if (supportExtension("GL_ARB_direct_state_access")) - { - logger->log1("found GL_ARB_direct_state_access"); - logger->log1("GL_EXT_direct_state_access not found"); - assignFunction(glTextureSubImage2D); + if (is45) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunction(glTextureSubImage2D); + } + else if (supportExtension("GL_EXT_direct_state_access")) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunctionEmu2(glTextureSubImage2DEXT, + "glTextureSubImage2DEXT"); + } + else if (supportExtension("GL_ARB_direct_state_access")) + { + logger->log1("found GL_ARB_direct_state_access"); + logger->log1("GL_EXT_direct_state_access not found"); + assignFunction(glTextureSubImage2D); + } + else + { + logger->log1("GL_EXT_direct_state_access not found"); + logger->log1("GL_ARB_direct_state_access not found"); + emulateFunction(glTextureSubImage2DEXT); + } } else { - logger->log1("GL_EXT_direct_state_access not found"); - logger->log1("GL_ARB_direct_state_access not found"); + logger->log1("Direct state access disabled in settings"); emulateFunction(glTextureSubImage2DEXT); } } |