diff options
Diffstat (limited to 'examples/multiviewport/main.qml')
-rw-r--r-- | examples/multiviewport/main.qml | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/examples/multiviewport/main.qml b/examples/multiviewport/main.qml index 07a58c543..895a40c16 100644 --- a/examples/multiviewport/main.qml +++ b/examples/multiviewport/main.qml @@ -92,31 +92,32 @@ Entity { ClearBuffer { buffers : ClearBuffer.ColorDepthBuffer + } - Viewport { - id : topLeftViewport - rect : Qt.rect(0, 0, 0.5, 0.5) - CameraSelector {id : cameraSelectorTopLeftViewport; camera : sceneRoot.cameras[0]} - } + Viewport { + id : topLeftViewport + rect : Qt.rect(0, 0, 0.5, 0.5) + CameraSelector {id : cameraSelectorTopLeftViewport; camera : sceneRoot.cameras[0]} + } - Viewport { - id : topRightViewport - rect : Qt.rect(0.5, 0, 0.5, 0.5) - CameraSelector {id : cameraSelectorTopRightViewport;camera : sceneRoot.cameras[1]} - } + Viewport { + id : topRightViewport + rect : Qt.rect(0.5, 0, 0.5, 0.5) + CameraSelector {id : cameraSelectorTopRightViewport; camera : sceneRoot.cameras[1]} + } - Viewport { - id : bottomLeftViewport - rect : Qt.rect(0, 0.5, 0.5, 0.5) - CameraSelector {id : cameraSelectorBottomLeftViewport; camera : sceneRoot.cameras[2]} - } + Viewport { + id : bottomLeftViewport + rect : Qt.rect(0, 0.5, 0.5, 0.5) + CameraSelector {id : cameraSelectorBottomLeftViewport; camera : sceneRoot.cameras[2]} + } - Viewport { - id : bottomRightViewport - rect : Qt.rect(0.5, 0.5, 0.5, 0.5) - CameraSelector {id : cameraSelectorBottomRightViewport; camera : sceneRoot.cameras[3]} - } + Viewport { + id : bottomRightViewport + rect : Qt.rect(0.5, 0.5, 0.5, 0.5) + CameraSelector {id : cameraSelectorBottomRightViewport; camera : sceneRoot.cameras[3]} } + } // mainViewport } // frameGraph @@ -161,6 +162,19 @@ Entity { } Entity { + components : [ + Transform { + Rotate { + angle : -sceneRoot.rotationAngle + axis : Qt.vector3d(0, 0, 1) + } + }, + SceneLoader { + source: ":/assets/test_scene.dae" + }] + } + + Entity { id : cameraViewport4 property Transform transform : Transform { LookAt { @@ -173,17 +187,6 @@ Entity { } - SceneLoader { - id: scene - source: ":/assets/test_scene.dae" - components : [Transform { - Rotate { - angle : -sceneRoot.rotationAngle - axis : Qt.vector3d(0, 0, 1) - } - }] - } - } // sceneRoot } // rootNode |