diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-05 12:12:29 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-05 12:13:36 +0200 |
commit | 67df1c8a574763745cd1672414e4fc118a13ad1d (patch) | |
tree | 445a1a06c5ee56fb34662c4d74506662c465159f /examples | |
parent | 2e2fa3690730e65cfd705f1d75b67e1f16568f21 (diff) |
Updated according to ShaderEffectItem -> ShaderEffect API changes.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qml-compositor/qml-compositor.qrc | 2 | ||||
-rw-r--r-- | examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml (renamed from examples/qml-compositor/qml/QmlCompositor/ShaderEffect.qml) | 10 | ||||
-rw-r--r-- | examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/qml-compositor/qml-compositor.qrc b/examples/qml-compositor/qml-compositor.qrc index 0dc86580c..0a3898fb2 100644 --- a/examples/qml-compositor/qml-compositor.qrc +++ b/examples/qml-compositor/qml-compositor.qrc @@ -3,7 +3,7 @@ <file>background.jpg</file> <file>qml/QmlCompositor/main.qml</file> <file>qml/QmlCompositor/compositor.js</file> - <file>qml/QmlCompositor/ShaderEffect.qml</file> + <file>qml/QmlCompositor/ContrastEffect.qml</file> <file>qml/QmlCompositor/WindowChrome.qml</file> <file>qml/QmlCompositor/WindowContainer.qml</file> </qresource> diff --git a/examples/qml-compositor/qml/QmlCompositor/ShaderEffect.qml b/examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml index eb2f80005..b832c7131 100644 --- a/examples/qml-compositor/qml/QmlCompositor/ShaderEffect.qml +++ b/examples/qml-compositor/qml/QmlCompositor/ContrastEffect.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 -ShaderEffectItem { +ShaderEffect { property variant source: null; property color color: "#ffffff" property real blend; @@ -53,23 +53,23 @@ ShaderEffectItem { } property string vShader: " - uniform highp mat4 qt_ModelViewProjectionMatrix; + uniform highp mat4 qt_Matrix; attribute highp vec4 qt_Vertex; attribute highp vec2 qt_MultiTexCoord0; varying highp vec2 qt_TexCoord0; void main() { qt_TexCoord0 = qt_MultiTexCoord0; - gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex; + gl_Position = qt_Matrix * qt_Vertex; } " property string vShaderInvertedY: " - uniform highp mat4 qt_ModelViewProjectionMatrix; + uniform highp mat4 qt_Matrix; attribute highp vec4 qt_Vertex; attribute highp vec2 qt_MultiTexCoord0; varying highp vec2 qt_TexCoord0; void main() { qt_TexCoord0 = vec2(0, 1) + qt_MultiTexCoord0 * vec2(1, -1); - gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex; + gl_Position = qt_Matrix * qt_Vertex; } " diff --git a/examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml b/examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml index 9182f251d..b5683e90a 100644 --- a/examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml +++ b/examples/qml-compositor/qml/QmlCompositor/WindowContainer.qml @@ -72,7 +72,7 @@ Item { NumberAnimation { easing.type: Easing.Linear; duration: 250; } } - ShaderEffect { + ContrastEffect { id: effect source: child anchors.fill: child |