diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-11-07 19:02:14 +0000 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-11-17 19:41:18 +0000 |
commit | 26a118cfbce29014864f6cdddae66cccb65ffb4f (patch) | |
tree | daea9f2fc41c1df586c35cd56daa61f920ce5b58 /examples/qt3d/plasma/main.qml | |
parent | ace675a084ab944a245500b9f54be653126c3147 (diff) |
Remove transforms property of QTransform
Compound transformations are now built up using QMatrix4x4 in both QML
and C++. Updating examples accordingly.
Change-Id: I03c9abf1f6cdd1b56226dc0e16a7ad5ce84516dd
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/plasma/main.qml')
-rw-r--r-- | examples/qt3d/plasma/main.qml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/qt3d/plasma/main.qml b/examples/qt3d/plasma/main.qml index 1c4cb45ea..a15287b41 100644 --- a/examples/qt3d/plasma/main.qml +++ b/examples/qt3d/plasma/main.qml @@ -38,14 +38,12 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 Entity { - components: FrameGraph { ForwardRenderer {} } - Entity { - components : [ + components: [ PlaneMesh { width: 2.0 height: 2.0 @@ -53,14 +51,17 @@ Entity { }, Transform { // Rotate the plane so that it faces us - Rotate { - axis: Qt.vector3d(1.0, 0.0, 0.0) - angle: 90 + matrix: { + var m = Qt.matrix4x4(1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + m.rotate(90, Qt.vector3d(1.0, 0.0, 0.0)); + return m; } }, - Material - { + Material { parameters: Parameter { name: "winsize"; value: Qt.vector2d(_window.width, _window.height) } effect: Effect { @@ -77,7 +78,6 @@ Entity { shaderProgram: ShaderProgram { vertexShaderCode: loadSource("qrc:/plasma.vert") fragmentShaderCode: loadSource("qrc:/plasma.frag") - } } } |