diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-08 12:30:19 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-16 08:11:40 (GMT) |
commit | b8ff02a67ebd8246253823b53cfed98eef400547 (patch) | |
tree | 011c1ea8b6d860e5a43824caa6903977394048ad /src/opengl/gl2paintengineex/qglengineshadermanager.cpp | |
parent | 120329adb47dba60f532c1c2fd2ad0f37b812437 (diff) | |
download | Qt-b8ff02a67ebd8246253823b53cfed98eef400547.zip Qt-b8ff02a67ebd8246253823b53cfed98eef400547.tar.gz Qt-b8ff02a67ebd8246253823b53cfed98eef400547.tar.bz2 |
Added support for subpixel antialiasing on text in the GL2 engine.
The antialiasing is currently not gamma corrected.
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"); } |