aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
diff options
context:
space:
mode:
Diffstat (limited to 'src/particles')
-rw-r--r--src/particles/qquickimageparticle.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 07cbee1383..c68153aca8 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -49,6 +49,7 @@
#include <private/qquicksprite_p.h>
#include <private/qquickspriteengine_p.h>
#include <QOpenGLFunctions>
+#include <QSGRendererInterface>
#include <QtQuick/private/qsgshadersourcebuilder_p.h>
#include <QtQuick/private/qsgtexture_p.h>
#include <private/qqmlglobal_p.h>
@@ -1469,8 +1470,17 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node)
update();
}
+static inline bool isOpenGL(QSGRenderContext *rc)
+{
+ QSGRendererInterface *rif = rc->sceneGraphContext()->rendererInterface(rc);
+ return !rif || rif->graphicsApi() == QSGRendererInterface::OpenGL;
+}
+
QSGNode *QQuickImageParticle::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
{
+ if (!node && !isOpenGL(QQuickItemPrivate::get(this)->sceneGraphRenderContext()))
+ return 0;
+
if (m_pleaseReset){
if (node)
delete node;