summaryrefslogtreecommitdiffstats
path: root/examples/cpp_example
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2014-07-02 12:54:47 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-07-05 16:03:19 +0200
commit3c37d50d0e526959223b8c51dd75cde7a2527d9d (patch)
treebad3c01af4e28e27d660726b460a09650a4b2a31 /examples/cpp_example
parenta20f272b2fe5179d95e397afc6aa3ed80afb7188 (diff)
Refactored QAbstractMesh, QMesh and QAbstractShapeMesh
The Backend now monitors QAbstractMesh elements instead of QMesh. QAbstractMesh subclasses have to implement a load method. For QMesh it uses the ObjLoader to create MeshData from a source file while QAbstractShapeMesh loads MeshData created by code. Each scene parser can then implement its own QAbstractMesh subclass. The loadmeshdatajobs has been corrected and works with QAbstractMesh. Change-Id: I5caae63a153f18eaae3b2f1bdbfa8995c63a2d23 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/cpp_example')
-rw-r--r--examples/cpp_example/main.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/cpp_example/main.cpp b/examples/cpp_example/main.cpp
index 4ea59c23c..72aeef828 100644
--- a/examples/cpp_example/main.cpp
+++ b/examples/cpp_example/main.cpp
@@ -90,10 +90,7 @@ int main(int ac, char **av)
torus->setRadius(40);
torus->setMinorRadius(15);
- // Torus mesh holding the shape's data
- Qt3D::QMesh *torusMesh = new Qt3D::QMesh();
- torusMesh->setData(torus->data());
- torusEntity->addComponent(torusMesh);
+ torusEntity->addComponent(torus);
// TorusMesh Transform
Qt3D::TranslateTransform *torusTranslation = new Qt3D::TranslateTransform();