aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-11-20 15:56:37 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-11-20 15:56:37 +0200
commitde625ea60fa8eb030c3348710a96b37f2281ae0f (patch)
treec50b9fbac603d9efad0374a18c906ba14ced9e2b /src/particles
parentabe4729ea8db32124c36dc33fc32eb629df03043 (diff)
parent73eeb35f09fd1ea846bb0f5ce507316f587fda9f (diff)
Merge tag 'v5.15.17-lts' into tqtc/lts-5.15-opensource5.15
Qt 5.15.17-lts release Change-Id: I85da10a6f1030e50730c7aaee4c71ae861f1ecc4
Diffstat (limited to 'src/particles')
-rw-r--r--src/particles/qquickparticlesystem.cpp5
-rw-r--r--src/particles/qquickparticlesystem_p.h2
-rw-r--r--src/particles/shaders/customparticle.frag39
-rw-r--r--src/particles/shaders/customparticle.vert39
-rw-r--r--src/particles/shaders/customparticle_core.frag39
-rw-r--r--src/particles/shaders/customparticle_core.vert39
-rw-r--r--src/particles/shaders/customparticletemplate.vert39
-rw-r--r--src/particles/shaders/customparticletemplate_core.vert39
-rw-r--r--src/particles/shaders/imageparticle.frag39
-rw-r--r--src/particles/shaders/imageparticle.vert39
-rw-r--r--src/particles/shaders/imageparticle_core.frag39
-rw-r--r--src/particles/shaders/imageparticle_core.vert39
-rw-r--r--src/particles/shaders_ng/imageparticle.frag39
-rw-r--r--src/particles/shaders_ng/imageparticle.vert39
14 files changed, 472 insertions, 3 deletions
diff --git a/src/particles/qquickparticlesystem.cpp b/src/particles/qquickparticlesystem.cpp
index 57812ba797..e07c02f60c 100644
--- a/src/particles/qquickparticlesystem.cpp
+++ b/src/particles/qquickparticlesystem.cpp
@@ -240,8 +240,7 @@ void QQuickParticleDataHeap::insertTimed(QQuickParticleData* data, int time)
int QQuickParticleDataHeap::top()
{
- if (m_end == 0)
- return 1 << 30;
+ Q_ASSERT(!isEmpty());
return m_data[0].time;
}
@@ -391,7 +390,7 @@ bool QQuickParticleGroupData::recycle()
{
m_latestAliveParticles.clear();
- while (dataHeap.top() <= m_system->timeInt) {
+ while (!dataHeap.isEmpty() && dataHeap.top() <= m_system->timeInt) {
foreach (QQuickParticleData* datum, dataHeap.pop()) {
if (!datum->stillAlive(m_system)) {
freeList.free(datum->index);
diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h
index c74be45c7a..6612b7991f 100644
--- a/src/particles/qquickparticlesystem_p.h
+++ b/src/particles/qquickparticlesystem_p.h
@@ -118,6 +118,8 @@ public:
int top();
+ bool isEmpty() const { return m_end == 0; }
+
QSet<QQuickParticleData*> pop();
void clear();
diff --git a/src/particles/shaders/customparticle.frag b/src/particles/shaders/customparticle.frag
index 64007029f7..ab0055c8cf 100644
--- a/src/particles/shaders/customparticle.frag
+++ b/src/particles/shaders/customparticle.frag
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 120
varying highp vec2 qt_TexCoord0;
diff --git a/src/particles/shaders/customparticle.vert b/src/particles/shaders/customparticle.vert
index b99f73ea53..f9fe8fd046 100644
--- a/src/particles/shaders/customparticle.vert
+++ b/src/particles/shaders/customparticle.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
void main()
{
defaultMain();
diff --git a/src/particles/shaders/customparticle_core.frag b/src/particles/shaders/customparticle_core.frag
index 699c834605..8f2a395b3f 100644
--- a/src/particles/shaders/customparticle_core.frag
+++ b/src/particles/shaders/customparticle_core.frag
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 150
in vec2 qt_TexCoord0;
diff --git a/src/particles/shaders/customparticle_core.vert b/src/particles/shaders/customparticle_core.vert
index b99f73ea53..f9fe8fd046 100644
--- a/src/particles/shaders/customparticle_core.vert
+++ b/src/particles/shaders/customparticle_core.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
void main()
{
defaultMain();
diff --git a/src/particles/shaders/customparticletemplate.vert b/src/particles/shaders/customparticletemplate.vert
index eef8458a85..10fc7771f0 100644
--- a/src/particles/shaders/customparticletemplate.vert
+++ b/src/particles/shaders/customparticletemplate.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 120
attribute highp vec2 qt_ParticlePos;
diff --git a/src/particles/shaders/customparticletemplate_core.vert b/src/particles/shaders/customparticletemplate_core.vert
index 15d38e797c..bc4f414bc3 100644
--- a/src/particles/shaders/customparticletemplate_core.vert
+++ b/src/particles/shaders/customparticletemplate_core.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 150 core
in vec2 qt_ParticlePos;
diff --git a/src/particles/shaders/imageparticle.frag b/src/particles/shaders/imageparticle.frag
index 92795a5381..83e3af7895 100644
--- a/src/particles/shaders/imageparticle.frag
+++ b/src/particles/shaders/imageparticle.frag
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 120
uniform sampler2D _qt_texture;
diff --git a/src/particles/shaders/imageparticle.vert b/src/particles/shaders/imageparticle.vert
index 4057a9eb4b..aed41b9512 100644
--- a/src/particles/shaders/imageparticle.vert
+++ b/src/particles/shaders/imageparticle.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 120
#if defined(DEFORM)
diff --git a/src/particles/shaders/imageparticle_core.frag b/src/particles/shaders/imageparticle_core.frag
index 3ac8c8d34e..35c450c3bd 100644
--- a/src/particles/shaders/imageparticle_core.frag
+++ b/src/particles/shaders/imageparticle_core.frag
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 150 core
#if defined(SPRITE)
diff --git a/src/particles/shaders/imageparticle_core.vert b/src/particles/shaders/imageparticle_core.vert
index cfa0d57dfd..39c53303ac 100644
--- a/src/particles/shaders/imageparticle_core.vert
+++ b/src/particles/shaders/imageparticle_core.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 150 core
#if defined(DEFORM)
diff --git a/src/particles/shaders_ng/imageparticle.frag b/src/particles/shaders_ng/imageparticle.frag
index cefb7d2d75..f7c218face 100644
--- a/src/particles/shaders_ng/imageparticle.frag
+++ b/src/particles/shaders_ng/imageparticle.frag
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 440
#if defined(TABLE)
diff --git a/src/particles/shaders_ng/imageparticle.vert b/src/particles/shaders_ng/imageparticle.vert
index 870139452b..c2d2fa0d6b 100644
--- a/src/particles/shaders_ng/imageparticle.vert
+++ b/src/particles/shaders_ng/imageparticle.vert
@@ -1,3 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+**
+****************************************************************************/
+
#version 440
layout(location = 1) in vec4 vData; // x = time, y = lifeSpan, z = size, w = endSize