summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderer_p.h
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2016-10-21 09:46:31 +0300
committerAntti Määttä <antti.maatta@qt.io>2017-01-18 13:48:12 +0000
commit42175321749ff876c6271f60e111ca7b83049c4f (patch)
treea87bc5b9648805c07a92e174a7485571774a59bc /src/render/backend/renderer_p.h
parent206199f94fb3c59abc27cd4bd25c3c22ea3d8a33 (diff)
Add shared context to renderer
Allows other contexts to access resources created by Qt3D backend. Needed by Render-qml-to-texture render thread, which requires it's own context. Change-Id: Ib1886301a8d2fffa03befeabe38e92ad5c9606d5 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src/render/backend/renderer_p.h')
-rw-r--r--src/render/backend/renderer_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/backend/renderer_p.h b/src/render/backend/renderer_p.h
index c7c8e247a..344565173 100644
--- a/src/render/backend/renderer_p.h
+++ b/src/render/backend/renderer_p.h
@@ -205,6 +205,7 @@ public:
virtual void setSettings(RenderSettings *settings) Q_DECL_OVERRIDE;
virtual RenderSettings *settings() const Q_DECL_OVERRIDE;
+ QOpenGLContext *shareContext() const Q_DECL_OVERRIDE;
void updateGLResources();
void updateTexture(Texture *texture);
@@ -296,6 +297,7 @@ private:
BackendNodeDirtySet m_changeSet;
QAtomicInt m_lastFrameCorrect;
QOpenGLContext *m_glContext;
+ QOpenGLContext *m_shareContext;
PickBoundingVolumeJobPtr m_pickBoundingVolumeJob;
qint64 m_time;