summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/graphicsmanager.cpp42
-rw-r--r--src/gui/widgets/tabs/setup_perfomance.cpp4
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)"),