summaryrefslogtreecommitdiffstats
path: root/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp')
-rw-r--r--src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp b/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
index 1167698..8d298a9 100644
--- a/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
+++ b/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
@@ -1358,10 +1358,11 @@ struct SDynamicObjectTranslatorContext : public STranslatorContext
}
}
}
- void ApplyChanges(SPresentation &inPresentation, IQt3DSRenderContext &inRenderContext,
+ bool ApplyChanges(SPresentation &inPresentation, IQt3DSRenderContext &inRenderContext,
SDynamicObject &inObject, Q3DStudio::TElement &element,
IDynamicObjectSystem &inSystem)
{
+ bool ret = false;
if (element.GetActive()) {
NVConstDataRef<qt3ds::render::dynamic::SPropertyDefinition> theProperties =
inSystem.GetProperties(inObject.m_ClassName);
@@ -1408,8 +1409,9 @@ struct SDynamicObjectTranslatorContext : public STranslatorContext
}
}
}
- theItem.m_Flags.SetDirty(true);
+ ret = true;
}
+ return ret;
}
};
@@ -1428,9 +1430,10 @@ struct SEffectTranslator : public Qt3DSTranslator
{
SRuntimePropertyParser theParser(inPresentation, inRenderContext, *m_Element);
SEffect &theItem = *static_cast<SEffect *>(m_RenderObject);
- static_cast<SDynamicObjectTranslatorContext *>(m_TranslatorContext)
- ->ApplyChanges(inPresentation, inRenderContext, theItem, Element(),
+ bool dirty = static_cast<SDynamicObjectTranslatorContext *>(m_TranslatorContext)
+ ->ApplyChanges(inPresentation, inRenderContext, *theItem.m_dynamicObject, Element(),
inRenderContext.GetDynamicObjectSystem());
+ theItem.m_Flags.SetDirty(dirty);
theItem.SetActive(Element().GetActive(), inRenderContext.GetEffectSystem());
}
};
@@ -1450,9 +1453,10 @@ struct SCustomMaterialTranslator : public Qt3DSTranslator
{
SRuntimePropertyParser theParser(inPresentation, inRenderContext, *m_Element);
SCustomMaterial &theItem = *static_cast<SCustomMaterial *>(m_RenderObject);
- static_cast<SDynamicObjectTranslatorContext *>(m_TranslatorContext)
- ->ApplyChanges(inPresentation, inRenderContext, theItem, Element(),
+ bool dirty = static_cast<SDynamicObjectTranslatorContext *>(m_TranslatorContext)
+ ->ApplyChanges(inPresentation, inRenderContext, *theItem.m_dynamicObject, Element(),
inRenderContext.GetDynamicObjectSystem());
+ theItem.m_Flags.SetDirty(dirty);
bool active = m_Element->GetActive();
if (active != theItem.m_Flags.IsActive()) {
theItem.m_Flags.SetActive(active);