diff --git a/desktop/toolkit/qt6/component.xml b/desktop/toolkit/qt6/component.xml
new file mode 100644
index 0000000000..8542b52377
--- /dev/null
+++ b/desktop/toolkit/qt6/component.xml
@@ -0,0 +1,3 @@
+
+ desktop.toolkit.qt6
+
diff --git a/desktop/toolkit/qt6/qt6-3d/actions.py b/desktop/toolkit/qt6/qt6-3d/actions.py
new file mode 100755
index 0000000000..b486d40837
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-3d/actions.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import qt6
+from pisi.actionsapi import pisitools
+
+
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-3d/files/x.patch b/desktop/toolkit/qt6/qt6-3d/files/x.patch
new file mode 100644
index 0000000000..7c13e58d6a
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-3d/files/x.patch
@@ -0,0 +1,1480 @@
+If an entity uses a QBoundingVolume and a QGeometryView, compute
+the bounding volume data in the core aspect. All other cases will
+still happen in the render aspect.
+
+Result not currently used (ie it's done again in render aspect).
+
+Change-Id: I4b5ed21bac42b79777c3112aa76d876ac5b6f52d
+Reviewed-by: Paul Lemire
+14 files changed:
+src/core/aspect/qcoreaspect.cpp patch | blob | history
+src/core/aspect/qcoreaspect.h patch | blob | history
+src/core/aspect/qcoreaspect_p.h patch | blob | history
+src/core/core.pro patch | blob | history
+src/core/geometry/bufferutils_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/buffervisitor_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/geometry.pri patch | blob | history
+src/core/geometry/qgeometry_p.h patch | blob | history
+src/core/geometry/qgeometryview.cpp patch | blob | history
+src/core/geometry/qgeometryview_p.h patch | blob | history
+src/core/jobs/calcboundingvolumejob.cpp [new file with mode: 0644] patch | blob
+src/core/jobs/calcboundingvolumejob_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/job_common_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/jobs.pri patch | blob | history
+
+diff --git a/src/core/aspect/qcoreaspect.cpp b/src/core/aspect/qcoreaspect.cpp
+index 48f9aaf..dc3566e 100644 (file)
+--- a/src/core/aspect/qcoreaspect.cpp
++++ b/src/core/aspect/qcoreaspect.cpp
+@@ -39,12 +39,16 @@
+
+ #include "qcoreaspect.h"
+ #include "qcoreaspect_p.h"
++#include
++#include
++#include
+
+ QT_BEGIN_NAMESPACE
+
+ using namespace Qt3DCore;
+
+ QCoreAspectPrivate::QCoreAspectPrivate()
++ : Qt3DCore::QAbstractAspectPrivate()
+ {
+
+ }
+@@ -65,7 +69,7 @@ void QCoreAspectPrivate::frameDone()
+ }
+
+ QCoreAspect::QCoreAspect(QObject *parent)
+- : Qt3DCore::QAbstractAspect(parent)
++ : Qt3DCore::QAbstractAspect(*new QCoreAspectPrivate, parent)
+ {
+
+ }
+@@ -75,10 +79,28 @@ QCoreAspect::~QCoreAspect()
+
+ }
+
++QAspectJobPtr QCoreAspect::calculateBoundingVolumeJob() const
++{
++ Q_D(const QCoreAspect);
++ return d->m_calculateBoundingVolumeJob;
++}
++
+ QVector QCoreAspect::jobsToExecute(qint64 time)
+ {
++ Q_D(QCoreAspect);
+ Q_UNUSED(time)
+- return {};
++
++ QVector jobs;
++
++ auto scene = d->m_aspectManager->scene();
++ auto dirtyBits = scene->dirtyBits();
++
++ if (dirtyBits & QScene::GeometryDirty ||
++ dirtyBits & QScene::BuffersDirty) {
++ jobs.push_back(d->m_calculateBoundingVolumeJob);
++ }
++
++ return jobs;
+ }
+
+ QVariant QCoreAspect::executeCommand(const QStringList &args)
+@@ -89,12 +111,25 @@ QVariant QCoreAspect::executeCommand(const QStringList &args)
+
+ void QCoreAspect::onRegistered()
+ {
++ Q_D(QCoreAspect);
+
++ if (d->m_calculateBoundingVolumeJob.isNull())
++ d->m_calculateBoundingVolumeJob = CalculateBoundingVolumeJobPtr::create();
+ }
+
+-void QCoreAspect::onUnregistered()
++void QCoreAspect::onEngineStartup()
+ {
++ Q_D(QCoreAspect);
+
++ Q_ASSERT(d->m_calculateBoundingVolumeJob);
++ d->m_calculateBoundingVolumeJob->setRoot(d->m_root);
++}
++
++void QCoreAspect::frameDone()
++{
++ Q_D(QCoreAspect);
++ auto scene = d->m_aspectManager->scene();
++ scene->clearDirtyBits();
+ }
+
+ QT_END_NAMESPACE
+diff --git a/src/core/aspect/qcoreaspect.h b/src/core/aspect/qcoreaspect.h
+index 27c72f4..071b738 100644 (file)
+--- a/src/core/aspect/qcoreaspect.h
++++ b/src/core/aspect/qcoreaspect.h
+@@ -55,6 +55,8 @@ public:
+ explicit QCoreAspect(QObject *parent = nullptr);
+ ~QCoreAspect();
+
++ QAspectJobPtr calculateBoundingVolumeJob() const;
++
+ protected:
+ Q_DECLARE_PRIVATE(QCoreAspect)
+
+@@ -62,7 +64,8 @@ private:
+ QVector jobsToExecute(qint64 time) override;
+ QVariant executeCommand(const QStringList &args) override;
+ void onRegistered() override;
+- void onUnregistered() override;
++ void onEngineStartup() override;
++ void frameDone() override;
+ };
+
+ }
+diff --git a/src/core/aspect/qcoreaspect_p.h b/src/core/aspect/qcoreaspect_p.h
+index ca665fa..cda0a14 100644 (file)
+--- a/src/core/aspect/qcoreaspect_p.h
++++ b/src/core/aspect/qcoreaspect_p.h
+@@ -55,10 +55,15 @@
+ #include
+ #include
+
++#include
++
+ QT_BEGIN_NAMESPACE
+
+ namespace Qt3DCore {
+
++class CalculateBoundingVolumeJob;
++using CalculateBoundingVolumeJobPtr = QSharedPointer;
++
+ class Q_3DCORE_PRIVATE_EXPORT QCoreAspectPrivate : public Qt3DCore::QAbstractAspectPrivate
+ {
+ public:
+@@ -71,6 +76,7 @@ public:
+ void frameDone() override;
+
+ bool m_initialized;
++ CalculateBoundingVolumeJobPtr m_calculateBoundingVolumeJob;
+ };
+
+ }
+diff --git a/src/core/core.pro b/src/core/core.pro
+index b149497..846e9d8 100644 (file)
+--- a/src/core/core.pro
++++ b/src/core/core.pro
+@@ -1,7 +1,8 @@
+-TARGET = Qt3DCore
+-MODULE = 3dcore
++TARGET = Qt3DCore
++MODULE = 3dcore
+
+-QT = core-private gui-private network
++QT = core-private gui-private network
++QT_FOR_PRIVATE = concurrent
+
+ gcov {
+ QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
+diff --git a/src/core/geometry/bufferutils_p.h b/src/core/geometry/bufferutils_p.h
+new file mode 100644 (file)
+index 0000000..1b83d99
+--- /dev/null
++++ b/src/core/geometry/bufferutils_p.h
+@@ -0,0 +1,113 @@
++/****************************************************************************
++**
++** Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERUTILS_P_H
++#define QT3DCORE_BUFFERUTILS_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++
++namespace Qt3DCore {
++
++class QGeometryView;
++class QBuffer;
++
++struct BufferInfo
++{
++ BufferInfo()
++ : type(Qt3DCore::QAttribute::VertexBaseType::Float)
++ , dataSize(0)
++ , count(0)
++ , byteStride(0)
++ , byteOffset(0)
++ , restartEnabled(false)
++ , restartIndexValue(-1)
++ {}
++
++ QByteArray data;
++ Qt3DCore::QAttribute::VertexBaseType type;
++ uint dataSize;
++ uint count;
++ uint byteStride;
++ uint byteOffset;
++ bool restartEnabled;
++ int restartIndexValue;
++};
++
++
++namespace BufferTypeInfo {
++
++ template struct EnumToType;
++ template <> struct EnumToType { typedef const char type; };
++ template <> struct EnumToType { typedef const uchar type; };
++ template <> struct EnumToType { typedef const short type; };
++ template <> struct EnumToType { typedef const ushort type; };
++ template <> struct EnumToType { typedef const int type; };
++ template <> struct EnumToType { typedef const uint type; };
++ template <> struct EnumToType { typedef const float type; };
++ template <> struct EnumToType { typedef const double type; };
++
++ template
++ typename EnumToType::type *castToType(const QByteArray &u, uint byteOffset)
++ {
++ return reinterpret_cast< typename EnumToType::type *>(u.constData() + byteOffset);
++ }
++
++} // namespace BufferTypeInfo
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++
++#endif // QT3DCORE_BUFFERUTILS_P_H
+diff --git a/src/core/geometry/buffervisitor_p.h b/src/core/geometry/buffervisitor_p.h
+new file mode 100644 (file)
+index 0000000..69cfb9b
+--- /dev/null
++++ b/src/core/geometry/buffervisitor_p.h
+@@ -0,0 +1,285 @@
++/****************************************************************************
++**
++** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERVISITOR_P_H
++#define QT3DCORE_BUFFERVISITOR_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++class QEntity;
++
++template
++class Q_AUTOTEST_EXPORT BufferVisitor
++{
++public:
++ explicit BufferVisitor() = default;
++ virtual ~BufferVisitor() = default;
++
++ virtual void visit(uint ndx, ValueType x) {
++ Q_UNUSED(ndx) Q_UNUSED(x)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z, ValueType w) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z) Q_UNUSED(w)
++ }
++
++ bool apply(QAttribute *attribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ if (attribute->vertexBaseType() != VertexBaseType)
++ return false;
++ if (attribute->vertexSize() < dataSize)
++ return false;
++
++ auto data = attribute->buffer()->data();
++ auto vertexBuffer = BufferTypeInfo::castToType(data, attribute->byteOffset());
++
++ if (indexAttribute) {
++ auto indexData = indexAttribute->buffer()->data();
++ switch (indexAttribute->vertexBaseType()) {
++ case Qt3DCore::QAttribute::UnsignedShort: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedInt: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedByte: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ default: Q_UNREACHABLE();
++ }
++ } else {
++ switch (dataSize) {
++ case 1: traverseCoordinates1(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 2: traverseCoordinates2(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 3: traverseCoordinates3(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 4: traverseCoordinates4(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ return true;
++ }
++
++protected:
++ template
++ void traverseCoordinateIndexed(VertexBufferType *vertexBuffer,
++ IndexBufferType *indexBuffer,
++ int vertexByteStride,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ switch (dataSize) {
++ case 1: traverseCoordinates1Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 2: traverseCoordinates2Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 3: traverseCoordinates3Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 4: traverseCoordinates4Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ template
++ void traverseCoordinates1(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates1Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates2(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 2;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1]);
++ coordinates += stride;
++ }
++ }
++
++
++ template
++ void traverseCoordinates2Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 2;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates3(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 3;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1], coordinates[2]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates3Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 3;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1], coordinates[n + 2]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates4(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 4;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1], coordinates[2], coordinates[3]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates4Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 4;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1], coordinates[n + 2], coordinates[n + 3]);
++ }
++ }
++ }
++};
++
++typedef BufferVisitor Buffer3fVisitor;
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++
++#endif // QT3DCORE_BUFFERVISITOR_P_H
+diff --git a/src/core/geometry/geometry.pri b/src/core/geometry/geometry.pri
+index eadf7ca..70bda07 100644 (file)
+--- a/src/core/geometry/geometry.pri
++++ b/src/core/geometry/geometry.pri
+@@ -12,7 +12,9 @@ HEADERS += \
+ $$PWD/qgeometry.h \
+ $$PWD/qgeometryfactory_p.h \
+ $$PWD/qgeometryview_p.h \
+- $$PWD/qgeometryview.h
++ $$PWD/qgeometryview.h \
++ $$PWD/bufferutils_p.h \
++ $$PWD/buffervisitor_p.h
+
+ SOURCES += \
+ $$PWD/qabstractfunctor.cpp \
+diff --git a/src/core/geometry/qgeometry_p.h b/src/core/geometry/qgeometry_p.h
+index 2a05b5b..ed13b3f 100644 (file)
+--- a/src/core/geometry/qgeometry_p.h
++++ b/src/core/geometry/qgeometry_p.h
+@@ -72,7 +72,6 @@ public:
+ void setScene(QScene *scene) override;
+ void update() override;
+ void setExtent(const QVector3D &minExtent, const QVector3D &maxExtent);
+-
+ static QGeometryPrivate *get(QGeometry *q);
+
+ QVector m_attributes;
+diff --git a/src/core/geometry/qgeometryview.cpp b/src/core/geometry/qgeometryview.cpp
+index 65e30d9..258448b 100644 (file)
+--- a/src/core/geometry/qgeometryview.cpp
++++ b/src/core/geometry/qgeometryview.cpp
+@@ -39,11 +39,250 @@
+
+ #include "qgeometryview.h"
+ #include "qgeometryview_p.h"
++#include "qgeometry_p.h"
++#include "buffervisitor_p.h"
++
++#include
++#include
++#include
+
+ QT_BEGIN_NAMESPACE
+
+ using namespace Qt3DCore;
+
++namespace {
++
++class FindExtremePoints : public Buffer3fVisitor
++{
++public:
++ FindExtremePoints()
++ : Buffer3fVisitor()
++ , xMin(0.0f), xMax(0.0f), yMin(0.0f), yMax(0.0f), zMin(0.0f), zMax(0.0f)
++ { }
++
++ float xMin, xMax, yMin, yMax, zMin, zMax;
++ Vector3D xMinPt, xMaxPt, yMinPt, yMaxPt, zMinPt, zMaxPt;
++
++ void visit(uint ndx, float x, float y, float z) override
++ {
++ if (ndx) {
++ if (x < xMin) {
++ xMin = x;
++ xMinPt = Vector3D(x, y, z);
++ }
++ if (x > xMax) {
++ xMax = x;
++ xMaxPt = Vector3D(x, y, z);
++ }
++ if (y < yMin) {
++ yMin = y;
++ yMinPt = Vector3D(x, y, z);
++ }
++ if (y > yMax) {
++ yMax = y;
++ yMaxPt = Vector3D(x, y, z);
++ }
++ if (z < zMin) {
++ zMin = z;
++ zMinPt = Vector3D(x, y, z);
++ }
++ if (z > zMax) {
++ zMax = z;
++ zMaxPt = Vector3D(x, y, z);
++ }
++ } else {
++ xMin = xMax = x;
++ yMin = yMax = y;
++ zMin = zMax = z;
++ xMinPt = xMaxPt = yMinPt = yMaxPt = zMinPt = zMaxPt = Vector3D(x, y, z);
++ }
++ }
++};
++
++class FindMaxDistantPoint : public Buffer3fVisitor
++{
++public:
++ FindMaxDistantPoint()
++ : Buffer3fVisitor()
++ { }
++
++ float maxLengthSquared = 0.0f;
++ bool setReferencePoint = false;
++ bool hasNoPoints = true;
++ Vector3D maxDistPt;
++ Vector3D referencePt;
++
++ void visit(uint ndx, float x, float y, float z) override
++ {
++ Q_UNUSED(ndx)
++ const Vector3D p = Vector3D(x, y, z);
++
++ if (hasNoPoints && setReferencePoint) {
++ maxLengthSquared = 0.0f;
++ referencePt = p;
++ }
++ const float lengthSquared = (p - referencePt).lengthSquared();
++ if ( lengthSquared >= maxLengthSquared ) {
++ maxDistPt = p;
++ maxLengthSquared = lengthSquared;
++ }
++ hasNoPoints = false;
++ }
++};
++
++std::pair calculateLocalBoundingVolume(QGeometryView *node)
++{
++ // The Bounding volume will only be computed if the position Buffer
++ // isDirty
++
++ if (!node->isEnabled())
++ return {};
++
++ if (node->primitiveType() == QGeometryView::Patches)
++ return {};
++
++ QGeometry *geom = node->geometry();
++ QGeometryPrivate *dgeom = QGeometryPrivate::get(geom);
++
++ if (!geom)
++ return {};
++
++ int drawVertexCount = node->vertexCount(); // may be 0, gets changed below if so
++
++ QAttribute *positionAttribute = dgeom->m_boundingVolumePositionAttribute;
++ const QVector attributes = geom->attributes();
++
++ // Use the default position attribute if attribute is null
++ if (!positionAttribute) {
++ for (QAttribute *attr : attributes) {
++ if (attr->name() == QAttribute::defaultPositionAttributeName()) {
++ positionAttribute = attr;
++ break;
++ }
++ }
++ }
++
++ if (!positionAttribute
++ || positionAttribute->attributeType() != QAttribute::VertexAttribute
++ || positionAttribute->vertexBaseType() != QAttribute::Float
++ || positionAttribute->vertexSize() < 3) {
++ qWarning("calculateLocalBoundingVolume: Position attribute not suited for bounding volume computation");
++ return {};
++ }
++
++ Qt3DCore::QBuffer *buf = positionAttribute->buffer();
++ // No point in continuing if the positionAttribute doesn't have a suitable buffer
++ if (!buf) {
++ qWarning("calculateLocalBoundingVolume: Position attribute not referencing a valid buffer");
++ return {};
++ }
++
++ // Check if there is an index attribute.
++ QAttribute *indexAttribute = nullptr;
++ Qt3DCore::QBuffer *indexBuf = nullptr;
++
++ for (const auto attr : attributes) {
++ if (attr->attributeType() == QAttribute::IndexAttribute) {
++ indexBuf = attr->buffer();
++ if (indexBuf) {
++ indexAttribute = attr;
++
++ if (!drawVertexCount)
++ drawVertexCount = static_cast(indexAttribute->count());
++
++ static const QAttribute::VertexBaseType validIndexTypes[] = {
++ QAttribute::UnsignedShort,
++ QAttribute::UnsignedInt,
++ QAttribute::UnsignedByte
++ };
++
++ if (std::find(std::begin(validIndexTypes),
++ std::end(validIndexTypes),
++ indexAttribute->vertexBaseType()) == std::end(validIndexTypes)) {
++ qWarning() << "calculateLocalBoundingVolume: Unsupported index attribute type" << indexAttribute->name() << indexAttribute->vertexBaseType();
++ return {};
++ }
++
++ break;
++ }
++ }
++ }
++
++ if (!indexAttribute && !drawVertexCount)
++ drawVertexCount = static_cast(positionAttribute->count());
++
++ // Buf will be set to not dirty once it's loaded
++ // in a job executed after this one
++ // We need to recompute the bounding volume
++ // If anything in the GeometryRenderer has changed
++ BoundingVolumeCalculator reader;
++ if (reader.apply(positionAttribute, indexAttribute, drawVertexCount,
++ node->primitiveRestartEnabled(), node->restartIndexValue()))
++ return {reader.min(), reader.max()};
++
++ return {};
++}
++
++}
++
++
++bool BoundingVolumeCalculator::apply(QAttribute *positionAttribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++{
++ m_radius = -1.f;
++
++ FindExtremePoints findExtremePoints;
++ if (!findExtremePoints.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex)) {
++ return false;
++ }
++
++ m_min = QVector3D(findExtremePoints.xMin, findExtremePoints.yMin, findExtremePoints.zMin);
++ m_max = QVector3D(findExtremePoints.xMax, findExtremePoints.yMax, findExtremePoints.zMax);
++
++ FindMaxDistantPoint maxDistantPointY;
++ maxDistantPointY.setReferencePoint = true;
++ if (!maxDistantPointY.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex)) {
++ return false;
++ }
++ if (maxDistantPointY.hasNoPoints)
++ return false;
++
++ //const Vector3D x = maxDistantPointY.referencePt;
++ const Vector3D y = maxDistantPointY.maxDistPt;
++
++ FindMaxDistantPoint maxDistantPointZ;
++ maxDistantPointZ.setReferencePoint = false;
++ maxDistantPointZ.referencePt = y;
++ if (!maxDistantPointZ.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex))
++ return false;
++ const Vector3D z = maxDistantPointZ.maxDistPt;
++ const Vector3D center = (y + z) * .5f;
++
++ FindMaxDistantPoint maxDistantPointCenter;
++ maxDistantPointCenter.setReferencePoint = false;
++ maxDistantPointCenter.referencePt = center;
++ if (!maxDistantPointCenter.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex))
++ return false;
++
++ const float radius = (center - maxDistantPointCenter.maxDistPt).length();
++
++ if (center == Vector3D{} || radius < 0.f)
++ return false;
++
++ m_radius = radius;
++ m_center = QVector3D{ center.x(), center.y(), center.z() };
++
++ return true;
++}
++
++
+ QGeometryViewPrivate::QGeometryViewPrivate()
+ : QNodePrivate()
+ , m_instanceCount(1)
+@@ -65,6 +304,11 @@ QGeometryViewPrivate::~QGeometryViewPrivate()
+ {
+ }
+
++QGeometryViewPrivate *QGeometryViewPrivate::get(QGeometryView *q)
++{
++ return q->d_func();
++}
++
+ void QGeometryViewPrivate::update()
+ {
+ if (!m_blockNotifications)
+diff --git a/src/core/geometry/qgeometryview_p.h b/src/core/geometry/qgeometryview_p.h
+index f806c4d..05dea1d 100644 (file)
+--- a/src/core/geometry/qgeometryview_p.h
++++ b/src/core/geometry/qgeometryview_p.h
+@@ -55,6 +55,8 @@
+ #include
+ #include
+ #include
++
++#include
+ #include
+
+ QT_BEGIN_NAMESPACE
+@@ -67,6 +69,8 @@ public:
+ QGeometryViewPrivate();
+ ~QGeometryViewPrivate();
+
++ static QGeometryViewPrivate *get(QGeometryView *q);
++
+ void update() override;
+
+ Q_DECLARE_PUBLIC(QGeometryView)
+@@ -85,6 +89,30 @@ public:
+ bool m_dirty;
+ };
+
++class BoundingVolumeCalculator
++{
++public:
++ BoundingVolumeCalculator() = default;
++
++ const QVector3D min() const { return m_min; }
++ const QVector3D max() const { return m_max; }
++ const QVector3D center() const { return m_center; }
++ float radius() const { return m_radius; }
++ bool isValid() const { return m_radius >= 0.f; }
++
++ bool apply(QAttribute *positionAttribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex);
++
++private:
++ QVector3D m_min;
++ QVector3D m_max;
++ QVector3D m_center;
++ float m_radius = -1.f;
++};
++
+ } // namespace Qt3DCore
+
+ QT_END_NAMESPACE
+diff --git a/src/core/jobs/calcboundingvolumejob.cpp b/src/core/jobs/calcboundingvolumejob.cpp
+new file mode 100644 (file)
+index 0000000..37ee92e
+--- /dev/null
++++ b/src/core/jobs/calcboundingvolumejob.cpp
+@@ -0,0 +1,317 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "calcboundingvolumejob_p.h"
++
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++
++#include
++#if QT_CONFIG(concurrent)
++#include
++#endif
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++namespace {
++
++BoundingVolumeComputeData findBoundingVolumeComputeData(QGeometryView *node)
++{
++ if (!node->isEnabled())
++ return {};
++
++ if (node->primitiveType() == QGeometryView::Patches)
++ return {};
++
++ QGeometry *geom = node->geometry();
++ QGeometryPrivate *dgeom = QGeometryPrivate::get(geom);
++ if (!geom)
++ return {};
++
++ int drawVertexCount = node->vertexCount(); // may be 0, gets changed below if so
++
++ QAttribute *positionAttribute = dgeom->m_boundingVolumePositionAttribute;
++ const QVector attributes = geom->attributes();
++
++ // Use the default position attribute if attribute is null
++ if (!positionAttribute) {
++ for (QAttribute *attr : attributes) {
++ if (attr->name() == QAttribute::defaultPositionAttributeName()) {
++ positionAttribute = attr;
++ break;
++ }
++ }
++ }
++
++ if (!positionAttribute
++ || positionAttribute->attributeType() != QAttribute::VertexAttribute
++ || positionAttribute->vertexBaseType() != QAttribute::Float
++ || positionAttribute->vertexSize() < 3) {
++ qWarning("findBoundingVolumeComputeData: Position attribute not suited for bounding volume computation");
++ return {};
++ }
++
++ Qt3DCore::QBuffer *positionBuffer = positionAttribute->buffer();
++ // No point in continuing if the positionAttribute doesn't have a suitable buffer
++ if (!positionBuffer) {
++ qWarning("findBoundingVolumeComputeData: Position attribute not referencing a valid buffer");
++ return {};
++ }
++
++ // Check if there is an index attribute.
++ QAttribute *indexAttribute = nullptr;
++ Qt3DCore::QBuffer *indexBuffer = nullptr;
++
++ for (const auto attr : attributes) {
++ if (attr->attributeType() == QAttribute::IndexAttribute) {
++ indexBuffer = attr->buffer();
++ if (indexBuffer) {
++ indexAttribute = attr;
++
++ if (!drawVertexCount)
++ drawVertexCount = static_cast(indexAttribute->count());
++
++ static const QAttribute::VertexBaseType validIndexTypes[] = {
++ QAttribute::UnsignedShort,
++ QAttribute::UnsignedInt,
++ QAttribute::UnsignedByte
++ };
++
++ if (std::find(std::begin(validIndexTypes),
++ std::end(validIndexTypes),
++ indexAttribute->vertexBaseType()) == std::end(validIndexTypes)) {
++ qWarning() << "findBoundingVolumeComputeData: Unsupported index attribute type" << indexAttribute->name() << indexAttribute->vertexBaseType();
++ return {};
++ }
++
++ break;
++ }
++ }
++ }
++
++ if (!indexAttribute && !drawVertexCount)
++ drawVertexCount = static_cast(positionAttribute->count());
++
++ return { nullptr, nullptr, positionAttribute, indexAttribute, drawVertexCount };
++}
++
++BoundingVolumeComputeResult calculateLocalBoundingVolume(const BoundingVolumeComputeData &data) {
++ BoundingVolumeCalculator calculator;
++ if (calculator.apply(data.positionAttribute, data.indexAttribute, data.vertexCount,
++ data.provider->view()->primitiveRestartEnabled(),
++ data.provider->view()->restartIndexValue()))
++ return {
++ data.entity, data.provider, data.positionAttribute, data.indexAttribute,
++ calculator.min(), calculator.max(),
++ calculator.center(), calculator.radius()
++ };
++ return {};
++}
++
++bool isTreeEnabled(QEntity *entity) {
++ if (!entity->isEnabled())
++ return false;
++
++ QEntity *parent = entity->parentEntity();
++ while (parent) {
++ if (!parent->isEnabled())
++ return false;
++ parent = parent->parentEntity();
++ }
++
++ return true;
++}
++
++struct UpdateBoundFunctor
++{
++ // This define is required to work with QtConcurrent
++ typedef QVector result_type;
++ result_type operator ()(const BoundingVolumeComputeData &data)
++ {
++ return { calculateLocalBoundingVolume(data) };
++ }
++};
++
++struct ReduceUpdateBoundFunctor
++{
++ void operator ()(QVector &result, const QVector &values)
++ {
++ result += values;
++ }
++};
++
++} // anonymous
++
++//class CalculateBoundingVolumeJobPrivate : public Qt3DCore::QAspectJobPrivate
++//{
++//public:
++// CalculateBoundingVolumeJobPrivate() { }
++// ~CalculateBoundingVolumeJobPrivate() override { }
++
++// void postFrame(Qt3DCore::QAspectManager *manager) override
++// {
++// Q_UNUSED(manager)
++//// for (Geometry *backend : qAsConst(m_updatedGeometries)) {
++//// Qt3DCore::QGeometry *node = qobject_cast(manager->lookupNode(backend->peerId()));
++//// if (!node)
++//// continue;
++//// Qt3DCore::QGeometryPrivate *dNode = static_cast(Qt3DCore::QNodePrivate::get(node));
++//// dNode->setExtent(backend->min(), backend->max());
++//// }
++// }
++
++//};
++
++CalculateBoundingVolumeJob::CalculateBoundingVolumeJob()
++ : Qt3DCore::QAspectJob()
++ , m_root(nullptr)
++{
++ SET_JOB_RUN_STAT_TYPE(this, JobTypes::CalcBoundingVolume, 0)
++}
++
++void CalculateBoundingVolumeJob::run()
++{
++ m_results.clear();
++
++ QHash dirtyEntities;
++ QNodeVisitor visitor;
++ visitor.traverse(m_root, [](QNode *) {}, [&dirtyEntities](QEntity *entity) {
++ if (!isTreeEnabled(entity))
++ return;
++
++ const auto bvProviders = entity->componentsOfType();
++ if (bvProviders.isEmpty())
++ return;
++
++ // we go through the list until be find a dirty provider,
++ // or THE primary provider
++ bool foundBV = false;
++ for (auto bv: bvProviders) {
++ if (!bv->view())
++ continue;
++ auto dbv = QBoundingVolumePrivate::get(bv);
++ if (foundBV && !dbv->m_primaryProvider)
++ continue;
++
++ auto bvdata = findBoundingVolumeComputeData(bv->view());
++ if (!bvdata.valid())
++ continue;
++ bvdata.entity = entity;
++ bvdata.provider = bv;
++
++ bool dirty = QEntityPrivate::get(entity)->m_dirty;
++ dirty |= QGeometryViewPrivate::get(bv->view())->m_dirty;
++ dirty |= QGeometryPrivate::get(bv->view()->geometry())->m_dirty;
++ dirty |= QAttributePrivate::get(bvdata.positionAttribute)->m_dirty;
++ dirty |= QBufferPrivate::get(bvdata.positionAttribute->buffer())->m_dirty;
++ if (bvdata.indexAttribute) {
++ dirty |= QAttributePrivate::get(bvdata.indexAttribute)->m_dirty;
++ dirty |= QBufferPrivate::get(bvdata.indexAttribute->buffer())->m_dirty;
++ }
++
++ if (dbv->m_primaryProvider) {
++ if (dirty)
++ dirtyEntities[entity] = bvdata;
++ break;
++ } else if (dirty) {
++ dirtyEntities[entity] = bvdata;
++ foundBV = true;
++ }
++ }
++ });
++
++#if QT_CONFIG(concurrent)
++ if (dirtyEntities.size() > 1) {
++ UpdateBoundFunctor functor;
++ ReduceUpdateBoundFunctor reduceFunctor;
++ m_results = QtConcurrent::blockingMappedReduced(dirtyEntities, functor, reduceFunctor);
++ } else
++#endif
++ {
++ for (auto it = dirtyEntities.begin(); it != dirtyEntities.end(); ++it) {
++ auto res = calculateLocalBoundingVolume(it.value());
++ if (res.valid())
++ m_results.push_back(res); // How do we push it to the backends????
++ }
++ }
++
++ for (auto result: qAsConst(m_results)) {
++ // set the results
++ QBoundingVolumePrivate::get(result.provider)->setImplicitBounds(result.m_min, result.m_max, result.m_center, result.m_radius);
++ }
++}
++
++void CalculateBoundingVolumeJob::postFrame(QAspectEngine *aspectEngine)
++{
++ Q_UNUSED(aspectEngine)
++
++ for (auto result: qAsConst(m_results)) {
++ // reset dirty flags
++ QEntityPrivate::get(result.entity)->m_dirty = false;
++ QGeometryViewPrivate::get(result.provider->view())->m_dirty = false;
++ QGeometryPrivate::get(result.provider->view()->geometry())->m_dirty = false;
++ QAttributePrivate::get(result.positionAttribute)->m_dirty = false;
++ QBufferPrivate::get(result.positionAttribute->buffer())->m_dirty = false;
++ if (result.indexAttribute) {
++ QAttributePrivate::get(result.indexAttribute)->m_dirty = false;
++ QBufferPrivate::get(result.indexAttribute->buffer())->m_dirty = false;
++ }
++ }
++
++ m_results.clear();
++}
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
+diff --git a/src/core/jobs/calcboundingvolumejob_p.h b/src/core/jobs/calcboundingvolumejob_p.h
+new file mode 100644 (file)
+index 0000000..498fe76
+--- /dev/null
++++ b/src/core/jobs/calcboundingvolumejob_p.h
+@@ -0,0 +1,113 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
++#define QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists purely as an
++// implementation detail. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++class CalculateBoundingVolumeJobPrivate;
++class QEntity;
++class QAttribute;
++class QBoundingVolume;
++
++struct BoundingVolumeComputeData {
++ QEntity *entity = nullptr;
++ QBoundingVolume *provider = nullptr;
++ QAttribute *positionAttribute = nullptr;
++ QAttribute *indexAttribute = nullptr;
++ int vertexCount = 0;
++
++ bool valid() const { return positionAttribute != nullptr; }
++};
++
++struct BoundingVolumeComputeResult {
++ QEntity *entity = nullptr;
++ QBoundingVolume *provider = nullptr;
++ QAttribute *positionAttribute = nullptr;
++ QAttribute *indexAttribute = nullptr;
++ QVector3D m_min;
++ QVector3D m_max;
++ QVector3D m_center;
++ float m_radius = -1.f;
++
++ bool valid() const { return m_radius >= 0.f; }
++};
++
++class Q_3DCORE_PRIVATE_EXPORT CalculateBoundingVolumeJob : public Qt3DCore::QAspectJob
++{
++public:
++ explicit CalculateBoundingVolumeJob();
++
++ void setRoot(QEntity *root) { m_root = root; }
++ void run() override;
++ void postFrame(QAspectEngine *aspectEngine) override;
++
++private:
++ Q_DECLARE_PRIVATE(CalculateBoundingVolumeJob)
++ QEntity *m_root;
++ QVector m_results;
++};
++
++typedef QSharedPointer CalculateBoundingVolumeJobPtr;
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++#endif // QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
+diff --git a/src/core/jobs/job_common_p.h b/src/core/jobs/job_common_p.h
+new file mode 100644 (file)
+index 0000000..6cbf178
+--- /dev/null
++++ b/src/core/jobs/job_common_p.h
+@@ -0,0 +1,73 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_JOB_COMMON_P_H
++#define QT3DCORE_JOB_COMMON_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists purely as an
++// implementation detail. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++namespace JobTypes {
++
++ enum JobType {
++ LoadBuffer = 4096,
++ CalcBoundingVolume,
++ };
++
++} // JobTypes
++
++} // Qt3DCore
++
++QT_END_NAMESPACE
++
++#endif // QT3DCORE_JOB_COMMON_P_H
+diff --git a/src/core/jobs/jobs.pri b/src/core/jobs/jobs.pri
+index 5d262f5..a045339 100644 (file)
+--- a/src/core/jobs/jobs.pri
++++ b/src/core/jobs/jobs.pri
+@@ -4,7 +4,8 @@ SOURCES += \
+ $$PWD/qaspectjobmanager.cpp \
+ $$PWD/qabstractaspectjobmanager.cpp \
+ $$PWD/qthreadpooler.cpp \
+- $$PWD/task.cpp
++ $$PWD/task.cpp \
++ $$PWD/calcboundingvolumejob.cpp
+
+ HEADERS += \
+ $$PWD/qaspectjob.h \
+@@ -13,7 +14,9 @@ HEADERS += \
+ $$PWD/qaspectjobmanager_p.h \
+ $$PWD/qabstractaspectjobmanager_p.h \
+ $$PWD/task_p.h \
+- $$PWD/qthreadpooler_p.h
++ $$PWD/qthreadpooler_p.h \
++ $$PWD/calcboundingvolumejob_p.h \
++ $$PWD/job_common_p.h
+
+ INCLUDEPATH += $$PWD
diff --git a/desktop/toolkit/qt6/qt6-3d/pspec.xml b/desktop/toolkit/qt6/qt6-3d/pspec.xml
new file mode 100755
index 0000000000..1f670258e9
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-3d/pspec.xml
@@ -0,0 +1,71 @@
+
+
+
+
+ qt6-3d
+ http://qt-project.org/
+
+ Stefan Gronewold
+ groni@pisilinux.org
+
+ custom
+ FDL
+ GPL3
+ LGPL3
+ desktop
+ C++ and QML APIs for easy inclusion of 3D graphics
+ C++ and QML APIs for easy inclusion of 3D graphics
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qt3d-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ vulkan-headers
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-shadertools-devel
+
+
+
+ qt6-3d
+ C++ and QML APIs for easy inclusion of 3D graphics
+
+ qt6-base
+ qt6-declarative
+ qt6-shadertools
+ libgcc
+ assimp
+
+
+ /usr/bin
+ /usr/lib/qt6
+ /usr/lib
+ /usr/share/doc
+ /usr/share/qt6/modules/*
+
+
+
+
+ qt6-3d-devel
+ Development files for qt6-3d
+
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-3d
+
+
+ /usr/include/qt6
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-5compat/actions.py b/desktop/toolkit/qt6/qt6-5compat/actions.py
new file mode 100755
index 0000000000..fc281f18c6
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-5compat/actions.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import cmaketools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ # for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ # pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-5compat/pspec.xml b/desktop/toolkit/qt6/qt6-5compat/pspec.xml
new file mode 100755
index 0000000000..a984db726c
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-5compat/pspec.xml
@@ -0,0 +1,68 @@
+
+
+
+
+ qt6-5compat
+ http://qt.digia.com/
+
+ Pisi Linux Admins
+ admin@pisilinux.org
+
+ Module that contains unsupported Qt 5 APIs
+ Module that contains unsupported Qt 5 APIs
+ custom
+ FDL
+ GPL3
+ LGPL3
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qt5compat-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ icu4c-devel
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-shadertools-devel
+
+
+
+
+ qt6-5compat
+
+ icu4c
+ libgcc
+ qt6-base
+ qt6-declarative
+ qt6-shadertools
+
+
+ /usr/lib
+ /usr/lib/qt6
+ /usr/share/doc
+ /usr/share/licenses
+ /usr/share/qt6/modules/Core5Compat.json
+
+
+
+
+ qt6-5compat-devel
+
+ /usr/lib/pkgconfig
+ /usr/lib/cmake
+ /usr/include/qt6
+
+
+ qt6-5compat
+ qt6-base-devel
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-5compat/translations.xml b/desktop/toolkit/qt6/qt6-5compat/translations.xml
new file mode 100755
index 0000000000..ee4979c5e0
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-5compat/translations.xml
@@ -0,0 +1,13 @@
+
+
+
+ qt5-location
+ Konum, uydu ve alan izleme sınıflarına erişim sağlar
+ Konum, uydu ve alan izleme sınıflarına erişim sağlar
+
+
+
+ qt5-location-devel
+ qt5-location için geliştirme dosyaları
+
+
diff --git a/desktop/toolkit/qt6/qt6-base/actions.py b/desktop/toolkit/qt6/qt6-base/actions.py
new file mode 100755
index 0000000000..2cb4d805cc
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/actions.py
@@ -0,0 +1,120 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import cmaketools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+import os
+
+WorkDir = "qtbase-everywhere-src-%s" % get.srcVERSION().replace('_','-').replace('pre1', 'tp')
+
+qtbase = qt6.prefix
+absoluteWorkDir = "%s/%s" % (get.workDIR(), WorkDir)
+
+#Temporary bindir to avoid qt5 conflicts
+bindirQt6="/usr/lib/qt6/bin"
+
+def setup():
+ #shelltools.system("patch -Rp1 < qt6-base-nouveau-freeze.patch")
+
+ checkdeletepath="%s/qtbase/src/3rdparty" % absoluteWorkDir
+ for dir in ('libjpeg', 'freetype', 'libpng', 'zlib', "xcb", "sqlite"):
+ if os.path.exists(checkdeletepath+dir):
+ shelltools.unlinkDir(checkdeletepath+dir)
+
+ filteredCFLAGS = get.CFLAGS().replace("-g3", "-g")
+ filteredCXXFLAGS = get.CXXFLAGS().replace("-g3", "-g")
+
+ vars = {"PISILINUX_CC" : get.CC() + (" -m32" if get.buildTYPE() == "emul32" else ""),
+ "PISILINUX_CXX": get.CXX() + (" -m32" if get.buildTYPE() == "emul32" else ""),
+ "PISILINUX_CFLAGS": filteredCFLAGS + (" -m32" if get.buildTYPE() == "emul32" else ""),
+ "PISILINUX_LDFLAGS": get.LDFLAGS() + (" -m32" if get.buildTYPE() == "emul32" else "")}
+
+ for k, v in vars.items():
+ pisitools.dosed("mkspecs/common/g++-base.conf", k, v)
+ pisitools.dosed("mkspecs/common/g++-unix.conf", k, v)
+
+ shelltools.export("CFLAGS", filteredCFLAGS)
+ shelltools.export("CXXFLAGS", filteredCXXFLAGS)
+ #check that dosed commands without releated patches
+ pisitools.dosed("mkspecs/common/gcc-base-unix.conf", "\-Wl,\-rpath,")
+ pisitools.dosed("mkspecs/common/gcc-base.conf", "\-O2", filteredCFLAGS)
+ pisitools.dosed("mkspecs/common/gcc-base.conf", "^(QMAKE_LFLAGS\s+\+=)", r"\1 %s" % get.LDFLAGS())
+
+ if not get.buildTYPE() == "emul32":
+ #-no-pch makes build ccache-friendly
+ options = " -DCMAKE_INSTALL_PREFIX=%s \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DINSTALL_BINDIR=%s \
+ -DINSTALL_INCLUDEDIR=%s \
+ -DINSTALL_ARCHDATADIR=%s \
+ -DINSTALL_DOCDIR=%s \
+ -DINSTALL_DATADIR=%s \
+ -DINSTALL_MKSPECSDIR=%s \
+ -DINSTALL_EXAMPLESDIR=%s \
+ -DQT_FEATURE_libproxy=ON \
+ -DQT_FEATURE_vulkan=ON \
+ -DQT_FEATURE_system_freetype=ON \
+ -DQT_FEATURE_system_harfbuzz=ON \
+ -DQT_FEATURE_system_sqlite=ON \
+ -DQT_FEATURE_dbus_linked=ON \
+ -DQT_FEATURE_journald=ON \
+ -DQT_FEATURE_system_zlib=ON \
+ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
+ -DCMAKE_MESSAGE_LOG_LEVEL=STATUS \
+ -DQT_FEATURE_openssl_linked=ON" % (qt6.prefix, bindirQt6, qt6.headerdir, qt6.archdatadir, qt6.docdir, qt6.datadir, qt6.mkspecsdir, qt6.examplesdir)
+ #-G Ninja \
+ #-DQT_FEATURE_directfb=ON \
+ else:
+ pisitools.dosed("mkspecs/linux-g++-64/qmake.conf", "-m64", "-m32")
+ shelltools.export("LDFLAGS", "-m32 %s" % get.LDFLAGS())
+ options = "-no-pch -v -confirm-license -opensource -no-use-gold-linker\
+ -platform linux-g++-32 \
+ -xplatform linux-g++-32 \
+ -prefix /usr/lib32 \
+ -bindir /usr/lib32/qt6/bin \
+ -docdir /usr/share/doc/qt \
+ -headerdir /usr/lib32/qt6/include/qt6 \
+ -datadir /usr/share/qt6 \
+ -sysconfdir /etc/xdg \
+ -examplesdir /usr/share/doc/qt/examples \
+ -system-sqlite \
+ -openssl-linked \
+ -nomake examples \
+ -no-xcb \
+ -no-rpath \
+ -optimized-qmake \
+ -dbus-linked \
+ -system-harfbuzz \
+ -libdir /usr/lib32/ \
+ -archdatadir /usr/lib32/qt6/"
+
+ qt6.configure(options)
+
+def build():
+ shelltools.export("LD_LIBRARY_PATH", "%s/lib:%s" % (get.curDIR(), get.ENV("LD_LIBRARY_PATH")))
+ qt6.make()
+
+def install():
+ if get.buildTYPE() == "emul32":
+ qt6.install("INSTALL_ROOT=%s32" % get.installDIR())
+ shelltools.move("%s32/usr/lib32" % get.installDIR(), "%s/usr" % get.installDIR())
+ return
+
+ pisitools.dodir(qt6.libdir)
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ mkspecPath = "%s/mkspecs" % qt6.archdatadir
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-firebird.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-firebird.patch
new file mode 100644
index 0000000000..c794304440
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-firebird.patch
@@ -0,0 +1,32 @@
+diff --git a/cmake/FindInterbase.cmake b/cmake/FindInterbase.cmake
+index 22f866d8..4ef16e75 100644
+--- a/cmake/FindInterbase.cmake
++++ b/cmake/FindInterbase.cmake
+@@ -19,12 +19,12 @@
+ # The Interbase client library
+
+ find_path(Interbase_INCLUDE_DIR
+- NAMES ibase.h
++ NAMES firebird/ibase.h
+ HINTS ${Interbase_INCLUDEDIR}
+ )
+
+ find_library(Interbase_LIBRARY
+- NAMES firebase_ms fbclient gds
++ NAMES firebase_ms fbclient gds fbclient
+ HINTS ${Interbase_LIBDIR}
+ )
+
+diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
+index 9109c2b4..7477d5ee 100644
+--- a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
++++ b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
+@@ -52,7 +52,7 @@
+ //
+
+ #include
+-#include
++#include
+
+ #ifdef QT_PLUGIN
+ #define Q_EXPORT_SQLDRIVER_IBASE
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-gcc11.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-gcc11.patch
new file mode 100644
index 0000000000..dfbd08ff72
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-gcc11.patch
@@ -0,0 +1,36 @@
+diff --git a/examples/corelib/tools/contiguouscache/randomlistmodel.h b/examples/corelib/tools/contiguouscache/randomlistmodel.h
+index 1fabb0d9..393ebaa3 100644
+--- a/examples/corelib/tools/contiguouscache/randomlistmodel.h
++++ b/examples/corelib/tools/contiguouscache/randomlistmodel.h
+@@ -50,6 +50,7 @@
+ #ifndef RANDOMLISTMODEL_H
+ #define RANDOMLISTMODEL_H
+
++#include
+ #include
+ #include
+
+diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h
+index a7606253..60747cf0 100644
+--- a/src/corelib/text/qanystringview.h
++++ b/src/corelib/text/qanystringview.h
+@@ -39,6 +39,7 @@
+ #ifndef QANYSTRINGVIEW_H
+ #define QANYSTRINGVIEW_H
+
++#include
+ #include
+ #include
+
+diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
+index 9f646aaa..a5af793c 100644
+--- a/src/corelib/text/qbytearray.h
++++ b/src/corelib/text/qbytearray.h
+@@ -41,6 +41,7 @@
+ #ifndef QBYTEARRAY_H
+ #define QBYTEARRAY_H
+
++#include
+ #include
+ #include
+ #include
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-libglvnd.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-libglvnd.patch
new file mode 100644
index 0000000000..c5aa7e5ddf
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-libglvnd.patch
@@ -0,0 +1,16 @@
+diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
+index 0bf250ea..2d1bb645 100644
+--- a/src/gui/configure.cmake
++++ b/src/gui/configure.cmake
+@@ -174,9 +174,9 @@ qt_config_compile_test(egl_x11
+ int main(void)
+ {
+ /* BEGIN TEST: */
+-Display *dpy = EGL_DEFAULT_DISPLAY;
++Display *dpy = reinterpret_cast(EGL_DEFAULT_DISPLAY);
+ EGLNativeDisplayType egldpy = XOpenDisplay(\"\");
+-dpy = egldpy;
++dpy = reinterpret_cast(egldpy);
+ EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ XDestroyWindow(dpy, w);
+ XCloseDisplay(dpy);
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-moc-macros.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-moc-macros.patch
new file mode 100644
index 0000000000..8f5f4d61b8
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-moc-macros.patch
@@ -0,0 +1,16 @@
+diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
+index 1cb383c9..6bfdee55 100644
+--- a/src/tools/moc/main.cpp
++++ b/src/tools/moc/main.cpp
+@@ -230,6 +230,11 @@ int runMoc(int argc, char **argv)
+ Moc moc;
+ pp.macros["Q_MOC_RUN"];
+ pp.macros["__cplusplus"];
++ pp.macros["_SYS_SYSMACROS_H_OUTER"];
++ Macro macro;
++ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
++ macro.symbols.removeLast(); // remove the EOF symbol
++ pp.macros.insert("__WORDSIZE", macro);
+
+ // Don't stumble over GCC extensions
+ Macro dummyVariadicFunctionMacro;
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-mysql.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-mysql.patch
new file mode 100644
index 0000000000..c190ca67e8
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-mysql.patch
@@ -0,0 +1,12 @@
+diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
+--- qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than 2017-07-14 13:43:50.831203768 +0200
++++ qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-07-14 13:44:24.364948006 +0200
+@@ -58,6 +58,7 @@
+ #endif
+
+ #include
++#include
+
+ #ifdef QT_PLUGIN
+ #define Q_EXPORT_SQLDRIVER_MYSQL
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-tell-truth-about-private-api.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-tell-truth-about-private-api.patch
new file mode 100644
index 0000000000..33e48ad993
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-tell-truth-about-private-api.patch
@@ -0,0 +1,16 @@
+diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
+index 3cacc8df..469e6f50 100644
+--- a/mkspecs/features/qt_module.prf
++++ b/mkspecs/features/qt_module.prf
+@@ -218,9 +218,9 @@ android: CONFIG += qt_android_deps no_linker_version_script
+ QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
+
+ internal_module {
+- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };"
++ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API { *; };"
+ } else {
+- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
++ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API {" \
+ " qt_private_api_tag*;"
+
+ private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES
diff --git a/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-version-check.patch b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-version-check.patch
new file mode 100644
index 0000000000..d9c62b87ac
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/fedora/qtbase-version-check.patch
@@ -0,0 +1,13 @@
+diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
+index 6e83b78f..6a18cc19 100644
+--- a/src/corelib/global/qglobal.h
++++ b/src/corelib/global/qglobal.h
+@@ -59,7 +59,7 @@
+ /*
+ can be used like #if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
+ */
+-#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
++#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch))
+
+ #ifdef QT_BOOTSTRAPPED
+ #include
diff --git a/desktop/toolkit/qt6/qt6-base/files/mkspecs.patch b/desktop/toolkit/qt6/qt6-base/files/mkspecs.patch
new file mode 100755
index 0000000000..336946155e
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/mkspecs.patch
@@ -0,0 +1,47 @@
+diff -Nuar a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf
+--- a/mkspecs/common/g++-base.conf 2021-11-15 00:00:01.000000000 +0200
++++ b/mkspecs/common/g++-base.conf 2021-11-15 22:49:20.969099951 +0200
+@@ -10,15 +10,17 @@
+
+ QMAKE_COMPILER = gcc
+
+-QMAKE_CC = $${CROSS_COMPILE}gcc
++QMAKE_CC = PISILINUX_CC
+
+-QMAKE_LINK_C = $$QMAKE_CC
+-QMAKE_LINK_C_SHLIB = $$QMAKE_CC
++QMAKE_LINK_C = PISILINUX_CC
++QMAKE_LINK_C_SHLIB = PISILINUX_CC
+
+-QMAKE_CXX = $${CROSS_COMPILE}g++
++QMAKE_CXX = PISILINUX_CXX
+
+-QMAKE_LINK = $$QMAKE_CXX
+-QMAKE_LINK_SHLIB = $$QMAKE_CXX
++QMAKE_LINK = PISILINUX_CXX
++QMAKE_LINK_SHLIB = PISILINUX_CXX
++
++QMAKE_LFLAGS_RELEASE += PISILINUX_LDFLAGS
+
+ QMAKE_PCH_OUTPUT_EXT = .gch
+
+diff -Nuar a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
+--- a/mkspecs/common/g++-unix.conf 2021-11-15 00:00:01.000000000 +0200
++++ b/mkspecs/common/g++-unix.conf 2021-11-15 22:51:51.058450056 +0200
+@@ -10,5 +10,5 @@
+
+ include(g++-base.conf)
+
+-QMAKE_LFLAGS_RELEASE += -Wl,-O1
++QMAKE_LFLAGS_RELEASE += PISILINUX_LDFLAGS
+ QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+diff -Nuar a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
+--- a/mkspecs/common/linux.conf 2021-11-15 00:00:01.000000000 +0200
++++ b/mkspecs/common/linux.conf 2021-11-15 22:52:35.802019704 +0200
+@@ -48,5 +48,5 @@
+ QMAKE_NM = nm -P
+ QMAKE_RANLIB =
+
+-QMAKE_STRIP = strip
++QMAKE_STRIP =
+ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
diff --git a/desktop/toolkit/qt6/qt6-base/files/qt6-base-nostrip.patch b/desktop/toolkit/qt6/qt6-base/files/qt6-base-nostrip.patch
new file mode 100644
index 0000000000..17d24b4b65
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/files/qt6-base-nostrip.patch
@@ -0,0 +1,13 @@
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index 99d77156fd..fc840fe9f6 100644
+--- a/mkspecs/common/gcc-base.conf
++++ b/mkspecs/common/gcc-base.conf
+@@ -31,6 +31,8 @@
+ # you can use the manual test in tests/manual/mkspecs.
+ #
+
++CONFIG += nostrip
++
+ QMAKE_CFLAGS_OPTIMIZE = -O2
+ QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
+ QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
diff --git a/desktop/toolkit/qt6/qt6-base/pspec.xml b/desktop/toolkit/qt6/qt6-base/pspec.xml
new file mode 100755
index 0000000000..73c41a816f
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/pspec.xml
@@ -0,0 +1,302 @@
+
+
+
+
+ qt6-base
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ Cross platform application and UI framework
+ Cross platform application and UI development framework
+ 'GPL3' 'LGPL3' 'FDL' 'custom'
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtbase-everywhere-src-6.4.0.tar.xz
+
+
+
+
+ ninja
+ cmake
+ zstd-devel
+ at-spi2-core-devel
+ cups-devel
+ dbus-devel
+ zlib-devel
+ glib2-devel
+ libpcre2-devel
+ desktop-file-utils
+ fontconfig-devel
+ gperf
+ gtk3-devel
+ harfbuzz-devel
+ icon-theme-hicolor
+ leveldb-devel
+ firebird-superserver
+ libjpeg-turbo-devel
+ mariadb-lib
+ libxcb-devel
+ libXcomposite-devel
+ libxkbcommon-devel
+ libxslt-devel
+ mesa-devel
+ libmtdev-devel
+ nss-devel
+ pciutils-devel
+ postgresql-server
+ python-devel
+ DirectFB-devel
+ libinput-devel
+ sqlite-devel
+ xcb-proto
+ xcb-util-devel
+ xcb-util-image-devel
+ xcb-util-keysyms-devel
+ xcb-util-wm-devel
+ tiff-devel
+ libdrm-devel
+ libpng-devel
+ eudev-devel
+ libSM-devel
+ libICE-devel
+ libX11-devel
+ libXext-devel
+ firebird-devel
+ unixODBC-devel
+ libXrandr-devel
+ libXrender-devel
+ libXi-devel
+ xcb-util-renderutil-devel
+ openssl-devel
+ freetype-devel
+ pulseaudio-libs-devel
+ alsa-lib-devel
+ libproxy-devel
+ gst-plugins-base-devel
+ wayland-devel
+ wayland-protocols-devel
+ libXcursor-devel
+ tslib-devel
+ shared-mime-info
+ md4c-devel
+ libglvnd-devel
+ vulkan-headers
+ postgresql-pl
+ mit-kerberos-devel
+ double-conversion-devel
+ icu4c-devel
+
+
+
+ mkspecs.patch
+ qt6-base-nostrip.patch
+
+
+
+
+
+
+ fedora/qtbase-libglvnd.patch
+ fedora/qtbase-gcc11.patch
+
+
+
+
+ qt6-base
+
+ zstd
+ gtk3
+ pango
+ libpcre2
+ libgcc
+ cups
+ dbus
+ tslib
+ mesa
+ zlib
+ brotli
+ glib2
+ icu4c
+ libSM
+ firebird-client
+ libproxy
+ libXi
+ libICE
+ libX11
+ libdrm
+ libpng
+ libxcb
+ eudev
+ DirectFB
+ openssl
+ freetype
+ harfbuzz
+ libinput
+ libmtdev
+ fontconfig
+ gdk-pixbuf
+ libXrender
+ xcb-util-wm
+ libxkbcommon
+ libjpeg-turbo
+ xcb-util-image
+ xcb-util-keysyms
+ double-conversion
+ xcb-util-renderutil
+ md4c
+ mit-kerberos
+ libglvnd
+
+
+ /usr/lib
+ /usr/lib/qt6/imports
+ /usr/lib/qt6/qml
+ /usr/lib/qt6/plugins
+ /usr/share/qt6/translations
+ /usr/lib/qt6/bin
+ /usr/bin
+ /usr/share/doc
+ /usr/lib/qt6/mkspecs
+ /usr/share/qt6/modules
+
+
+
+
+ qt6-base-devel
+ Development files for Qt 5
+ Development files for Qt 5
+
+ /usr/include
+ /usr/lib/pkgconfig
+ /usr/lib/cmake
+ /usr/lib/*.prl
+
+
+ qt6-base
+ libglvnd-devel
+ vulkan-headers
+ libxkbcommon-devel
+
+
+
+
+
+ qt6-sql-mysql
+
+ qt6-base
+ libgcc
+ mariadb-lib
+
+
+ /usr/lib/qt6/plugins/sqldrivers/libqsqlmysql.so
+
+
+
+
+ qt6-sql-postgresql
+
+ qt6-base
+ libgcc
+ postgresql-lib
+
+
+ /usr/lib/qt6/plugins/sqldrivers/libqsqlpsql.so
+
+
+
+
+ qt6-sql-sqlite
+
+ qt6-base
+ libgcc
+ sqlite
+
+
+ /usr/lib/qt6/plugins/sqldrivers/libqsqlite.so
+
+
+
+
+ qt6-sql-odbc
+
+ qt6-base
+ libgcc
+ unixODBC
+
+
+ /usr/lib/qt6/plugins/sqldrivers/libqsqlodbc.so
+
+
+
+
+
+
+
+ 2022-10-03
+ 6.4.0
+ First release.
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-base/translations.xml b/desktop/toolkit/qt6/qt6-base/translations.xml
new file mode 100755
index 0000000000..42b119d710
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-base/translations.xml
@@ -0,0 +1,45 @@
+
+
+
+ qt5-base
+ Qt5 araç takımı, sürüm 5
+ Qt bir çok platformda çalışabilen ve grafiksel kullanıcı arayüzü (GUI) oluşturmaya yarayan bir araç takımıdır.
+ Qt est une boîte à outils graphique multi-plateforme.
+ Qt es un toolkit para GUI multiplataforma.
+
+
+
+ qt5-base-devel
+ Qt5 için geliştirme dosyaları
+
+
+
+ qt5-docs
+ Qt5 için geliştirme belgeleri ve Qt Assistant aracı
+
+
+
+ qt5-sql-ibase
+ Qt5'in SQL sınıfları için IBase sürücüsü
+
+
+
+ qt5-sql-mysql
+ Qt5'in SQL sınıfları için MySQL sürücüsü
+
+
+
+ qt5-sql-odbc
+ Qt5'in SQL sınıfları için ODBC sürücüsü
+
+
+
+ qt5-sql-postgresql
+ Qt5'in SQL sınıfları için PostgreSQL sürücüsü
+
+
+
+ qt5-sql-sqlite
+ Qt5'in SQL sınıfları için SQLite sürücüsü
+
+
\ No newline at end of file
diff --git a/desktop/toolkit/qt6/qt6-charts/actions.py b/desktop/toolkit/qt6/qt6-charts/actions.py
new file mode 100755
index 0000000000..b486d40837
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-charts/actions.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import qt6
+from pisi.actionsapi import pisitools
+
+
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-charts/pspec.xml b/desktop/toolkit/qt6/qt6-charts/pspec.xml
new file mode 100755
index 0000000000..b5ff00d282
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-charts/pspec.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ qt6-charts
+ http://qt-project.org/
+
+ Stefan Gronewold
+ groni@pisilinux.org
+
+ GPL3
+ Provides a set of easy to use chart components
+ Provides a set of easy to use chart components
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtcharts-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+
+ qt6-charts
+ Provides a set of easy to use chart components
+
+ qt6-base
+ qt6-declarative
+ libgcc
+
+
+ /usr/lib/qt6
+ /usr/lib
+ /usr/share/doc
+ /usr/share/qt6/modules
+
+
+
+
+ qt6-charts-devel
+ Development files for qt6-charts
+
+ qt6-charts
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+ /usr/include/qt6
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First Release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-connectivity/actions.py b/desktop/toolkit/qt6/qt6-connectivity/actions.py
new file mode 100755
index 0000000000..0fa7d330cb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-connectivity/actions.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+ # qt6.make("docs")
+
+def install():
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-connectivity/pspec.xml b/desktop/toolkit/qt6/qt6-connectivity/pspec.xml
new file mode 100755
index 0000000000..1c4ea5b562
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-connectivity/pspec.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ qt6-connectivity
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ Provides access to Bluetooth hardware
+ Provides access to Bluetooth hardware
+ LGPLv2.1-linking-exception
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtconnectivity-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ pcsc-lite-devel
+ bluez-libs-devel
+ qt6-sql-sqlite
+ qt6-base-devel
+
+ qt6-declarative-devel
+
+
+
+
+ qt6-connectivity
+
+ pcsc-lite
+ bluez-libs
+ qt6-base
+ qt6-declarative
+
+
+ /usr/bin
+ /usr/lib
+ /usr/share/doc/qt6-connectivity
+ /usr/lib/qt6
+ /usr/lib/qt6/bin/
+ /usr/share/qt6/modules
+
+
+
+
+ qt6-connectivity-devel
+
+ /usr/lib/pkgconfig
+ /usr/include/qt6
+
+
+ qt6-connectivity
+ qt6-base-devel
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-connectivity/translations.xml b/desktop/toolkit/qt6/qt6-connectivity/translations.xml
new file mode 100755
index 0000000000..a0e006bb92
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-connectivity/translations.xml
@@ -0,0 +1,13 @@
+
+
+
+ qt5-connectivity
+ Bluetooth donanımlarına bağlantı sağlar
+ Bluetooth donanımlarına bağlantı sağlar
+
+
+
+ qt5-connectivity-devel
+ qt5-connectivity için geliştirme dosyaları
+
+
diff --git a/desktop/toolkit/qt6/qt6-datavis3d/actions.py b/desktop/toolkit/qt6/qt6-datavis3d/actions.py
new file mode 100755
index 0000000000..b5a1b897c2
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-datavis3d/actions.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import qt6
+from pisi.actionsapi import pisitools
+
+
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+
+ pisitools.dodoc("LICENSES/*")
+
+
diff --git a/desktop/toolkit/qt6/qt6-datavis3d/pspec.xml b/desktop/toolkit/qt6/qt6-datavis3d/pspec.xml
new file mode 100755
index 0000000000..153e5cab04
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-datavis3d/pspec.xml
@@ -0,0 +1,63 @@
+
+
+
+
+ qt6-datavis3d
+ http://qt-project.org/
+
+ Stefan Gronewold
+ groni@pisilinux.org
+
+ GPL3
+ desktop
+ Provides a set of easy to use chart components
+ Qt Data Visualization module
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtdatavis3d-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+
+ qt6-datavis3d
+ Qt Data Visualization module
+
+ qt6-base
+ qt6-declarative
+ libgcc
+
+
+ /usr/lib
+ /usr/lib/qt6
+ /usr/share/doc
+ /usr/share/qt6/modules
+
+
+
+
+ qt6-datavis3d-devel
+ Development files for qt6-datavis3d
+
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-datavis3d
+
+
+ /usr/include/qt6
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First Release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-declarative/actions.py b/desktop/toolkit/qt6/qt6-declarative/actions.py
new file mode 100755
index 0000000000..ae1fe4d9a8
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-declarative/actions.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+#NoStrip = "/"
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+def setup():
+ # shelltools.system("sed -i 's/python /python3 /' qtdeclarative.pro \
+ # src/3rdparty/masm/masm.pri")
+ #shelltools.system("sed -i 's/python /python3 /' qtdeclarative/src/3rdparty/masm/masm.pri")
+ # shelltools.export("CFLAGS", "CXXFLAGS")
+ qt6.configure("-DQT_FEATURE_system_freetype=ON")
+
+def build():
+ qt6.make()
+ #qt6.make("docs")
+
+def install():
+ #pisitools.insinto("/usr/lib/qt6/qml", "qml/QtQml")
+ #pisitools.insinto("/usr/lib/qt6/qml", "qml/Qt")
+ #pisitools.insinto("/usr/lib/qt6/qml", "qml/QtQuick")
+ #pisitools.insinto("/usr/lib/qt6/qml", "qml/QtQuick.2")
+ #pisitools.insinto("/usr/lib/qt6/qml", "qml/QtTest")
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.insinto("/usr/share/licenses/qt6-declarative/", "LICENSE*")
diff --git a/desktop/toolkit/qt6/qt6-declarative/pspec.xml b/desktop/toolkit/qt6/qt6-declarative/pspec.xml
new file mode 100755
index 0000000000..0d6459d0f7
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-declarative/pspec.xml
@@ -0,0 +1,83 @@
+
+
+
+
+ qt6-declarative
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ Classes for QML and JavaScript languages
+ Classes for QML and JavaScript languages
+ LGPLv2.1-linking-exception
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtdeclarative-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ python3
+ libxkbcommon-devel
+ mesa-devel
+ qt6-sql-sqlite
+ qt6-base-devel
+ qt6-languageserver-devel
+
+
+
+
+
+
+
+ qt6-declarative
+
+ libgcc
+
+ qt6-base
+ qt6-languageserver
+ libglvnd
+
+
+
+ /usr/lib
+ /usr/lib/qt6
+ /usr/share/licenses
+ /usr/lib/qt6/bin
+ /usr/bin/
+ /usr/share/qt6/modules
+
+
+
+
+
+ qt6-declarative-devel
+
+ /usr/lib/pkgconfig
+ /usr/lib/cmake
+ /usr/include/qt6
+
+
+ qt6-base-devel
+ qt6-declarative
+
+
+
+
+
+
+
+ 2022-10-05
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-declarative/translations.xml b/desktop/toolkit/qt6/qt6-declarative/translations.xml
new file mode 100755
index 0000000000..1b57242749
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-declarative/translations.xml
@@ -0,0 +1,13 @@
+
+
+
+ qt5-declarative
+ QML ve JavaScript dilleri için sınıflar
+ QML ve JavaScript dilleri için sınıflar
+
+
+
+ qt5-declarative-devel
+ qt5-declarative için geliştirme dosyaları
+
+
diff --git a/desktop/toolkit/qt6/qt6-doc/actions.py b/desktop/toolkit/qt6/qt6-doc/actions.py
new file mode 100755
index 0000000000..d4d8b47359
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-doc/actions.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make("docs")
+ # qt6.make("docs")
+
+def install():
+ qt6.install("install_docs")
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-doc/pspec.xml b/desktop/toolkit/qt6/qt6-doc/pspec.xml
new file mode 100755
index 0000000000..d45976f20c
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-doc/pspec.xml
@@ -0,0 +1,68 @@
+
+
+
+
+ qt6-doc
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ assistant5
+ A cross-platform application and UI framework (Documentation)
+ A cross-platform application and UI framework (Documentation)
+ LGPLv2.1-linking-exception
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtdoc-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+
+
+
+
+
+ qt6-doc
+
+ qt6-base
+ qt6-script
+ qt6-svg
+ qt6-xmlpatterns
+ qt6-assistant
+ qt6-declarative
+
+
+ /usr/share/doc
+ /usr/share/doc/qt6
+ /usr/lib/qt6/mkspecs/
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-doc/translations.xml b/desktop/toolkit/qt6/qt6-doc/translations.xml
new file mode 100755
index 0000000000..0474f82041
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-doc/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt5-doc
+ Qt bir çok platformda çalışabilen ve grafiksel kullanıcı arayüzü (GUI) oluşturmaya yarayan bir araç takımıdır(Belgelendirme)
+ Qt bir çok platformda çalışabilen ve grafiksel kullanıcı arayüzü (GUI) oluşturmaya yarayan bir araç takımıdır(Belgelendirme)
+
+
diff --git a/desktop/toolkit/qt6/qt6-httpserver/actions.py b/desktop/toolkit/qt6/qt6-httpserver/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-httpserver/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-httpserver/pspec.xml b/desktop/toolkit/qt6/qt6-httpserver/pspec.xml
new file mode 100644
index 0000000000..5794f6f8bd
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-httpserver/pspec.xml
@@ -0,0 +1,69 @@
+
+
+
+
+ qt6-httpserver
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ custom, FDL, GPL3
+ library
+ Qt HTTP Server
+ qt6-httpserver
+ Qt HTTP Server
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qthttpserver-everywhere-src-6.4.0.tar.xz
+
+ cmake
+ ninja
+ qt6-base-devel
+ qt6-websockets-devel
+
+
+
+
+
+ qt6-httpserver
+
+ qt6-base
+ qt6-websockets
+
+
+ /usr/lib
+ /usr/share
+ /usr/share/doc
+ /usr/share/qt6/modules/
+
+
+
+
+ qt6-httpserver-devel
+ Development files for qt6-httpserver
+
+ qt6-httpserver
+ qt6-base-devel
+ qt6-websockets-devel
+
+
+ /usr/include
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ PisiLinux Community
+ admins@pisilinux.org
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-httpserver/translations.xml b/desktop/toolkit/qt6/qt6-httpserver/translations.xml
new file mode 100644
index 0000000000..b7417f564b
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-httpserver/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt6-httpserver
+ Qt HTTP Server
+ Qt HTTP Server
+
+
diff --git a/desktop/toolkit/qt6/qt6-imageformats/actions.py b/desktop/toolkit/qt6/qt6-imageformats/actions.py
new file mode 100755
index 0000000000..c094d0753e
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-imageformats/actions.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import cmaketools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+bindirQt6="/usr/lib/qt6/bin"
+
+def setup():
+ options = " -DCMAKE_INSTALL_PREFIX=%s \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DINSTALL_BINDIR=%s \
+ -DINSTALL_INCLUDEDIR=%s \
+ -DINSTALL_ARCHDATADIR=%s \
+ -DINSTALL_DOCDIR=%s \
+ -DINSTALL_DATADIR=%s \
+ -DINSTALL_MKSPECSDIR=%s \
+ -DINSTALL_EXAMPLESDIR=%s \
+ -DQT_FEATURE_libproxy=ON \
+ -DQT_FEATURE_vulkan=ON \
+ -DQT_FEATURE_system_freetype=ON \
+ -DQT_FEATURE_system_harfbuzz=ON \
+ -DQT_FEATURE_system_sqlite=ON \
+ -DQT_FEATURE_dbus_linked=ON \
+ -DQT_FEATURE_openssl_linked=ON" % (qt6.prefix, bindirQt6, qt6.headerdir, qt6.archdatadir, qt6.docdir, qt6.datadir, qt6.mkspecsdir, qt6.examplesdir)
+
+ cmaketools.configure(options)
+
+def build():
+ qt6.make()
+ #qt6.make("docs")
+
+def install():
+ qt6.install("INSTALL_ROOT=%s" % get.installDIR())
+
+ #I hope qtchooser will manage this issue
+ #for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ #pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.dodoc("LICENSE*")
diff --git a/desktop/toolkit/qt6/qt6-imageformats/pspec.xml b/desktop/toolkit/qt6/qt6-imageformats/pspec.xml
new file mode 100755
index 0000000000..0fc95c974e
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-imageformats/pspec.xml
@@ -0,0 +1,67 @@
+
+
+
+
+ qt6-imageformats
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ Plugins for additional image formats: TIFF, MNG, TGA, WBMP
+ Plugins for additional image formats: TIFF, MNG, TGA, WBMP
+ LGPLv2.1-linking-exception
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtimageformats-everywhere-src-6.4.0.tar.xz
+
+ cmake
+ libxkbcommon-devel
+ vulkan-headers
+ jasper-devel
+ libmng-devel
+ zlib-devel
+ tiff-devel
+ webp-devel
+ libjpeg-turbo-devel
+ qt6-base-devel
+ qt6-sql-sqlite
+
+
+
+
+ qt6-imageformats
+
+ qt6-base
+ libgcc
+
+ tiff
+ webp
+ jasper
+
+
+ /usr/lib
+ /usr/lib/qt6
+ /usr/share/licenses
+ /usr/share/doc
+
+
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-imageformats/translations.xml b/desktop/toolkit/qt6/qt6-imageformats/translations.xml
new file mode 100755
index 0000000000..18c57a1d38
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-imageformats/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt5-imageformats
+ İlave resim biçimleri için eklentiler: TIFF, MNG, TGA, WBMP
+ İlave resim biçimleri için eklentiler: TIFF, MNG, TGA, WBMP
+
+
diff --git a/desktop/toolkit/qt6/qt6-keychain/actions.py b/desktop/toolkit/qt6/qt6-keychain/actions.py
new file mode 100755
index 0000000000..7d6ffa24bb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-keychain/actions.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import kde5
+from pisi.actionsapi import cmaketools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+
+def setup():
+ cmaketools.configure("-B build-qt6 -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DECM_MKSPECS_INSTALL_DIR=/usr/lib/qt6/mkspecs/modules \
+ -DBUILD_WITH_QT6=ON")
+
+def build():
+ cmaketools.make("-C build-qt6")
+
+def install():
+ cmaketools.install("-C build-qt6 DESTDIR=%s" % get.installDIR())
+
+ pisitools.dodoc("ChangeLog", "COPYING", "ReadMe*")
+
diff --git a/desktop/toolkit/qt6/qt6-keychain/pspec.xml b/desktop/toolkit/qt6/qt6-keychain/pspec.xml
new file mode 100755
index 0000000000..b7854ee39e
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-keychain/pspec.xml
@@ -0,0 +1,59 @@
+
+
+
+
+ qt6-keychain
+ https://github.com/frankosterfeld/qtkeychain
+
+ Stefan Gronewold
+ groni@pisilinux.org
+
+ BSD
+ Provides support for secure credentials storage
+ Qt5-Keychain is a Qt API to store passwords and other secret data securely. How the data is stored depends on the platform
+ https://github.com/frankosterfeld/qtkeychain/archive/v0.13.2.tar.gz
+
+ cmake
+ glib2-devel
+ qt6-assistant-devel
+ qt6-base-devel
+ qt6-designer-devel
+ qt6-linguist
+
+
+
+ qt6-keychain
+ Provides support for secure credentials storage
+
+ glib2
+ libgcc
+ qt6-base
+
+
+ /usr/lib
+ /usr/share
+ /usr/share/doc
+
+
+
+
+ qt6-keychain-devel
+ Development support for qt6-keychain
+
+ qt6-keychain
+
+
+ /usr/lib/cmake
+ /usr/include
+
+
+
+
+ 2022-10-07
+ 0.13.2
+ First Release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-languageserver/actions.py b/desktop/toolkit/qt6/qt6-languageserver/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-languageserver/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-languageserver/pspec.xml b/desktop/toolkit/qt6/qt6-languageserver/pspec.xml
new file mode 100644
index 0000000000..95eb654b39
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-languageserver/pspec.xml
@@ -0,0 +1,65 @@
+
+
+
+
+ qt6-languageserver
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ FDL, GPL3
+ library
+ An implementation of the Language Server Protocol
+ qt6-languageserver
+ An implementation of the Language Server Protocol
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtlanguageserver-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ qt6-base-devel
+
+ -->
+
+
+
+
+ qt6-languageserver
+
+ qt6-base-devel
+
+
+ /usr/lib
+ /usr/share
+ /usr/share/doc
+
+
+
+
+ qt6-languageserver-devel
+ Development files for qt6-languageserver
+
+ qt6-languageserver
+
+
+ /usr/include
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ PisiLinux Community
+ admins@pisilinux.org
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-languageserver/translations.xml b/desktop/toolkit/qt6/qt6-languageserver/translations.xml
new file mode 100644
index 0000000000..0c559ff2b9
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-languageserver/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt6-languageserver
+ An implementation of the Language Server Protocol
+ An implementation of the Language Server Protocol
+
+
diff --git a/desktop/toolkit/qt6/qt6-lottie/actions.py b/desktop/toolkit/qt6/qt6-lottie/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-lottie/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-lottie/pspec.xml b/desktop/toolkit/qt6/qt6-lottie/pspec.xml
new file mode 100644
index 0000000000..9d175c8ac2
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-lottie/pspec.xml
@@ -0,0 +1,67 @@
+
+
+
+
+ qt6-lottie
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ custom, FDL, GPL3
+ library
+ A family of player software for a certain json-based file format for describing 2d vector graphics animations
+ qt6-lottie
+ A family of player software for a certain json-based file format for describing 2d vector graphics animations
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtlottie-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+
+
+
+ qt6-lottie
+
+ qt6-base
+ qt6-declarative
+
+
+ /usr/lib
+ /usr/share
+ /usr/share/doc
+ /usr/share/qt6/modules/
+
+
+
+
+ qt6-lottie-devel
+ Development files for qt6-lottie
+
+ qt6-lottie
+
+
+ /usr/include
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ PisiLinux Community
+ admins@pisilinux.org
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-lottie/translations.xml b/desktop/toolkit/qt6/qt6-lottie/translations.xml
new file mode 100644
index 0000000000..216b950e6c
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-lottie/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt6-lottie
+ A family of player software for a certain json-based file format for describing 2d vector graphics animations
+ A family of player software for a certain json-based file format for describing 2d vector graphics animations
+
+
diff --git a/desktop/toolkit/qt6/qt6-multimedia/actions.py b/desktop/toolkit/qt6/qt6-multimedia/actions.py
new file mode 100755
index 0000000000..0fa7d330cb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-multimedia/actions.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+ # qt6.make("docs")
+
+def install():
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-multimedia/pspec.xml b/desktop/toolkit/qt6/qt6-multimedia/pspec.xml
new file mode 100755
index 0000000000..ef69d57185
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-multimedia/pspec.xml
@@ -0,0 +1,83 @@
+
+
+
+
+ qt6-multimedia
+ http://qt.digia.com/
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ Classes for audio, video, radio and camera functionality
+ Classes for audio, video, radio and camera functionality
+ LGPLv2.1-linking-exception
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtmultimedia-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ icu4c-devel
+ libva-devel
+ ffmpeg-devel
+ openal-devel
+ libglvnd-devel
+ alsa-lib-devel
+ gstreamer-devel
+ pulseaudio-libs-devel
+ gst-plugins-bad-devel
+ mesa-devel
+ qt6-sql-sqlite
+ qt6-base-devel
+ qt6-shadertools-devel
+ qt6-declarative-devel
+ gst-plugins-base-devel
+
+
+
+
+ qt6-multimedia
+
+ /usr/lib
+ /usr/lib/qt6
+ /usr/share/doc
+ /usr/share/qt6/modules
+
+
+ glib2
+ libgcc
+ openal
+ libva
+ ffmpeg
+ libglvnd
+ alsa-lib
+ gstreamer
+ gst-plugins-bad
+ pulseaudio-libs
+ qt6-base
+ qt6-declarative
+ gst-plugins-base
+
+
+
+
+ qt6-multimedia-devel
+
+ /usr/lib/pkgconfig
+ /usr/include/qt6
+
+
+ qt6-multimedia
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-multimedia/translations.xml b/desktop/toolkit/qt6/qt6-multimedia/translations.xml
new file mode 100755
index 0000000000..5f027873fb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-multimedia/translations.xml
@@ -0,0 +1,13 @@
+
+
+
+ qt5-multimedia
+ Ses, video, radyo ve kamera işlevsellikleri için sınıflar
+ Ses, video, radyo ve kamera işlevsellikleri için sınıflar
+
+
+
+ qt5-multimedia-devel
+ qt5-multimedia için geliştirme dosyaları
+
+
diff --git a/desktop/toolkit/qt6/qt6-networkauth/actions.py b/desktop/toolkit/qt6/qt6-networkauth/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-networkauth/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-networkauth/pspec.xml b/desktop/toolkit/qt6/qt6-networkauth/pspec.xml
new file mode 100644
index 0000000000..ac319764eb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-networkauth/pspec.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ qt6-networkauth
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ 'GPL3' 'LGPL3' 'FDL' 'custom'
+ app:gui
+ Network authentication module
+ Ağ kimlik doğrulama modülü
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtnetworkauth-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ qt6-base-devel
+
+
+
+
+ qt6-networkauth
+
+ qt6-base
+
+
+ /usr/lib
+ /usr/share
+
+
+
+
+ qt6-networkauth-devel
+ Development files for qt6-networkauth
+
+ qt6-networkauth
+ qt6-base-devel
+
+
+ /usr/include
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-networkauth/translations.xml b/desktop/toolkit/qt6/qt6-networkauth/translations.xml
new file mode 100644
index 0000000000..1e8d77290f
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-networkauth/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt5-networkauth
+ Ağ kimlik doğrulama modülü
+ Ağ kimlik doğrulama modülü
+
+
diff --git a/desktop/toolkit/qt6/qt6-positioning/actions.py b/desktop/toolkit/qt6/qt6-positioning/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-positioning/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-positioning/pspec.xml b/desktop/toolkit/qt6/qt6-positioning/pspec.xml
new file mode 100644
index 0000000000..2f2a5d4e9b
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-positioning/pspec.xml
@@ -0,0 +1,75 @@
+
+
+
+
+ qt6-positioning
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ custom, FDL, GPL3
+ library
+ Provides access to position, satellite and area monitoring classes
+ qt6-positioning
+ Provides access to position, satellite and area monitoring classes
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtpositioning-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ gconf-devel
+ glib2-devel
+ gypsy-devel
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+
+
+
+ qt6-positioning
+
+ gconf
+ glib2
+ gypsy
+ qt6-base
+ qt6-declarative
+
+
+ /usr/lib
+ /usr/share
+ /usr/share/doc
+ /usr/share/qt6/modules/
+
+
+
+
+ qt6-positioning-devel
+ Development files for qt6-positioning
+
+ qt6-positioning
+ qt6-base-devel
+ qt6-declarative-devel
+
+
+ /usr/include
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ PisiLinux Community
+ admins@pisilinux.org
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-positioning/translations.xml b/desktop/toolkit/qt6/qt6-positioning/translations.xml
new file mode 100644
index 0000000000..fb943a575c
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-positioning/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt6-positioning
+ Provides access to position, satellite and area monitoring classes
+ Provides access to position, satellite and area monitoring classes
+
+
diff --git a/desktop/toolkit/qt6/qt6-quick3d/actions.py b/desktop/toolkit/qt6/qt6-quick3d/actions.py
new file mode 100755
index 0000000000..655dde01eb
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3d/actions.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import shelltools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+from pisi.actionsapi import get
+
+
+def setup():
+ shelltools.export("CC", "gcc")
+ shelltools.export("CXX", "g++")
+ shelltools.export("LDFLAGS", "%s" % get.LDFLAGS())
+ # pisitools.cflags.remove("-lto-wrapper")
+ # pisitools.cxxflags.remove("-lto-wrapper")
+ # pisitools.cflags.add(" -ffat-lto-objects")
+ # pisitools.cxxflags.add(" -ffat-lto-objects")
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ #I hope qtchooser will manage this issue
+ for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
+ pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s-qt6" % bin)
+
+ pisitools.dodoc("LICENSE.GPL*")
diff --git a/desktop/toolkit/qt6/qt6-quick3d/files/qtquick3d-fix-build-with-gcc11.patch b/desktop/toolkit/qt6/qt6-quick3d/files/qtquick3d-fix-build-with-gcc11.patch
new file mode 100644
index 0000000000..f389f777b0
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3d/files/qtquick3d-fix-build-with-gcc11.patch
@@ -0,0 +1,24 @@
+diff --git a/src/3rdparty/assimp/src/code/Common/Importer.cpp b/src/3rdparty/assimp/src/code/Common/Importer.cpp
+index a2ad041..6f2438f 100644
+--- a/src/3rdparty/assimp/src/code/Common/Importer.cpp
++++ b/src/3rdparty/assimp/src/code/Common/Importer.cpp
+@@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include
+ #include
+ #include
++#include
+
+ // ------------------------------------------------------------------------------------------------
+ /* Uncomment this line to prevent Assimp from catching unknown exceptions.
+diff --git a/src/3rdparty/assimp/src/include/assimp/Importer.hpp b/src/3rdparty/assimp/src/include/assimp/Importer.hpp
+index 09b5b68..89eb071 100644
+--- a/src/3rdparty/assimp/src/include/assimp/Importer.hpp
++++ b/src/3rdparty/assimp/src/include/assimp/Importer.hpp
+@@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ // Public ASSIMP data structures
+ #include
++#include
+
+ #include
+
diff --git a/desktop/toolkit/qt6/qt6-quick3d/files/x.patch b/desktop/toolkit/qt6/qt6-quick3d/files/x.patch
new file mode 100644
index 0000000000..7c13e58d6a
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3d/files/x.patch
@@ -0,0 +1,1480 @@
+If an entity uses a QBoundingVolume and a QGeometryView, compute
+the bounding volume data in the core aspect. All other cases will
+still happen in the render aspect.
+
+Result not currently used (ie it's done again in render aspect).
+
+Change-Id: I4b5ed21bac42b79777c3112aa76d876ac5b6f52d
+Reviewed-by: Paul Lemire
+14 files changed:
+src/core/aspect/qcoreaspect.cpp patch | blob | history
+src/core/aspect/qcoreaspect.h patch | blob | history
+src/core/aspect/qcoreaspect_p.h patch | blob | history
+src/core/core.pro patch | blob | history
+src/core/geometry/bufferutils_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/buffervisitor_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/geometry.pri patch | blob | history
+src/core/geometry/qgeometry_p.h patch | blob | history
+src/core/geometry/qgeometryview.cpp patch | blob | history
+src/core/geometry/qgeometryview_p.h patch | blob | history
+src/core/jobs/calcboundingvolumejob.cpp [new file with mode: 0644] patch | blob
+src/core/jobs/calcboundingvolumejob_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/job_common_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/jobs.pri patch | blob | history
+
+diff --git a/src/core/aspect/qcoreaspect.cpp b/src/core/aspect/qcoreaspect.cpp
+index 48f9aaf..dc3566e 100644 (file)
+--- a/src/core/aspect/qcoreaspect.cpp
++++ b/src/core/aspect/qcoreaspect.cpp
+@@ -39,12 +39,16 @@
+
+ #include "qcoreaspect.h"
+ #include "qcoreaspect_p.h"
++#include
++#include
++#include
+
+ QT_BEGIN_NAMESPACE
+
+ using namespace Qt3DCore;
+
+ QCoreAspectPrivate::QCoreAspectPrivate()
++ : Qt3DCore::QAbstractAspectPrivate()
+ {
+
+ }
+@@ -65,7 +69,7 @@ void QCoreAspectPrivate::frameDone()
+ }
+
+ QCoreAspect::QCoreAspect(QObject *parent)
+- : Qt3DCore::QAbstractAspect(parent)
++ : Qt3DCore::QAbstractAspect(*new QCoreAspectPrivate, parent)
+ {
+
+ }
+@@ -75,10 +79,28 @@ QCoreAspect::~QCoreAspect()
+
+ }
+
++QAspectJobPtr QCoreAspect::calculateBoundingVolumeJob() const
++{
++ Q_D(const QCoreAspect);
++ return d->m_calculateBoundingVolumeJob;
++}
++
+ QVector QCoreAspect::jobsToExecute(qint64 time)
+ {
++ Q_D(QCoreAspect);
+ Q_UNUSED(time)
+- return {};
++
++ QVector jobs;
++
++ auto scene = d->m_aspectManager->scene();
++ auto dirtyBits = scene->dirtyBits();
++
++ if (dirtyBits & QScene::GeometryDirty ||
++ dirtyBits & QScene::BuffersDirty) {
++ jobs.push_back(d->m_calculateBoundingVolumeJob);
++ }
++
++ return jobs;
+ }
+
+ QVariant QCoreAspect::executeCommand(const QStringList &args)
+@@ -89,12 +111,25 @@ QVariant QCoreAspect::executeCommand(const QStringList &args)
+
+ void QCoreAspect::onRegistered()
+ {
++ Q_D(QCoreAspect);
+
++ if (d->m_calculateBoundingVolumeJob.isNull())
++ d->m_calculateBoundingVolumeJob = CalculateBoundingVolumeJobPtr::create();
+ }
+
+-void QCoreAspect::onUnregistered()
++void QCoreAspect::onEngineStartup()
+ {
++ Q_D(QCoreAspect);
+
++ Q_ASSERT(d->m_calculateBoundingVolumeJob);
++ d->m_calculateBoundingVolumeJob->setRoot(d->m_root);
++}
++
++void QCoreAspect::frameDone()
++{
++ Q_D(QCoreAspect);
++ auto scene = d->m_aspectManager->scene();
++ scene->clearDirtyBits();
+ }
+
+ QT_END_NAMESPACE
+diff --git a/src/core/aspect/qcoreaspect.h b/src/core/aspect/qcoreaspect.h
+index 27c72f4..071b738 100644 (file)
+--- a/src/core/aspect/qcoreaspect.h
++++ b/src/core/aspect/qcoreaspect.h
+@@ -55,6 +55,8 @@ public:
+ explicit QCoreAspect(QObject *parent = nullptr);
+ ~QCoreAspect();
+
++ QAspectJobPtr calculateBoundingVolumeJob() const;
++
+ protected:
+ Q_DECLARE_PRIVATE(QCoreAspect)
+
+@@ -62,7 +64,8 @@ private:
+ QVector jobsToExecute(qint64 time) override;
+ QVariant executeCommand(const QStringList &args) override;
+ void onRegistered() override;
+- void onUnregistered() override;
++ void onEngineStartup() override;
++ void frameDone() override;
+ };
+
+ }
+diff --git a/src/core/aspect/qcoreaspect_p.h b/src/core/aspect/qcoreaspect_p.h
+index ca665fa..cda0a14 100644 (file)
+--- a/src/core/aspect/qcoreaspect_p.h
++++ b/src/core/aspect/qcoreaspect_p.h
+@@ -55,10 +55,15 @@
+ #include
+ #include
+
++#include
++
+ QT_BEGIN_NAMESPACE
+
+ namespace Qt3DCore {
+
++class CalculateBoundingVolumeJob;
++using CalculateBoundingVolumeJobPtr = QSharedPointer;
++
+ class Q_3DCORE_PRIVATE_EXPORT QCoreAspectPrivate : public Qt3DCore::QAbstractAspectPrivate
+ {
+ public:
+@@ -71,6 +76,7 @@ public:
+ void frameDone() override;
+
+ bool m_initialized;
++ CalculateBoundingVolumeJobPtr m_calculateBoundingVolumeJob;
+ };
+
+ }
+diff --git a/src/core/core.pro b/src/core/core.pro
+index b149497..846e9d8 100644 (file)
+--- a/src/core/core.pro
++++ b/src/core/core.pro
+@@ -1,7 +1,8 @@
+-TARGET = Qt3DCore
+-MODULE = 3dcore
++TARGET = Qt3DCore
++MODULE = 3dcore
+
+-QT = core-private gui-private network
++QT = core-private gui-private network
++QT_FOR_PRIVATE = concurrent
+
+ gcov {
+ QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
+diff --git a/src/core/geometry/bufferutils_p.h b/src/core/geometry/bufferutils_p.h
+new file mode 100644 (file)
+index 0000000..1b83d99
+--- /dev/null
++++ b/src/core/geometry/bufferutils_p.h
+@@ -0,0 +1,113 @@
++/****************************************************************************
++**
++** Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERUTILS_P_H
++#define QT3DCORE_BUFFERUTILS_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++
++namespace Qt3DCore {
++
++class QGeometryView;
++class QBuffer;
++
++struct BufferInfo
++{
++ BufferInfo()
++ : type(Qt3DCore::QAttribute::VertexBaseType::Float)
++ , dataSize(0)
++ , count(0)
++ , byteStride(0)
++ , byteOffset(0)
++ , restartEnabled(false)
++ , restartIndexValue(-1)
++ {}
++
++ QByteArray data;
++ Qt3DCore::QAttribute::VertexBaseType type;
++ uint dataSize;
++ uint count;
++ uint byteStride;
++ uint byteOffset;
++ bool restartEnabled;
++ int restartIndexValue;
++};
++
++
++namespace BufferTypeInfo {
++
++ template struct EnumToType;
++ template <> struct EnumToType { typedef const char type; };
++ template <> struct EnumToType { typedef const uchar type; };
++ template <> struct EnumToType { typedef const short type; };
++ template <> struct EnumToType { typedef const ushort type; };
++ template <> struct EnumToType { typedef const int type; };
++ template <> struct EnumToType { typedef const uint type; };
++ template <> struct EnumToType { typedef const float type; };
++ template <> struct EnumToType { typedef const double type; };
++
++ template
++ typename EnumToType::type *castToType(const QByteArray &u, uint byteOffset)
++ {
++ return reinterpret_cast< typename EnumToType::type *>(u.constData() + byteOffset);
++ }
++
++} // namespace BufferTypeInfo
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++
++#endif // QT3DCORE_BUFFERUTILS_P_H
+diff --git a/src/core/geometry/buffervisitor_p.h b/src/core/geometry/buffervisitor_p.h
+new file mode 100644 (file)
+index 0000000..69cfb9b
+--- /dev/null
++++ b/src/core/geometry/buffervisitor_p.h
+@@ -0,0 +1,285 @@
++/****************************************************************************
++**
++** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERVISITOR_P_H
++#define QT3DCORE_BUFFERVISITOR_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++class QEntity;
++
++template
++class Q_AUTOTEST_EXPORT BufferVisitor
++{
++public:
++ explicit BufferVisitor() = default;
++ virtual ~BufferVisitor() = default;
++
++ virtual void visit(uint ndx, ValueType x) {
++ Q_UNUSED(ndx) Q_UNUSED(x)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z, ValueType w) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z) Q_UNUSED(w)
++ }
++
++ bool apply(QAttribute *attribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ if (attribute->vertexBaseType() != VertexBaseType)
++ return false;
++ if (attribute->vertexSize() < dataSize)
++ return false;
++
++ auto data = attribute->buffer()->data();
++ auto vertexBuffer = BufferTypeInfo::castToType(data, attribute->byteOffset());
++
++ if (indexAttribute) {
++ auto indexData = indexAttribute->buffer()->data();
++ switch (indexAttribute->vertexBaseType()) {
++ case Qt3DCore::QAttribute::UnsignedShort: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedInt: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedByte: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ default: Q_UNREACHABLE();
++ }
++ } else {
++ switch (dataSize) {
++ case 1: traverseCoordinates1(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 2: traverseCoordinates2(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 3: traverseCoordinates3(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 4: traverseCoordinates4(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ return true;
++ }
++
++protected:
++ template
++ void traverseCoordinateIndexed(VertexBufferType *vertexBuffer,
++ IndexBufferType *indexBuffer,
++ int vertexByteStride,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ switch (dataSize) {
++ case 1: traverseCoordinates1Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 2: traverseCoordinates2Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 3: traverseCoordinates3Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 4: traverseCoordinates4Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ template
++ void traverseCoordinates1(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates1Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates2(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 2;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1]);
++ coordinates += stride;
++ }
++ }
++
++
++ template
++ void traverseCoordinates2Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 2;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates3(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 3;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1], coordinates[2]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates3Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 3;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1], coordinates[n + 2]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates4(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 4;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1], coordinates[2], coordinates[3]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates4Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 4;
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n], coordinates[n + 1], coordinates[n + 2], coordinates[n + 3]);
++ }
++ }
++ }
++};
++
++typedef BufferVisitor Buffer3fVisitor;
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++
++#endif // QT3DCORE_BUFFERVISITOR_P_H
+diff --git a/src/core/geometry/geometry.pri b/src/core/geometry/geometry.pri
+index eadf7ca..70bda07 100644 (file)
+--- a/src/core/geometry/geometry.pri
++++ b/src/core/geometry/geometry.pri
+@@ -12,7 +12,9 @@ HEADERS += \
+ $$PWD/qgeometry.h \
+ $$PWD/qgeometryfactory_p.h \
+ $$PWD/qgeometryview_p.h \
+- $$PWD/qgeometryview.h
++ $$PWD/qgeometryview.h \
++ $$PWD/bufferutils_p.h \
++ $$PWD/buffervisitor_p.h
+
+ SOURCES += \
+ $$PWD/qabstractfunctor.cpp \
+diff --git a/src/core/geometry/qgeometry_p.h b/src/core/geometry/qgeometry_p.h
+index 2a05b5b..ed13b3f 100644 (file)
+--- a/src/core/geometry/qgeometry_p.h
++++ b/src/core/geometry/qgeometry_p.h
+@@ -72,7 +72,6 @@ public:
+ void setScene(QScene *scene) override;
+ void update() override;
+ void setExtent(const QVector3D &minExtent, const QVector3D &maxExtent);
+-
+ static QGeometryPrivate *get(QGeometry *q);
+
+ QVector m_attributes;
+diff --git a/src/core/geometry/qgeometryview.cpp b/src/core/geometry/qgeometryview.cpp
+index 65e30d9..258448b 100644 (file)
+--- a/src/core/geometry/qgeometryview.cpp
++++ b/src/core/geometry/qgeometryview.cpp
+@@ -39,11 +39,250 @@
+
+ #include "qgeometryview.h"
+ #include "qgeometryview_p.h"
++#include "qgeometry_p.h"
++#include "buffervisitor_p.h"
++
++#include
++#include
++#include
+
+ QT_BEGIN_NAMESPACE
+
+ using namespace Qt3DCore;
+
++namespace {
++
++class FindExtremePoints : public Buffer3fVisitor
++{
++public:
++ FindExtremePoints()
++ : Buffer3fVisitor()
++ , xMin(0.0f), xMax(0.0f), yMin(0.0f), yMax(0.0f), zMin(0.0f), zMax(0.0f)
++ { }
++
++ float xMin, xMax, yMin, yMax, zMin, zMax;
++ Vector3D xMinPt, xMaxPt, yMinPt, yMaxPt, zMinPt, zMaxPt;
++
++ void visit(uint ndx, float x, float y, float z) override
++ {
++ if (ndx) {
++ if (x < xMin) {
++ xMin = x;
++ xMinPt = Vector3D(x, y, z);
++ }
++ if (x > xMax) {
++ xMax = x;
++ xMaxPt = Vector3D(x, y, z);
++ }
++ if (y < yMin) {
++ yMin = y;
++ yMinPt = Vector3D(x, y, z);
++ }
++ if (y > yMax) {
++ yMax = y;
++ yMaxPt = Vector3D(x, y, z);
++ }
++ if (z < zMin) {
++ zMin = z;
++ zMinPt = Vector3D(x, y, z);
++ }
++ if (z > zMax) {
++ zMax = z;
++ zMaxPt = Vector3D(x, y, z);
++ }
++ } else {
++ xMin = xMax = x;
++ yMin = yMax = y;
++ zMin = zMax = z;
++ xMinPt = xMaxPt = yMinPt = yMaxPt = zMinPt = zMaxPt = Vector3D(x, y, z);
++ }
++ }
++};
++
++class FindMaxDistantPoint : public Buffer3fVisitor
++{
++public:
++ FindMaxDistantPoint()
++ : Buffer3fVisitor()
++ { }
++
++ float maxLengthSquared = 0.0f;
++ bool setReferencePoint = false;
++ bool hasNoPoints = true;
++ Vector3D maxDistPt;
++ Vector3D referencePt;
++
++ void visit(uint ndx, float x, float y, float z) override
++ {
++ Q_UNUSED(ndx)
++ const Vector3D p = Vector3D(x, y, z);
++
++ if (hasNoPoints && setReferencePoint) {
++ maxLengthSquared = 0.0f;
++ referencePt = p;
++ }
++ const float lengthSquared = (p - referencePt).lengthSquared();
++ if ( lengthSquared >= maxLengthSquared ) {
++ maxDistPt = p;
++ maxLengthSquared = lengthSquared;
++ }
++ hasNoPoints = false;
++ }
++};
++
++std::pair calculateLocalBoundingVolume(QGeometryView *node)
++{
++ // The Bounding volume will only be computed if the position Buffer
++ // isDirty
++
++ if (!node->isEnabled())
++ return {};
++
++ if (node->primitiveType() == QGeometryView::Patches)
++ return {};
++
++ QGeometry *geom = node->geometry();
++ QGeometryPrivate *dgeom = QGeometryPrivate::get(geom);
++
++ if (!geom)
++ return {};
++
++ int drawVertexCount = node->vertexCount(); // may be 0, gets changed below if so
++
++ QAttribute *positionAttribute = dgeom->m_boundingVolumePositionAttribute;
++ const QVector attributes = geom->attributes();
++
++ // Use the default position attribute if attribute is null
++ if (!positionAttribute) {
++ for (QAttribute *attr : attributes) {
++ if (attr->name() == QAttribute::defaultPositionAttributeName()) {
++ positionAttribute = attr;
++ break;
++ }
++ }
++ }
++
++ if (!positionAttribute
++ || positionAttribute->attributeType() != QAttribute::VertexAttribute
++ || positionAttribute->vertexBaseType() != QAttribute::Float
++ || positionAttribute->vertexSize() < 3) {
++ qWarning("calculateLocalBoundingVolume: Position attribute not suited for bounding volume computation");
++ return {};
++ }
++
++ Qt3DCore::QBuffer *buf = positionAttribute->buffer();
++ // No point in continuing if the positionAttribute doesn't have a suitable buffer
++ if (!buf) {
++ qWarning("calculateLocalBoundingVolume: Position attribute not referencing a valid buffer");
++ return {};
++ }
++
++ // Check if there is an index attribute.
++ QAttribute *indexAttribute = nullptr;
++ Qt3DCore::QBuffer *indexBuf = nullptr;
++
++ for (const auto attr : attributes) {
++ if (attr->attributeType() == QAttribute::IndexAttribute) {
++ indexBuf = attr->buffer();
++ if (indexBuf) {
++ indexAttribute = attr;
++
++ if (!drawVertexCount)
++ drawVertexCount = static_cast(indexAttribute->count());
++
++ static const QAttribute::VertexBaseType validIndexTypes[] = {
++ QAttribute::UnsignedShort,
++ QAttribute::UnsignedInt,
++ QAttribute::UnsignedByte
++ };
++
++ if (std::find(std::begin(validIndexTypes),
++ std::end(validIndexTypes),
++ indexAttribute->vertexBaseType()) == std::end(validIndexTypes)) {
++ qWarning() << "calculateLocalBoundingVolume: Unsupported index attribute type" << indexAttribute->name() << indexAttribute->vertexBaseType();
++ return {};
++ }
++
++ break;
++ }
++ }
++ }
++
++ if (!indexAttribute && !drawVertexCount)
++ drawVertexCount = static_cast(positionAttribute->count());
++
++ // Buf will be set to not dirty once it's loaded
++ // in a job executed after this one
++ // We need to recompute the bounding volume
++ // If anything in the GeometryRenderer has changed
++ BoundingVolumeCalculator reader;
++ if (reader.apply(positionAttribute, indexAttribute, drawVertexCount,
++ node->primitiveRestartEnabled(), node->restartIndexValue()))
++ return {reader.min(), reader.max()};
++
++ return {};
++}
++
++}
++
++
++bool BoundingVolumeCalculator::apply(QAttribute *positionAttribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++{
++ m_radius = -1.f;
++
++ FindExtremePoints findExtremePoints;
++ if (!findExtremePoints.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex)) {
++ return false;
++ }
++
++ m_min = QVector3D(findExtremePoints.xMin, findExtremePoints.yMin, findExtremePoints.zMin);
++ m_max = QVector3D(findExtremePoints.xMax, findExtremePoints.yMax, findExtremePoints.zMax);
++
++ FindMaxDistantPoint maxDistantPointY;
++ maxDistantPointY.setReferencePoint = true;
++ if (!maxDistantPointY.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex)) {
++ return false;
++ }
++ if (maxDistantPointY.hasNoPoints)
++ return false;
++
++ //const Vector3D x = maxDistantPointY.referencePt;
++ const Vector3D y = maxDistantPointY.maxDistPt;
++
++ FindMaxDistantPoint maxDistantPointZ;
++ maxDistantPointZ.setReferencePoint = false;
++ maxDistantPointZ.referencePt = y;
++ if (!maxDistantPointZ.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex))
++ return false;
++ const Vector3D z = maxDistantPointZ.maxDistPt;
++ const Vector3D center = (y + z) * .5f;
++
++ FindMaxDistantPoint maxDistantPointCenter;
++ maxDistantPointCenter.setReferencePoint = false;
++ maxDistantPointCenter.referencePt = center;
++ if (!maxDistantPointCenter.apply(positionAttribute, indexAttribute, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex))
++ return false;
++
++ const float radius = (center - maxDistantPointCenter.maxDistPt).length();
++
++ if (center == Vector3D{} || radius < 0.f)
++ return false;
++
++ m_radius = radius;
++ m_center = QVector3D{ center.x(), center.y(), center.z() };
++
++ return true;
++}
++
++
+ QGeometryViewPrivate::QGeometryViewPrivate()
+ : QNodePrivate()
+ , m_instanceCount(1)
+@@ -65,6 +304,11 @@ QGeometryViewPrivate::~QGeometryViewPrivate()
+ {
+ }
+
++QGeometryViewPrivate *QGeometryViewPrivate::get(QGeometryView *q)
++{
++ return q->d_func();
++}
++
+ void QGeometryViewPrivate::update()
+ {
+ if (!m_blockNotifications)
+diff --git a/src/core/geometry/qgeometryview_p.h b/src/core/geometry/qgeometryview_p.h
+index f806c4d..05dea1d 100644 (file)
+--- a/src/core/geometry/qgeometryview_p.h
++++ b/src/core/geometry/qgeometryview_p.h
+@@ -55,6 +55,8 @@
+ #include
+ #include
+ #include
++
++#include
+ #include
+
+ QT_BEGIN_NAMESPACE
+@@ -67,6 +69,8 @@ public:
+ QGeometryViewPrivate();
+ ~QGeometryViewPrivate();
+
++ static QGeometryViewPrivate *get(QGeometryView *q);
++
+ void update() override;
+
+ Q_DECLARE_PUBLIC(QGeometryView)
+@@ -85,6 +89,30 @@ public:
+ bool m_dirty;
+ };
+
++class BoundingVolumeCalculator
++{
++public:
++ BoundingVolumeCalculator() = default;
++
++ const QVector3D min() const { return m_min; }
++ const QVector3D max() const { return m_max; }
++ const QVector3D center() const { return m_center; }
++ float radius() const { return m_radius; }
++ bool isValid() const { return m_radius >= 0.f; }
++
++ bool apply(QAttribute *positionAttribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex);
++
++private:
++ QVector3D m_min;
++ QVector3D m_max;
++ QVector3D m_center;
++ float m_radius = -1.f;
++};
++
+ } // namespace Qt3DCore
+
+ QT_END_NAMESPACE
+diff --git a/src/core/jobs/calcboundingvolumejob.cpp b/src/core/jobs/calcboundingvolumejob.cpp
+new file mode 100644 (file)
+index 0000000..37ee92e
+--- /dev/null
++++ b/src/core/jobs/calcboundingvolumejob.cpp
+@@ -0,0 +1,317 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "calcboundingvolumejob_p.h"
++
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++
++#include
++#if QT_CONFIG(concurrent)
++#include
++#endif
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++namespace {
++
++BoundingVolumeComputeData findBoundingVolumeComputeData(QGeometryView *node)
++{
++ if (!node->isEnabled())
++ return {};
++
++ if (node->primitiveType() == QGeometryView::Patches)
++ return {};
++
++ QGeometry *geom = node->geometry();
++ QGeometryPrivate *dgeom = QGeometryPrivate::get(geom);
++ if (!geom)
++ return {};
++
++ int drawVertexCount = node->vertexCount(); // may be 0, gets changed below if so
++
++ QAttribute *positionAttribute = dgeom->m_boundingVolumePositionAttribute;
++ const QVector attributes = geom->attributes();
++
++ // Use the default position attribute if attribute is null
++ if (!positionAttribute) {
++ for (QAttribute *attr : attributes) {
++ if (attr->name() == QAttribute::defaultPositionAttributeName()) {
++ positionAttribute = attr;
++ break;
++ }
++ }
++ }
++
++ if (!positionAttribute
++ || positionAttribute->attributeType() != QAttribute::VertexAttribute
++ || positionAttribute->vertexBaseType() != QAttribute::Float
++ || positionAttribute->vertexSize() < 3) {
++ qWarning("findBoundingVolumeComputeData: Position attribute not suited for bounding volume computation");
++ return {};
++ }
++
++ Qt3DCore::QBuffer *positionBuffer = positionAttribute->buffer();
++ // No point in continuing if the positionAttribute doesn't have a suitable buffer
++ if (!positionBuffer) {
++ qWarning("findBoundingVolumeComputeData: Position attribute not referencing a valid buffer");
++ return {};
++ }
++
++ // Check if there is an index attribute.
++ QAttribute *indexAttribute = nullptr;
++ Qt3DCore::QBuffer *indexBuffer = nullptr;
++
++ for (const auto attr : attributes) {
++ if (attr->attributeType() == QAttribute::IndexAttribute) {
++ indexBuffer = attr->buffer();
++ if (indexBuffer) {
++ indexAttribute = attr;
++
++ if (!drawVertexCount)
++ drawVertexCount = static_cast(indexAttribute->count());
++
++ static const QAttribute::VertexBaseType validIndexTypes[] = {
++ QAttribute::UnsignedShort,
++ QAttribute::UnsignedInt,
++ QAttribute::UnsignedByte
++ };
++
++ if (std::find(std::begin(validIndexTypes),
++ std::end(validIndexTypes),
++ indexAttribute->vertexBaseType()) == std::end(validIndexTypes)) {
++ qWarning() << "findBoundingVolumeComputeData: Unsupported index attribute type" << indexAttribute->name() << indexAttribute->vertexBaseType();
++ return {};
++ }
++
++ break;
++ }
++ }
++ }
++
++ if (!indexAttribute && !drawVertexCount)
++ drawVertexCount = static_cast(positionAttribute->count());
++
++ return { nullptr, nullptr, positionAttribute, indexAttribute, drawVertexCount };
++}
++
++BoundingVolumeComputeResult calculateLocalBoundingVolume(const BoundingVolumeComputeData &data) {
++ BoundingVolumeCalculator calculator;
++ if (calculator.apply(data.positionAttribute, data.indexAttribute, data.vertexCount,
++ data.provider->view()->primitiveRestartEnabled(),
++ data.provider->view()->restartIndexValue()))
++ return {
++ data.entity, data.provider, data.positionAttribute, data.indexAttribute,
++ calculator.min(), calculator.max(),
++ calculator.center(), calculator.radius()
++ };
++ return {};
++}
++
++bool isTreeEnabled(QEntity *entity) {
++ if (!entity->isEnabled())
++ return false;
++
++ QEntity *parent = entity->parentEntity();
++ while (parent) {
++ if (!parent->isEnabled())
++ return false;
++ parent = parent->parentEntity();
++ }
++
++ return true;
++}
++
++struct UpdateBoundFunctor
++{
++ // This define is required to work with QtConcurrent
++ typedef QVector result_type;
++ result_type operator ()(const BoundingVolumeComputeData &data)
++ {
++ return { calculateLocalBoundingVolume(data) };
++ }
++};
++
++struct ReduceUpdateBoundFunctor
++{
++ void operator ()(QVector &result, const QVector &values)
++ {
++ result += values;
++ }
++};
++
++} // anonymous
++
++//class CalculateBoundingVolumeJobPrivate : public Qt3DCore::QAspectJobPrivate
++//{
++//public:
++// CalculateBoundingVolumeJobPrivate() { }
++// ~CalculateBoundingVolumeJobPrivate() override { }
++
++// void postFrame(Qt3DCore::QAspectManager *manager) override
++// {
++// Q_UNUSED(manager)
++//// for (Geometry *backend : qAsConst(m_updatedGeometries)) {
++//// Qt3DCore::QGeometry *node = qobject_cast(manager->lookupNode(backend->peerId()));
++//// if (!node)
++//// continue;
++//// Qt3DCore::QGeometryPrivate *dNode = static_cast(Qt3DCore::QNodePrivate::get(node));
++//// dNode->setExtent(backend->min(), backend->max());
++//// }
++// }
++
++//};
++
++CalculateBoundingVolumeJob::CalculateBoundingVolumeJob()
++ : Qt3DCore::QAspectJob()
++ , m_root(nullptr)
++{
++ SET_JOB_RUN_STAT_TYPE(this, JobTypes::CalcBoundingVolume, 0)
++}
++
++void CalculateBoundingVolumeJob::run()
++{
++ m_results.clear();
++
++ QHash dirtyEntities;
++ QNodeVisitor visitor;
++ visitor.traverse(m_root, [](QNode *) {}, [&dirtyEntities](QEntity *entity) {
++ if (!isTreeEnabled(entity))
++ return;
++
++ const auto bvProviders = entity->componentsOfType();
++ if (bvProviders.isEmpty())
++ return;
++
++ // we go through the list until be find a dirty provider,
++ // or THE primary provider
++ bool foundBV = false;
++ for (auto bv: bvProviders) {
++ if (!bv->view())
++ continue;
++ auto dbv = QBoundingVolumePrivate::get(bv);
++ if (foundBV && !dbv->m_primaryProvider)
++ continue;
++
++ auto bvdata = findBoundingVolumeComputeData(bv->view());
++ if (!bvdata.valid())
++ continue;
++ bvdata.entity = entity;
++ bvdata.provider = bv;
++
++ bool dirty = QEntityPrivate::get(entity)->m_dirty;
++ dirty |= QGeometryViewPrivate::get(bv->view())->m_dirty;
++ dirty |= QGeometryPrivate::get(bv->view()->geometry())->m_dirty;
++ dirty |= QAttributePrivate::get(bvdata.positionAttribute)->m_dirty;
++ dirty |= QBufferPrivate::get(bvdata.positionAttribute->buffer())->m_dirty;
++ if (bvdata.indexAttribute) {
++ dirty |= QAttributePrivate::get(bvdata.indexAttribute)->m_dirty;
++ dirty |= QBufferPrivate::get(bvdata.indexAttribute->buffer())->m_dirty;
++ }
++
++ if (dbv->m_primaryProvider) {
++ if (dirty)
++ dirtyEntities[entity] = bvdata;
++ break;
++ } else if (dirty) {
++ dirtyEntities[entity] = bvdata;
++ foundBV = true;
++ }
++ }
++ });
++
++#if QT_CONFIG(concurrent)
++ if (dirtyEntities.size() > 1) {
++ UpdateBoundFunctor functor;
++ ReduceUpdateBoundFunctor reduceFunctor;
++ m_results = QtConcurrent::blockingMappedReduced(dirtyEntities, functor, reduceFunctor);
++ } else
++#endif
++ {
++ for (auto it = dirtyEntities.begin(); it != dirtyEntities.end(); ++it) {
++ auto res = calculateLocalBoundingVolume(it.value());
++ if (res.valid())
++ m_results.push_back(res); // How do we push it to the backends????
++ }
++ }
++
++ for (auto result: qAsConst(m_results)) {
++ // set the results
++ QBoundingVolumePrivate::get(result.provider)->setImplicitBounds(result.m_min, result.m_max, result.m_center, result.m_radius);
++ }
++}
++
++void CalculateBoundingVolumeJob::postFrame(QAspectEngine *aspectEngine)
++{
++ Q_UNUSED(aspectEngine)
++
++ for (auto result: qAsConst(m_results)) {
++ // reset dirty flags
++ QEntityPrivate::get(result.entity)->m_dirty = false;
++ QGeometryViewPrivate::get(result.provider->view())->m_dirty = false;
++ QGeometryPrivate::get(result.provider->view()->geometry())->m_dirty = false;
++ QAttributePrivate::get(result.positionAttribute)->m_dirty = false;
++ QBufferPrivate::get(result.positionAttribute->buffer())->m_dirty = false;
++ if (result.indexAttribute) {
++ QAttributePrivate::get(result.indexAttribute)->m_dirty = false;
++ QBufferPrivate::get(result.indexAttribute->buffer())->m_dirty = false;
++ }
++ }
++
++ m_results.clear();
++}
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
+diff --git a/src/core/jobs/calcboundingvolumejob_p.h b/src/core/jobs/calcboundingvolumejob_p.h
+new file mode 100644 (file)
+index 0000000..498fe76
+--- /dev/null
++++ b/src/core/jobs/calcboundingvolumejob_p.h
+@@ -0,0 +1,113 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
++#define QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists purely as an
++// implementation detail. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++class CalculateBoundingVolumeJobPrivate;
++class QEntity;
++class QAttribute;
++class QBoundingVolume;
++
++struct BoundingVolumeComputeData {
++ QEntity *entity = nullptr;
++ QBoundingVolume *provider = nullptr;
++ QAttribute *positionAttribute = nullptr;
++ QAttribute *indexAttribute = nullptr;
++ int vertexCount = 0;
++
++ bool valid() const { return positionAttribute != nullptr; }
++};
++
++struct BoundingVolumeComputeResult {
++ QEntity *entity = nullptr;
++ QBoundingVolume *provider = nullptr;
++ QAttribute *positionAttribute = nullptr;
++ QAttribute *indexAttribute = nullptr;
++ QVector3D m_min;
++ QVector3D m_max;
++ QVector3D m_center;
++ float m_radius = -1.f;
++
++ bool valid() const { return m_radius >= 0.f; }
++};
++
++class Q_3DCORE_PRIVATE_EXPORT CalculateBoundingVolumeJob : public Qt3DCore::QAspectJob
++{
++public:
++ explicit CalculateBoundingVolumeJob();
++
++ void setRoot(QEntity *root) { m_root = root; }
++ void run() override;
++ void postFrame(QAspectEngine *aspectEngine) override;
++
++private:
++ Q_DECLARE_PRIVATE(CalculateBoundingVolumeJob)
++ QEntity *m_root;
++ QVector m_results;
++};
++
++typedef QSharedPointer CalculateBoundingVolumeJobPtr;
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++#endif // QT3DCORE_CALCBOUNDINGVOLUMEJOB_H
+diff --git a/src/core/jobs/job_common_p.h b/src/core/jobs/job_common_p.h
+new file mode 100644 (file)
+index 0000000..6cbf178
+--- /dev/null
++++ b/src/core/jobs/job_common_p.h
+@@ -0,0 +1,73 @@
++/****************************************************************************
++**
++** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_JOB_COMMON_P_H
++#define QT3DCORE_JOB_COMMON_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists purely as an
++// implementation detail. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++
++namespace JobTypes {
++
++ enum JobType {
++ LoadBuffer = 4096,
++ CalcBoundingVolume,
++ };
++
++} // JobTypes
++
++} // Qt3DCore
++
++QT_END_NAMESPACE
++
++#endif // QT3DCORE_JOB_COMMON_P_H
+diff --git a/src/core/jobs/jobs.pri b/src/core/jobs/jobs.pri
+index 5d262f5..a045339 100644 (file)
+--- a/src/core/jobs/jobs.pri
++++ b/src/core/jobs/jobs.pri
+@@ -4,7 +4,8 @@ SOURCES += \
+ $$PWD/qaspectjobmanager.cpp \
+ $$PWD/qabstractaspectjobmanager.cpp \
+ $$PWD/qthreadpooler.cpp \
+- $$PWD/task.cpp
++ $$PWD/task.cpp \
++ $$PWD/calcboundingvolumejob.cpp
+
+ HEADERS += \
+ $$PWD/qaspectjob.h \
+@@ -13,7 +14,9 @@ HEADERS += \
+ $$PWD/qaspectjobmanager_p.h \
+ $$PWD/qabstractaspectjobmanager_p.h \
+ $$PWD/task_p.h \
+- $$PWD/qthreadpooler_p.h
++ $$PWD/qthreadpooler_p.h \
++ $$PWD/calcboundingvolumejob_p.h \
++ $$PWD/job_common_p.h
+
+ INCLUDEPATH += $$PWD
diff --git a/desktop/toolkit/qt6/qt6-quick3d/pspec.xml b/desktop/toolkit/qt6/qt6-quick3d/pspec.xml
new file mode 100755
index 0000000000..60e8215369
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3d/pspec.xml
@@ -0,0 +1,76 @@
+
+
+
+
+ qt6-quick3d
+ http://qt-project.org/
+
+ Stefan Gronewold
+ groni@pisilinux.org
+
+ custom
+ FDL
+ GPL3
+ LGPL3
+ desktop
+ Experimental module providing APIs and a host tool to host tool to perform graphics and compute shader conditioning for the upcoming Qt graphics abstraction layer
+ Experimental module providing APIs and a host tool to host tool to perform graphics and compute shader conditioning for the upcoming Qt graphics abstraction layer
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtquick3d-everywhere-src-6.4.0.tar.xz
+
+ ninja
+ cmake
+ vulkan-headers
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-shadertools-devel
+ assimp-devel
+
+
+ qtquick3d-fix-build-with-gcc11.patch
+
+
+
+ qt6-quick3d
+ Experimental module providing APIs and a host tool to host tool to perform graphics and compute shader conditioning for the upcoming Qt graphics abstraction layer
+
+ qt6-base
+ qt6-shadertools
+ qt6-declarative
+ libgcc
+ assimp
+
+
+ /usr/bin
+ /usr/lib/qt6/bin
+ /usr/lib/qt6
+ /usr/lib
+ /usr/share/doc
+
+
+
+
+ qt6-quick3d-devel
+ Development files for qt6-quick3d
+
+ qt6-base-devel
+ qt6-declarative-devel
+ qt6-quick3d
+ qt6-shadertools-devel
+
+
+ /usr/include/qt6
+ /usr/lib/cmake
+ /usr/lib/pkgconfig
+
+
+
+
+
+ 2022-10-06
+ 6.4.0
+ First release
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-quick3dphysics/actions.py b/desktop/toolkit/qt6/qt6-quick3dphysics/actions.py
new file mode 100644
index 0000000000..ac8c6e4bc5
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3dphysics/actions.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import qt6
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-quick3dphysics/pspec.xml b/desktop/toolkit/qt6/qt6-quick3dphysics/pspec.xml
new file mode 100644
index 0000000000..b3c110b9ac
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3dphysics/pspec.xml
@@ -0,0 +1,105 @@
+
+
+
+
+ qt6-quick3dphysics
+ https://www.qt.io
+
+ PisiLinux Community
+ admins@pisilinux.org
+
+ custom, FDL, GPL3
+ library
+ Physics engine integration for Qt Quick 3D
+ qt6-quick3dphysics
+ Physics engine integration for Qt Quick 3D
+ https://download.qt.io/official_releases/qt/6.4/6.4.0/submodules/qtquick3dphysics-everywhere-src-6.4.0.tar.xz
+
+
+
+
+
+ qt6-quick3dphysics
+
+
+ /
+
+
+
+
+
+
+
+
+
+ 2022-10-07
+ 6.4.0
+ First release
+ PisiLinux Community
+ admins@pisilinux.org
+
+
+
diff --git a/desktop/toolkit/qt6/qt6-quick3dphysics/translations.xml b/desktop/toolkit/qt6/qt6-quick3dphysics/translations.xml
new file mode 100644
index 0000000000..8e58e31b97
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quick3dphysics/translations.xml
@@ -0,0 +1,8 @@
+
+
+
+ qt6-quick3dphysics
+ Physics engine integration for Qt Quick 3D
+ Physics engine integration for Qt Quick 3D
+
+
diff --git a/desktop/toolkit/qt6/qt6-quicktimeline/actions.py b/desktop/toolkit/qt6/qt6-quicktimeline/actions.py
new file mode 100755
index 0000000000..b486d40837
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quicktimeline/actions.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/copyleft/gpl.txt
+
+from pisi.actionsapi import qt6
+from pisi.actionsapi import pisitools
+
+
+
+def setup():
+ qt6.configure()
+
+def build():
+ qt6.make()
+
+def install():
+ qt6.install()
+
+
+ pisitools.dodoc("LICENSES/*")
diff --git a/desktop/toolkit/qt6/qt6-quicktimeline/files/x.patch b/desktop/toolkit/qt6/qt6-quicktimeline/files/x.patch
new file mode 100644
index 0000000000..7c13e58d6a
--- /dev/null
+++ b/desktop/toolkit/qt6/qt6-quicktimeline/files/x.patch
@@ -0,0 +1,1480 @@
+If an entity uses a QBoundingVolume and a QGeometryView, compute
+the bounding volume data in the core aspect. All other cases will
+still happen in the render aspect.
+
+Result not currently used (ie it's done again in render aspect).
+
+Change-Id: I4b5ed21bac42b79777c3112aa76d876ac5b6f52d
+Reviewed-by: Paul Lemire
+14 files changed:
+src/core/aspect/qcoreaspect.cpp patch | blob | history
+src/core/aspect/qcoreaspect.h patch | blob | history
+src/core/aspect/qcoreaspect_p.h patch | blob | history
+src/core/core.pro patch | blob | history
+src/core/geometry/bufferutils_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/buffervisitor_p.h [new file with mode: 0644] patch | blob
+src/core/geometry/geometry.pri patch | blob | history
+src/core/geometry/qgeometry_p.h patch | blob | history
+src/core/geometry/qgeometryview.cpp patch | blob | history
+src/core/geometry/qgeometryview_p.h patch | blob | history
+src/core/jobs/calcboundingvolumejob.cpp [new file with mode: 0644] patch | blob
+src/core/jobs/calcboundingvolumejob_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/job_common_p.h [new file with mode: 0644] patch | blob
+src/core/jobs/jobs.pri patch | blob | history
+
+diff --git a/src/core/aspect/qcoreaspect.cpp b/src/core/aspect/qcoreaspect.cpp
+index 48f9aaf..dc3566e 100644 (file)
+--- a/src/core/aspect/qcoreaspect.cpp
++++ b/src/core/aspect/qcoreaspect.cpp
+@@ -39,12 +39,16 @@
+
+ #include "qcoreaspect.h"
+ #include "qcoreaspect_p.h"
++#include
++#include
++#include
+
+ QT_BEGIN_NAMESPACE
+
+ using namespace Qt3DCore;
+
+ QCoreAspectPrivate::QCoreAspectPrivate()
++ : Qt3DCore::QAbstractAspectPrivate()
+ {
+
+ }
+@@ -65,7 +69,7 @@ void QCoreAspectPrivate::frameDone()
+ }
+
+ QCoreAspect::QCoreAspect(QObject *parent)
+- : Qt3DCore::QAbstractAspect(parent)
++ : Qt3DCore::QAbstractAspect(*new QCoreAspectPrivate, parent)
+ {
+
+ }
+@@ -75,10 +79,28 @@ QCoreAspect::~QCoreAspect()
+
+ }
+
++QAspectJobPtr QCoreAspect::calculateBoundingVolumeJob() const
++{
++ Q_D(const QCoreAspect);
++ return d->m_calculateBoundingVolumeJob;
++}
++
+ QVector QCoreAspect::jobsToExecute(qint64 time)
+ {
++ Q_D(QCoreAspect);
+ Q_UNUSED(time)
+- return {};
++
++ QVector jobs;
++
++ auto scene = d->m_aspectManager->scene();
++ auto dirtyBits = scene->dirtyBits();
++
++ if (dirtyBits & QScene::GeometryDirty ||
++ dirtyBits & QScene::BuffersDirty) {
++ jobs.push_back(d->m_calculateBoundingVolumeJob);
++ }
++
++ return jobs;
+ }
+
+ QVariant QCoreAspect::executeCommand(const QStringList &args)
+@@ -89,12 +111,25 @@ QVariant QCoreAspect::executeCommand(const QStringList &args)
+
+ void QCoreAspect::onRegistered()
+ {
++ Q_D(QCoreAspect);
+
++ if (d->m_calculateBoundingVolumeJob.isNull())
++ d->m_calculateBoundingVolumeJob = CalculateBoundingVolumeJobPtr::create();
+ }
+
+-void QCoreAspect::onUnregistered()
++void QCoreAspect::onEngineStartup()
+ {
++ Q_D(QCoreAspect);
+
++ Q_ASSERT(d->m_calculateBoundingVolumeJob);
++ d->m_calculateBoundingVolumeJob->setRoot(d->m_root);
++}
++
++void QCoreAspect::frameDone()
++{
++ Q_D(QCoreAspect);
++ auto scene = d->m_aspectManager->scene();
++ scene->clearDirtyBits();
+ }
+
+ QT_END_NAMESPACE
+diff --git a/src/core/aspect/qcoreaspect.h b/src/core/aspect/qcoreaspect.h
+index 27c72f4..071b738 100644 (file)
+--- a/src/core/aspect/qcoreaspect.h
++++ b/src/core/aspect/qcoreaspect.h
+@@ -55,6 +55,8 @@ public:
+ explicit QCoreAspect(QObject *parent = nullptr);
+ ~QCoreAspect();
+
++ QAspectJobPtr calculateBoundingVolumeJob() const;
++
+ protected:
+ Q_DECLARE_PRIVATE(QCoreAspect)
+
+@@ -62,7 +64,8 @@ private:
+ QVector jobsToExecute(qint64 time) override;
+ QVariant executeCommand(const QStringList &args) override;
+ void onRegistered() override;
+- void onUnregistered() override;
++ void onEngineStartup() override;
++ void frameDone() override;
+ };
+
+ }
+diff --git a/src/core/aspect/qcoreaspect_p.h b/src/core/aspect/qcoreaspect_p.h
+index ca665fa..cda0a14 100644 (file)
+--- a/src/core/aspect/qcoreaspect_p.h
++++ b/src/core/aspect/qcoreaspect_p.h
+@@ -55,10 +55,15 @@
+ #include
+ #include
+
++#include
++
+ QT_BEGIN_NAMESPACE
+
+ namespace Qt3DCore {
+
++class CalculateBoundingVolumeJob;
++using CalculateBoundingVolumeJobPtr = QSharedPointer;
++
+ class Q_3DCORE_PRIVATE_EXPORT QCoreAspectPrivate : public Qt3DCore::QAbstractAspectPrivate
+ {
+ public:
+@@ -71,6 +76,7 @@ public:
+ void frameDone() override;
+
+ bool m_initialized;
++ CalculateBoundingVolumeJobPtr m_calculateBoundingVolumeJob;
+ };
+
+ }
+diff --git a/src/core/core.pro b/src/core/core.pro
+index b149497..846e9d8 100644 (file)
+--- a/src/core/core.pro
++++ b/src/core/core.pro
+@@ -1,7 +1,8 @@
+-TARGET = Qt3DCore
+-MODULE = 3dcore
++TARGET = Qt3DCore
++MODULE = 3dcore
+
+-QT = core-private gui-private network
++QT = core-private gui-private network
++QT_FOR_PRIVATE = concurrent
+
+ gcov {
+ QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
+diff --git a/src/core/geometry/bufferutils_p.h b/src/core/geometry/bufferutils_p.h
+new file mode 100644 (file)
+index 0000000..1b83d99
+--- /dev/null
++++ b/src/core/geometry/bufferutils_p.h
+@@ -0,0 +1,113 @@
++/****************************************************************************
++**
++** Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERUTILS_P_H
++#define QT3DCORE_BUFFERUTILS_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++
++namespace Qt3DCore {
++
++class QGeometryView;
++class QBuffer;
++
++struct BufferInfo
++{
++ BufferInfo()
++ : type(Qt3DCore::QAttribute::VertexBaseType::Float)
++ , dataSize(0)
++ , count(0)
++ , byteStride(0)
++ , byteOffset(0)
++ , restartEnabled(false)
++ , restartIndexValue(-1)
++ {}
++
++ QByteArray data;
++ Qt3DCore::QAttribute::VertexBaseType type;
++ uint dataSize;
++ uint count;
++ uint byteStride;
++ uint byteOffset;
++ bool restartEnabled;
++ int restartIndexValue;
++};
++
++
++namespace BufferTypeInfo {
++
++ template struct EnumToType;
++ template <> struct EnumToType { typedef const char type; };
++ template <> struct EnumToType { typedef const uchar type; };
++ template <> struct EnumToType { typedef const short type; };
++ template <> struct EnumToType { typedef const ushort type; };
++ template <> struct EnumToType { typedef const int type; };
++ template <> struct EnumToType { typedef const uint type; };
++ template <> struct EnumToType { typedef const float type; };
++ template <> struct EnumToType { typedef const double type; };
++
++ template
++ typename EnumToType::type *castToType(const QByteArray &u, uint byteOffset)
++ {
++ return reinterpret_cast< typename EnumToType::type *>(u.constData() + byteOffset);
++ }
++
++} // namespace BufferTypeInfo
++
++} // namespace Qt3DCore
++
++QT_END_NAMESPACE
++
++
++#endif // QT3DCORE_BUFFERUTILS_P_H
+diff --git a/src/core/geometry/buffervisitor_p.h b/src/core/geometry/buffervisitor_p.h
+new file mode 100644 (file)
+index 0000000..69cfb9b
+--- /dev/null
++++ b/src/core/geometry/buffervisitor_p.h
+@@ -0,0 +1,285 @@
++/****************************************************************************
++**
++** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the Qt3D module of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** 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.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#ifndef QT3DCORE_BUFFERVISITOR_P_H
++#define QT3DCORE_BUFFERVISITOR_P_H
++
++//
++// W A R N I N G
++// -------------
++//
++// This file is not part of the Qt API. It exists for the convenience
++// of other Qt classes. This header file may change from version to
++// version without notice, or even be removed.
++//
++// We mean it.
++//
++
++#include
++#include
++#include
++#include
++
++QT_BEGIN_NAMESPACE
++
++namespace Qt3DCore {
++class QEntity;
++
++template
++class Q_AUTOTEST_EXPORT BufferVisitor
++{
++public:
++ explicit BufferVisitor() = default;
++ virtual ~BufferVisitor() = default;
++
++ virtual void visit(uint ndx, ValueType x) {
++ Q_UNUSED(ndx) Q_UNUSED(x)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z)
++ }
++ virtual void visit(uint ndx, ValueType x, ValueType y, ValueType z, ValueType w) {
++ Q_UNUSED(ndx) Q_UNUSED(x) Q_UNUSED(y) Q_UNUSED(z) Q_UNUSED(w)
++ }
++
++ bool apply(QAttribute *attribute,
++ QAttribute *indexAttribute,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ if (attribute->vertexBaseType() != VertexBaseType)
++ return false;
++ if (attribute->vertexSize() < dataSize)
++ return false;
++
++ auto data = attribute->buffer()->data();
++ auto vertexBuffer = BufferTypeInfo::castToType(data, attribute->byteOffset());
++
++ if (indexAttribute) {
++ auto indexData = indexAttribute->buffer()->data();
++ switch (indexAttribute->vertexBaseType()) {
++ case Qt3DCore::QAttribute::UnsignedShort: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedInt: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ case Qt3DCore::QAttribute::UnsignedByte: {
++ auto indexBuffer = BufferTypeInfo::castToType(indexData, indexAttribute->byteOffset());
++ traverseCoordinateIndexed(vertexBuffer, indexBuffer, attribute->byteStride(), drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ }
++ default: Q_UNREACHABLE();
++ }
++ } else {
++ switch (dataSize) {
++ case 1: traverseCoordinates1(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 2: traverseCoordinates2(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 3: traverseCoordinates3(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ case 4: traverseCoordinates4(vertexBuffer, attribute->byteStride(), drawVertexCount); break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ return true;
++ }
++
++protected:
++ template
++ void traverseCoordinateIndexed(VertexBufferType *vertexBuffer,
++ IndexBufferType *indexBuffer,
++ int vertexByteStride,
++ int drawVertexCount,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ switch (dataSize) {
++ case 1: traverseCoordinates1Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 2: traverseCoordinates2Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 3: traverseCoordinates3Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ case 4: traverseCoordinates4Indexed(vertexBuffer, vertexByteStride, indexBuffer, drawVertexCount,
++ primitiveRestartEnabled, primitiveRestartIndex);
++ break;
++ default: Q_UNREACHABLE();
++ }
++ }
++
++ template
++ void traverseCoordinates1(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0]);
++ coordinates += stride;
++ }
++ }
++
++ template
++ void traverseCoordinates1Indexed(Coordinate *coordinates,
++ const uint byteStride,
++ IndexElem *indices,
++ const uint count,
++ bool primitiveRestartEnabled,
++ int primitiveRestartIndex)
++ {
++ const uint stride = byteStride / sizeof(Coordinate);
++ for (uint i = 0; i < count; ++i) {
++ if (!primitiveRestartEnabled || static_cast(indices[i]) != primitiveRestartIndex) {
++ const uint n = stride * indices[i];
++ visit(i, coordinates[n]);
++ }
++ }
++ }
++
++ template
++ void traverseCoordinates2(Coordinate *coordinates,
++ const uint byteStride,
++ const uint count)
++ {
++ const uint stride = byteStride ? byteStride / sizeof(Coordinate) : 2;
++ for (uint ndx = 0; ndx < count; ++ndx) {
++ visit(ndx, coordinates[0], coordinates[1]);
++ coordinates += stride;
++ }
++ }
++
++
++ template