From: Sean Harmer Date: Mon, 20 Aug 2012 20:09:48 +0000 (+0100) Subject: Fix compilation on OSX 10.6 X-Git-Tag: 1.0_branch~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fdf98a11f6919c04c5ef3fb78ecd39dd5f4b1fa;p=profile%2Fivi%2Fqtdeclarative.git Fix compilation on OSX 10.6 OS X 10.6 does not support the GL_ARB_framebuffer_sRGB extension. Change-Id: Ifea8eaf3ffca6242d908538afeb983131a113c73 Reviewed-by: Lars Knoll --- diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 6616173..27339ab 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -128,7 +128,7 @@ void QSGTextMaskMaterialData::activate() 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) @@ -141,7 +141,7 @@ void QSGTextMaskMaterialData::deactivate() 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