From 23acade0260af960e246e1249fb42ab98c90020f Mon Sep 17 00:00:00 2001 From: Deve Date: Wed, 4 Jan 2017 23:39:15 +0100 Subject: [PATCH] Make sure that legacy pipeline is used when it's set in graphics restrictions. It was be done only for GLES before, but also for OpenGL some drivers create OpenGL 4.x compatibility profile context even if we request GL 2.1. So we can't assume that it will report GL2.1 and we should make sure that fixed pipeline will be used. Actually now it works in the same way as force_legacy_device in config.xml. --- src/graphics/central_settings.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/graphics/central_settings.cpp b/src/graphics/central_settings.cpp index dbe7ad034..768ed2c7f 100644 --- a/src/graphics/central_settings.cpp +++ b/src/graphics/central_settings.cpp @@ -90,6 +90,11 @@ void CentralVideoSettings::init() std::string driver((char*)(glGetString(GL_VERSION))); std::string card((char*)(glGetString(GL_RENDERER))); GraphicsRestrictions::init(driver, card); + + if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FORCE_LEGACY_DEVICE)) + { + m_glsl = false; + } #if !defined(USE_GLES2) if (hasGLExtension("GL_AMD_vertex_shader_layer")) { @@ -220,11 +225,6 @@ void CentralVideoSettings::init() m_need_srgb_visual_workaround = (param != GL_SRGB); } #else - if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FORCE_LEGACY_DEVICE)) - { - m_glsl = false; - } - if (m_glsl == true) { hasTextureStorage = true;