~saviq/ubuntu/saucy/qtdeclarative-opensource-src/add-qtquick-delegate-range

« back to all changes in this revision

Viewing changes to tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
    width: 320
 
5
    height: 480
 
6
    color: "skyblue"
 
7
    ShaderEffect {
 
8
        anchors.centerIn: parent
 
9
        width: 16 * 16
 
10
        height: 24 * 16
 
11
        property variant source: ShaderEffectSource {
 
12
            sourceItem: Rectangle {
 
13
                width: 22 * 20
 
14
                height: 16 * 20
 
15
                color: "#EF2B2D"
 
16
                Rectangle {
 
17
                    y: 6 * 20
 
18
                    height: 4 * 20
 
19
                    width: 22 * 20
 
20
                    color: "white"
 
21
                }
 
22
                Rectangle {
 
23
                    x: 6 * 20
 
24
                    width: 4 * 20
 
25
                    height: 16 * 20
 
26
                    color: "white"
 
27
                }
 
28
                Rectangle {
 
29
                    y: 7 * 20
 
30
                    height: 2 * 20
 
31
                    width: 22 * 20
 
32
                    color: "#002868"
 
33
                }
 
34
                Rectangle {
 
35
                    x: 7 * 20
 
36
                    width: 2 * 20
 
37
                    height: 16 * 20
 
38
                    color: "#002868"
 
39
                }
 
40
            }
 
41
            smooth: true
 
42
        }
 
43
        vertexShader: "
 
44
            uniform highp mat4 qt_Matrix;
 
45
            attribute highp vec4 qt_Vertex;
 
46
            attribute highp vec2 qt_MultiTexCoord0;
 
47
            varying highp vec2 qt_TexCoord0;
 
48
            void main() {
 
49
                highp vec4 pos = qt_Vertex;
 
50
                pos.x += sin(qt_Vertex.y * 0.02) * 20.;
 
51
                pos.y += sin(qt_Vertex.x * 0.02) * 20.;
 
52
                gl_Position = qt_Matrix * pos;
 
53
                qt_TexCoord0 = qt_MultiTexCoord0;
 
54
            }"
 
55
        mesh: GridMesh {
 
56
            property int r: 8
 
57
            resolution: Qt.size(r, r)
 
58
        }
 
59
    }
 
60
}