One more tweak.

glGetFramebufferAttachmentParameteriv function is available in OpenGL 3.0 and newer.
This commit is contained in:
Deve 2015-12-14 18:56:08 +01:00
parent 5f46863a19
commit bddfa43da4

View File

@ -182,9 +182,10 @@ void CentralVideoSettings::init()
} }
// Check if visual is sRGB-capable // Check if visual is sRGB-capable
if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_CAPABLE)) if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_CAPABLE) &&
m_glsl == true)
{ {
GLint param; GLint param = GL_SRGB;
glGetFramebufferAttachmentParameteriv(GL_DRAW_FRAMEBUFFER, GL_BACK_LEFT, glGetFramebufferAttachmentParameteriv(GL_DRAW_FRAMEBUFFER, GL_BACK_LEFT,
GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &param); GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &param);
hasSRGBCapableVisual = (param == GL_SRGB); hasSRGBCapableVisual = (param == GL_SRGB);