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 | |
parent | c0b2cd3773c2a7fc6f7ca75c45c106ea04907109 (diff) | |
download | manaverse-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.gz manaverse-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.bz2 manaverse-b873a942a8e78d42d159aa1e307b7c8155d6e755.tar.xz manaverse-b873a942a8e78d42d159aa1e307b7c8155d6e755.zip |
Add option for enable/disable DSA OpenGL extension.
By default this option disabled.
Diffstat (limited to 'src')
-rw-r--r-- | src/defaults.cpp | 1 | ||||
-rw-r--r-- | src/graphicsmanager.cpp | 42 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_perfomance.cpp | 4 |
3 files changed, 30 insertions, 17 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp index cf4687973..10f0f1374 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -401,6 +401,7 @@ DefaultsData* getConfigDefaults() AddDEF("checkOpenGLVersion", true); AddDEF("openglContext", false); AddDEF("allowMoveByMouse", true); + AddDEF("enableDSA", false); return configData; } 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); } } diff --git a/src/gui/widgets/tabs/setup_perfomance.cpp b/src/gui/widgets/tabs/setup_perfomance.cpp index 9e507c74d..b583257d8 100644 --- a/src/gui/widgets/tabs/setup_perfomance.cpp +++ b/src/gui/widgets/tabs/setup_perfomance.cpp @@ -96,6 +96,10 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) : new SetupItemCheckBox(_("Enable OpenGL context creation"), "", "openglContext", this, "openglContextEvent"); + // TRANSLATORS: settings option + new SetupItemCheckBox(_("Enable OpenGL direct state access"), + "", "enableDSA", this, "enableDSAEvent"); + // TRANSLATORS: settings option new SetupItemLabel(_("Better quality (disable for better performance)"), |