diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-08 12:30:19 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-22 06:09:46 (GMT) |
commit | 835a8e53d93f71fee0c73c3e02f73a4a01215d60 (patch) | |
tree | fc04bcbc084c1a721ee22dea356c7f6e3b00189c /src/opengl/gl2paintengineex/qglengineshadermanager.cpp | |
parent | a66826ed79203d1d665089eae4133921872a4532 (diff) | |
download | Qt-835a8e53d93f71fee0c73c3e02f73a4a01215d60.zip Qt-835a8e53d93f71fee0c73c3e02f73a4a01215d60.tar.gz Qt-835a8e53d93f71fee0c73c3e02f73a4a01215d60.tar.bz2 |
Resubmit support for subpixel antialiasing on text in the GL2 engine.
The antialiasing is currently not gamma corrected and is disabled on
OpenGL ES 2.0.
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadermanager.cpp')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp index b3458af..eceed06 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp @@ -134,7 +134,8 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) code[ShockingPinkSrcFragmentShader] = qglslShockingPinkSrcFragmentShader; code[MaskFragmentShader] = qglslMaskFragmentShader; - code[RgbMaskFragmentShader] = ""; //### + code[RgbMaskFragmentShaderPass1] = qglslRgbMaskFragmentShaderPass1; + code[RgbMaskFragmentShaderPass2] = qglslRgbMaskFragmentShaderPass2; code[RgbMaskWithGammaFragmentShader] = ""; //### code[MultiplyCompositionModeFragmentShader] = ""; //### @@ -587,10 +588,15 @@ bool QGLEngineShaderManager::useCorrectShaderProg() if (maskType == PixelMask) { maskShaderName = QGLEngineSharedShaders::MaskFragmentShader; texCoords = true; - } else if (maskType == SubPixelMask) { - maskShaderName = QGLEngineSharedShaders::RgbMaskFragmentShader; + } else if (maskType == SubPixelMaskPass1) { + maskShaderName = QGLEngineSharedShaders::RgbMaskFragmentShaderPass1; + texCoords = true; + } else if (maskType == SubPixelMaskPass2) { + maskShaderName = QGLEngineSharedShaders::RgbMaskFragmentShaderPass2; + texCoords = true; } else if (maskType == SubPixelWithGammaMask) { maskShaderName = QGLEngineSharedShaders::RgbMaskWithGammaFragmentShader; + texCoords = true; } else { qCritical("QGLEngineShaderManager::useCorrectShaderProg() - Unknown mask type"); } |