summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-10-02 14:41:04 +0200
committerChristian Stromme <christian.stromme@qt.io>2018-10-03 08:25:29 +0000
commitbf024bc30d37c6e3a4213726f1676a132656f4ff (patch)
treea1c179ed196ce8e87833fd51ba8b983a3dc966fe /tests
parent063d58d3440eb034ca5f8756135ed90777c563ae (diff)
Generate prop.changes from custom mesh updates as well
The scene manager must get a notification saying that something has changed in the geometry of a given model (so it can dirty appropriately). Therefore the standard notifyPropertyChange({ ...}) model has to be used for the updateCustomMeshBuffer functions as well. This avoids not updating the content in the 'standalone' test when trying to change geometry after all animations have finished. Change-Id: If9d8a8fa3c69147206803b790f0ea4ec1e59ec72 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/standalone/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/standalone/main.cpp b/tests/manual/standalone/main.cpp
index 8b5c3c0..c8d207b 100644
--- a/tests/manual/standalone/main.cpp
+++ b/tests/manual/standalone/main.cpp
@@ -127,7 +127,7 @@ void buildCustomMesh(Q3DSUipPresentation *pres, Q3DSLayerNode *layer, Q3DSSlide
// change the first vertex's y
float *p = reinterpret_cast<float *>(geom->buffer(0)->data.data());
*(p + 1) -= 10.0f;
- model->updateCustomMeshBuffer(0, 0, 3 * sizeof(float));
+ model->notifyPropertyChanges({ model->updateCustomMeshBuffer(0, 0, 3 * sizeof(float)) });
});
slide->addObject(text);
layer->appendChildNode(text);
@@ -149,7 +149,7 @@ void buildCustomMesh(Q3DSUipPresentation *pres, Q3DSLayerNode *layer, Q3DSSlide
*p++ = x + 100.0f; *p++ = -50.0f; *p++ = 0.0f; /* normal */ *p++ = 0.0f; *p++ = 0.0f; *p++ = 1.0f;
*p++ = x + 50.0f; *p++ = 50.0f; *p++ = 0.0f; /* normal */ *p++ = 0.0f; *p++ = 0.0f; *p++ = 1.0f;
geom->setDrawCount(geom->drawCount() + 3);
- model->updateCustomMeshBuffer(0);
+ model->notifyPropertyChanges({ model->updateCustomMeshBuffer(0) });
});
slide->addObject(text);
layer->appendChildNode(text);