diff options
Diffstat (limited to 'src/core')
45 files changed, 120 insertions, 363 deletions
diff --git a/src/core/aspect/aspect.pri b/src/core/aspect/aspect.pri deleted file mode 100644 index b9c4d5099..000000000 --- a/src/core/aspect/aspect.pri +++ /dev/null @@ -1,13 +0,0 @@ -SOURCES += \ - $$PWD/qcoreaspect.cpp \ - $$PWD/qcoresettings.cpp \ - $$PWD/coresettings.cpp - -HEADERS += \ - $$PWD/qcoreaspect.h \ - $$PWD/qcoreaspect_p.h \ - $$PWD/qcoresettings.h \ - $$PWD/qcoresettings_p.h \ - $$PWD/coresettings_p.h - -INCLUDEPATH += $$PWD diff --git a/src/core/aspect/coresettings.cpp b/src/core/aspect/coresettings.cpp index 51f034ec8..df64fd614 100644 --- a/src/core/aspect/coresettings.cpp +++ b/src/core/aspect/coresettings.cpp @@ -6,7 +6,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; +namespace Qt3DCore { CoreSettings::CoreSettings() : QBackendNode() @@ -57,4 +57,6 @@ void CoreSettingsFunctor::destroy(Qt3DCore::QNodeId id) const m_settings = nullptr; } +} // namespace Qt3DCore + QT_END_NAMESPACE diff --git a/src/core/aspect/qcoreaspect.cpp b/src/core/aspect/qcoreaspect.cpp index 628734b9f..0f14d4326 100644 --- a/src/core/aspect/qcoreaspect.cpp +++ b/src/core/aspect/qcoreaspect.cpp @@ -11,7 +11,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; +namespace Qt3DCore { QCoreAspectPrivate::QCoreAspectPrivate() : Qt3DCore::QAbstractAspectPrivate() @@ -114,6 +114,8 @@ void QCoreAspect::frameDone() scene->clearDirtyBits(); } +} // namespace Qt3DCore + QT_END_NAMESPACE QT3D_REGISTER_NAMESPACED_ASPECT("core", QT_PREPEND_NAMESPACE(Qt3DCore), QCoreAspect) diff --git a/src/core/aspect/qcoresettings.cpp b/src/core/aspect/qcoresettings.cpp index 84aaa0df2..374646bb5 100644 --- a/src/core/aspect/qcoresettings.cpp +++ b/src/core/aspect/qcoresettings.cpp @@ -7,8 +7,6 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; - /*! \class Qt3DCore::QCoreSettings \brief The QCoreSettings class holds settings related to core data handling process. @@ -73,7 +71,7 @@ should keep this enabled (even when providing explicit bounding volumes sizes using BoundingVolume). */ /*! -\property QCoreSettings::boundingVolumesEnabled +\property Qt3DCore::QCoreSettings::boundingVolumesEnabled Holds whether bounding volumes handling is enabled. This is true by default. Disabling this allows to reduce the amount of computations diff --git a/src/core/aspects/aspectcommanddebugger.cpp b/src/core/aspects/aspectcommanddebugger.cpp index d2d19d011..e6c9d7232 100644 --- a/src/core/aspects/aspectcommanddebugger.cpp +++ b/src/core/aspects/aspectcommanddebugger.cpp @@ -37,9 +37,9 @@ void AspectCommandDebugger::ReadBuffer::insert(const QByteArray &array) void AspectCommandDebugger::ReadBuffer::trim() { if (startIdx != endIdx && startIdx != 0) { - memcpy(buffer.data(), - buffer.constData() + startIdx, - size()); + memmove(buffer.data(), + buffer.constData() + startIdx, + size()); endIdx -= startIdx; startIdx = 0; } @@ -53,17 +53,17 @@ AspectCommandDebugger::AspectCommandDebugger(QSystemInformationService *parent) void AspectCommandDebugger::initialize() { - QObject::connect(this, &QTcpServer::newConnection, [this] { + QObject::connect(this, &QTcpServer::newConnection, this, [this] { QTcpSocket *socket = nextPendingConnection(); m_connections.push_back(socket); - QObject::connect(socket, &QTcpSocket::disconnected, [this, socket] { + QObject::connect(socket, &QTcpSocket::disconnected, this, [this, socket] { m_connections.removeOne(socket); // Destroy object to make sure all QObject connection are removed socket->deleteLater(); }); - QObject::connect(socket, &QTcpSocket::readyRead, [this, socket] { + QObject::connect(socket, &QTcpSocket::readyRead, this, [this, socket] { onCommandReceived(socket); }); }); diff --git a/src/core/aspects/aspects.pri b/src/core/aspects/aspects.pri deleted file mode 100644 index 268a2fc37..000000000 --- a/src/core/aspects/aspects.pri +++ /dev/null @@ -1,20 +0,0 @@ -SOURCES += \ - $$PWD/qabstractaspect.cpp \ - $$PWD/qaspectengine.cpp \ - $$PWD/qaspectfactory.cpp \ - $$PWD/qaspectmanager.cpp \ - $$PWD/aspectcommanddebugger.cpp - -HEADERS += \ - $$PWD/qabstractaspect.h \ - $$PWD/qaspectengine.h \ - $$PWD/qabstractaspect_p.h \ - $$PWD/qaspectengine_p.h \ - $$PWD/qaspectfactory_p.h \ - $$PWD/qaspectmanager_p.h \ - $$PWD/aspectcommanddebugger_p.h - -INCLUDEPATH += $$PWD - -include($$QT3D_BUILD_ROOT/src/core/qt3dcore-config.pri) -QT_FOR_CONFIG += 3dcore-private diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 67cbc2f80..8ba5abd63 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -65,7 +65,7 @@ void QAbstractAspectPrivate::unregisterBackendType(const QMetaObject &mo) */ /*! - * \fn void Qt3DCore::QAbstractAspect::registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor) + * \fn template <class Frontend> void Qt3DCore::QAbstractAspect::registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor) * Registers backend with \a functor. */ diff --git a/src/core/aspects/qaspectmanager.cpp b/src/core/aspects/qaspectmanager.cpp index 2b99d972a..199d293ed 100644 --- a/src/core/aspects/qaspectmanager.cpp +++ b/src/core/aspects/qaspectmanager.cpp @@ -273,17 +273,14 @@ void QAspectManager::addNodes(const QList<QNode *> &nodes) // as this call) The idea is we want to avoid modifying the backend tree if // the Renderer hasn't allowed processFrame to continue yet - QList<NodeTreeChange> treeChanges; - treeChanges.reserve(nodes.size()); + m_nodeTreeChanges.reserve(m_nodeTreeChanges.size() + nodes.size()); for (QNode *node : nodes) { - treeChanges.push_back({ node->id(), - QNodePrivate::get(node)->m_typeInfo, - NodeTreeChange::Added, - node }); + m_nodeTreeChanges.push_back({ node->id(), + QNodePrivate::get(node)->m_typeInfo, + NodeTreeChange::Added, + node }); } - - m_nodeTreeChanges += treeChanges; } // Main Thread -> immediately following node destruction (call from QNode dtor) @@ -512,13 +509,13 @@ void QAspectManager::processFrame() // Sync node / subnode relationship changes const auto dirtySubNodes = m_changeArbiter->takeDirtyEntityComponentNodes(); - if (dirtySubNodes.size()) + if (!dirtySubNodes.empty()) for (QAbstractAspect *aspect : std::as_const(m_aspects)) QAbstractAspectPrivate::get(aspect)->syncDirtyEntityComponentNodes(dirtySubNodes); // Sync property updates const auto dirtyFrontEndNodes = m_changeArbiter->takeDirtyFrontEndNodes(); - if (dirtyFrontEndNodes.size()) + if (!dirtyFrontEndNodes.empty()) for (QAbstractAspect *aspect : std::as_const(m_aspects)) QAbstractAspectPrivate::get(aspect)->syncDirtyFrontEndNodes(dirtyFrontEndNodes); } diff --git a/src/core/core.pri b/src/core/core.pri deleted file mode 100644 index 1ff71d3fe..000000000 --- a/src/core/core.pri +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qt3dcore_global.h \ - $$PWD/qtickclock_p.h \ - $$PWD/qscheduler_p.h \ - $$PWD/corelogging_p.h \ - $$PWD/qchangearbiter_p.h \ - $$PWD/qt3dcore_global_p.h \ - $$PWD/qurlhelper_p.h \ - $$PWD/qscene_p.h \ - $$PWD/qabstractfrontendnodemanager_p.h - -SOURCES += \ - $$PWD/qtickclock.cpp \ - $$PWD/qscheduler.cpp \ - $$PWD/qchangearbiter.cpp \ - $$PWD/corelogging.cpp \ - $$PWD/qurlhelper.cpp \ - $$PWD/qscene.cpp \ - $$PWD/qabstractfrontendnodemanager.cpp diff --git a/src/core/core.pro b/src/core/core.pro deleted file mode 100644 index 57421b6fd..000000000 --- a/src/core/core.pro +++ /dev/null @@ -1,25 +0,0 @@ -TARGET = Qt3DCore -MODULE = 3dcore - -QT = core-private gui-private network -QT_FOR_PRIVATE = concurrent - -QMAKE_DOCS = $$PWD/doc/qt3d.qdocconf - -gcov { - QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage - QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage -} - -include(core.pri) -include(aspects/aspects.pri) -include(geometry/geometry.pri) -include(jobs/jobs.pri) -include(nodes/nodes.pri) -include(transforms/transforms.pri) -include(resources/resources.pri) -include(services/services.pri) -include(aspect/aspect.pri) - -load(qt_module) -QMAKE_DOCS_TARGETDIR = qt3d diff --git a/src/core/doc/images/shadowmapping-depth.png b/src/core/doc/images/shadowmapping-depth.png Binary files differnew file mode 100644 index 000000000..d2b501412 --- /dev/null +++ b/src/core/doc/images/shadowmapping-depth.png diff --git a/src/core/doc/images/shadowmapping-qt3d.png b/src/core/doc/images/shadowmapping-qt3d.png Binary files differnew file mode 100644 index 000000000..bac6ac75c --- /dev/null +++ b/src/core/doc/images/shadowmapping-qt3d.png diff --git a/src/core/doc/qt3d.qdocconf b/src/core/doc/qt3d.qdocconf index 86c416d72..0e5eb18d2 100644 --- a/src/core/doc/qt3d.qdocconf +++ b/src/core/doc/qt3d.qdocconf @@ -86,15 +86,7 @@ excludedirs += \ ../../plugins/sceneparsers macro.TODO = " " -imagedirs += images \ - ../../../examples/qt3d/shadow-map-qml/doc/images \ - ../../../examples/qt3d/basicshapes-cpp/doc/images \ - ../../../examples/qt3d/planets-qml/doc/images \ - ../../../examples/qt3d/wireframe/doc/images \ - ../../../examples/qt3d/audio-visualizer-qml/doc/images \ - ../../../examples/qt3d/simplecustommaterial/doc/images \ - ../../../examples/qt3d/scene2d/doc/images \ - ../../../examples/qt3d/advancedcustommaterial/doc/images +imagedirs += images manifestmeta.thumbnail.names += "Qt3D/Qt 3D: Deferred Renderer C++ Example" diff --git a/src/core/doc/snippets/code/src_core_qcircularbuffer.cpp b/src/core/doc/snippets/code/src_core_qcircularbuffer.cpp index 03547e342..18b63c97c 100644 --- a/src/core/doc/snippets/code/src_core_qcircularbuffer.cpp +++ b/src/core/doc/snippets/code/src_core_qcircularbuffer.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [0] QCircularBuffer<int> integerBuffer; diff --git a/src/core/doc/src/qt3d-overview.qdoc b/src/core/doc/src/qt3d-overview.qdoc index d33da4f50..bffede472 100644 --- a/src/core/doc/src/qt3d-overview.qdoc +++ b/src/core/doc/src/qt3d-overview.qdoc @@ -4,7 +4,7 @@ /*! \page qt3d-overview.html \title Qt 3D Overview - + \ingroup explanations-2dand3dgraphics \brief Qt 3D provides C++ and QML APIs to incorporate 3D content into Qt applications. @@ -56,7 +56,6 @@ For examples of using materials, see the following examples: \list \li \l {Qt 3D: Simple Custom Material QML Example} - \li \l {Qt 3D: Advanced Custom Material QML Example} \li \l {Qt 3D: PBR Materials QML Example} \endlist @@ -66,8 +65,7 @@ vertex, tessellation control, tessellation evaluation, geometry, and fragment shaders. Compute shaders are planned for a future release. - For examples of using shaders, see the \l {Qt 3D: Shadow Map QML Example}, - \l{Qt 3D: Wireframe QML Example}, and \l {Qt 3D: Wave QML Example}. + For examples of using shaders, see the \l{Qt 3D: Wireframe QML Example}. \section2 Shadow Mapping @@ -128,8 +126,6 @@ and the fragment's depth can be compared with the result of the sampling. If the fragment is further away, then it is in shadow; otherwise it is lit. - For example code, see the \l {Qt 3D: Shadow Map QML Example}. - \section2 Instanced Rendering \e Instancing is a way of getting the GPU to draw many copies (instances) of diff --git a/src/core/doc/src/qt3danimation-module.qdoc b/src/core/doc/src/qt3danimation-module.qdoc index 85f9150c7..ffdf51c12 100644 --- a/src/core/doc/src/qt3danimation-module.qdoc +++ b/src/core/doc/src/qt3danimation-module.qdoc @@ -6,6 +6,8 @@ \module Qt3DAnimation \title Qt 3D Animation C++ Classes \preliminary + \modulestate Deprecated + \deprecated [6.8] \keyword Qt 3D Animation \brief The Qt 3D Animation modules provides a set of prebuilt elements to help @@ -195,6 +197,8 @@ \qmlmodule Qt3D.Animation 2.\QtMinorVersion \title Qt 3D Qt3DAnimation QML Types \preliminary + \modulestate Deprecated + \deprecated [6.8] \ingroup qmlmodules \ingroup qt3d-qmlmodules-preliminary diff --git a/src/core/doc/src/qt3dcore-module.qdoc b/src/core/doc/src/qt3dcore-module.qdoc index fa6ca9a5c..2af8691f2 100644 --- a/src/core/doc/src/qt3dcore-module.qdoc +++ b/src/core/doc/src/qt3dcore-module.qdoc @@ -7,10 +7,12 @@ \keyword Qt 3D Core \brief The Qt 3D module contains functionality to support near-realtime simulation systems. \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup modules \ingroup qt3d-modules - \qtcmakepackage 3dcore + \qtcmakepackage 3DCore \qtvariable 3dcore The Qt 3D module provides the foundations and core types used for near-realtime @@ -33,6 +35,8 @@ \ingroup qmlmodules \ingroup qt3d-qmlmodules \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \brief Provides core Qt 3D QML types. diff --git a/src/core/doc/src/qt3dextras-module.qdoc b/src/core/doc/src/qt3dextras-module.qdoc index f6e05e0c0..f89e99374 100644 --- a/src/core/doc/src/qt3dextras-module.qdoc +++ b/src/core/doc/src/qt3dextras-module.qdoc @@ -6,6 +6,8 @@ \title Qt 3D Extras C++ Classes \keyword Qt 3D Extras \preliminary + \modulestate Deprecated + \deprecated [6.8] \brief The Qt 3D Extras module provides a set of prebuilt elements to help you get started with Qt 3D. @@ -83,6 +85,8 @@ \qmlmodule Qt3D.Extras 2.\QtMinorVersion \title Qt 3D Extras QML Types \preliminary + \modulestate Deprecated + \deprecated [6.8] \ingroup qmlmodules \ingroup qt3d-qmlmodules-preliminary diff --git a/src/core/doc/src/qt3dinput-module.qdoc b/src/core/doc/src/qt3dinput-module.qdoc index a0aaaf36a..add397726 100644 --- a/src/core/doc/src/qt3dinput-module.qdoc +++ b/src/core/doc/src/qt3dinput-module.qdoc @@ -7,6 +7,8 @@ \brief The Qt 3D Input module provides classes for handling user input in applications using Qt3D. \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup modules \ingroup qt3d-modules @@ -38,6 +40,8 @@ \qmlmodule Qt3D.Input 2.\QtMinorVersion \title Qt 3D Input QML Types \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup qmlmodules \ingroup qt3d-qmlmodules diff --git a/src/core/doc/src/qt3dlogic-module.qdoc b/src/core/doc/src/qt3dlogic-module.qdoc index 2b2557ca3..65134fb2c 100644 --- a/src/core/doc/src/qt3dlogic-module.qdoc +++ b/src/core/doc/src/qt3dlogic-module.qdoc @@ -6,6 +6,8 @@ \title Qt 3D Logic C++ Classes \keyword Qt 3D Logic \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \brief The Qt 3D Logic module enables synchronizing frames with the Qt 3D backend. @@ -40,6 +42,8 @@ \qmlmodule Qt3D.Logic 2.\QtMinorVersion \title Qt 3D Logic QML Types \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup qmlmodules \ingroup qt3d-qmlmodules diff --git a/src/core/doc/src/qt3drender-module.qdoc b/src/core/doc/src/qt3drender-module.qdoc index 5bf66db3a..b64ef3d3e 100644 --- a/src/core/doc/src/qt3drender-module.qdoc +++ b/src/core/doc/src/qt3drender-module.qdoc @@ -7,6 +7,8 @@ \brief The Qt 3D Render module contains functionality to support 2D and 3D rendering using Qt 3D. \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup modules \ingroup qt3d-modules @@ -89,6 +91,8 @@ \qmlmodule Qt3D.Render 2.\QtMinorVersion \title Qt 3D Render QML Types \since 5.7 + \modulestate Deprecated + \deprecated [6.8] \ingroup qmlmodules \ingroup qt3d-qmlmodules diff --git a/src/core/doc/src/qt3dscene2d-module.qdoc b/src/core/doc/src/qt3dscene2d-module.qdoc index 75a49f949..dc73aa9b6 100644 --- a/src/core/doc/src/qt3dscene2d-module.qdoc +++ b/src/core/doc/src/qt3dscene2d-module.qdoc @@ -6,6 +6,8 @@ \title Qt 3D Scene2D C++ Classes \keyword Qt 3D Scene2D \preliminary + \modulestate Deprecated + \deprecated [6.8] \brief The Qt 3D Scene2D module provides a way to render Quick2 qml content to a Qt 3D texture. @@ -51,6 +53,8 @@ \title Qt 3D Scene2D QML Types \ingroup qmlmodules \ingroup qt3d-qmlmodules-preliminary + \modulestate Deprecated + \deprecated [6.8] \brief Provides Qt 3D QML types for the scene2d module. diff --git a/src/core/doc/src/qt3dscene3d-module.qdoc b/src/core/doc/src/qt3dscene3d-module.qdoc index d825a9ea4..f9906be66 100644 --- a/src/core/doc/src/qt3dscene3d-module.qdoc +++ b/src/core/doc/src/qt3dscene3d-module.qdoc @@ -7,6 +7,8 @@ \title Qt 3D Scene3D QML Types \ingroup qmlmodules \ingroup qt3d-qmlmodules-preliminary + \modulestate Deprecated + \deprecated [6.8] \brief Provides Qt 3D QML types for the Scene3D module. diff --git a/src/core/geometry/geometry.pri b/src/core/geometry/geometry.pri deleted file mode 100644 index 70bda07ed..000000000 --- a/src/core/geometry/geometry.pri +++ /dev/null @@ -1,26 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qabstractfunctor.h \ - $$PWD/qattribute.h \ - $$PWD/qattribute_p.h \ - $$PWD/qboundingvolume.h \ - $$PWD/qboundingvolume_p.h \ - $$PWD/qbuffer.h \ - $$PWD/qbuffer_p.h \ - $$PWD/qgeometry_p.h \ - $$PWD/qgeometry.h \ - $$PWD/qgeometryfactory_p.h \ - $$PWD/qgeometryview_p.h \ - $$PWD/qgeometryview.h \ - $$PWD/bufferutils_p.h \ - $$PWD/buffervisitor_p.h - -SOURCES += \ - $$PWD/qabstractfunctor.cpp \ - $$PWD/qattribute.cpp \ - $$PWD/qboundingvolume.cpp \ - $$PWD/qbuffer.cpp \ - $$PWD/qgeometry.cpp \ - $$PWD/qgeometryview.cpp - diff --git a/src/core/geometry/qabstractfunctor.cpp b/src/core/geometry/qabstractfunctor.cpp index ee9fea61b..4fe5dd5cd 100644 --- a/src/core/geometry/qabstractfunctor.cpp +++ b/src/core/geometry/qabstractfunctor.cpp @@ -26,7 +26,7 @@ namespace Qt3DCore { Returns a pointer to the id of the functor. */ /*! - \fn qintptr Qt3DCore::functorTypeId() + \fn template <class T> qintptr Qt3DCore::functorTypeId() Returns a pointer to the type id of the functor. */ diff --git a/src/core/geometry/qattribute.cpp b/src/core/geometry/qattribute.cpp index 301dba467..9d4662435 100644 --- a/src/core/geometry/qattribute.cpp +++ b/src/core/geometry/qattribute.cpp @@ -95,7 +95,7 @@ QAttributePrivate *QAttributePrivate::get(QAttribute *q) */ /*! - * \enum QAttribute::AttributeType + * \enum Qt3DCore::QAttribute::AttributeType * * The type of the attribute. * @@ -105,7 +105,7 @@ QAttributePrivate *QAttributePrivate::get(QAttribute *q) */ /*! - * \enum QAttribute::VertexBaseType + * \enum Qt3DCore::QAttribute::VertexBaseType * * The type of the data. * @@ -168,7 +168,7 @@ QAttribute::~QAttribute() } /*! - * \property QAttribute::buffer + * \property Qt3DCore::QAttribute::buffer * * Holds the buffer. */ @@ -179,7 +179,7 @@ QBuffer *QAttribute::buffer() const } /*! - * \property QAttribute::name + * \property Qt3DCore::QAttribute::name * * Holds the name. */ @@ -190,7 +190,7 @@ QString QAttribute::name() const } /*! - * \property QAttribute::vertexSize + * \property Qt3DCore::QAttribute::vertexSize * * Holds the data size, it can only be 1 to 4 units (scalars and vectors), * 9 units (3x3 matrices) or 16 units (4x4 matrices). @@ -202,7 +202,7 @@ uint QAttribute::vertexSize() const } /*! - * \property QAttribute::vertexBaseType + * \property Qt3DCore::QAttribute::vertexBaseType * * Holds the data type. */ @@ -213,7 +213,7 @@ QAttribute::VertexBaseType QAttribute::vertexBaseType() const } /*! - * \property QAttribute::count + * \property Qt3DCore::QAttribute::count * * Holds the count. */ @@ -224,7 +224,7 @@ uint QAttribute::count() const } /*! - * \property QAttribute::byteStride + * \property Qt3DCore::QAttribute::byteStride * * Holds the byte stride. */ @@ -235,7 +235,7 @@ uint QAttribute::byteStride() const } /*! - * \property QAttribute::byteOffset + * \property Qt3DCore::QAttribute::byteOffset * * Holds the byte offset. */ @@ -246,7 +246,7 @@ uint QAttribute::byteOffset() const } /*! - * \property QAttribute::divisor + * \property Qt3DCore::QAttribute::divisor * * Holds the divisor. */ @@ -257,7 +257,7 @@ uint QAttribute::divisor() const } /*! - * \property QAttribute::attributeType + * \property Qt3DCore::QAttribute::attributeType * * Holds the attribute type. */ diff --git a/src/core/geometry/qboundingvolume.cpp b/src/core/geometry/qboundingvolume.cpp index 645627f31..272e07e16 100644 --- a/src/core/geometry/qboundingvolume.cpp +++ b/src/core/geometry/qboundingvolume.cpp @@ -185,7 +185,7 @@ QBoundingVolume::~QBoundingVolume() * to compute the bounding volume. */ /*! -* \property QBoundingVolume::view +* \property Qt3DCore::QBoundingVolume::view * * Holds a pointer to the instance of QGeometryView which will be used, if set, * to compute the bounding volume. @@ -202,7 +202,7 @@ QGeometryView *QBoundingVolume::view() const * Holds minimum extent of the bounding volume computed from the specified view. */ /*! -* \property QBoundingVolume::implicitMinPoint +* \property Qt3DCore::QBoundingVolume::implicitMinPoint * * Holds minimum extent of the bounding volume computed from the specified view. */ @@ -218,7 +218,7 @@ QVector3D QBoundingVolume::implicitMinPoint() const * Holds maximum extent of the bounding volume computed from the specified view. */ /*! -* \property QBoundingVolume::implicitMaxPoint +* \property Qt3DCore::QBoundingVolume::implicitMaxPoint * * Holds maximum extent of the bounding volume computed from the specified view. */ @@ -236,7 +236,7 @@ QVector3D QBoundingVolume::implicitMaxPoint() const * \sa updateImplicitBounds */ /*! -* \property QBoundingVolume::implicitPointsValid +* \property Qt3DCore::QBoundingVolume::implicitPointsValid * * True if a view has been assigned and the implicit extent properties are up to date. * @@ -256,7 +256,7 @@ bool QBoundingVolume::areImplicitPointsValid() const * geometry. */ /*! -* \property QBoundingVolume::minPoint +* \property Qt3DCore::QBoundingVolume::minPoint * * User specified minimum extent of the bounding volume. When set (along with maximum * extent), this will be used internally to avoid computing the volume from the @@ -276,7 +276,7 @@ QVector3D QBoundingVolume::minPoint() const * geometry. */ /*! -* \property QBoundingVolume::maxPoint +* \property Qt3DCore::QBoundingVolume::maxPoint * * User specified maximum extent of the bounding volume. When set (along with minimum * extent), this will be used internally to avoid computing the volume from the diff --git a/src/core/geometry/qbuffer.cpp b/src/core/geometry/qbuffer.cpp index 1d6bec562..7f2917b32 100644 --- a/src/core/geometry/qbuffer.cpp +++ b/src/core/geometry/qbuffer.cpp @@ -7,8 +7,6 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; - namespace Qt3DCore { const char *QBufferPrivate::UpdateDataPropertyName = "QT3D_updateData"; @@ -86,7 +84,7 @@ void QBufferPrivate::setData(const QByteArray &data) */ /*! - * \enum QBuffer::UsageType + * \enum Qt3DCore::QBuffer::UsageType * * The type of the usage. * @@ -111,7 +109,7 @@ void QBufferPrivate::setData(const QByteArray &data) */ /*! - * \enum QBuffer::AccessType + * \enum Qt3DCore::QBuffer::AccessType * * \value Write * Write access @@ -186,7 +184,7 @@ QByteArray QBuffer::data() const } /*! - * \property QBuffer::usage + * \property Qt3DCore::QBuffer::usage * * Holds the buffer usage. */ diff --git a/src/core/geometry/qgeometry.cpp b/src/core/geometry/qgeometry.cpp index 05d791d7d..b70881daf 100644 --- a/src/core/geometry/qgeometry.cpp +++ b/src/core/geometry/qgeometry.cpp @@ -9,7 +9,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; +namespace Qt3DCore { QGeometryFactory::~QGeometryFactory() { @@ -107,7 +107,7 @@ void QGeometryPrivate::setExtent(const QVector3D &minExtent, const QVector3D &ma */ /*! - \property QGeometry::boundingVolumePositionAttribute + \property Qt3DCore::QGeometry::boundingVolumePositionAttribute Holds the attribute used to compute the bounding volume. The bounding volume is used internally for picking and view frustum culling. @@ -202,7 +202,7 @@ QAttribute *QGeometry::boundingVolumePositionAttribute() const */ /*! - \property QGeometry::minExtent + \property Qt3DCore::QGeometry::minExtent Holds the vertex with the lowest x, y, z position values. */ @@ -219,7 +219,7 @@ QVector3D QGeometry::minExtent() const */ /*! - \property QGeometry::maxExtent + \property Qt3DCore::QGeometry::maxExtent Holds the vertex with the highest x, y, z position values. */ @@ -238,6 +238,8 @@ QList<QAttribute *> QGeometry::attributes() const return d->m_attributes; } +} // namespace Qt3DCore + QT_END_NAMESPACE #include "moc_qgeometry.cpp" diff --git a/src/core/geometry/qgeometryview.cpp b/src/core/geometry/qgeometryview.cpp index e0e9dd75d..228594a6b 100644 --- a/src/core/geometry/qgeometryview.cpp +++ b/src/core/geometry/qgeometryview.cpp @@ -12,7 +12,7 @@ QT_BEGIN_NAMESPACE -using namespace Qt3DCore; +namespace Qt3DCore { namespace { @@ -96,7 +96,6 @@ public: } - bool BoundingVolumeCalculator::apply(QAttribute *positionAttribute, QAttribute *indexAttribute, int drawVertexCount, @@ -213,7 +212,7 @@ void QGeometryViewPrivate::update() /*! - \enum QGeometryView::PrimitiveType + \enum Qt3DCore::QGeometryView::PrimitiveType The type of the primitive. @@ -338,7 +337,7 @@ QGeometryView::QGeometryView(QGeometryViewPrivate &dd, QNode *parent) } /*! - \property QGeometryView::instanceCount + \property Qt3DCore::QGeometryView::instanceCount Holds the instance count. */ @@ -349,7 +348,7 @@ int QGeometryView::instanceCount() const } /*! - \property QGeometryView::vertexCount + \property Qt3DCore::QGeometryView::vertexCount Holds the primitive count. */ @@ -360,7 +359,7 @@ int QGeometryView::vertexCount() const } /*! - \property QGeometryView::indexOffset + \property Qt3DCore::QGeometryView::indexOffset Holds the base vertex. */ @@ -371,7 +370,7 @@ int QGeometryView::indexOffset() const } /*! - \property QGeometryView::firstInstance + \property Qt3DCore::QGeometryView::firstInstance Holds the base instance. */ @@ -382,7 +381,7 @@ int QGeometryView::firstInstance() const } /*! - \property QGeometryView::firstVertex + \property Qt3DCore::QGeometryView::firstVertex Holds the base vertex. */ @@ -393,7 +392,7 @@ int QGeometryView::firstVertex() const } /*! - \property QGeometryView::indexBufferByteOffset + \property Qt3DCore::QGeometryView::indexBufferByteOffset Holds the byte offset into the index buffer. */ @@ -404,7 +403,7 @@ int QGeometryView::indexBufferByteOffset() const } /*! - \property QGeometryView::restartIndexValue + \property Qt3DCore::QGeometryView::restartIndexValue Holds the restart index. */ @@ -415,7 +414,7 @@ int QGeometryView::restartIndexValue() const } /*! - \property QGeometryView::verticesPerPatch + \property Qt3DCore::QGeometryView::verticesPerPatch Holds vertices per patch. */ @@ -426,7 +425,7 @@ int QGeometryView::verticesPerPatch() const } /*! - \property QGeometryView::primitiveRestartEnabled + \property Qt3DCore::QGeometryView::primitiveRestartEnabled Holds the primitive restart flag. */ @@ -437,7 +436,7 @@ bool QGeometryView::primitiveRestartEnabled() const } /*! - \property QGeometryView::geometry + \property Qt3DCore::QGeometryView::geometry Holds the geometry. */ @@ -448,7 +447,7 @@ QGeometry *QGeometryView::geometry() const } /*! - \property QGeometryView::primitiveType + \property Qt3DCore::QGeometryView::primitiveType Holds the primitive type. */ @@ -578,6 +577,8 @@ void QGeometryView::setPrimitiveType(QGeometryView::PrimitiveType primitiveType) emit primitiveTypeChanged(primitiveType); } +} // namespace Qt3DCore + QT_END_NAMESPACE #include "moc_qgeometryview.cpp" diff --git a/src/core/jobs/calcboundingvolumejob.cpp b/src/core/jobs/calcboundingvolumejob.cpp index 5fab373b3..ab6af8928 100644 --- a/src/core/jobs/calcboundingvolumejob.cpp +++ b/src/core/jobs/calcboundingvolumejob.cpp @@ -190,6 +190,8 @@ bool CalculateBoundingVolumeJob::isRequired() void CalculateBoundingVolumeJob::run() { + using QBufferPrivate = Qt3DCore::QBufferPrivate; + // There's 2 bounding volume jobs, one here in Core, the other in Render. // - This one computes bounding volumes for entities that have QBoundingVolume // components and use QGeometryViews. diff --git a/src/core/jobs/jobs.pri b/src/core/jobs/jobs.pri deleted file mode 100644 index a0453395c..000000000 --- a/src/core/jobs/jobs.pri +++ /dev/null @@ -1,23 +0,0 @@ - -SOURCES += \ - $$PWD/qaspectjob.cpp \ - $$PWD/qaspectjobmanager.cpp \ - $$PWD/qabstractaspectjobmanager.cpp \ - $$PWD/qthreadpooler.cpp \ - $$PWD/task.cpp \ - $$PWD/calcboundingvolumejob.cpp - -HEADERS += \ - $$PWD/qaspectjob.h \ - $$PWD/qaspectjob_p.h \ - $$PWD/qaspectjobproviderinterface_p.h \ - $$PWD/qaspectjobmanager_p.h \ - $$PWD/qabstractaspectjobmanager_p.h \ - $$PWD/task_p.h \ - $$PWD/qthreadpooler_p.h \ - $$PWD/calcboundingvolumejob_p.h \ - $$PWD/job_common_p.h - -INCLUDEPATH += $$PWD - -#DEFINES += QT3DCORE_ASPECT_JOB_DEBUG diff --git a/src/core/nodes/nodes.pri b/src/core/nodes/nodes.pri deleted file mode 100644 index 097f1cbc7..000000000 --- a/src/core/nodes/nodes.pri +++ /dev/null @@ -1,27 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qnode.h \ - $$PWD/qnode_p.h \ - $$PWD/qcomponent.h \ - $$PWD/qcomponent_p.h \ - $$PWD/qentity.h \ - $$PWD/qentity_p.h \ - $$PWD/qbackendnode_p.h \ - $$PWD/qbackendnode.h \ - $$PWD/qnodeid.h \ - $$PWD/qnodevisitor_p.h \ - $$PWD/propertychangehandler_p.h \ - $$PWD/qdestructionidandtypecollector_p.h \ - $$PWD/qabstractnodefactory_p.h - -SOURCES += \ - $$PWD/qnode.cpp \ - $$PWD/qcomponent.cpp \ - $$PWD/qentity.cpp \ - $$PWD/qbackendnode.cpp \ - $$PWD/qnodeid.cpp \ - $$PWD/qnodevisitor.cpp \ - $$PWD/qabstractnodefactory.cpp \ - $$PWD/propertychangehandler.cpp \ - $$PWD/qdestructionidandtypecollector.cpp diff --git a/src/core/nodes/qbackendnode.cpp b/src/core/nodes/qbackendnode.cpp index 7a8aaa45e..ed5363a70 100644 --- a/src/core/nodes/qbackendnode.cpp +++ b/src/core/nodes/qbackendnode.cpp @@ -156,7 +156,7 @@ QBackendNode::Mode QBackendNode::mode() const noexcept * \param frontEnd * \param firstTime * - * This is called by the aspect when a \a frontEnd node needs to synchronize it's changes + * This is called by the aspect when a \a frontEnd node needs to synchronize its changes * with the backend (normally due to property changes). * * \a firstTime will be true if the backend node was just created diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index f26da3bea..a77ec09ca 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -139,7 +139,7 @@ QEntity::QEntity(QEntityPrivate &dd, QNode *parent) QEntity::~QEntity() { // remove all component aggregations - Q_D(const QEntity); + Q_D(QEntity); // to avoid hammering m_components by repeated removeComponent() // calls below, move all contents out, so the removeOne() calls in // removeComponent() don't actually remove something: diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index 5ba46a7c5..3c2bf3259 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -12,6 +12,7 @@ #include <QtCore/QEvent> #include <QtCore/QMetaObject> #include <QtCore/QMetaProperty> +#include <QtCore/QThread> #include <Qt3DCore/private/corelogging_p.h> #include <Qt3DCore/private/qdestructionidandtypecollector_p.h> @@ -848,7 +849,10 @@ void NodePostConstructorInit::addNode(QNode *node) while (nextNode != nullptr && !m_nodesToConstruct.contains(QNodePrivate::get(nextNode))) nextNode = nextNode->parentNode(); - if (!nextNode) { + // An ancestor in the m_nodesToConstruct may already have been created (m_hasBackendNode) + // at this point (e.g. when a QComponent calls _q_ensureBackendNodeCreated()), + // that's why we also queue a creation request in this case. + if (!nextNode || QNodePrivate::get(nextNode)->m_hasBackendNode) { m_nodesToConstruct.append(QNodePrivate::get(node)); if (!m_requestedProcessing){ QMetaObject::invokeMethod(this, "processNodes", Qt::QueuedConnection); @@ -877,6 +881,7 @@ void NodePostConstructorInit::removeNode(QNode *node) */ void NodePostConstructorInit::processNodes() { + Q_ASSERT(thread() == QThread::currentThread()); m_requestedProcessing = false; while (!m_nodesToConstruct.empty()) { auto node = m_nodesToConstruct.takeFirst(); diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h index faca3db70..b2a61fbbe 100644 --- a/src/core/nodes/qnode_p.h +++ b/src/core/nodes/qnode_p.h @@ -86,7 +86,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func]() { (static_cast<Caller *>(q)->*func)(nullptr); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> @@ -95,7 +95,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, node]() { (static_cast<Caller *>(q)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> @@ -104,7 +104,7 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, node]() { (static_cast<Caller *>(q)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename ValueType> @@ -117,15 +117,16 @@ public: // If the node is destoyed, we make sure not to keep a dangling pointer to it Q_Q(QNode); auto f = [q, func, resetValue]() { (static_cast<Caller *>(q)->*func)(resetValue); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } template<typename Caller, typename NodeType> void registerPrivateDestructionHelper(NodeType *node, DestructionFunctionPointer<Caller, NodeType> func) { + Q_Q(QNode); // If the node is destoyed, we make sure not to keep a dangling pointer to it auto f = [this, func, node]() { (static_cast<Caller *>(this)->*func)(node); }; - m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, f)}); + m_destructionConnections.push_back({node, QObject::connect(node, &QNode::nodeDestroyed, q, f)}); } void unregisterDestructionHelper(QNode *node) diff --git a/src/core/qscene.cpp b/src/core/qscene.cpp index 3068eeda3..d4a0a1529 100644 --- a/src/core/qscene.cpp +++ b/src/core/qscene.cpp @@ -8,6 +8,7 @@ #include <QtCore/QReadLocker> #include <Qt3DCore/private/qnode_p.h> +#include <Qt3DCore/qaspectengine.h> QT_BEGIN_NAMESPACE @@ -19,7 +20,8 @@ public: QScenePrivate(QAspectEngine *engine) : m_engine(engine) , m_arbiter(nullptr) - , m_postConstructorInit(new NodePostConstructorInit) + //m_postConstructorInit needs the parent set correctly for QObject::moveToThread() to work correctly + , m_postConstructorInit(new NodePostConstructorInit(engine)) , m_rootNode(nullptr) { } @@ -28,7 +30,7 @@ public: QHash<QNodeId, QNode *> m_nodeLookupTable; QMultiHash<QNodeId, QNodeId> m_componentToEntities; QChangeArbiter *m_arbiter; - QScopedPointer<NodePostConstructorInit> m_postConstructorInit; + QScopedPointer<NodePostConstructorInit, QScopedPointerDeleteLater> m_postConstructorInit; mutable QReadWriteLock m_lock; mutable QReadWriteLock m_nodePropertyTrackModeLock; QNode *m_rootNode; diff --git a/src/core/qt3dcore_global.h b/src/core/qt3dcore_global.h index be7f29f94..dbde1f127 100644 --- a/src/core/qt3dcore_global.h +++ b/src/core/qt3dcore_global.h @@ -51,13 +51,8 @@ QT_BEGIN_NAMESPACE QT3D_DECLARE_TYPEINFO_2(OuterNS, InnerNS, Class, Q_RELOCATABLE_TYPE) \ /*end*/ -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#define QT3D_REVISION(major, minor) Q_REVISION(minor) -#define QT3D_PROPERTY_REVISION(major, minor) REVISION minor -#else #define QT3D_REVISION(major, minor) Q_REVISION(major, minor) #define QT3D_PROPERTY_REVISION(major, minor) REVISION(major, minor) -#endif QT_END_NAMESPACE diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h index 741cd7403..38e5a4fb5 100644 --- a/src/core/resources/qresourcemanager_p.h +++ b/src/core/resources/qresourcemanager_p.h @@ -129,11 +129,7 @@ public : } private: -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QMutexLocker<QMutex> m_locker; -#else - QMutexLocker m_locker; -#endif }; private: diff --git a/src/core/resources/resources.pri b/src/core/resources/resources.pri deleted file mode 100644 index d25070d56..000000000 --- a/src/core/resources/resources.pri +++ /dev/null @@ -1,19 +0,0 @@ -HEADERS += \ - $$PWD/qloadgltf_p.h \ - $$PWD/qresourcemanager_p.h \ - $$PWD/qhandle_p.h - -SOURCES += \ - $$PWD/qresourcemanager.cpp - - -# Define proper SIMD flags for qresourcemanager.cpp -qtConfig(qt3d-simd-avx2) { - CONFIG += simd - QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_AVX2 -} - -qtConfig(qt3d-simd-sse2):!qtConfig(qt3d-simd-avx2) { - CONFIG += simd - QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2 -} diff --git a/src/core/services/services.pri b/src/core/services/services.pri deleted file mode 100644 index f311b8329..000000000 --- a/src/core/services/services.pri +++ /dev/null @@ -1,27 +0,0 @@ - -SOURCES += \ - $$PWD/qservicelocator.cpp \ - $$PWD/qsysteminformationservice.cpp \ - $$PWD/qopenglinformationservice.cpp \ - $$PWD/qtickclockservice.cpp \ - $$PWD/qabstractframeadvanceservice.cpp \ - $$PWD/qeventfilterservice.cpp \ - $$PWD/qdownloadhelperservice.cpp \ - $$PWD/qdownloadnetworkworker.cpp - -HEADERS += \ - $$PWD/qservicelocator_p.h \ - $$PWD/qsysteminformationservice_p.h \ - $$PWD/nullservices_p.h \ - $$PWD/qopenglinformationservice_p.h \ - $$PWD/qabstractserviceprovider_p.h \ - $$PWD/qsysteminformationservice_p_p.h \ - $$PWD/qopenglinformationservice_p_p.h \ - $$PWD/qtickclockservice_p.h \ - $$PWD/qabstractframeadvanceservice_p.h \ - $$PWD/qabstractframeadvanceservice_p_p.h \ - $$PWD/qeventfilterservice_p.h \ - $$PWD/qdownloadhelperservice_p.h \ - $$PWD/qdownloadnetworkworker_p.h - -INCLUDEPATH += $$PWD diff --git a/src/core/transforms/qskeletonloader.cpp b/src/core/transforms/qskeletonloader.cpp index 8175d73a6..74bc7e6c4 100644 --- a/src/core/transforms/qskeletonloader.cpp +++ b/src/core/transforms/qskeletonloader.cpp @@ -95,7 +95,7 @@ void QSkeletonLoaderPrivate::setRootJoint(QJoint *rootJoint) */ /*! - \enum QSkeletonLoader::Status + \enum Qt3DCore::QSkeletonLoader::Status This enum identifies the status of skeleton. diff --git a/src/core/transforms/qtransform.cpp b/src/core/transforms/qtransform.cpp index 116f1d0e6..2b96422f3 100644 --- a/src/core/transforms/qtransform.cpp +++ b/src/core/transforms/qtransform.cpp @@ -322,7 +322,7 @@ QMatrix4x4 QTransform::matrix() const } /*! - \property QTransform::worldMatrix + \property Qt3DCore::QTransform::worldMatrix Holds the world transformation matrix for the transform. This assumes the QTransform component is being referenced by a QEntity. This makes it more diff --git a/src/core/transforms/transforms.pri b/src/core/transforms/transforms.pri deleted file mode 100644 index 36e657e86..000000000 --- a/src/core/transforms/transforms.pri +++ /dev/null @@ -1,61 +0,0 @@ -SOURCES += \ - $$PWD/qtransform.cpp \ - $$PWD/qjoint.cpp \ - $$PWD/qabstractskeleton.cpp \ - $$PWD/qskeleton.cpp \ - $$PWD/qskeletonloader.cpp \ - $$PWD/qarmature.cpp - -HEADERS += \ - $$PWD/qtransform.h \ - $$PWD/qtransform_p.h \ - $$PWD/qmath3d_p.h \ - $$PWD/qjoint.h \ - $$PWD/qjoint_p.h \ - $$PWD/qabstractskeleton.h \ - $$PWD/qabstractskeleton_p.h \ - $$PWD/qskeleton.h \ - $$PWD/qskeleton_p.h \ - $$PWD/qskeletonloader.h \ - $$PWD/qskeletonloader_p.h \ - $$PWD/qarmature.h \ - $$PWD/qarmature_p.h \ - $$PWD/vector4d_p.h \ - $$PWD/vector3d_p.h \ - $$PWD/matrix4x4_p.h \ - $$PWD/sqt_p.h - -INCLUDEPATH += $$PWD - -qtConfig(qt3d-simd-sse2) { - CONFIG += simd - - SSE2_HEADERS += \ - $$PWD/matrix4x4_sse_p.h - - SSE2_SOURCES += \ - $$PWD/matrix4x4_sse.cpp - - # These files contain AVX2 code, only add them to SSE2 if AVX2 not available - !qtConfig(qt3d-simd-avx2) { - SSE2_SOURCES += \ - $$PWD/vector4d_sse.cpp \ - $$PWD/vector3d_sse.cpp - SSE2_HEADERS += \ - $$PWD/vector4d_sse_p.h \ - $$PWD/vector3d_sse_p.h - } -} - -qtConfig(qt3d-simd-avx2) { - CONFIG += simd - - AVX2_HEADERS += \ - $$PWD/matrix4x4_avx2_p.h \ - $$PWD/vector4d_sse_p.h \ - $$PWD/vector3d_sse_p.h - AVX2_SOURCES += \ - $$PWD/matrix4x4_avx2.cpp \ - $$PWD/vector4d_sse.cpp \ - $$PWD/vector3d_sse.cpp -} |