diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-01-20 16:33:53 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-01-22 14:29:34 +0000 |
commit | 86177b98e27a9d376e35039454986ff7de8f3104 (patch) | |
tree | 6ac256365641f538128666917f0b5090d873320a /src/render/backend/renderer_p.h | |
parent | 31e4d157c6b0af0c04546af643707a3811583455 (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/render/backend/renderer_p.h')
-rw-r--r-- | src/render/backend/renderer_p.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/render/backend/renderer_p.h b/src/render/backend/renderer_p.h index 7d7eb944a..dc619492e 100644 --- a/src/render/backend/renderer_p.h +++ b/src/render/backend/renderer_p.h @@ -76,7 +76,6 @@ QT_BEGIN_NAMESPACE class QSurface; -class QOpenGLDebugLogger; class QMouseEvent; namespace Qt3DCore { @@ -127,16 +126,10 @@ public: qint64 time() const Q_DECL_OVERRIDE; void setTime(qint64 time) Q_DECL_OVERRIDE; - void setSurface(QSurface *s) Q_DECL_OVERRIDE; - void setSurfaceSize(const QSize& s) Q_DECL_OVERRIDE; - void setDevicePixelRatio(qreal s) Q_DECL_OVERRIDE; void setNodeManagers(NodeManagers *managers) Q_DECL_OVERRIDE { m_nodesManager = managers; } void setServices(Qt3DCore::QServiceLocator *services) Q_DECL_OVERRIDE { m_services = services; } void setSurfaceExposed(bool exposed) Q_DECL_OVERRIDE; - QSurface *surface() const Q_DECL_OVERRIDE { return m_surface; } - const QSize &surfaceSize() const Q_DECL_OVERRIDE { return m_surfaceSize; } - qreal devicePixelRatio() const Q_DECL_OVERRIDE { return m_devicePixelRatio; } NodeManagers *nodeManagers() const Q_DECL_OVERRIDE; Qt3DCore::QServiceLocator *services() const Q_DECL_OVERRIDE { return m_services; } @@ -230,10 +223,6 @@ private: ShaderParameterPack m_defaultUniformPack; QScopedPointer<GraphicsContext> m_graphicsContext; - QSurface *m_surface; - QSize m_surfaceSize; - qreal m_devicePixelRatio; - RenderQueue *m_renderQueue; QScopedPointer<RenderThread> m_renderThread; @@ -244,8 +233,7 @@ private: QMutex m_mutex; QSemaphore m_submitRenderViewsSemaphore; - QWaitCondition m_waitForWindowToBeSetCondition; - QWaitCondition m_waitForInitializationToBeCompleted; + QSemaphore m_waitForInitializationToBeCompleted; static void createThreadLocalAllocator(void *renderer); static void destroyThreadLocalAllocator(void *renderer); @@ -253,7 +241,6 @@ private: QAtomicInt m_running; - QScopedPointer<QOpenGLDebugLogger> m_debugLogger; QScopedPointer<PickEventFilter> m_pickEventFilter; QVector<Qt3DCore::QFrameAllocator *> m_allocators; |