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.
This commit is contained in:
Deve 2017-01-04 23:39:15 +01:00
parent 1f8e047164
commit 23acade026

View File

@ -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;