summaryrefslogtreecommitdiffstats
path: root/src/core/aspects/qaspectmanager.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-01-20 16:33:53 +0100
committerPaul Lemire <paul.lemire@kdab.com>2016-01-22 14:29:34 +0000
commit86177b98e27a9d376e35039454986ff7de8f3104 (patch)
tree6ac256365641f538128666917f0b5090d873320a /src/core/aspects/qaspectmanager.cpp
parent31e4d157c6b0af0c04546af643707a3811583455 (diff)
QAspectEngine/QAbstractAspects: get rid of setData
Getting rid of set data and the refactoring on setting the surface implies that: - Given the FrameGraph configuration, there may be several RenderViews each having a different RenderSurfaceSelector/Window - This means that the Renderer/QRenderAspect can't know about the surface before reading the scene - This means that the Renderer may be dealing with more than 1 window - This means that initialization, render and shutdown procedures will have to be updated accordingly Therefore the Renderer was refactored to: - Be initialized without knowing about a surface - For each RenderView, check the surface and if different from the previous one: * Make the context current with it * Create the appropriate glHelpers (as Surfaces may have != formats) TO DO: - Fix picking - Fix windows exposition - Fix shutdown / detection of all windows beging closed Change-Id: I49d070b05f46be4b26cfb57e494feba145d1da9c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/aspects/qaspectmanager.cpp')
-rw-r--r--src/core/aspects/qaspectmanager.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp
index 80faef768..01441df53 100644
--- a/src/core/aspects/qaspectmanager.cpp
+++ b/src/core/aspects/qaspectmanager.cpp
@@ -130,15 +130,6 @@ void QAspectManager::setRootEntity(Qt3DCore::QEntity *root)
}
}
-// Should be called after aspects are registered
-void QAspectManager::setData(const QVariantMap &data)
-{
- qCDebug(Aspects) << Q_FUNC_INFO;
- m_data = data;
- Q_FOREACH (QAbstractAspect *aspect, m_aspects)
- aspect->onInitialize(m_data);
-}
-
/*!
* Registers a new \a aspect.
*/
@@ -153,7 +144,8 @@ void QAspectManager::registerAspect(QAbstractAspect *aspect)
QAbstractAspectPrivate::get(aspect)->m_arbiter = m_changeArbiter;
// Register sceneObserver with the QChangeArbiter
m_changeArbiter->registerSceneObserver(aspect->d_func());
- aspect->onInitialize(m_data);
+ // Initialize the aspect in the main thread
+ aspect->onInitialize();
}
else {
qCWarning(Aspects) << "Failed to register aspect";
@@ -161,11 +153,6 @@ void QAspectManager::registerAspect(QAbstractAspect *aspect)
qCDebug(Aspects) << "Completed registering aspect";
}
-QVariantMap QAspectManager::data() const
-{
- return m_data;
-}
-
void QAspectManager::exec()
{
// Gentlemen, start your engines