summaryrefslogtreecommitdiffstats
path: root/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Runtime/Source/engine/Qt3DSRuntimeView.cpp')
-rw-r--r--src/Runtime/Source/engine/Qt3DSRuntimeView.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp b/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
index 9485a67b..2849cd39 100644
--- a/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
+++ b/src/Runtime/Source/engine/Qt3DSRuntimeView.cpp
@@ -47,6 +47,7 @@
#include "Qt3DSRenderer.h"
#include "Qt3DSRenderBufferManager.h"
#include "Qt3DSRenderRuntimeBindingImpl.h"
+#include "Qt3DSImportMesh.h"
#include "Qt3DSDLLManager.h"
#include "foundation/Qt3DSSimpleTypes.h"
@@ -217,6 +218,7 @@ public:
void deleteElements(const QStringList &elementPaths) override;
void createMaterials(const QString &elementPath,
const QStringList &materialDefinitions) override;
+ void createMesh(const QString &name, qt3dsimp::Mesh *mesh) override;
void SetAttribute(const char *elementPath, const char *attributeName,
const char *value) override;
bool GetAttribute(const char *elementPath, const char *attributeName, void *value) override;
@@ -668,6 +670,16 @@ void CRuntimeView::createMaterials(const QString &elementPath,
}
}
+void CRuntimeView::createMesh(const QString &name, qt3dsimp::Mesh *mesh)
+{
+ if (m_Application) {
+ Q3DStudio::CQmlEngine &theBridgeEngine
+ = static_cast<Q3DStudio::CQmlEngine &>(m_RuntimeFactoryCore->GetScriptEngineQml());
+ theBridgeEngine.createMesh(
+ name, mesh, &m_RuntimeFactory->GetQt3DSRenderContext().GetBufferManager());
+ }
+}
+
void CRuntimeView::SetAttribute(const char *elementPath, const char *attributeName,
const char *value)
{