summaryrefslogtreecommitdiffstats
path: root/src/api/studio3dqml/q3dsrenderer_p.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-08-13 16:47:39 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-08-14 10:33:49 +0300
commit998c4352801134eff290dc2f4677eebe650233af (patch)
tree2e80645a3681c1f013b785909cea8d3821fd8339 /src/api/studio3dqml/q3dsrenderer_p.h
parent4ce1ac65981572f7493b08d032f7d0074db45c67 (diff)
Don't share surface between async init contexts
Some platforms can't handle sharing a surface between multiple active OpenGL contexts, so create a new QOffscreenSurface for asynchronous initialization purposes. Task-number: QT3DS-3862 Change-Id: I76f59bb81417c4522d40403dd5597add270dd5fc Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/api/studio3dqml/q3dsrenderer_p.h')
-rw-r--r--src/api/studio3dqml/q3dsrenderer_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/studio3dqml/q3dsrenderer_p.h b/src/api/studio3dqml/q3dsrenderer_p.h
index f0b6cfe..0817494 100644
--- a/src/api/studio3dqml/q3dsrenderer_p.h
+++ b/src/api/studio3dqml/q3dsrenderer_p.h
@@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
class Q3DSViewerSettings;
class Q3DSPresentation;
class Q3DSRuntimeInitializerThread;
+class QSurface;
class Q3DSRenderer : public QObject,
public QQuickFramebufferObject::Renderer
@@ -61,7 +62,7 @@ class Q3DSRenderer : public QObject,
public:
Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisitor,
- QElapsedTimer *startupTimer, bool asyncInit);
+ QElapsedTimer *startupTimer, QSurface *asyncInitSurface);
~Q3DSRenderer() override;
QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override;
@@ -110,7 +111,7 @@ protected:
QString m_error;
QElapsedTimer *m_startupTimer;
Q3DSRuntimeInitializerThread *m_runtimeInitializerThread = nullptr;
- bool m_asyncInit = false;
+ QSurface *m_asyncInitSurface = nullptr;
friend class RuntimeInitializer;
};