aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2012-01-17 16:49:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-07 11:49:20 +0100
commita6eb09137247a880c58995464a35c1ad5c3f0c20 (patch)
treeb5d8b2444cf93f9f25ff90d9b6c65bbb2a492553 /tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml
parent54a2a4ee656134874990d5657dfe921d98c6c028 (diff)
Fixed some Item.layer bugs and added auto-tests.
Change-Id: I3f66f911d1c499c37a66904f8ddab6951ba85e60 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml')
-rw-r--r--tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml b/tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml
new file mode 100644
index 0000000000..a4c2ebff6b
--- /dev/null
+++ b/tests/auto/qtquick2/qquickitemlayer/data/SamplerNameChange.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "blue"
+ layer.enabled: true
+ layer.effect: ShaderEffect {
+ fragmentShader: "
+ uniform sampler2D foo;
+ uniform lowp float qt_Opacity;
+ varying highp vec2 qt_TexCoord0;
+ void main() {
+ gl_FragColor = texture2D(foo, qt_TexCoord0) * qt_Opacity;
+ }"
+ }
+ Component.onCompleted: layer.samplerName = "foo"
+}