summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadersource_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-30 09:45:14 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-06-30 14:20:11 +0200
commit351e890aa13faac69a0ceaa8cb02660b2275cf82 (patch)
treecaf61d0d83735128390759638b20011d3b150cf7 /src/opengl/gl2paintengineex/qglengineshadersource_p.h
parent9dd82fcebc50ca802e9e24a50283152e1dc35508 (diff)
Added custom shader hook to the GL 2 paint engine.
This will make it easier to implement pixmap filters, YUV->RGB conversions, etc in other parts of Qt.
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadersource_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index 4e32f91828..e379aa39e2 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -290,6 +290,14 @@ static const char* const qglslImageSrcFragmentShader = "\
return texture2D(imageTexture, textureCoords); \
}";
+static const char* const qglslCustomSrcFragmentShader = "\
+ varying highp vec2 textureCoords; \
+ uniform sampler2D imageTexture; \
+ lowp vec4 customShader(sampler2D texture, vec2 coords); \
+ lowp vec4 srcPixel() { \
+ return customShader(imageTexture, textureCoords); \
+ }";
+
static const char* const qglslImageSrcWithPatternFragmentShader = "\
varying highp vec2 textureCoords; \
uniform lowp vec4 patternColor; \