diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-07-10 11:22:33 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-07-18 13:59:06 +0200 |
commit | 404faa146d3b25088eefff481f3c0ee7ed044613 (patch) | |
tree | 75678347478441d8f88295f641074af33cedebd9 /examples | |
parent | 373b7e66f004b580598d8aa977487148de03b104 (diff) |
Backend refactoring
Minimized references to frontend elements from the backend.
QNode now has a uuid.
simple-qml update to use an instanciator.
Changed slightly the way LoadDataMeshJobs works.
Change-Id: If2866eb124bf9c026098ea0c70ae197101e9553e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simple-qml/main.qml | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/examples/simple-qml/main.qml b/examples/simple-qml/main.qml index 5a55ffaf8..d2878dc80 100644 --- a/examples/simple-qml/main.qml +++ b/examples/simple-qml/main.qml @@ -48,7 +48,8 @@ import Qt3D.Render 2.0 // type provider in QtQml. So we will need to replicate this in Qt3D // for the types that we wish to support. Otherwise we'll have to import // QtQuick 2.1 all over the place. -import QtQuick 2.1 as QQ2 +import QtQuick 2.2 as QQ2 +import QtQml 2.2 Entity { id: root @@ -67,10 +68,29 @@ Entity { ball2.mesh = test ? null : ballMesh ball1.mesh = test ? cubeMesh : ballMesh test = !test + instanciator.model = (test) ? 1 : 0 external_forward_renderer.activeFrameGraph.layerFilters = test ? ["balls"] : [] } } + Instantiator { + id : instanciator + model : 1 + + delegate : Entity { + objectName : "toto" + components : [TorusMesh { + id: mesh + objectName : "instancedMesh" + radius: 5 + minorRadius: 1 + rings: 100 + slices: 20 + }] + } + } + + // Scene graph Entity { id: sceneRoot |