summaryrefslogtreecommitdiffstats
path: root/tests/manual/texture-updates-cpp/scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/texture-updates-cpp/scene.cpp')
-rw-r--r--tests/manual/texture-updates-cpp/scene.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/manual/texture-updates-cpp/scene.cpp b/tests/manual/texture-updates-cpp/scene.cpp
index 274b9422f..65277227c 100644
--- a/tests/manual/texture-updates-cpp/scene.cpp
+++ b/tests/manual/texture-updates-cpp/scene.cpp
@@ -56,6 +56,7 @@
#include <Qt3DExtras/QCuboidMesh>
#include <Qt3DExtras/QDiffuseMapMaterial>
+#include <Qt3DRender/QGeometryRenderer>
#include <Qt3DRender/QTextureDataUpdate>
#include <cstring>
@@ -85,9 +86,12 @@ Scene::Scene(Qt3DCore::QEntity *rootEntity)
mat->setSpecular(QColor(255, 255, 255));
mat->setDiffuse(m_texture);
+ auto renderer = new Qt3DRender::QGeometryRenderer();
+ renderer->setView(cuboid);
+
//Cuboid
m_cuboidEntity = new Qt3DCore::QEntity(m_rootEntity);
- m_cuboidEntity->addComponent(cuboid);
+ m_cuboidEntity->addComponent(renderer);
m_cuboidEntity->addComponent(mat);
m_cuboidEntity->addComponent(m_transform);
}