QSGMaterialShader::activate();
glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR);
-#if !defined(QT_OPENGL_ES_2)
+#if !defined(QT_OPENGL_ES_2) && defined(GL_ARB_framebuffer_sRGB)
// 0.25 was found to be acceptable error margin by experimentation. On Mac, the gamma is 2.0,
// but using sRGB looks okay.
if (qAbs(fontSmoothingGamma() - 2.2) < 0.25)
QSGMaterialShader::deactivate();
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-#if !defined(QT_OPENGL_ES_2)
+#if !defined(QT_OPENGL_ES_2) && defined(GL_ARB_framebuffer_sRGB)
if (qAbs(fontSmoothingGamma() - 2.2) < 0.25)
glDisable(GL_FRAMEBUFFER_SRGB);
#endif