diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2019-04-14 17:26:22 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2019-04-15 14:30:59 +0000 |
commit | bad9cd31fc9f3bb911f59439c0468f8dc7170646 (patch) | |
tree | 60d5a6afcd93a3adeb2f324dfa7d4e8bab6a8735 | |
parent | 100175e92d6adb346169eda0392b9485ca41a905 (diff) | |
parent | 276be935bfeccde733bacd4267abeb978f6efda5 (diff) |
Merge remote-tracking branch origin/5.13 into dev
Change-Id: Ib5c04e9941aeea1a4cd27519b94b9a53e8349ea3
519 files changed, 1825 insertions, 1056 deletions
diff --git a/dist/changes-5.12.2 b/dist/changes-5.12.2 new file mode 100644 index 000000000..0c8bd8579 --- /dev/null +++ b/dist/changes-5.12.2 @@ -0,0 +1,20 @@ +Qt 5.12.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp index c6147fe7e..c876fcb87 100644 --- a/src/animation/backend/animationutils.cpp +++ b/src/animation/backend/animationutils.cpp @@ -259,8 +259,65 @@ ClipResults evaluateClipAtLocalTime(AnimationClip *clip, float localTime) const QVector<Channel> &channels = clip->channels(); int i = 0; for (const Channel &channel : channels) { - for (const auto &channelComponent : qAsConst(channel.channelComponents)) - channelResults[i++] = channelComponent.fcurve.evaluateAtTime(localTime); + if (channel.name.contains(QStringLiteral("Rotation")) && + channel.channelComponents.size() == 4) { + + // Try to SLERP + const int nbKeyframes = channel.channelComponents[0].fcurve.keyframeCount(); + const bool canSlerp = std::find_if(std::begin(channel.channelComponents)+1, + std::end(channel.channelComponents), + [nbKeyframes](const ChannelComponent &v) { + return v.fcurve.keyframeCount() != nbKeyframes; + }) == std::end(channel.channelComponents); + + if (!canSlerp) { + // Interpolate per component + for (const auto &channelComponent : qAsConst(channel.channelComponents)) { + const int lowerKeyframeBound = channelComponent.fcurve.lowerKeyframeBound(localTime); + channelResults[i++] = channelComponent.fcurve.evaluateAtTime(localTime, lowerKeyframeBound); + } + } else { + // There's only one keyframe. We cant compute omega. Interpolate per component + const int lowerKeyframeBound = channel.channelComponents[0].fcurve.lowerKeyframeBound(localTime); + if (lowerKeyframeBound + 1 >= channel.channelComponents[0].fcurve.keyframeCount()) { + for (const auto &channelComponent : qAsConst(channel.channelComponents)) + channelResults[i++] = channelComponent.fcurve.evaluateAtTime(localTime, lowerKeyframeBound); + } else { + auto quaternionFromChannel = [channel](const int keyframe) { + const float w = channel.channelComponents[0].fcurve.keyframe(keyframe).value; + const float x = channel.channelComponents[1].fcurve.keyframe(keyframe).value; + const float y = channel.channelComponents[2].fcurve.keyframe(keyframe).value; + const float z = channel.channelComponents[3].fcurve.keyframe(keyframe).value; + QQuaternion quat{w,x,y,z}; + quat.normalize(); + return quat; + }; + + const auto lowerQuat = quaternionFromChannel(lowerKeyframeBound); + const auto higherQuat = quaternionFromChannel(lowerKeyframeBound + 1); + const float omega = std::acos(qBound(-1.0f, QQuaternion::dotProduct(lowerQuat, higherQuat), 1.0f)); + + if (qFuzzyIsNull(omega)) { + // If the two keyframe quaternions are equal, just return the first one as the interpolated value. + channelResults[0] = lowerQuat.scalar(); + channelResults[1] = lowerQuat.x(); + channelResults[2] = lowerQuat.y(); + channelResults[3] = lowerQuat.z(); + } else { + for (const auto &channelComponent : qAsConst(channel.channelComponents)) + channelResults[i++] = channelComponent.fcurve.evaluateAtTimeAsSlerp(localTime, lowerKeyframeBound, omega); + } + } + } + } else { + // If the channel is not a Rotation, apply linear interpolation per channel component + // TODO How do we handle other interpolations. For exammple, color interpolation + // in a linear perceptual way or other non linear spaces? + for (const auto &channelComponent : qAsConst(channel.channelComponents)) { + const int lowerKeyframeBound = channelComponent.fcurve.lowerKeyframeBound(localTime); + channelResults[i++] = channelComponent.fcurve.evaluateAtTime(localTime, lowerKeyframeBound); + } + } } return channelResults; } diff --git a/src/animation/backend/fcurve.cpp b/src/animation/backend/fcurve.cpp index c4361a37a..490866d54 100644 --- a/src/animation/backend/fcurve.cpp +++ b/src/animation/backend/fcurve.cpp @@ -53,6 +53,12 @@ FCurve::FCurve() float FCurve::evaluateAtTime(float localTime) const { + return evaluateAtTime(localTime, lowerKeyframeBound(localTime)); +} + + +float FCurve::evaluateAtTime(float localTime, int lowerBound) const +{ // TODO: Implement extrapolation beyond first/last keyframes if (localTime < m_localTimes.first()) { return m_keyframes.first().value; @@ -60,14 +66,13 @@ float FCurve::evaluateAtTime(float localTime) const return m_keyframes.last().value; } else { // Find keyframes that sandwich the requested localTime - const int idx = m_rangeFinder.findLowerBound(localTime); - if (idx < 0) // only one keyframe + if (lowerBound < 0) // only one keyframe return m_keyframes.first().value; - const float t0 = m_localTimes[idx]; - const float t1 = m_localTimes[idx + 1]; - const Keyframe &keyframe0(m_keyframes[idx]); - const Keyframe &keyframe1(m_keyframes[idx + 1]); + const float t0 = m_localTimes[lowerBound]; + const float t1 = m_localTimes[lowerBound + 1]; + const Keyframe &keyframe0(m_keyframes[lowerBound]); + const Keyframe &keyframe1(m_keyframes[lowerBound + 1]); switch (keyframe0.interpolation) { case QKeyFrame::ConstantInterpolation: @@ -92,6 +97,52 @@ float FCurve::evaluateAtTime(float localTime) const return m_keyframes.first().value; } +float FCurve::evaluateAtTimeAsSlerp(float localTime, int lowerBound, float omega) const +{ + // TODO: Implement extrapolation beyond first/last keyframes + if (localTime < m_localTimes.first()) + return m_keyframes.first().value; + + if (localTime > m_localTimes.last()) + return m_keyframes.last().value; + // Find keyframes that sandwich the requested localTime + if (lowerBound < 0) // only one keyframe + return m_keyframes.first().value; + + const float t0 = m_localTimes[lowerBound]; + const float t1 = m_localTimes[lowerBound + 1]; + const Keyframe &keyframe0(m_keyframes[lowerBound]); + const Keyframe &keyframe1(m_keyframes[lowerBound + 1]); + + switch (keyframe0.interpolation) { + case QKeyFrame::ConstantInterpolation: + return keyframe0.value; + case QKeyFrame::LinearInterpolation: + if (localTime >= t0 && localTime <= t1 && t1 > t0) { + const float t = (localTime - t0) / (t1 - t0); + const float div = 1.0f / std::sin(omega); + return std::sin((1 - t) * omega) * div * keyframe0.value + + std::sin(t * omega) * div * keyframe1.value; + } + break; + case QKeyFrame::BezierInterpolation: + // TODO implement a proper slerp bezier interpolation + BezierEvaluator evaluator(t0, keyframe0, t1, keyframe1); + return evaluator.valueForTime(localTime); + } + + return m_keyframes.first().value; +} + +int FCurve::lowerKeyframeBound(float localTime) const +{ + if (localTime < m_localTimes.first()) + return 0; + if (localTime > m_localTimes.last()) + return 0; + return m_rangeFinder.findLowerBound(localTime); +} + float FCurve::startTime() const { if (!m_localTimes.isEmpty()) diff --git a/src/animation/backend/fcurve_p.h b/src/animation/backend/fcurve_p.h index f96c98c1c..337eb615d 100644 --- a/src/animation/backend/fcurve_p.h +++ b/src/animation/backend/fcurve_p.h @@ -83,6 +83,9 @@ public: float endTime() const; float evaluateAtTime(float localTime) const; + float evaluateAtTime(float localTime, int lowerBound) const; + float evaluateAtTimeAsSlerp(float localTime, int lowerBound, float omega) const; + int lowerKeyframeBound(float localTime) const; void read(const QJsonObject &json); void setFromQChannelComponent(const QChannelComponent &qcc); diff --git a/src/animation/frontend/qabstractanimation.h b/src/animation/frontend/qabstractanimation.h index 951e2dd2d..1d7459217 100644 --- a/src/animation/frontend/qabstractanimation.h +++ b/src/animation/frontend/qabstractanimation.h @@ -48,7 +48,7 @@ namespace Qt3DAnimation { class QAbstractAnimationPrivate; -class QT3DANIMATIONSHARED_EXPORT QAbstractAnimation : public QObject +class Q_3DANIMATIONSHARED_EXPORT QAbstractAnimation : public QObject { Q_OBJECT Q_PROPERTY(QString animationName READ animationName WRITE setAnimationName NOTIFY animationNameChanged) diff --git a/src/animation/frontend/qabstractanimationclip.h b/src/animation/frontend/qabstractanimationclip.h index 6190550e6..79464b13d 100644 --- a/src/animation/frontend/qabstractanimationclip.h +++ b/src/animation/frontend/qabstractanimationclip.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QAbstractAnimationClipPrivate; -class QT3DANIMATIONSHARED_EXPORT QAbstractAnimationClip : public Qt3DCore::QNode +class Q_3DANIMATIONSHARED_EXPORT QAbstractAnimationClip : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(float duration READ duration NOTIFY durationChanged) diff --git a/src/animation/frontend/qabstractchannelmapping.h b/src/animation/frontend/qabstractchannelmapping.h index 564f51191..1fd451a2a 100644 --- a/src/animation/frontend/qabstractchannelmapping.h +++ b/src/animation/frontend/qabstractchannelmapping.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QAbstractChannelMappingPrivate; -class QT3DANIMATIONSHARED_EXPORT QAbstractChannelMapping : public Qt3DCore::QNode +class Q_3DANIMATIONSHARED_EXPORT QAbstractChannelMapping : public Qt3DCore::QNode { Q_OBJECT diff --git a/src/animation/frontend/qabstractclipanimator.h b/src/animation/frontend/qabstractclipanimator.h index 08bf1f5dc..a3bce0600 100644 --- a/src/animation/frontend/qabstractclipanimator.h +++ b/src/animation/frontend/qabstractclipanimator.h @@ -52,7 +52,7 @@ class QChannelMapper; class QClock; class QAbstractClipAnimatorPrivate; -class QT3DANIMATIONSHARED_EXPORT QAbstractClipAnimator : public Qt3DCore::QComponent +class Q_3DANIMATIONSHARED_EXPORT QAbstractClipAnimator : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) diff --git a/src/animation/frontend/qabstractclipblendnode.h b/src/animation/frontend/qabstractclipblendnode.h index d981bd7a5..3bc6d37d0 100644 --- a/src/animation/frontend/qabstractclipblendnode.h +++ b/src/animation/frontend/qabstractclipblendnode.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QAbstractAnimationClip; class QAbstractClipBlendNodePrivate; -class QT3DANIMATIONSHARED_EXPORT QAbstractClipBlendNode : public Qt3DCore::QNode +class Q_3DANIMATIONSHARED_EXPORT QAbstractClipBlendNode : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/animation/frontend/qadditiveclipblend.h b/src/animation/frontend/qadditiveclipblend.h index 0771bd032..70c5b3cea 100644 --- a/src/animation/frontend/qadditiveclipblend.h +++ b/src/animation/frontend/qadditiveclipblend.h @@ -45,7 +45,7 @@ namespace Qt3DAnimation { class QAdditiveClipBlendPrivate; -class QT3DANIMATIONSHARED_EXPORT QAdditiveClipBlend : public QAbstractClipBlendNode +class Q_3DANIMATIONSHARED_EXPORT QAdditiveClipBlend : public QAbstractClipBlendNode { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAbstractClipBlendNode *baseClip READ baseClip WRITE setBaseClip NOTIFY baseClipChanged) diff --git a/src/animation/frontend/qanimationaspect.h b/src/animation/frontend/qanimationaspect.h index bd3745fec..280c643e6 100644 --- a/src/animation/frontend/qanimationaspect.h +++ b/src/animation/frontend/qanimationaspect.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QAnimationAspectPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationAspect : public Qt3DCore::QAbstractAspect +class Q_3DANIMATIONSHARED_EXPORT QAnimationAspect : public Qt3DCore::QAbstractAspect { Q_OBJECT public: diff --git a/src/animation/frontend/qanimationcallback.h b/src/animation/frontend/qanimationcallback.h index 1fcbd657c..f7abb4a29 100644 --- a/src/animation/frontend/qanimationcallback.h +++ b/src/animation/frontend/qanimationcallback.h @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { -class QT3DANIMATIONSHARED_EXPORT QAnimationCallback +class Q_3DANIMATIONSHARED_EXPORT QAnimationCallback { public: enum Flag { diff --git a/src/animation/frontend/qanimationclip.h b/src/animation/frontend/qanimationclip.h index 4781641e0..cec758704 100644 --- a/src/animation/frontend/qanimationclip.h +++ b/src/animation/frontend/qanimationclip.h @@ -50,7 +50,7 @@ namespace Qt3DAnimation { class QAnimationClipPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationClip : public QAbstractAnimationClip +class Q_3DANIMATIONSHARED_EXPORT QAnimationClip : public QAbstractAnimationClip { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAnimationClipData clipData READ clipData WRITE setClipData NOTIFY clipDataChanged) diff --git a/src/animation/frontend/qanimationclipdata.h b/src/animation/frontend/qanimationclipdata.h index 605b17208..d0e35527e 100644 --- a/src/animation/frontend/qanimationclipdata.h +++ b/src/animation/frontend/qanimationclipdata.h @@ -51,7 +51,7 @@ namespace Qt3DAnimation { class QAnimationClipDataPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationClipData +class Q_3DANIMATIONSHARED_EXPORT QAnimationClipData { public: QAnimationClipData(); diff --git a/src/animation/frontend/qanimationcliploader.h b/src/animation/frontend/qanimationcliploader.h index 2106d0f31..bf82f742e 100644 --- a/src/animation/frontend/qanimationcliploader.h +++ b/src/animation/frontend/qanimationcliploader.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QAnimationClipLoaderPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationClipLoader : public QAbstractAnimationClip +class Q_3DANIMATIONSHARED_EXPORT QAnimationClipLoader : public QAbstractAnimationClip { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/animation/frontend/qanimationcontroller.h b/src/animation/frontend/qanimationcontroller.h index ae3272517..47f2e0edd 100644 --- a/src/animation/frontend/qanimationcontroller.h +++ b/src/animation/frontend/qanimationcontroller.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QAnimationControllerPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationController : public QObject +class Q_3DANIMATIONSHARED_EXPORT QAnimationController : public QObject { Q_OBJECT Q_PROPERTY(int activeAnimationGroup READ activeAnimationGroup WRITE setActiveAnimationGroup NOTIFY activeAnimationGroupChanged) diff --git a/src/animation/frontend/qanimationgroup.h b/src/animation/frontend/qanimationgroup.h index a4f34c815..dd18edafc 100644 --- a/src/animation/frontend/qanimationgroup.h +++ b/src/animation/frontend/qanimationgroup.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QAnimationGroupPrivate; -class QT3DANIMATIONSHARED_EXPORT QAnimationGroup : public QObject +class Q_3DANIMATIONSHARED_EXPORT QAnimationGroup : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) diff --git a/src/animation/frontend/qblendedclipanimator.h b/src/animation/frontend/qblendedclipanimator.h index 064a83dc7..f4463802f 100644 --- a/src/animation/frontend/qblendedclipanimator.h +++ b/src/animation/frontend/qblendedclipanimator.h @@ -50,7 +50,7 @@ namespace Qt3DAnimation { class QAbstractClipBlendNode; class QBlendedClipAnimatorPrivate; -class QT3DANIMATIONSHARED_EXPORT QBlendedClipAnimator : public Qt3DAnimation::QAbstractClipAnimator +class Q_3DANIMATIONSHARED_EXPORT QBlendedClipAnimator : public Qt3DAnimation::QAbstractClipAnimator { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAbstractClipBlendNode *blendTree READ blendTree WRITE setBlendTree NOTIFY blendTreeChanged) diff --git a/src/animation/frontend/qcallbackmapping.h b/src/animation/frontend/qcallbackmapping.h index c52e284ff..b98a3b430 100644 --- a/src/animation/frontend/qcallbackmapping.h +++ b/src/animation/frontend/qcallbackmapping.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QCallbackMappingPrivate; -class QT3DANIMATIONSHARED_EXPORT QCallbackMapping : public QAbstractChannelMapping +class Q_3DANIMATIONSHARED_EXPORT QCallbackMapping : public QAbstractChannelMapping { Q_OBJECT Q_PROPERTY(QString channelName READ channelName WRITE setChannelName NOTIFY channelNameChanged) diff --git a/src/animation/frontend/qchannel.cpp b/src/animation/frontend/qchannel.cpp index 801ad385b..eab7f0df4 100644 --- a/src/animation/frontend/qchannel.cpp +++ b/src/animation/frontend/qchannel.cpp @@ -53,6 +53,16 @@ public: int m_jointIndex = -1; }; +/*! + \class QChannel + \inmodule Qt3DAnimation + \brief Defines a channel for a QAnimationClipData. + The animation system interpolates each channel component independently + except in the case the QChannel is called "Rotation" (case sensitive), + it has four QChannelComponents and the same number of keyframes for + each QChannelComponent. In that case the interpolation will be performed + using SLERP. +*/ QChannel::QChannel() : d(new QChannelPrivate) { @@ -138,14 +148,12 @@ QChannel::const_iterator QChannel::end() const Q_DECL_NOTHROW bool operator==(const QChannel &lhs, const QChannel &rhs) Q_DECL_NOTHROW { - return lhs.d->m_name == rhs.d->m_name && - lhs.d->m_channelComponents == rhs.d->m_channelComponents; + return lhs.d->m_name == rhs.d->m_name && lhs.d->m_channelComponents == rhs.d->m_channelComponents; } bool operator!=(const QChannel &lhs, const QChannel &rhs) Q_DECL_NOTHROW { - return lhs.d->m_name != rhs.d->m_name || - lhs.d->m_channelComponents != rhs.d->m_channelComponents; + return lhs.d->m_name != rhs.d->m_name || lhs.d->m_channelComponents != rhs.d->m_channelComponents; } } // namespace Qt3DAnimation diff --git a/src/animation/frontend/qchannel.h b/src/animation/frontend/qchannel.h index 50e574756..4c856dba5 100644 --- a/src/animation/frontend/qchannel.h +++ b/src/animation/frontend/qchannel.h @@ -51,7 +51,7 @@ namespace Qt3DAnimation { class QChannelPrivate; -class QT3DANIMATIONSHARED_EXPORT QChannel +class Q_3DANIMATIONSHARED_EXPORT QChannel { public: QChannel(); diff --git a/src/animation/frontend/qchannelcomponent.h b/src/animation/frontend/qchannelcomponent.h index 922073a85..aa29d7fd5 100644 --- a/src/animation/frontend/qchannelcomponent.h +++ b/src/animation/frontend/qchannelcomponent.h @@ -51,7 +51,7 @@ namespace Qt3DAnimation { class QChannelComponentPrivate; -class QT3DANIMATIONSHARED_EXPORT QChannelComponent +class Q_3DANIMATIONSHARED_EXPORT QChannelComponent { public: QChannelComponent(); diff --git a/src/animation/frontend/qchannelmapper.h b/src/animation/frontend/qchannelmapper.h index a14fbcdd4..cb5532265 100644 --- a/src/animation/frontend/qchannelmapper.h +++ b/src/animation/frontend/qchannelmapper.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QChannelMapperPrivate; class QAbstractChannelMapping; -class QT3DANIMATIONSHARED_EXPORT QChannelMapper : public Qt3DCore::QNode +class Q_3DANIMATIONSHARED_EXPORT QChannelMapper : public Qt3DCore::QNode { Q_OBJECT diff --git a/src/animation/frontend/qchannelmapping.h b/src/animation/frontend/qchannelmapping.h index 776a2f846..e88e6daa9 100644 --- a/src/animation/frontend/qchannelmapping.h +++ b/src/animation/frontend/qchannelmapping.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QChannelMappingPrivate; -class QT3DANIMATIONSHARED_EXPORT QChannelMapping : public QAbstractChannelMapping +class Q_3DANIMATIONSHARED_EXPORT QChannelMapping : public QAbstractChannelMapping { Q_OBJECT Q_PROPERTY(QString channelName READ channelName WRITE setChannelName NOTIFY channelNameChanged) diff --git a/src/animation/frontend/qchannelmappingcreatedchange_p.h b/src/animation/frontend/qchannelmappingcreatedchange_p.h index b01a97acc..527ab524a 100644 --- a/src/animation/frontend/qchannelmappingcreatedchange_p.h +++ b/src/animation/frontend/qchannelmappingcreatedchange_p.h @@ -58,7 +58,7 @@ namespace Qt3DAnimation { class QChannelMappingCreatedChangeBasePrivate; -class QT3DANIMATIONSHARED_PRIVATE_EXPORT QChannelMappingCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase +class Q_3DANIMATIONSHARED_PRIVATE_EXPORT QChannelMappingCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase { public: explicit QChannelMappingCreatedChangeBase(const QAbstractChannelMapping *mapping); diff --git a/src/animation/frontend/qclipanimator.h b/src/animation/frontend/qclipanimator.h index 72f1ba95f..bc77b20ff 100644 --- a/src/animation/frontend/qclipanimator.h +++ b/src/animation/frontend/qclipanimator.h @@ -51,7 +51,7 @@ class QAbstractAnimationClip; class QChannelMapper; class QClipAnimatorPrivate; -class QT3DANIMATIONSHARED_EXPORT QClipAnimator : public Qt3DAnimation::QAbstractClipAnimator +class Q_3DANIMATIONSHARED_EXPORT QClipAnimator : public Qt3DAnimation::QAbstractClipAnimator { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAbstractAnimationClip *clip READ clip WRITE setClip NOTIFY clipChanged) diff --git a/src/animation/frontend/qclipblendnodecreatedchange.h b/src/animation/frontend/qclipblendnodecreatedchange.h index 01f17d7ca..094e8128e 100644 --- a/src/animation/frontend/qclipblendnodecreatedchange.h +++ b/src/animation/frontend/qclipblendnodecreatedchange.h @@ -47,7 +47,7 @@ namespace Qt3DAnimation { class QAbstractClipBlendNode; class QClipBlendNodeCreatedChangeBasePrivate; -class QT3DANIMATIONSHARED_EXPORT QClipBlendNodeCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase +class Q_3DANIMATIONSHARED_EXPORT QClipBlendNodeCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase { public: explicit QClipBlendNodeCreatedChangeBase(const QAbstractClipBlendNode *node); diff --git a/src/animation/frontend/qclipblendvalue.h b/src/animation/frontend/qclipblendvalue.h index 65ac0eb6c..b97fc6e58 100644 --- a/src/animation/frontend/qclipblendvalue.h +++ b/src/animation/frontend/qclipblendvalue.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QClipBlendValuePrivate; -class QT3DANIMATIONSHARED_EXPORT QClipBlendValue : public Qt3DAnimation::QAbstractClipBlendNode +class Q_3DANIMATIONSHARED_EXPORT QClipBlendValue : public Qt3DAnimation::QAbstractClipBlendNode { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAbstractAnimationClip *clip READ clip WRITE setClip NOTIFY clipChanged) diff --git a/src/animation/frontend/qclock.h b/src/animation/frontend/qclock.h index ea0f294d2..8475f2831 100644 --- a/src/animation/frontend/qclock.h +++ b/src/animation/frontend/qclock.h @@ -46,7 +46,7 @@ namespace Qt3DAnimation { class QClockPrivate; -class QT3DANIMATIONSHARED_EXPORT QClock : public Qt3DCore::QNode +class Q_3DANIMATIONSHARED_EXPORT QClock : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(double playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) diff --git a/src/animation/frontend/qkeyframe.h b/src/animation/frontend/qkeyframe.h index 7eabbeb17..87e2812b2 100644 --- a/src/animation/frontend/qkeyframe.h +++ b/src/animation/frontend/qkeyframe.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { -class QT3DANIMATIONSHARED_EXPORT QKeyFrame +class Q_3DANIMATIONSHARED_EXPORT QKeyFrame { public: enum InterpolationType : quint8 { diff --git a/src/animation/frontend/qkeyframeanimation.h b/src/animation/frontend/qkeyframeanimation.h index efc132cdd..0aed76cfb 100644 --- a/src/animation/frontend/qkeyframeanimation.h +++ b/src/animation/frontend/qkeyframeanimation.h @@ -50,7 +50,7 @@ namespace Qt3DAnimation { class QKeyframeAnimationPrivate; -class QT3DANIMATIONSHARED_EXPORT QKeyframeAnimation : public QAbstractAnimation +class Q_3DANIMATIONSHARED_EXPORT QKeyframeAnimation : public QAbstractAnimation { Q_OBJECT Q_PROPERTY(QVector<float> framePositions READ framePositions WRITE setFramePositions NOTIFY framePositionsChanged) diff --git a/src/animation/frontend/qlerpclipblend.h b/src/animation/frontend/qlerpclipblend.h index 225b52e53..6511d1c37 100644 --- a/src/animation/frontend/qlerpclipblend.h +++ b/src/animation/frontend/qlerpclipblend.h @@ -45,7 +45,7 @@ namespace Qt3DAnimation { class QLerpClipBlendPrivate; -class QT3DANIMATIONSHARED_EXPORT QLerpClipBlend : public QAbstractClipBlendNode +class Q_3DANIMATIONSHARED_EXPORT QLerpClipBlend : public QAbstractClipBlendNode { Q_OBJECT Q_PROPERTY(Qt3DAnimation::QAbstractClipBlendNode *startClip READ startClip WRITE setStartClip NOTIFY startClipChanged) diff --git a/src/animation/frontend/qmorphinganimation.h b/src/animation/frontend/qmorphinganimation.h index 09d0054c8..1a9a60695 100644 --- a/src/animation/frontend/qmorphinganimation.h +++ b/src/animation/frontend/qmorphinganimation.h @@ -51,7 +51,7 @@ namespace Qt3DAnimation { class QMorphingAnimationPrivate; -class QT3DANIMATIONSHARED_EXPORT QMorphingAnimation : public QAbstractAnimation +class Q_3DANIMATIONSHARED_EXPORT QMorphingAnimation : public QAbstractAnimation { Q_OBJECT Q_PROPERTY(QVector<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) diff --git a/src/animation/frontend/qmorphtarget.h b/src/animation/frontend/qmorphtarget.h index 0435924e1..ec9761c64 100644 --- a/src/animation/frontend/qmorphtarget.h +++ b/src/animation/frontend/qmorphtarget.h @@ -50,7 +50,7 @@ namespace Qt3DAnimation { class QMorphTargetPrivate; -class QT3DANIMATIONSHARED_EXPORT QMorphTarget : public QObject +class Q_3DANIMATIONSHARED_EXPORT QMorphTarget : public QObject { Q_OBJECT Q_PROPERTY(QStringList attributeNames READ attributeNames NOTIFY attributeNamesChanged) diff --git a/src/animation/frontend/qskeletonmapping.h b/src/animation/frontend/qskeletonmapping.h index 2c698da8e..275fce818 100644 --- a/src/animation/frontend/qskeletonmapping.h +++ b/src/animation/frontend/qskeletonmapping.h @@ -53,7 +53,7 @@ namespace Qt3DAnimation { class QSkeletonMappingPrivate; -class QT3DANIMATIONSHARED_EXPORT QSkeletonMapping : public QAbstractChannelMapping +class Q_3DANIMATIONSHARED_EXPORT QSkeletonMapping : public QAbstractChannelMapping { Q_OBJECT Q_PROPERTY(Qt3DCore::QAbstractSkeleton* skeleton READ skeleton WRITE setSkeleton NOTIFY skeletonChanged) diff --git a/src/animation/frontend/qvertexblendanimation.h b/src/animation/frontend/qvertexblendanimation.h index a7da2bcda..1be721ce4 100644 --- a/src/animation/frontend/qvertexblendanimation.h +++ b/src/animation/frontend/qvertexblendanimation.h @@ -49,7 +49,7 @@ namespace Qt3DAnimation { class QVertexBlendAnimationPrivate; -class QT3DANIMATIONSHARED_EXPORT QVertexBlendAnimation : public QAbstractAnimation +class Q_3DANIMATIONSHARED_EXPORT QVertexBlendAnimation : public QAbstractAnimation { Q_OBJECT Q_PROPERTY(QVector<float> targetPositions READ targetPositions WRITE setTargetPositions NOTIFY targetPositionsChanged) diff --git a/src/animation/qt3danimation_global.h b/src/animation/qt3danimation_global.h index 6b66e7ec9..b6dd15161 100644 --- a/src/animation/qt3danimation_global.h +++ b/src/animation/qt3danimation_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DANIMATION_LIB) -# define QT3DANIMATIONSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DANIMATIONSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DANIMATIONSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DANIMATIONSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DANIMATIONSHARED_EXPORT +# define Q_3DANIMATIONSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/animation/qt3danimation_global_p.h b/src/animation/qt3danimation_global_p.h index e184222b5..ce1b99b9c 100644 --- a/src/animation/qt3danimation_global_p.h +++ b/src/animation/qt3danimation_global_p.h @@ -53,7 +53,7 @@ #include "qt3danimation_global.h" -#define QT3DANIMATIONSHARED_PRIVATE_EXPORT QT3DANIMATIONSHARED_EXPORT +#define Q_3DANIMATIONSHARED_PRIVATE_EXPORT Q_3DANIMATIONSHARED_EXPORT #endif // QT3DANIMATION_GLOBAL_P_H diff --git a/src/core/aspects/qabstractaspect.h b/src/core/aspects/qabstractaspect.h index 8ac1b251f..1ae85e4e6 100644 --- a/src/core/aspects/qabstractaspect.h +++ b/src/core/aspects/qabstractaspect.h @@ -60,7 +60,7 @@ class QBackendNodeMapper; typedef QSharedPointer<QAspectJob> QAspectJobPtr; typedef QSharedPointer<QBackendNodeMapper> QBackendNodeMapperPtr; -class QT3DCORESHARED_EXPORT QAbstractAspect : public QObject +class Q_3DCORESHARED_EXPORT QAbstractAspect : public QObject { Q_OBJECT @@ -118,8 +118,8 @@ QT_END_NAMESPACE QT_BEGIN_NAMESPACE \ namespace Qt3DCore { \ typedef QAbstractAspect *(*AspectCreateFunction)(QObject *); \ - QT_DEPRECATED QT3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QString &, const QMetaObject *, AspectCreateFunction); \ - QT3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QLatin1String &, const QMetaObject *, AspectCreateFunction); \ + QT_DEPRECATED Q_3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QString &, const QMetaObject *, AspectCreateFunction); \ + Q_3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QLatin1String &, const QMetaObject *, AspectCreateFunction); \ } \ QT_END_NAMESPACE \ namespace { \ diff --git a/src/core/aspects/qabstractaspect_p.h b/src/core/aspects/qabstractaspect_p.h index 6b0490d91..e743dc63a 100644 --- a/src/core/aspects/qabstractaspect_p.h +++ b/src/core/aspects/qabstractaspect_p.h @@ -78,7 +78,7 @@ class QServiceLocator; namespace Debug { -class QT3DCORE_PRIVATE_EXPORT AsynchronousCommandReply : public QObject +class Q_3DCORE_PRIVATE_EXPORT AsynchronousCommandReply : public QObject { Q_OBJECT public: @@ -102,7 +102,7 @@ private: } // Debug -class QT3DCORE_PRIVATE_EXPORT QAbstractAspectPrivate +class Q_3DCORE_PRIVATE_EXPORT QAbstractAspectPrivate : public QObjectPrivate , public QBackendNodeFactory , public QSceneObserverInterface diff --git a/src/core/aspects/qaspectengine.h b/src/core/aspects/qaspectengine.h index 28b15046b..7f900ad52 100644 --- a/src/core/aspects/qaspectengine.h +++ b/src/core/aspects/qaspectengine.h @@ -56,7 +56,7 @@ class QNode; typedef QSharedPointer<QEntity> QEntityPtr; -class QT3DCORESHARED_EXPORT QAspectEngine : public QObject +class Q_3DCORESHARED_EXPORT QAspectEngine : public QObject { Q_OBJECT public: diff --git a/src/core/aspects/qaspectengine_p.h b/src/core/aspects/qaspectengine_p.h index 6b0aae9cb..2d7d0fe93 100644 --- a/src/core/aspects/qaspectengine_p.h +++ b/src/core/aspects/qaspectengine_p.h @@ -75,7 +75,7 @@ class AspectCommandDebugger; } // Debug #endif -class QT3DCORE_PRIVATE_EXPORT QAspectEnginePrivate : public QObjectPrivate +class Q_3DCORE_PRIVATE_EXPORT QAspectEnginePrivate : public QObjectPrivate { public: QAspectEnginePrivate(); diff --git a/src/core/aspects/qaspectfactory.cpp b/src/core/aspects/qaspectfactory.cpp index 94e04b34d..2f1530257 100644 --- a/src/core/aspects/qaspectfactory.cpp +++ b/src/core/aspects/qaspectfactory.cpp @@ -52,7 +52,7 @@ Q_GLOBAL_STATIC(defaultFactories_t, defaultFactories) typedef QHash<const QMetaObject*, QLatin1String> defaultAspectNames_t; Q_GLOBAL_STATIC(defaultAspectNames_t, defaultAspectNames) -QT3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QLatin1String &name, +Q_3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QLatin1String &name, const QMetaObject *metaObject, QAspectFactory::CreateFunction factory) { @@ -60,7 +60,7 @@ QT3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QLatin1St defaultAspectNames->insert(metaObject, name); } -QT3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QString &name, +Q_3DCORESHARED_EXPORT void qt3d_QAspectFactory_addDefaultFactory(const QString &name, const QMetaObject *metaObject, QAspectFactory::CreateFunction factory) { diff --git a/src/core/aspects/qaspectfactory_p.h b/src/core/aspects/qaspectfactory_p.h index 67b5e0b9d..41a063900 100644 --- a/src/core/aspects/qaspectfactory_p.h +++ b/src/core/aspects/qaspectfactory_p.h @@ -65,7 +65,7 @@ namespace Qt3DCore { class QAbstractAspect; -class QT3DCORE_PRIVATE_EXPORT QAspectFactory +class Q_3DCORE_PRIVATE_EXPORT QAspectFactory { public: typedef QAbstractAspect *(*CreateFunction)(QObject *); diff --git a/src/core/aspects/qaspectmanager_p.h b/src/core/aspects/qaspectmanager_p.h index 0a703a776..de978b8e9 100644 --- a/src/core/aspects/qaspectmanager_p.h +++ b/src/core/aspects/qaspectmanager_p.h @@ -75,7 +75,7 @@ class QAbstractAspectJobManager; class QSceneObserverInterface; class QServiceLocator; -class QT3DCORE_PRIVATE_EXPORT QAspectManager : public QObject +class Q_3DCORE_PRIVATE_EXPORT QAspectManager : public QObject { Q_OBJECT public: diff --git a/src/core/changes/qcomponentaddedchange.h b/src/core/changes/qcomponentaddedchange.h index e7676a026..ef2f6a227 100644 --- a/src/core/changes/qcomponentaddedchange.h +++ b/src/core/changes/qcomponentaddedchange.h @@ -50,7 +50,7 @@ class QComponent; class QEntity; class QComponentAddedChangePrivate; -class QT3DCORESHARED_EXPORT QComponentAddedChange : public QSceneChange +class Q_3DCORESHARED_EXPORT QComponentAddedChange : public QSceneChange { public: explicit QComponentAddedChange(const QEntity *entity, diff --git a/src/core/changes/qcomponentaddedchange_p.h b/src/core/changes/qcomponentaddedchange_p.h index 5eb453363..2a600288d 100644 --- a/src/core/changes/qcomponentaddedchange_p.h +++ b/src/core/changes/qcomponentaddedchange_p.h @@ -65,7 +65,7 @@ namespace Qt3DCore { class QComponent; class QEntity; -class QT3DCORE_PRIVATE_EXPORT QComponentAddedChangePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QComponentAddedChangePrivate : public QSceneChangePrivate { public: QComponentAddedChangePrivate(const QEntity *entity, const QComponent *component); diff --git a/src/core/changes/qcomponentremovedchange.h b/src/core/changes/qcomponentremovedchange.h index 66743b1ae..8108b33d5 100644 --- a/src/core/changes/qcomponentremovedchange.h +++ b/src/core/changes/qcomponentremovedchange.h @@ -50,7 +50,7 @@ class QComponent; class QEntity; class QComponentRemovedChangePrivate; -class QT3DCORESHARED_EXPORT QComponentRemovedChange : public QSceneChange +class Q_3DCORESHARED_EXPORT QComponentRemovedChange : public QSceneChange { public: explicit QComponentRemovedChange(const QEntity *entity, diff --git a/src/core/changes/qcomponentremovedchange_p.h b/src/core/changes/qcomponentremovedchange_p.h index 5284c7bbd..fe84da252 100644 --- a/src/core/changes/qcomponentremovedchange_p.h +++ b/src/core/changes/qcomponentremovedchange_p.h @@ -65,7 +65,7 @@ namespace Qt3DCore { class QComponent; class QEntity; -class QT3DCORE_PRIVATE_EXPORT QComponentRemovedChangePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QComponentRemovedChangePrivate : public QSceneChangePrivate { public: QComponentRemovedChangePrivate(const QEntity *entity, const QComponent *component); diff --git a/src/core/changes/qdynamicpropertyupdatedchange.h b/src/core/changes/qdynamicpropertyupdatedchange.h index 2eee6d6d6..0509582b0 100644 --- a/src/core/changes/qdynamicpropertyupdatedchange.h +++ b/src/core/changes/qdynamicpropertyupdatedchange.h @@ -48,7 +48,7 @@ namespace Qt3DCore { class QDynamicPropertyUpdatedChangePrivate; -class QT3DCORESHARED_EXPORT QDynamicPropertyUpdatedChange : public QPropertyUpdatedChangeBase +class Q_3DCORESHARED_EXPORT QDynamicPropertyUpdatedChange : public QPropertyUpdatedChangeBase { public: explicit QDynamicPropertyUpdatedChange(QNodeId subjectId); diff --git a/src/core/changes/qdynamicpropertyupdatedchange_p.h b/src/core/changes/qdynamicpropertyupdatedchange_p.h index c71c2a71a..233d55c8e 100644 --- a/src/core/changes/qdynamicpropertyupdatedchange_p.h +++ b/src/core/changes/qdynamicpropertyupdatedchange_p.h @@ -63,7 +63,7 @@ namespace Qt3DCore { class QPropertyUpdatedChange; class QFrameAllocator; -class QT3DCORE_PRIVATE_EXPORT QDynamicPropertyUpdatedChangePrivate : public QPropertyUpdatedChangeBasePrivate +class Q_3DCORE_PRIVATE_EXPORT QDynamicPropertyUpdatedChangePrivate : public QPropertyUpdatedChangeBasePrivate { public: QDynamicPropertyUpdatedChangePrivate(); diff --git a/src/core/changes/qnodecommand.h b/src/core/changes/qnodecommand.h index f4371b03c..3622f7421 100644 --- a/src/core/changes/qnodecommand.h +++ b/src/core/changes/qnodecommand.h @@ -48,7 +48,7 @@ namespace Qt3DCore { class QNodeCommandPrivate; -class QT3DCORESHARED_EXPORT QNodeCommand : public QSceneChange +class Q_3DCORESHARED_EXPORT QNodeCommand : public QSceneChange { public: #if defined(Q_ATOMIC_INT64_IS_SUPPORTED) diff --git a/src/core/changes/qnodecommand_p.h b/src/core/changes/qnodecommand_p.h index dd4259b20..e89dbe1a9 100644 --- a/src/core/changes/qnodecommand_p.h +++ b/src/core/changes/qnodecommand_p.h @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QNodeCommandPrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QNodeCommandPrivate : public QSceneChangePrivate { public: QNodeCommandPrivate(); diff --git a/src/core/changes/qnodecreatedchange.h b/src/core/changes/qnodecreatedchange.h index 85444e00c..f46e8abee 100644 --- a/src/core/changes/qnodecreatedchange.h +++ b/src/core/changes/qnodecreatedchange.h @@ -48,7 +48,7 @@ namespace Qt3DCore { class QNode; class QNodeCreatedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QNodeCreatedChangeBase : public QSceneChange +class Q_3DCORESHARED_EXPORT QNodeCreatedChangeBase : public QSceneChange { public: explicit QNodeCreatedChangeBase(const QNode *node); diff --git a/src/core/changes/qnodecreatedchange_p.h b/src/core/changes/qnodecreatedchange_p.h index 5e4c5b91d..153ccc0e8 100644 --- a/src/core/changes/qnodecreatedchange_p.h +++ b/src/core/changes/qnodecreatedchange_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QNode; -class QT3DCORE_PRIVATE_EXPORT QNodeCreatedChangeBasePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QNodeCreatedChangeBasePrivate : public QSceneChangePrivate { public: QNodeCreatedChangeBasePrivate(const QNode *node); diff --git a/src/core/changes/qnodedestroyedchange.h b/src/core/changes/qnodedestroyedchange.h index 11a54f8e2..c072dd412 100644 --- a/src/core/changes/qnodedestroyedchange.h +++ b/src/core/changes/qnodedestroyedchange.h @@ -47,7 +47,7 @@ namespace Qt3DCore { class QNodeDestroyedChangePrivate; -class QT3DCORESHARED_EXPORT QNodeDestroyedChange : public QSceneChange +class Q_3DCORESHARED_EXPORT QNodeDestroyedChange : public QSceneChange { public: explicit QNodeDestroyedChange(const QNode *node, const QVector<QNodeIdTypePair> &subtreeIdsAndTypes); diff --git a/src/core/changes/qpropertynodeaddedchange.h b/src/core/changes/qpropertynodeaddedchange.h index a816f711c..ce3288a65 100644 --- a/src/core/changes/qpropertynodeaddedchange.h +++ b/src/core/changes/qpropertynodeaddedchange.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyNodeAddedChangePrivate; -class QT3DCORESHARED_EXPORT QPropertyNodeAddedChange : public QStaticPropertyValueAddedChangeBase +class Q_3DCORESHARED_EXPORT QPropertyNodeAddedChange : public QStaticPropertyValueAddedChangeBase { public: explicit QPropertyNodeAddedChange(QNodeId subjectId, QNode *node); diff --git a/src/core/changes/qpropertynoderemovedchange.h b/src/core/changes/qpropertynoderemovedchange.h index d97bec6e6..1a4db8f1c 100644 --- a/src/core/changes/qpropertynoderemovedchange.h +++ b/src/core/changes/qpropertynoderemovedchange.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyNodeRemovedChangePrivate; -class QT3DCORESHARED_EXPORT QPropertyNodeRemovedChange : public QStaticPropertyValueRemovedChangeBase +class Q_3DCORESHARED_EXPORT QPropertyNodeRemovedChange : public QStaticPropertyValueRemovedChangeBase { public: explicit QPropertyNodeRemovedChange(QNodeId subjectId, QNode *node); diff --git a/src/core/changes/qpropertyupdatedchange.h b/src/core/changes/qpropertyupdatedchange.h index acec44694..e0c12f13d 100644 --- a/src/core/changes/qpropertyupdatedchange.h +++ b/src/core/changes/qpropertyupdatedchange.h @@ -48,7 +48,7 @@ namespace Qt3DCore { class QPropertyUpdatedChangePrivate; -class QT3DCORESHARED_EXPORT QPropertyUpdatedChange : public QStaticPropertyUpdatedChangeBase +class Q_3DCORESHARED_EXPORT QPropertyUpdatedChange : public QStaticPropertyUpdatedChangeBase { public: explicit QPropertyUpdatedChange(QNodeId subjectId); diff --git a/src/core/changes/qpropertyupdatedchangebase.h b/src/core/changes/qpropertyupdatedchangebase.h index 1abbd899a..800abb477 100644 --- a/src/core/changes/qpropertyupdatedchangebase.h +++ b/src/core/changes/qpropertyupdatedchangebase.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyUpdatedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QPropertyUpdatedChangeBase : public QSceneChange +class Q_3DCORESHARED_EXPORT QPropertyUpdatedChangeBase : public QSceneChange { public: ~QPropertyUpdatedChangeBase(); diff --git a/src/core/changes/qpropertyupdatedchangebase_p.h b/src/core/changes/qpropertyupdatedchangebase_p.h index 7c66812a1..6dd7186f2 100644 --- a/src/core/changes/qpropertyupdatedchangebase_p.h +++ b/src/core/changes/qpropertyupdatedchangebase_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { class QPropertyUpdatedChangeBase; -class QT3DCORE_PRIVATE_EXPORT QPropertyUpdatedChangeBasePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QPropertyUpdatedChangeBasePrivate : public QSceneChangePrivate { public: QPropertyUpdatedChangeBasePrivate(); diff --git a/src/core/changes/qpropertyvalueaddedchange.h b/src/core/changes/qpropertyvalueaddedchange.h index 80b41c9f8..d85720246 100644 --- a/src/core/changes/qpropertyvalueaddedchange.h +++ b/src/core/changes/qpropertyvalueaddedchange.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyValueAddedChangePrivate; -class QT3DCORESHARED_EXPORT QPropertyValueAddedChange : public QStaticPropertyValueAddedChangeBase +class Q_3DCORESHARED_EXPORT QPropertyValueAddedChange : public QStaticPropertyValueAddedChangeBase { public: explicit QPropertyValueAddedChange(QNodeId subjectId); diff --git a/src/core/changes/qpropertyvalueaddedchange_p.h b/src/core/changes/qpropertyvalueaddedchange_p.h index edd59489f..3f7ea33fe 100644 --- a/src/core/changes/qpropertyvalueaddedchange_p.h +++ b/src/core/changes/qpropertyvalueaddedchange_p.h @@ -62,7 +62,7 @@ namespace Qt3DCore { class QPropertyValueAddedChange; -class QT3DCORE_PRIVATE_EXPORT QPropertyValueAddedChangePrivate : public QStaticPropertyValueAddedChangeBasePrivate +class Q_3DCORE_PRIVATE_EXPORT QPropertyValueAddedChangePrivate : public QStaticPropertyValueAddedChangeBasePrivate { public: QPropertyValueAddedChangePrivate(); diff --git a/src/core/changes/qpropertyvalueaddedchangebase.h b/src/core/changes/qpropertyvalueaddedchangebase.h index 2ac449667..2be39ad47 100644 --- a/src/core/changes/qpropertyvalueaddedchangebase.h +++ b/src/core/changes/qpropertyvalueaddedchangebase.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyValueAddedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QPropertyValueAddedChangeBase : public QSceneChange +class Q_3DCORESHARED_EXPORT QPropertyValueAddedChangeBase : public QSceneChange { public: ~QPropertyValueAddedChangeBase(); diff --git a/src/core/changes/qpropertyvalueaddedchangebase_p.h b/src/core/changes/qpropertyvalueaddedchangebase_p.h index be92e2d5b..57d97e4c0 100644 --- a/src/core/changes/qpropertyvalueaddedchangebase_p.h +++ b/src/core/changes/qpropertyvalueaddedchangebase_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { class QPropertyValueAddedChangeBase; -class QT3DCORE_PRIVATE_EXPORT QPropertyValueAddedChangeBasePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QPropertyValueAddedChangeBasePrivate : public QSceneChangePrivate { public: QPropertyValueAddedChangeBasePrivate(); diff --git a/src/core/changes/qpropertyvalueremovedchange.h b/src/core/changes/qpropertyvalueremovedchange.h index 06bb1dd39..2bd781ed5 100644 --- a/src/core/changes/qpropertyvalueremovedchange.h +++ b/src/core/changes/qpropertyvalueremovedchange.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyValueRemovedChangePrivate; -class QT3DCORESHARED_EXPORT QPropertyValueRemovedChange : public QStaticPropertyValueRemovedChangeBase +class Q_3DCORESHARED_EXPORT QPropertyValueRemovedChange : public QStaticPropertyValueRemovedChangeBase { public: explicit QPropertyValueRemovedChange(QNodeId subjectId); diff --git a/src/core/changes/qpropertyvalueremovedchange_p.h b/src/core/changes/qpropertyvalueremovedchange_p.h index b4e86bc9e..119dabefc 100644 --- a/src/core/changes/qpropertyvalueremovedchange_p.h +++ b/src/core/changes/qpropertyvalueremovedchange_p.h @@ -62,7 +62,7 @@ namespace Qt3DCore { class QPropertyValueRemovedChange; -class QT3DCORE_PRIVATE_EXPORT QPropertyValueRemovedChangePrivate : public QStaticPropertyValueRemovedChangeBasePrivate +class Q_3DCORE_PRIVATE_EXPORT QPropertyValueRemovedChangePrivate : public QStaticPropertyValueRemovedChangeBasePrivate { public: QPropertyValueRemovedChangePrivate(); diff --git a/src/core/changes/qpropertyvalueremovedchangebase.h b/src/core/changes/qpropertyvalueremovedchangebase.h index 44bc57726..233354078 100644 --- a/src/core/changes/qpropertyvalueremovedchangebase.h +++ b/src/core/changes/qpropertyvalueremovedchangebase.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QPropertyValueRemovedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QPropertyValueRemovedChangeBase : public QSceneChange +class Q_3DCORESHARED_EXPORT QPropertyValueRemovedChangeBase : public QSceneChange { public: ~QPropertyValueRemovedChangeBase(); diff --git a/src/core/changes/qpropertyvalueremovedchangebase_p.h b/src/core/changes/qpropertyvalueremovedchangebase_p.h index f9c1b4009..f62f7f24d 100644 --- a/src/core/changes/qpropertyvalueremovedchangebase_p.h +++ b/src/core/changes/qpropertyvalueremovedchangebase_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { class QPropertyValueRemovedChangeBase; -class QT3DCORE_PRIVATE_EXPORT QPropertyValueRemovedChangeBasePrivate : public QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QPropertyValueRemovedChangeBasePrivate : public QSceneChangePrivate { public: QPropertyValueRemovedChangeBasePrivate(); diff --git a/src/core/changes/qscenechange.h b/src/core/changes/qscenechange.h index 7679fb030..7d88d334f 100644 --- a/src/core/changes/qscenechange.h +++ b/src/core/changes/qscenechange.h @@ -65,7 +65,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ChangeFlags) class QSceneChangePrivate; -class QT3DCORESHARED_EXPORT QSceneChange +class Q_3DCORESHARED_EXPORT QSceneChange { public: enum DeliveryFlag { diff --git a/src/core/changes/qscenechange_p.h b/src/core/changes/qscenechange_p.h index cd0194b01..d32f6eec3 100644 --- a/src/core/changes/qscenechange_p.h +++ b/src/core/changes/qscenechange_p.h @@ -63,7 +63,7 @@ namespace Qt3DCore { class QSceneChange; class QNodeId; -class QT3DCORE_PRIVATE_EXPORT QSceneChangePrivate +class Q_3DCORE_PRIVATE_EXPORT QSceneChangePrivate { public : QSceneChangePrivate(); diff --git a/src/core/changes/qskeletoncreatedchange_p.h b/src/core/changes/qskeletoncreatedchange_p.h index 337a4bf26..09b37d545 100644 --- a/src/core/changes/qskeletoncreatedchange_p.h +++ b/src/core/changes/qskeletoncreatedchange_p.h @@ -57,7 +57,7 @@ namespace Qt3DCore { class QSkeletonCreatedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QSkeletonCreatedChangeBase : public QNodeCreatedChangeBase +class Q_3DCORESHARED_EXPORT QSkeletonCreatedChangeBase : public QNodeCreatedChangeBase { public: explicit QSkeletonCreatedChangeBase(const QAbstractSkeleton *skeleton); diff --git a/src/core/changes/qstaticpropertyupdatedchangebase.h b/src/core/changes/qstaticpropertyupdatedchangebase.h index ca145e975..b698d1f06 100644 --- a/src/core/changes/qstaticpropertyupdatedchangebase.h +++ b/src/core/changes/qstaticpropertyupdatedchangebase.h @@ -48,7 +48,7 @@ namespace Qt3DCore { class QStaticPropertyUpdatedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QStaticPropertyUpdatedChangeBase : public QPropertyUpdatedChangeBase +class Q_3DCORESHARED_EXPORT QStaticPropertyUpdatedChangeBase : public QPropertyUpdatedChangeBase { public: ~QStaticPropertyUpdatedChangeBase(); diff --git a/src/core/changes/qstaticpropertyvalueaddedchangebase.h b/src/core/changes/qstaticpropertyvalueaddedchangebase.h index bf55ac31c..e56e8f18a 100644 --- a/src/core/changes/qstaticpropertyvalueaddedchangebase.h +++ b/src/core/changes/qstaticpropertyvalueaddedchangebase.h @@ -49,7 +49,7 @@ namespace Qt3DCore { class QStaticPropertyValueAddedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QStaticPropertyValueAddedChangeBase : public QPropertyValueAddedChangeBase +class Q_3DCORESHARED_EXPORT QStaticPropertyValueAddedChangeBase : public QPropertyValueAddedChangeBase { public: ~QStaticPropertyValueAddedChangeBase(); diff --git a/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h b/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h index cd995d739..3c7d62840 100644 --- a/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h +++ b/src/core/changes/qstaticpropertyvalueaddedchangebase_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { class QStaticPropertyValueAddedChangeBase; -class QT3DCORE_PRIVATE_EXPORT QStaticPropertyValueAddedChangeBasePrivate : public QPropertyValueAddedChangeBasePrivate +class Q_3DCORE_PRIVATE_EXPORT QStaticPropertyValueAddedChangeBasePrivate : public QPropertyValueAddedChangeBasePrivate { public: QStaticPropertyValueAddedChangeBasePrivate(); diff --git a/src/core/changes/qstaticpropertyvalueremovedchangebase.h b/src/core/changes/qstaticpropertyvalueremovedchangebase.h index f6f554397..e9f53fb12 100644 --- a/src/core/changes/qstaticpropertyvalueremovedchangebase.h +++ b/src/core/changes/qstaticpropertyvalueremovedchangebase.h @@ -49,7 +49,7 @@ namespace Qt3DCore { class QStaticPropertyValueRemovedChangeBasePrivate; -class QT3DCORESHARED_EXPORT QStaticPropertyValueRemovedChangeBase : public QPropertyValueRemovedChangeBase +class Q_3DCORESHARED_EXPORT QStaticPropertyValueRemovedChangeBase : public QPropertyValueRemovedChangeBase { public: ~QStaticPropertyValueRemovedChangeBase(); diff --git a/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h b/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h index ac4e1d875..1c26efa6c 100644 --- a/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h +++ b/src/core/changes/qstaticpropertyvalueremovedchangebase_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { class QStaticPropertyValueRemovedChangeBase; -class QT3DCORE_PRIVATE_EXPORT QStaticPropertyValueRemovedChangeBasePrivate : public QPropertyValueRemovedChangeBasePrivate +class Q_3DCORE_PRIVATE_EXPORT QStaticPropertyValueRemovedChangeBasePrivate : public QPropertyValueRemovedChangeBasePrivate { public: QStaticPropertyValueRemovedChangeBasePrivate(); diff --git a/src/core/jobs/qabstractaspectjobmanager_p.h b/src/core/jobs/qabstractaspectjobmanager_p.h index 5c4e9f699..b3e76b86d 100644 --- a/src/core/jobs/qabstractaspectjobmanager_p.h +++ b/src/core/jobs/qabstractaspectjobmanager_p.h @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORESHARED_EXPORT QAbstractAspectJobManager : public QObject +class Q_3DCORESHARED_EXPORT QAbstractAspectJobManager : public QObject { Q_OBJECT public: diff --git a/src/core/jobs/qaspectjob.h b/src/core/jobs/qaspectjob.h index 398cd88d1..5c088fd1a 100644 --- a/src/core/jobs/qaspectjob.h +++ b/src/core/jobs/qaspectjob.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QAspectJobPrivate; -class QT3DCORESHARED_EXPORT QAspectJob +class Q_3DCORESHARED_EXPORT QAspectJob { public: QAspectJob(); diff --git a/src/core/jobs/qaspectjob_p.h b/src/core/jobs/qaspectjob_p.h index ff708443e..7aa3151a0 100644 --- a/src/core/jobs/qaspectjob_p.h +++ b/src/core/jobs/qaspectjob_p.h @@ -103,7 +103,7 @@ struct JobRunStats }; #endif -class QT3DCORE_PRIVATE_EXPORT QAspectJobPrivate +class Q_3DCORE_PRIVATE_EXPORT QAspectJobPrivate { public: QAspectJobPrivate(); diff --git a/src/core/jobs/qaspectjobmanager_p.h b/src/core/jobs/qaspectjobmanager_p.h index d59860039..77e535491 100644 --- a/src/core/jobs/qaspectjobmanager_p.h +++ b/src/core/jobs/qaspectjobmanager_p.h @@ -64,7 +64,7 @@ namespace Qt3DCore { class QThreadPooler; class DependencyHandler; -class QT3DCORE_PRIVATE_EXPORT QAspectJobManager : public QAbstractAspectJobManager +class Q_3DCORE_PRIVATE_EXPORT QAspectJobManager : public QAbstractAspectJobManager { Q_OBJECT public: diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h index 00742f8fc..65459efba 100644 --- a/src/core/jobs/qthreadpooler_p.h +++ b/src/core/jobs/qthreadpooler_p.h @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QThreadPooler : public QObject +class Q_3DCORE_PRIVATE_EXPORT QThreadPooler : public QObject { Q_OBJECT diff --git a/src/core/nodes/propertychangehandler_p.h b/src/core/nodes/propertychangehandler_p.h index ff8d6d5c2..6a3911dbd 100644 --- a/src/core/nodes/propertychangehandler_p.h +++ b/src/core/nodes/propertychangehandler_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORESHARED_EXPORT PropertyChangeHandlerBase : public QObject +class Q_3DCORESHARED_EXPORT PropertyChangeHandlerBase : public QObject { Q_OBJECT public: diff --git a/src/core/nodes/qabstractnodefactory_p.h b/src/core/nodes/qabstractnodefactory_p.h index dbe0adffe..de1b758a9 100644 --- a/src/core/nodes/qabstractnodefactory_p.h +++ b/src/core/nodes/qabstractnodefactory_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QAbstractNodeFactory +class Q_3DCORE_PRIVATE_EXPORT QAbstractNodeFactory { public: virtual ~QAbstractNodeFactory(); diff --git a/src/core/nodes/qbackendnode.h b/src/core/nodes/qbackendnode.h index 99e483cff..21485cd5f 100644 --- a/src/core/nodes/qbackendnode.h +++ b/src/core/nodes/qbackendnode.h @@ -58,7 +58,7 @@ class QAspectEngine; class QBackendNodeTester; #endif -class QT3DCORESHARED_EXPORT QBackendNodeMapper +class Q_3DCORESHARED_EXPORT QBackendNodeMapper { public: virtual ~QBackendNodeMapper(); @@ -69,7 +69,7 @@ public: typedef QSharedPointer<QBackendNodeMapper> QBackendNodeMapperPtr; -class QT3DCORESHARED_EXPORT QBackendNode +class Q_3DCORESHARED_EXPORT QBackendNode { public: enum Mode { diff --git a/src/core/nodes/qbackendnode_p.h b/src/core/nodes/qbackendnode_p.h index 358b3ab8e..dde86fa48 100644 --- a/src/core/nodes/qbackendnode_p.h +++ b/src/core/nodes/qbackendnode_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QBackendNodePrivate +class Q_3DCORE_PRIVATE_EXPORT QBackendNodePrivate : public QObserverInterface , public QObservableInterface { diff --git a/src/core/nodes/qcomponent.h b/src/core/nodes/qcomponent.h index 639f9446c..182a21e50 100644 --- a/src/core/nodes/qcomponent.h +++ b/src/core/nodes/qcomponent.h @@ -49,7 +49,7 @@ namespace Qt3DCore { class QComponentPrivate; -class QT3DCORESHARED_EXPORT QComponent : public QNode +class Q_3DCORESHARED_EXPORT QComponent : public QNode { Q_OBJECT Q_PROPERTY(bool isShareable READ isShareable WRITE setShareable NOTIFY shareableChanged) diff --git a/src/core/nodes/qcomponent_p.h b/src/core/nodes/qcomponent_p.h index 0b3a961ab..d28433d23 100644 --- a/src/core/nodes/qcomponent_p.h +++ b/src/core/nodes/qcomponent_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QComponentPrivate : public QNodePrivate +class Q_3DCORE_PRIVATE_EXPORT QComponentPrivate : public QNodePrivate { public: QComponentPrivate(); diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp index 3c8805a67..69d774dd1 100644 --- a/src/core/nodes/qentity.cpp +++ b/src/core/nodes/qentity.cpp @@ -159,6 +159,8 @@ void QEntity::addComponent(QComponent *comp) if (!comp->parent()) comp->setParent(this); + QNodePrivate::get(comp)->_q_ensureBackendNodeCreated(); + d->m_components.append(comp); // Ensures proper bookkeeping diff --git a/src/core/nodes/qentity.h b/src/core/nodes/qentity.h index ef6aedc4d..bbf38efb4 100644 --- a/src/core/nodes/qentity.h +++ b/src/core/nodes/qentity.h @@ -53,7 +53,7 @@ class QEntityPrivate; typedef QVector<QComponent*> QComponentVector; -class QT3DCORESHARED_EXPORT QEntity : public QNode +class Q_3DCORESHARED_EXPORT QEntity : public QNode { Q_OBJECT public: diff --git a/src/core/nodes/qentity_p.h b/src/core/nodes/qentity_p.h index 8fe03cd6b..ee6db75db 100644 --- a/src/core/nodes/qentity_p.h +++ b/src/core/nodes/qentity_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QEntityPrivate : public QNodePrivate +class Q_3DCORE_PRIVATE_EXPORT QEntityPrivate : public QNodePrivate { public : QEntityPrivate(); diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp index 83ac49471..c2373b805 100644 --- a/src/core/nodes/qnode.cpp +++ b/src/core/nodes/qnode.cpp @@ -394,15 +394,15 @@ void QNodePrivate::propertyChanged(int propertyIndex) if (data.canConvert<QNode*>()) { QNode *node = data.value<QNode*>(); - // Ensure the node has issued a node creation change. We can end - // up here if a newly created node with a parent is immediately set + // Ensure the node and all ancestors have issued their node creation changes. + // We can end up here if a newly created node with a parent is immediately set // as a property on another node. In this case the deferred call to // _q_postConstructorInit() will not have happened yet as the event - // loop will still be blocked. So force it here and we catch this - // eventuality in the _q_postConstructorInit() function so that we - // do not repeat the creation and new child scene change events. + // loop will still be blocked. We need to do this for all ancestors, + // since the subtree of this node otherwise can end up on the backend + // with a reference to a non-existent parent. if (node) - QNodePrivate::get(node)->_q_postConstructorInit(); + QNodePrivate::get(node)->_q_ensureBackendNodeCreated(); const QNodeId id = node ? node->id() : QNodeId(); return QVariant::fromValue(id); @@ -506,6 +506,29 @@ void QNodePrivate::setArbiter(QLockableObserverInterface *arbiter) } /*! + * \internal + * Makes sure this node has a backend by traversing the tree up to the most distant ancestor + * without a backend node and initializing that node. This is done to make sure the parent nodes + * are always created before the child nodes, since child nodes reference parent nodes at creation + * time. + */ +void QNodePrivate::_q_ensureBackendNodeCreated() +{ + if (m_hasBackendNode) + return; + + Q_Q(QNode); + + QNode *nextNode = q; + QNode *topNodeWithoutBackend = nullptr; + while (nextNode != nullptr && !QNodePrivate::get(nextNode)->m_hasBackendNode) { + topNodeWithoutBackend = nextNode; + nextNode = nextNode->parentNode(); + } + QNodePrivate::get(topNodeWithoutBackend)->_q_postConstructorInit(); +} + +/*! \class Qt3DCore::QNode \inherits QObject diff --git a/src/core/nodes/qnode.h b/src/core/nodes/qnode.h index 1fe03f5e0..d4e4ff088 100644 --- a/src/core/nodes/qnode.h +++ b/src/core/nodes/qnode.h @@ -65,7 +65,7 @@ class QBackendNodeTester; typedef QVector<QNode *> QNodeVector; typedef QSharedPointer<QNode> QNodePtr; -class QT3DCORESHARED_EXPORT QNode : public QObject +class Q_3DCORESHARED_EXPORT QNode : public QObject { Q_OBJECT Q_PROPERTY(Qt3DCore::QNode *parent READ parentNode WRITE setParent NOTIFY parentChanged) diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h index 73893cc1e..fd3265870 100644 --- a/src/core/nodes/qnode_p.h +++ b/src/core/nodes/qnode_p.h @@ -68,7 +68,7 @@ namespace Qt3DCore { class QNode; class QAspectEngine; -class QT3DCORE_PRIVATE_EXPORT QNodePrivate : public QObjectPrivate, public QObservableInterface +class Q_3DCORE_PRIVATE_EXPORT QNodePrivate : public QObjectPrivate, public QObservableInterface { public: QNodePrivate(); @@ -152,6 +152,7 @@ public: static const QMetaObject *findStaticMetaObject(const QMetaObject *metaObject); void _q_postConstructorInit(); + void _q_ensureBackendNodeCreated(); private: void notifyCreationChange(); diff --git a/src/core/nodes/qnodecreatedchangegenerator_p.h b/src/core/nodes/qnodecreatedchangegenerator_p.h index 42c2847cc..b2e8fa08b 100644 --- a/src/core/nodes/qnodecreatedchangegenerator_p.h +++ b/src/core/nodes/qnodecreatedchangegenerator_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORE_PRIVATE_EXPORT QNodeCreatedChangeGenerator +class Q_3DCORE_PRIVATE_EXPORT QNodeCreatedChangeGenerator { public: QNodeCreatedChangeGenerator(QNode *rootNode); diff --git a/src/core/nodes/qnodeid.h b/src/core/nodes/qnodeid.h index a00559df3..0fd81e790 100644 --- a/src/core/nodes/qnodeid.h +++ b/src/core/nodes/qnodeid.h @@ -58,7 +58,7 @@ public: : m_id(0) {} - QT3DCORESHARED_EXPORT static QNodeId createId() Q_DECL_NOTHROW; + Q_3DCORESHARED_EXPORT static QNodeId createId() Q_DECL_NOTHROW; Q_DECL_CONSTEXPR bool isNull() const Q_DECL_NOTHROW { @@ -103,7 +103,7 @@ QT3D_DECLARE_TYPEINFO(Qt3DCore, QNodeId, Q_PRIMITIVE_TYPE) typedef QVector<QNodeId> QNodeIdVector; #ifndef QT_NO_DEBUG_STREAM -QT3DCORESHARED_EXPORT QDebug operator<<(QDebug d, QNodeId id); +Q_3DCORESHARED_EXPORT QDebug operator<<(QDebug d, QNodeId id); #endif inline Q_DECL_CONSTEXPR uint qHash(QNodeId id, uint seed = 0) Q_DECL_NOTHROW diff --git a/src/core/nodes/qnodevisitor_p.h b/src/core/nodes/qnodevisitor_p.h index 15bfa90db..c7c75710a 100644 --- a/src/core/nodes/qnodevisitor_p.h +++ b/src/core/nodes/qnodevisitor_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORESHARED_EXPORT QNodeVisitor +class Q_3DCORESHARED_EXPORT QNodeVisitor { public: QNodeVisitor(); diff --git a/src/core/qbackendnodefactory_p.h b/src/core/qbackendnodefactory_p.h index 46e68266f..5752205c0 100644 --- a/src/core/qbackendnodefactory_p.h +++ b/src/core/qbackendnodefactory_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QBackendNode; -class QT3DCORE_PRIVATE_EXPORT QBackendNodeFactory +class Q_3DCORE_PRIVATE_EXPORT QBackendNodeFactory { public: virtual ~QBackendNodeFactory(); diff --git a/src/core/qchangearbiter_p.h b/src/core/qchangearbiter_p.h index ef2c07dc0..4a82061ed 100644 --- a/src/core/qchangearbiter_p.h +++ b/src/core/qchangearbiter_p.h @@ -77,13 +77,13 @@ class QAbstractPostman; class QScene; -class QT3DCORE_PRIVATE_EXPORT QAbstractArbiter : public QLockableObserverInterface +class Q_3DCORE_PRIVATE_EXPORT QAbstractArbiter : public QLockableObserverInterface { public: virtual QAbstractPostman *postman() const = 0; }; -class QT3DCORE_PRIVATE_EXPORT QChangeArbiter final +class Q_3DCORE_PRIVATE_EXPORT QChangeArbiter final : public QObject , public QAbstractArbiter { diff --git a/src/core/qlockableobserverinterface_p.h b/src/core/qlockableobserverinterface_p.h index b33a84ec4..57650aba2 100644 --- a/src/core/qlockableobserverinterface_p.h +++ b/src/core/qlockableobserverinterface_p.h @@ -60,7 +60,7 @@ namespace Qt3DCore { typedef std::vector<QSceneChangePtr> QSceneChangeList; -class QT3DCORE_PRIVATE_EXPORT QLockableObserverInterface : public QObserverInterface +class Q_3DCORE_PRIVATE_EXPORT QLockableObserverInterface : public QObserverInterface { public: virtual ~QLockableObserverInterface(); diff --git a/src/core/qobservableinterface_p.h b/src/core/qobservableinterface_p.h index 8b92168ff..e4d343d63 100644 --- a/src/core/qobservableinterface_p.h +++ b/src/core/qobservableinterface_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QLockableObserverInterface; -class QT3DCORE_PRIVATE_EXPORT QObservableInterface +class Q_3DCORE_PRIVATE_EXPORT QObservableInterface { public: virtual ~QObservableInterface(); diff --git a/src/core/qobserverinterface_p.h b/src/core/qobserverinterface_p.h index f2ed52aab..d19905dd2 100644 --- a/src/core/qobserverinterface_p.h +++ b/src/core/qobserverinterface_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { -class QT3DCORESHARED_EXPORT QObserverInterface +class Q_3DCORESHARED_EXPORT QObserverInterface { public: virtual ~QObserverInterface(); diff --git a/src/core/qpostman_p.h b/src/core/qpostman_p.h index ec00c50ae..23c638239 100644 --- a/src/core/qpostman_p.h +++ b/src/core/qpostman_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QScene; class QPostmanPrivate; -class QT3DCORE_PRIVATE_EXPORT QAbstractPostman : public QObserverInterface +class Q_3DCORE_PRIVATE_EXPORT QAbstractPostman : public QObserverInterface { public: virtual void setScene(QScene *sceneLookup) = 0; diff --git a/src/core/qpostman_p_p.h b/src/core/qpostman_p_p.h index 1b5cca3c9..0a34c2e02 100644 --- a/src/core/qpostman_p_p.h +++ b/src/core/qpostman_p_p.h @@ -62,7 +62,7 @@ namespace Qt3DCore { class QScene; class QPostman; -class QT3DCORE_PRIVATE_EXPORT QPostmanPrivate : public QObjectPrivate +class Q_3DCORE_PRIVATE_EXPORT QPostmanPrivate : public QObjectPrivate { public: QPostmanPrivate() diff --git a/src/core/qscene_p.h b/src/core/qscene_p.h index aaa8d9e92..379316247 100644 --- a/src/core/qscene_p.h +++ b/src/core/qscene_p.h @@ -67,7 +67,7 @@ class QAspectEngine; typedef QList<QObservableInterface *> QObservableList; -class QT3DCORE_PRIVATE_EXPORT QScene +class Q_3DCORE_PRIVATE_EXPORT QScene { public: QScene(QAspectEngine *engine = nullptr); diff --git a/src/core/qsceneobserverinterface_p.h b/src/core/qsceneobserverinterface_p.h index f183ab571..7ffc20742 100644 --- a/src/core/qsceneobserverinterface_p.h +++ b/src/core/qsceneobserverinterface_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QChangeArbiter; -class QT3DCORE_PRIVATE_EXPORT QSceneObserverInterface +class Q_3DCORE_PRIVATE_EXPORT QSceneObserverInterface { public: virtual ~QSceneObserverInterface(); diff --git a/src/core/qt3dcore_global.h b/src/core/qt3dcore_global.h index a449a2e52..b2ad787c0 100644 --- a/src/core/qt3dcore_global.h +++ b/src/core/qt3dcore_global.h @@ -47,12 +47,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DCORE_LIB) -# define QT3DCORESHARED_EXPORT Q_DECL_EXPORT +# define Q_3DCORESHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DCORESHARED_EXPORT Q_DECL_IMPORT +# define Q_3DCORESHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DCORESHARED_EXPORT +# define Q_3DCORESHARED_EXPORT #endif #define QT3D_DECLARE_TYPEINFO(NS, Class, Flags) \ diff --git a/src/core/qt3dcore_global_p.h b/src/core/qt3dcore_global_p.h index 2d6793744..fd4e9c31d 100644 --- a/src/core/qt3dcore_global_p.h +++ b/src/core/qt3dcore_global_p.h @@ -54,6 +54,6 @@ #include <Qt3DCore/qt3dcore_global.h> #include <Qt3DCore/private/qt3dcore-config_p.h> -#define QT3DCORE_PRIVATE_EXPORT QT3DCORESHARED_EXPORT +#define Q_3DCORE_PRIVATE_EXPORT Q_3DCORESHARED_EXPORT #endif // QT3DCORE_GLOBAL_P_H diff --git a/src/core/resources/qframeallocator_p.h b/src/core/resources/qframeallocator_p.h index b3ded0760..4c2b5a961 100644 --- a/src/core/resources/qframeallocator_p.h +++ b/src/core/resources/qframeallocator_p.h @@ -68,7 +68,7 @@ namespace Qt3DCore { class QFrameAllocatorPrivate; -class QT3DCORE_PRIVATE_EXPORT QFrameAllocator +class Q_3DCORE_PRIVATE_EXPORT QFrameAllocator { public: explicit QFrameAllocator(uint maxObjectSize, uint alignment = 16, uint pageSize = 128); diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h index d944c16c7..b3837fb1f 100644 --- a/src/core/resources/qresourcemanager_p.h +++ b/src/core/resources/qresourcemanager_p.h @@ -233,7 +233,7 @@ template<typename T> inline T *QHandle<T>::data() const { return (d && counter == d->counter) ? &static_cast<QHandleData<T> *>(d)->data : nullptr; } -class QT3DCORE_PRIVATE_EXPORT AlignedAllocator +class Q_3DCORE_PRIVATE_EXPORT AlignedAllocator { public: static void *allocate(uint size); diff --git a/src/core/services/qabstractframeadvanceservice_p.h b/src/core/services/qabstractframeadvanceservice_p.h index dac72a98d..73907c779 100644 --- a/src/core/services/qabstractframeadvanceservice_p.h +++ b/src/core/services/qabstractframeadvanceservice_p.h @@ -62,7 +62,7 @@ namespace Qt3DCore { class QAbstractFrameAdvanceServicePrivate; -class QT3DCORESHARED_EXPORT QAbstractFrameAdvanceService : public QAbstractServiceProvider +class Q_3DCORESHARED_EXPORT QAbstractFrameAdvanceService : public QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/core/services/qdownloadhelperservice_p.h b/src/core/services/qdownloadhelperservice_p.h index b74bcbaa1..507563ead 100644 --- a/src/core/services/qdownloadhelperservice_p.h +++ b/src/core/services/qdownloadhelperservice_p.h @@ -72,7 +72,7 @@ class QDownloadNetworkWorker; class QDownloadHelperService; class QDownloadHelperServicePrivate; -class QT3DCORESHARED_EXPORT QDownloadRequest +class Q_3DCORESHARED_EXPORT QDownloadRequest { public: QDownloadRequest(const QUrl &url); @@ -99,7 +99,7 @@ private: typedef QSharedPointer<QDownloadRequest> QDownloadRequestPtr; -class QT3DCORESHARED_EXPORT QDownloadHelperService : public QAbstractServiceProvider +class Q_3DCORESHARED_EXPORT QDownloadHelperService : public QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/core/services/qeventfilterservice_p.h b/src/core/services/qeventfilterservice_p.h index 58b87d9cc..7efe51df4 100644 --- a/src/core/services/qeventfilterservice_p.h +++ b/src/core/services/qeventfilterservice_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QEventFilterServicePrivate; -class QT3DCORESHARED_EXPORT QEventFilterService : public QAbstractServiceProvider +class Q_3DCORESHARED_EXPORT QEventFilterService : public QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/core/services/qopenglinformationservice_p.h b/src/core/services/qopenglinformationservice_p.h index 2adf73307..dcba480b6 100644 --- a/src/core/services/qopenglinformationservice_p.h +++ b/src/core/services/qopenglinformationservice_p.h @@ -63,7 +63,7 @@ namespace Qt3DCore { class QOpenGLInformationServicePrivate; -class QT3DCORESHARED_EXPORT QOpenGLInformationService : public QAbstractServiceProvider +class Q_3DCORESHARED_EXPORT QOpenGLInformationService : public QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/core/services/qservicelocator_p.h b/src/core/services/qservicelocator_p.h index 9534b33ce..9111a14ab 100644 --- a/src/core/services/qservicelocator_p.h +++ b/src/core/services/qservicelocator_p.h @@ -61,7 +61,7 @@ namespace Qt3DCore { class QAbstractServiceProviderPrivate; -class QT3DCORESHARED_EXPORT QAbstractServiceProvider : public QObject +class Q_3DCORESHARED_EXPORT QAbstractServiceProvider : public QObject { Q_OBJECT public: @@ -86,7 +86,7 @@ class QServiceLocatorPrivate; class QEventFilterService; class QDownloadHelperService; -class QT3DCORESHARED_EXPORT QServiceLocator +class Q_3DCORESHARED_EXPORT QServiceLocator { public: QServiceLocator(); diff --git a/src/core/services/qsysteminformationservice_p.h b/src/core/services/qsysteminformationservice_p.h index 01e976b77..a8a83701b 100644 --- a/src/core/services/qsysteminformationservice_p.h +++ b/src/core/services/qsysteminformationservice_p.h @@ -62,7 +62,7 @@ namespace Qt3DCore { class QSystemInformationServicePrivate; -class QT3DCORESHARED_EXPORT QSystemInformationService : public QAbstractServiceProvider +class Q_3DCORESHARED_EXPORT QSystemInformationService : public QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/core/transforms/matrix4x4_avx2_p.h b/src/core/transforms/matrix4x4_avx2_p.h index 363aaa6e9..74e7c911c 100644 --- a/src/core/transforms/matrix4x4_avx2_p.h +++ b/src/core/transforms/matrix4x4_avx2_p.h @@ -487,10 +487,10 @@ public: friend Vector4D operator*(const Vector4D &vector, const Matrix4x4_AVX2 &matrix); friend Vector4D operator*(const Matrix4x4_AVX2 &matrix, const Vector4D &vector); - friend QT3DCORE_PRIVATE_EXPORT Vector3D operator*(const Vector3D &vector, const Matrix4x4_AVX2 &matrix); - friend QT3DCORE_PRIVATE_EXPORT Vector3D operator*(const Matrix4x4_AVX2 &matrix, const Vector3D &vector); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D operator*(const Vector3D &vector, const Matrix4x4_AVX2 &matrix); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D operator*(const Matrix4x4_AVX2 &matrix, const Vector3D &vector); - friend QT3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_AVX2 &m); + friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_AVX2 &m); private: // column major order // aligned on 32 bytes boundaries for AVX, compatible with 16 bytes boundary for SSE diff --git a/src/core/transforms/matrix4x4_sse_p.h b/src/core/transforms/matrix4x4_sse_p.h index be314ca4d..287094be5 100644 --- a/src/core/transforms/matrix4x4_sse_p.h +++ b/src/core/transforms/matrix4x4_sse_p.h @@ -373,7 +373,7 @@ public: friend Q_ALWAYS_INLINE Vector3D operator*(const Vector3D &vector, const Matrix4x4_SSE &matrix); friend Q_ALWAYS_INLINE Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector); - friend QT3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_SSE &m); + friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Matrix4x4_SSE &m); private: // Internally we will store the matrix as indicated below // Q_DECL_ALIGN(16) // aligned on 16 bytes boundary for SSE (column major) @@ -484,7 +484,7 @@ Q_ALWAYS_INLINE Vector3D operator*(const Vector3D &vector, const Matrix4x4_SSE & return v; } -QT3DCORE_PRIVATE_EXPORT Q_ALWAYS_INLINE Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector) +Q_3DCORE_PRIVATE_EXPORT Q_ALWAYS_INLINE Vector3D operator*(const Matrix4x4_SSE &matrix, const Vector3D &vector) { const Matrix4x4_SSE transposed = matrix.transposed(); return vector * transposed; diff --git a/src/core/transforms/qabstractskeleton.h b/src/core/transforms/qabstractskeleton.h index 3fc13fb70..902def9f8 100644 --- a/src/core/transforms/qabstractskeleton.h +++ b/src/core/transforms/qabstractskeleton.h @@ -49,7 +49,7 @@ namespace Qt3DCore { class QAbstractSkeletonPrivate; -class QT3DCORESHARED_EXPORT QAbstractSkeleton : public Qt3DCore::QNode +class Q_3DCORESHARED_EXPORT QAbstractSkeleton : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(int jointCount READ jointCount NOTIFY jointCountChanged) diff --git a/src/core/transforms/qarmature.h b/src/core/transforms/qarmature.h index a5ccc9d28..e3beffa01 100644 --- a/src/core/transforms/qarmature.h +++ b/src/core/transforms/qarmature.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QArmaturePrivate; class QAbstractSkeleton; -class QT3DCORESHARED_EXPORT QArmature : public Qt3DCore::QComponent +class Q_3DCORESHARED_EXPORT QArmature : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DCore::QAbstractSkeleton* skeleton READ skeleton WRITE setSkeleton NOTIFY skeletonChanged) diff --git a/src/core/transforms/qjoint.h b/src/core/transforms/qjoint.h index fdc3d51a3..d3672e99f 100644 --- a/src/core/transforms/qjoint.h +++ b/src/core/transforms/qjoint.h @@ -53,7 +53,7 @@ namespace Qt3DCore { class QJointPrivate; -class QT3DCORESHARED_EXPORT QJoint : public QNode +class Q_3DCORESHARED_EXPORT QJoint : public QNode { Q_OBJECT Q_PROPERTY(QVector3D scale READ scale WRITE setScale NOTIFY scaleChanged) diff --git a/src/core/transforms/qskeleton.h b/src/core/transforms/qskeleton.h index e3c0c9194..ecffe1aa9 100644 --- a/src/core/transforms/qskeleton.h +++ b/src/core/transforms/qskeleton.h @@ -50,7 +50,7 @@ namespace Qt3DCore { class QJoint; class QSkeletonPrivate; -class QT3DCORESHARED_EXPORT QSkeleton : public QAbstractSkeleton +class Q_3DCORESHARED_EXPORT QSkeleton : public QAbstractSkeleton { Q_OBJECT Q_PROPERTY(Qt3DCore::QJoint* rootJoint READ rootJoint WRITE setRootJoint NOTIFY rootJointChanged) diff --git a/src/core/transforms/qskeletonloader.h b/src/core/transforms/qskeletonloader.h index 1185ba6c7..516a84b0a 100644 --- a/src/core/transforms/qskeletonloader.h +++ b/src/core/transforms/qskeletonloader.h @@ -51,7 +51,7 @@ namespace Qt3DCore { class QJoint; class QSkeletonLoaderPrivate; -class QT3DCORESHARED_EXPORT QSkeletonLoader : public QAbstractSkeleton +class Q_3DCORESHARED_EXPORT QSkeletonLoader : public QAbstractSkeleton { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/core/transforms/qtransform.h b/src/core/transforms/qtransform.h index 0a88cb49c..a80385a1b 100644 --- a/src/core/transforms/qtransform.h +++ b/src/core/transforms/qtransform.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { class QTransformPrivate; -class QT3DCORESHARED_EXPORT QTransform : public QComponent +class Q_3DCORESHARED_EXPORT QTransform : public QComponent { Q_OBJECT Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY matrixChanged) diff --git a/src/core/transforms/vector3d_sse_p.h b/src/core/transforms/vector3d_sse_p.h index c7f9a403c..bc25cd705 100644 --- a/src/core/transforms/vector3d_sse_p.h +++ b/src/core/transforms/vector3d_sse_p.h @@ -89,7 +89,7 @@ public: { } - explicit QT3DCORE_PRIVATE_EXPORT Vector3D_SSE(const Vector4D_SSE &v); + explicit Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE(const Vector4D_SSE &v); Q_ALWAYS_INLINE Vector3D_SSE &operator+=(Vector3D_SSE vector) { @@ -179,11 +179,11 @@ public: } #ifdef __AVX2__ - QT3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const; - QT3DCORE_PRIVATE_EXPORT Vector3D_SSE project(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const; + Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const; + Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE project(const Matrix4x4_AVX2 &modelView, const Matrix4x4_AVX2 &projection, const QRect &viewport) const; #else - QT3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_SSE &modelView, const Matrix4x4_SSE &projection, const QRect &viewport) const; - QT3DCORE_PRIVATE_EXPORT Vector3D_SSE project(const Matrix4x4_SSE &modelView, const Matrix4x4_SSE &projection, const QRect &viewport) const; + Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE unproject(const Matrix4x4_SSE &modelView, const Matrix4x4_SSE &projection, const QRect &viewport) const; + Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE project(const Matrix4x4_SSE &modelView, const Matrix4x4_SSE &projection, const QRect &viewport) const; #endif Q_ALWAYS_INLINE float x() const { return _mm_cvtss_f32(m_xyzw); } @@ -350,13 +350,13 @@ public: #ifdef __AVX2__ friend class Matrix4x4_AVX2; - friend QT3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Vector3D_SSE &vector, const Matrix4x4_AVX2 &matrix); - friend QT3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Matrix4x4_AVX2 &matrix, const Vector3D_SSE &vector); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Vector3D_SSE &vector, const Matrix4x4_AVX2 &matrix); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Matrix4x4_AVX2 &matrix, const Vector3D_SSE &vector); #endif friend class Matrix4x4_SSE; - friend QT3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Vector3D_SSE &vector, const Matrix4x4_SSE &matrix); - friend QT3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Matrix4x4_SSE &matrix, const Vector3D_SSE &vector); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Vector3D_SSE &vector, const Matrix4x4_SSE &matrix); + friend Q_3DCORE_PRIVATE_EXPORT Vector3D_SSE operator*(const Matrix4x4_SSE &matrix, const Vector3D_SSE &vector); friend Q_ALWAYS_INLINE const Vector3D_SSE operator+(Vector3D_SSE v1, Vector3D_SSE v2) { return v1 += v2; } friend Q_ALWAYS_INLINE const Vector3D_SSE operator-(Vector3D_SSE v1, Vector3D_SSE v2) { return v1 -= v2; } @@ -375,7 +375,7 @@ public: friend Q_ALWAYS_INLINE const Vector3D_SSE operator/(Vector3D_SSE vector, float divisor) { return vector /= divisor; } friend Q_ALWAYS_INLINE const Vector3D_SSE operator/(Vector3D_SSE vector, Vector3D_SSE divisor) { return vector /= divisor; } - friend QT3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Vector3D_SSE &v); + friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Vector3D_SSE &v); friend Q_ALWAYS_INLINE bool qFuzzyCompare(const Vector3D_SSE& v1, const Vector3D_SSE& v2) { return ::qFuzzyCompare(v1.x(), v2.x()) && diff --git a/src/core/transforms/vector4d_sse_p.h b/src/core/transforms/vector4d_sse_p.h index 0be5e3787..50e5c6836 100644 --- a/src/core/transforms/vector4d_sse_p.h +++ b/src/core/transforms/vector4d_sse_p.h @@ -371,7 +371,7 @@ public: friend Q_ALWAYS_INLINE const Vector4D_SSE operator/(Vector4D_SSE vector, float divisor) { return vector /= divisor; } friend Q_ALWAYS_INLINE const Vector4D_SSE operator/(Vector4D_SSE vector, Vector4D_SSE divisor) { return vector /= divisor; } - friend QT3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Vector4D_SSE &v); + friend Q_3DCORE_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const Vector4D_SSE &v); friend Q_ALWAYS_INLINE bool qFuzzyCompare(const Vector4D_SSE& v1, const Vector4D_SSE& v2) { return ::qFuzzyCompare(v1.x(), v2.x()) && diff --git a/src/doc/qt3d.qdocconf b/src/doc/qt3d.qdocconf index 798dcbfd7..25dafd2eb 100644 --- a/src/doc/qt3d.qdocconf +++ b/src/doc/qt3d.qdocconf @@ -100,16 +100,15 @@ imagedirs += images \ ../../examples/qt3d/scene2d/doc/images \ ../../examples/qt3d/advancedcustommaterial/doc/images -Cpp.ignoretokens += QT3DINPUTSHARED_EXPORT \ - QT3DCORESHARED_EXPORT \ - QT3DLOGIC_PRIVATE_EXPORT \ - QT3DLOGICSHARED_EXPORT \ - QT3DRENDERSHARED_EXPORT \ - QT3DRENDERSHARED_PRIVATE_EXPORT \ - QT3DQUICKSHARED_PRIVATE_EXPORT \ - QT3DEXTRASSHARED_EXPORT \ - QT3DANIMATIONSHARED_EXPORT \ - QT3DQUICKSCENE2DSHARED_EXPORT +Cpp.ignoretokens += Q_3DINPUTSHARED_EXPORT \ + Q_3DCORESHARED_EXPORT \ + Q_3DLOGICSHARED_EXPORT \ + Q_3DRENDERSHARED_EXPORT \ + Q_3DRENDERSHARED_PRIVATE_EXPORT \ + Q_3DQUICKSHARED_PRIVATE_EXPORT \ + Q_3DEXTRASSHARED_EXPORT \ + Q_3DANIMATIONSHARED_EXPORT \ + Q_3DQUICKSCENE2DSHARED_EXPORT Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY diff --git a/src/extras/3dtext/qextrudedtextgeometry.h b/src/extras/3dtext/qextrudedtextgeometry.h index d6e682dbd..d40797c6f 100644 --- a/src/extras/3dtext/qextrudedtextgeometry.h +++ b/src/extras/3dtext/qextrudedtextgeometry.h @@ -68,7 +68,7 @@ namespace Qt3DExtras { class QExtrudedTextGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QExtrudedTextGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QExtrudedTextGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) diff --git a/src/extras/3dtext/qextrudedtextmesh.h b/src/extras/3dtext/qextrudedtextmesh.h index ea3054003..8cbfb6cfd 100644 --- a/src/extras/3dtext/qextrudedtextmesh.h +++ b/src/extras/3dtext/qextrudedtextmesh.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QExtrudedTextMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QExtrudedTextMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) diff --git a/src/extras/defaults/qabstractcameracontroller.h b/src/extras/defaults/qabstractcameracontroller.h index e5d14745a..4cc71258d 100644 --- a/src/extras/defaults/qabstractcameracontroller.h +++ b/src/extras/defaults/qabstractcameracontroller.h @@ -55,7 +55,7 @@ namespace Qt3DExtras { class QAbstractCameraControllerPrivate; -class QT3DEXTRASSHARED_EXPORT QAbstractCameraController : public Qt3DCore::QEntity +class Q_3DEXTRASSHARED_EXPORT QAbstractCameraController : public Qt3DCore::QEntity { Q_OBJECT Q_PROPERTY(Qt3DRender::QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged) diff --git a/src/extras/defaults/qabstractspritesheet.h b/src/extras/defaults/qabstractspritesheet.h index bbef65798..ec72473f9 100644 --- a/src/extras/defaults/qabstractspritesheet.h +++ b/src/extras/defaults/qabstractspritesheet.h @@ -57,7 +57,7 @@ namespace Qt3DExtras { class QAbstractSpriteSheetPrivate; -class QT3DEXTRASSHARED_EXPORT QAbstractSpriteSheet : public Qt3DCore::QNode +class Q_3DEXTRASSHARED_EXPORT QAbstractSpriteSheet : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QAbstractTexture *texture READ texture WRITE setTexture NOTIFY textureChanged) diff --git a/src/extras/defaults/qdiffusemapmaterial.h b/src/extras/defaults/qdiffusemapmaterial.h index e6c632ed2..221e82859 100644 --- a/src/extras/defaults/qdiffusemapmaterial.h +++ b/src/extras/defaults/qdiffusemapmaterial.h @@ -56,7 +56,7 @@ namespace Qt3DExtras { class QDiffuseMapMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QDiffuseMapMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QDiffuseMapMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qdiffusespecularmapmaterial.h b/src/extras/defaults/qdiffusespecularmapmaterial.h index d86948673..bbf060397 100644 --- a/src/extras/defaults/qdiffusespecularmapmaterial.h +++ b/src/extras/defaults/qdiffusespecularmapmaterial.h @@ -55,7 +55,7 @@ namespace Qt3DExtras { class QDiffuseSpecularMapMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QDiffuseSpecularMapMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QDiffuseSpecularMapMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qdiffusespecularmaterial.h b/src/extras/defaults/qdiffusespecularmaterial.h index 5f21da093..7ce1e65ba 100644 --- a/src/extras/defaults/qdiffusespecularmaterial.h +++ b/src/extras/defaults/qdiffusespecularmaterial.h @@ -50,7 +50,7 @@ namespace Qt3DExtras { class QDiffuseSpecularMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QDiffuseSpecularMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QDiffuseSpecularMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qfirstpersoncameracontroller.h b/src/extras/defaults/qfirstpersoncameracontroller.h index 60edf7cb8..4656d8827 100644 --- a/src/extras/defaults/qfirstpersoncameracontroller.h +++ b/src/extras/defaults/qfirstpersoncameracontroller.h @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QFirstPersonCameraController : public QAbstractCameraController +class Q_3DEXTRASSHARED_EXPORT QFirstPersonCameraController : public QAbstractCameraController { Q_OBJECT diff --git a/src/extras/defaults/qforwardrenderer.h b/src/extras/defaults/qforwardrenderer.h index 7b6078169..e41cbd3df 100644 --- a/src/extras/defaults/qforwardrenderer.h +++ b/src/extras/defaults/qforwardrenderer.h @@ -54,7 +54,7 @@ namespace Qt3DExtras { class QForwardRendererPrivate; -class QT3DEXTRASSHARED_EXPORT QForwardRenderer : public Qt3DRender::QTechniqueFilter +class Q_3DEXTRASSHARED_EXPORT QForwardRenderer : public Qt3DRender::QTechniqueFilter { Q_OBJECT Q_PROPERTY(QObject *surface READ surface WRITE setSurface NOTIFY surfaceChanged) diff --git a/src/extras/defaults/qgoochmaterial.h b/src/extras/defaults/qgoochmaterial.h index 6afddfe8b..293ce0dbe 100644 --- a/src/extras/defaults/qgoochmaterial.h +++ b/src/extras/defaults/qgoochmaterial.h @@ -50,7 +50,7 @@ namespace Qt3DExtras { class QGoochMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QGoochMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QGoochMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor diffuse READ diffuse WRITE setDiffuse NOTIFY diffuseChanged) diff --git a/src/extras/defaults/qmetalroughmaterial.h b/src/extras/defaults/qmetalroughmaterial.h index 400437338..c3c3d6da9 100644 --- a/src/extras/defaults/qmetalroughmaterial.h +++ b/src/extras/defaults/qmetalroughmaterial.h @@ -54,7 +54,7 @@ namespace Qt3DExtras { class QMetalRoughMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QMetalRoughMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QMetalRoughMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QVariant baseColor READ baseColor WRITE setBaseColor NOTIFY baseColorChanged) diff --git a/src/extras/defaults/qmorphphongmaterial.h b/src/extras/defaults/qmorphphongmaterial.h index 235426f1c..77529692d 100644 --- a/src/extras/defaults/qmorphphongmaterial.h +++ b/src/extras/defaults/qmorphphongmaterial.h @@ -47,7 +47,7 @@ namespace Qt3DExtras { class QMorphPhongMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QMorphPhongMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QMorphPhongMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qnormaldiffusemapalphamaterial.h b/src/extras/defaults/qnormaldiffusemapalphamaterial.h index 040199b26..735430b37 100644 --- a/src/extras/defaults/qnormaldiffusemapalphamaterial.h +++ b/src/extras/defaults/qnormaldiffusemapalphamaterial.h @@ -49,7 +49,7 @@ namespace Qt3DExtras { class QNormalDiffuseMapAlphaMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QNormalDiffuseMapAlphaMaterial : public QNormalDiffuseMapMaterial +class Q_3DEXTRASSHARED_EXPORT QNormalDiffuseMapAlphaMaterial : public QNormalDiffuseMapMaterial { Q_OBJECT public: diff --git a/src/extras/defaults/qnormaldiffusemapmaterial.h b/src/extras/defaults/qnormaldiffusemapmaterial.h index c38d53352..a2db0d7f5 100644 --- a/src/extras/defaults/qnormaldiffusemapmaterial.h +++ b/src/extras/defaults/qnormaldiffusemapmaterial.h @@ -56,7 +56,7 @@ namespace Qt3DExtras { class QNormalDiffuseMapMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QNormalDiffuseMapMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QNormalDiffuseMapMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h index 164b07710..77ae9a7b6 100644 --- a/src/extras/defaults/qnormaldiffusespecularmapmaterial.h +++ b/src/extras/defaults/qnormaldiffusespecularmapmaterial.h @@ -50,7 +50,7 @@ namespace Qt3DExtras { class QNormalDiffuseSpecularMapMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QNormalDiffuseSpecularMapMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QNormalDiffuseSpecularMapMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qorbitcameracontroller.h b/src/extras/defaults/qorbitcameracontroller.h index 684bfddf1..422498222 100644 --- a/src/extras/defaults/qorbitcameracontroller.h +++ b/src/extras/defaults/qorbitcameracontroller.h @@ -45,7 +45,7 @@ namespace Qt3DExtras { class QOrbitCameraControllerPrivate; -class QT3DEXTRASSHARED_EXPORT QOrbitCameraController : public QAbstractCameraController +class Q_3DEXTRASSHARED_EXPORT QOrbitCameraController : public QAbstractCameraController { Q_OBJECT Q_PROPERTY(float zoomInLimit READ zoomInLimit WRITE setZoomInLimit NOTIFY zoomInLimitChanged) diff --git a/src/extras/defaults/qpervertexcolormaterial.h b/src/extras/defaults/qpervertexcolormaterial.h index 8b64eb2d3..3b1b8bd6a 100644 --- a/src/extras/defaults/qpervertexcolormaterial.h +++ b/src/extras/defaults/qpervertexcolormaterial.h @@ -50,7 +50,7 @@ namespace Qt3DExtras { class QPerVertexColorMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QPerVertexColorMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QPerVertexColorMaterial : public Qt3DRender::QMaterial { Q_OBJECT diff --git a/src/extras/defaults/qphongalphamaterial.h b/src/extras/defaults/qphongalphamaterial.h index 667c5b283..37c853e70 100644 --- a/src/extras/defaults/qphongalphamaterial.h +++ b/src/extras/defaults/qphongalphamaterial.h @@ -52,7 +52,7 @@ namespace Qt3DExtras { class QPhongAlphaMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QPhongAlphaMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QPhongAlphaMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qphongmaterial.h b/src/extras/defaults/qphongmaterial.h index d78c8c2ff..eab7e311b 100644 --- a/src/extras/defaults/qphongmaterial.h +++ b/src/extras/defaults/qphongmaterial.h @@ -50,7 +50,7 @@ namespace Qt3DExtras { class QPhongMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QPhongMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QPhongMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(QColor ambient READ ambient WRITE setAmbient NOTIFY ambientChanged) diff --git a/src/extras/defaults/qskyboxentity.h b/src/extras/defaults/qskyboxentity.h index e49782dc2..f0f2f3d63 100644 --- a/src/extras/defaults/qskyboxentity.h +++ b/src/extras/defaults/qskyboxentity.h @@ -49,7 +49,7 @@ namespace Qt3DExtras { class QSkyboxEntityPrivate; -class QT3DEXTRASSHARED_EXPORT QSkyboxEntity : public Qt3DCore::QEntity +class Q_3DEXTRASSHARED_EXPORT QSkyboxEntity : public Qt3DCore::QEntity { Q_OBJECT Q_PROPERTY(QString baseName READ baseName WRITE setBaseName NOTIFY baseNameChanged) diff --git a/src/extras/defaults/qspritegrid.h b/src/extras/defaults/qspritegrid.h index a0e73abdf..56f4b1976 100644 --- a/src/extras/defaults/qspritegrid.h +++ b/src/extras/defaults/qspritegrid.h @@ -51,7 +51,7 @@ namespace Qt3DExtras { class QSpriteGridPrivate; -class QT3DEXTRASSHARED_EXPORT QSpriteGrid : public QAbstractSpriteSheet +class Q_3DEXTRASSHARED_EXPORT QSpriteGrid : public QAbstractSpriteSheet { Q_OBJECT Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged) diff --git a/src/extras/defaults/qspritesheet.h b/src/extras/defaults/qspritesheet.h index 0e78c0e22..d1faeb825 100644 --- a/src/extras/defaults/qspritesheet.h +++ b/src/extras/defaults/qspritesheet.h @@ -51,7 +51,7 @@ namespace Qt3DExtras { class QSpriteSheetItem; class QSpriteSheetPrivate; -class QT3DEXTRASSHARED_EXPORT QSpriteSheet : public QAbstractSpriteSheet +class Q_3DEXTRASSHARED_EXPORT QSpriteSheet : public QAbstractSpriteSheet { Q_OBJECT Q_PROPERTY(QVector<QSpriteSheetItem *> sprites READ sprites WRITE setSprites NOTIFY spritesChanged) diff --git a/src/extras/defaults/qspritesheetitem.h b/src/extras/defaults/qspritesheetitem.h index f47846071..c98f3100e 100644 --- a/src/extras/defaults/qspritesheetitem.h +++ b/src/extras/defaults/qspritesheetitem.h @@ -48,7 +48,7 @@ namespace Qt3DExtras { class QSpriteSheetItemPrivate; -class QT3DEXTRASSHARED_EXPORT QSpriteSheetItem : public Qt3DCore::QNode +class Q_3DEXTRASSHARED_EXPORT QSpriteSheetItem : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged) diff --git a/src/extras/defaults/qt3dwindow.h b/src/extras/defaults/qt3dwindow.h index 7020a2bd5..bf4f44ff0 100644 --- a/src/extras/defaults/qt3dwindow.h +++ b/src/extras/defaults/qt3dwindow.h @@ -86,7 +86,7 @@ namespace Qt3DExtras { class Qt3DWindowPrivate; -class QT3DEXTRASSHARED_EXPORT Qt3DWindow : public QWindow +class Q_3DEXTRASSHARED_EXPORT Qt3DWindow : public QWindow { Q_OBJECT public: diff --git a/src/extras/defaults/qtexturedmetalroughmaterial.h b/src/extras/defaults/qtexturedmetalroughmaterial.h index 60f41b27f..23bce81f0 100644 --- a/src/extras/defaults/qtexturedmetalroughmaterial.h +++ b/src/extras/defaults/qtexturedmetalroughmaterial.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT_DEPRECATED_X("Use Qt3DExtras::QMetalRoughMaterial") QT3DEXTRASSHARED_EXPORT QTexturedMetalRoughMaterial : public QMetalRoughMaterial +class QT_DEPRECATED_X("Use Qt3DExtras::QMetalRoughMaterial") Q_3DEXTRASSHARED_EXPORT QTexturedMetalRoughMaterial : public QMetalRoughMaterial { Q_OBJECT Q_PROPERTY(QVariant ambientOcclusion READ ambientOcclusion WRITE setAmbientOcclusion NOTIFY ambientOcclusionChanged) diff --git a/src/extras/defaults/qtexturematerial.h b/src/extras/defaults/qtexturematerial.h index 4e36b1867..87c522992 100644 --- a/src/extras/defaults/qtexturematerial.h +++ b/src/extras/defaults/qtexturematerial.h @@ -57,7 +57,7 @@ namespace Qt3DExtras { class QTextureMaterialPrivate; -class QT3DEXTRASSHARED_EXPORT QTextureMaterial : public Qt3DRender::QMaterial +class Q_3DEXTRASSHARED_EXPORT QTextureMaterial : public Qt3DRender::QMaterial { Q_OBJECT Q_PROPERTY(Qt3DRender::QAbstractTexture *texture READ texture WRITE setTexture NOTIFY textureChanged) diff --git a/src/extras/geometries/qconegeometry.h b/src/extras/geometries/qconegeometry.h index 4f1dc944a..2deb56f0e 100644 --- a/src/extras/geometries/qconegeometry.h +++ b/src/extras/geometries/qconegeometry.h @@ -53,7 +53,7 @@ namespace Qt3DExtras { class QConeGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QConeGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QConeGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY( bool hasTopEndcap READ hasTopEndcap WRITE setHasTopEndcap NOTIFY hasTopEndcapChanged ) diff --git a/src/extras/geometries/qconemesh.h b/src/extras/geometries/qconemesh.h index c32070e5c..6c0408b7b 100644 --- a/src/extras/geometries/qconemesh.h +++ b/src/extras/geometries/qconemesh.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QConeMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QConeMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qcuboidgeometry.h b/src/extras/geometries/qcuboidgeometry.h index 2c295d6c4..50bb10930 100644 --- a/src/extras/geometries/qcuboidgeometry.h +++ b/src/extras/geometries/qcuboidgeometry.h @@ -56,7 +56,7 @@ namespace Qt3DExtras { class QCuboidGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QCuboidGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(float xExtent READ xExtent WRITE setXExtent NOTIFY xExtentChanged) diff --git a/src/extras/geometries/qcuboidmesh.h b/src/extras/geometries/qcuboidmesh.h index ca33c5f2d..dc7f821ff 100644 --- a/src/extras/geometries/qcuboidmesh.h +++ b/src/extras/geometries/qcuboidmesh.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QCuboidMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QCuboidMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT diff --git a/src/extras/geometries/qcylindergeometry.h b/src/extras/geometries/qcylindergeometry.h index add4a7d96..0a9022016 100644 --- a/src/extras/geometries/qcylindergeometry.h +++ b/src/extras/geometries/qcylindergeometry.h @@ -54,7 +54,7 @@ class QAttribute; namespace Qt3DExtras { class QCylinderGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QCylinderGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QCylinderGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qcylindermesh.h b/src/extras/geometries/qcylindermesh.h index 3083ed849..19ef5d2cf 100644 --- a/src/extras/geometries/qcylindermesh.h +++ b/src/extras/geometries/qcylindermesh.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QCylinderMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QCylinderMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qplanegeometry.h b/src/extras/geometries/qplanegeometry.h index 4a4efe6eb..91e985700 100644 --- a/src/extras/geometries/qplanegeometry.h +++ b/src/extras/geometries/qplanegeometry.h @@ -56,7 +56,7 @@ namespace Qt3DExtras { class QPlaneGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QPlaneGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QPlaneGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(float width READ width WRITE setWidth NOTIFY widthChanged) diff --git a/src/extras/geometries/qplanemesh.h b/src/extras/geometries/qplanemesh.h index 1cf2ae79e..eebea1dbf 100644 --- a/src/extras/geometries/qplanemesh.h +++ b/src/extras/geometries/qplanemesh.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QPlaneMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QPlaneMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(float width READ width WRITE setWidth NOTIFY widthChanged) diff --git a/src/extras/geometries/qspheregeometry.h b/src/extras/geometries/qspheregeometry.h index d657c0c67..8bd8c9c94 100644 --- a/src/extras/geometries/qspheregeometry.h +++ b/src/extras/geometries/qspheregeometry.h @@ -55,7 +55,7 @@ namespace Qt3DExtras { class QSphereGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QSphereGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QSphereGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qspheremesh.h b/src/extras/geometries/qspheremesh.h index 58e77dcab..44e5b81bb 100644 --- a/src/extras/geometries/qspheremesh.h +++ b/src/extras/geometries/qspheremesh.h @@ -49,7 +49,7 @@ namespace Qt3DExtras { class QSphereMeshPrivate; -class QT3DEXTRASSHARED_EXPORT QSphereMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QSphereMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qtorusgeometry.h b/src/extras/geometries/qtorusgeometry.h index ebde32bd8..cd4a4bb06 100644 --- a/src/extras/geometries/qtorusgeometry.h +++ b/src/extras/geometries/qtorusgeometry.h @@ -55,7 +55,7 @@ namespace Qt3DExtras { class QTorusGeometryPrivate; -class QT3DEXTRASSHARED_EXPORT QTorusGeometry : public Qt3DRender::QGeometry +class Q_3DEXTRASSHARED_EXPORT QTorusGeometry : public Qt3DRender::QGeometry { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/geometries/qtorusmesh.h b/src/extras/geometries/qtorusmesh.h index 69ad00efe..97bde10a2 100644 --- a/src/extras/geometries/qtorusmesh.h +++ b/src/extras/geometries/qtorusmesh.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DExtras { -class QT3DEXTRASSHARED_EXPORT QTorusMesh : public Qt3DRender::QGeometryRenderer +class Q_3DEXTRASSHARED_EXPORT QTorusMesh : public Qt3DRender::QGeometryRenderer { Q_OBJECT Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) diff --git a/src/extras/qt3dextras_global.h b/src/extras/qt3dextras_global.h index ee2111bcc..c4f649df3 100644 --- a/src/extras/qt3dextras_global.h +++ b/src/extras/qt3dextras_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT3DEXTRAS_LIBRARY) -# define QT3DEXTRASSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DEXTRASSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DEXTRASSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DEXTRASSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DEXTRASSHARED_EXPORT +# define Q_3DEXTRASSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/extras/shaders/es2/light.inc.frag b/src/extras/shaders/es2/light.inc.frag index 167ff306e..465138971 100644 --- a/src/extras/shaders/es2/light.inc.frag +++ b/src/extras/shaders/es2/light.inc.frag @@ -10,7 +10,9 @@ struct Light { FP vec3 color; FP float intensity; FP vec3 direction; - FP vec3 attenuation; + FP float constantAttenuation; + FP float linearAttenuation; + FP float quadraticAttenuation; FP float cutOffAngle; }; uniform Light lights[MAX_LIGHTS]; diff --git a/src/extras/shaders/es2/light.inc.frag100 b/src/extras/shaders/es2/light.inc.frag100 index 8680ee423..0b792b98e 100644 --- a/src/extras/shaders/es2/light.inc.frag100 +++ b/src/extras/shaders/es2/light.inc.frag100 @@ -10,7 +10,9 @@ struct Light { FP vec3 color; FP float intensity; FP vec3 direction; - FP vec3 attenuation; + FP float constantAttenuation; + FP float linearAttenuation; + FP float quadraticAttenuation; FP float cutOffAngle; }; uniform Light lights[MAX_LIGHTS]; diff --git a/src/extras/shaders/es2/phong.inc.frag b/src/extras/shaders/es2/phong.inc.frag index 9d17b68b5..a68e8124c 100644 --- a/src/extras/shaders/es2/phong.inc.frag +++ b/src/extras/shaders/es2/phong.inc.frag @@ -81,9 +81,11 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 FP float att = 1.0; if ( light.type != TYPE_DIRECTIONAL ) { s = light.position - vpos; - if (length( light.attenuation ) != 0.0) { + if (light.constantAttenuation != 0.0 + || light.linearAttenuation != 0.0 + || light.quadraticAttenuation != 0.0) { FP float dist = length(s); - att = 1.0 / (light.attenuation.x + light.attenuation.y * dist + light.attenuation.z * dist * dist); + att = 1.0 / (light.constantAttenuation + light.linearAttenuation * dist + light.quadraticAttenuation * dist * dist); } s = normalize( s ); if ( light.type == TYPE_SPOT ) { diff --git a/src/extras/shaders/es2/phong.inc.frag100 b/src/extras/shaders/es2/phong.inc.frag100 index 507d8eaf5..0c326d0b6 100644 --- a/src/extras/shaders/es2/phong.inc.frag100 +++ b/src/extras/shaders/es2/phong.inc.frag100 @@ -65,9 +65,11 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 FP float att = 1.0; if ( lights[0].type != TYPE_DIRECTIONAL ) { s = lights[0].position - vpos; - if (length( lights[0].attenuation ) != 0.0) { + if (lights[0].constantAttenuation != 0.0 + || light[0].linearAttenuation != 0.0 + || light[0].quadraticAttenuation != 0.0) { FP float dist = length(s); - att = 1.0 / (lights[0].attenuation.x + lights[0].attenuation.y * dist + lights[0].attenuation.z * dist * dist); + att = 1.0 / (lights[0].constantAttenuation + lights[0].linearAttenuation * dist + lights[0].quadraticAttenuation * dist * dist); } s = normalize( s ); if ( lights[0].type == TYPE_SPOT ) { @@ -96,9 +98,11 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3 att = 1.0; if ( lights[1].type != TYPE_DIRECTIONAL ) { s = lights[1].position - vpos; - if (length( lights[1].attenuation ) != 0.0) { + if (lights[1].constantAttenuation != 0.0 + || light[1].linearAttenuation != 0.0 + || light[1].quadraticAttenuation != 0.0) { FP float dist = length(s); - att = 1.0 / (lights[1].attenuation.x + lights[1].attenuation.y * dist + lights[1].attenuation.z * dist * dist); + att = 1.0 / (lights[1].constantAttenuation + lights[1].linearAttenuation * dist + lights[1].quadraticAttenuation * dist * dist); } s = normalize( s ); if ( lights[1].type == TYPE_SPOT ) { diff --git a/src/extras/text/qtext2dentity.h b/src/extras/text/qtext2dentity.h index 39be91a0f..1083d1c85 100644 --- a/src/extras/text/qtext2dentity.h +++ b/src/extras/text/qtext2dentity.h @@ -52,7 +52,7 @@ namespace Qt3DExtras { class QText2DEntityPrivate; -class QT3DEXTRASSHARED_EXPORT QText2DEntity : public Qt3DCore::QEntity +class Q_3DEXTRASSHARED_EXPORT QText2DEntity : public Qt3DCore::QEntity { Q_OBJECT Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) diff --git a/src/input/backend/qabstractphysicaldevicebackendnode_p.h b/src/input/backend/qabstractphysicaldevicebackendnode_p.h index 339ad7324..e8e397883 100644 --- a/src/input/backend/qabstractphysicaldevicebackendnode_p.h +++ b/src/input/backend/qabstractphysicaldevicebackendnode_p.h @@ -66,7 +66,7 @@ namespace Qt3DInput { class QInputAspect; class QAbstractPhysicalDeviceBackendNodePrivate; -class QT3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNode : public Qt3DCore::QBackendNode +class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNode : public Qt3DCore::QBackendNode { public: explicit QAbstractPhysicalDeviceBackendNode(QBackendNode::Mode mode); diff --git a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h index d6928aced..4b0c47b36 100644 --- a/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h +++ b/src/input/backend/qabstractphysicaldevicebackendnode_p_p.h @@ -83,7 +83,7 @@ class AxisSetting; } -class QT3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNodePrivate : public Qt3DCore::QBackendNodePrivate +class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceBackendNodePrivate : public Qt3DCore::QBackendNodePrivate { public: explicit QAbstractPhysicalDeviceBackendNodePrivate(Qt3DCore::QBackendNode::Mode mode = Qt3DCore::QBackendNode::ReadOnly); diff --git a/src/input/frontend/qabstractactioninput.h b/src/input/frontend/qabstractactioninput.h index a0c18cb54..0bafec351 100644 --- a/src/input/frontend/qabstractactioninput.h +++ b/src/input/frontend/qabstractactioninput.h @@ -48,7 +48,7 @@ namespace Qt3DInput { class QAbstractActionInputPrivate; -class QT3DINPUTSHARED_EXPORT QAbstractActionInput : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAbstractActionInput : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/input/frontend/qabstractaxisinput.h b/src/input/frontend/qabstractaxisinput.h index c0a93da31..fa3dc2fa8 100644 --- a/src/input/frontend/qabstractaxisinput.h +++ b/src/input/frontend/qabstractaxisinput.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QAbstractPhysicalDevice; class QAbstractAxisInputPrivate; -class QT3DINPUTSHARED_EXPORT QAbstractAxisInput : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAbstractAxisInput : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged) diff --git a/src/input/frontend/qabstractphysicaldevice.h b/src/input/frontend/qabstractphysicaldevice.h index bf93bc955..9e95d05f0 100644 --- a/src/input/frontend/qabstractphysicaldevice.h +++ b/src/input/frontend/qabstractphysicaldevice.h @@ -53,7 +53,7 @@ class QAxisSetting; class QInputAspect; class QAbstractPhysicalDevicePrivate; -class QT3DINPUTSHARED_EXPORT QAbstractPhysicalDevice : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAbstractPhysicalDevice : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/input/frontend/qabstractphysicaldevice_p.h b/src/input/frontend/qabstractphysicaldevice_p.h index e2b67a815..8fa72aa02 100644 --- a/src/input/frontend/qabstractphysicaldevice_p.h +++ b/src/input/frontend/qabstractphysicaldevice_p.h @@ -65,7 +65,7 @@ namespace Qt3DInput { class QAxisSetting; -class QT3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDevicePrivate : public Qt3DCore::QNodePrivate +class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDevicePrivate : public Qt3DCore::QNodePrivate { public: QAbstractPhysicalDevicePrivate(); diff --git a/src/input/frontend/qabstractphysicaldeviceproxy_p.h b/src/input/frontend/qabstractphysicaldeviceproxy_p.h index 64c634733..e250b9eb9 100644 --- a/src/input/frontend/qabstractphysicaldeviceproxy_p.h +++ b/src/input/frontend/qabstractphysicaldeviceproxy_p.h @@ -61,7 +61,7 @@ namespace Qt3DInput { class QAbstractPhysicalDeviceProxyPrivate; -class QT3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceProxy : public QAbstractPhysicalDevice +class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceProxy : public QAbstractPhysicalDevice { Q_OBJECT Q_PROPERTY(QString deviceName READ deviceName CONSTANT) diff --git a/src/input/frontend/qabstractphysicaldeviceproxy_p_p.h b/src/input/frontend/qabstractphysicaldeviceproxy_p_p.h index 2ba8f3bde..8f8d1bea3 100644 --- a/src/input/frontend/qabstractphysicaldeviceproxy_p_p.h +++ b/src/input/frontend/qabstractphysicaldeviceproxy_p_p.h @@ -62,7 +62,7 @@ namespace Qt3DInput { class QAbstractPhysicalDeviceProxy; class QAbstractPhysicalDevice; -class QT3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceProxyPrivate : public QAbstractPhysicalDevicePrivate +class Q_3DINPUTSHARED_PRIVATE_EXPORT QAbstractPhysicalDeviceProxyPrivate : public QAbstractPhysicalDevicePrivate { public: explicit QAbstractPhysicalDeviceProxyPrivate(const QString &deviceName); diff --git a/src/input/frontend/qaction.h b/src/input/frontend/qaction.h index 4b282e0b9..f15159f68 100644 --- a/src/input/frontend/qaction.h +++ b/src/input/frontend/qaction.h @@ -50,7 +50,7 @@ namespace Qt3DInput { class QActionPrivate; class QAbstractActionInput; -class QT3DINPUTSHARED_EXPORT QAction : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAction : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) diff --git a/src/input/frontend/qactioninput.h b/src/input/frontend/qactioninput.h index c4c2c934f..be620c5fb 100644 --- a/src/input/frontend/qactioninput.h +++ b/src/input/frontend/qactioninput.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QAbstractPhysicalDevice; class QActionInputPrivate; -class QT3DINPUTSHARED_EXPORT QActionInput : public Qt3DInput::QAbstractActionInput +class Q_3DINPUTSHARED_EXPORT QActionInput : public Qt3DInput::QAbstractActionInput { Q_OBJECT Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged) diff --git a/src/input/frontend/qanalogaxisinput.h b/src/input/frontend/qanalogaxisinput.h index 9fe221b61..fca13a822 100644 --- a/src/input/frontend/qanalogaxisinput.h +++ b/src/input/frontend/qanalogaxisinput.h @@ -49,7 +49,7 @@ namespace Qt3DInput { class QAnalogAxisInputPrivate; -class QT3DINPUTSHARED_EXPORT QAnalogAxisInput : public QAbstractAxisInput +class Q_3DINPUTSHARED_EXPORT QAnalogAxisInput : public QAbstractAxisInput { Q_OBJECT Q_PROPERTY(int axis READ axis WRITE setAxis NOTIFY axisChanged) diff --git a/src/input/frontend/qaxis.h b/src/input/frontend/qaxis.h index a6d0b3b1f..a4f7ea7d4 100644 --- a/src/input/frontend/qaxis.h +++ b/src/input/frontend/qaxis.h @@ -49,7 +49,7 @@ namespace Qt3DInput { class QAxisPrivate; class QAbstractAxisInput; -class QT3DINPUTSHARED_EXPORT QAxis : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAxis : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(float value READ value NOTIFY valueChanged) diff --git a/src/input/frontend/qaxisaccumulator.h b/src/input/frontend/qaxisaccumulator.h index 633713bb9..e5f35a32f 100644 --- a/src/input/frontend/qaxisaccumulator.h +++ b/src/input/frontend/qaxisaccumulator.h @@ -50,7 +50,7 @@ namespace Qt3DInput { class QAxis; class QAxisAccumulatorPrivate; -class QT3DINPUTSHARED_EXPORT QAxisAccumulator : public Qt3DCore::QComponent +class Q_3DINPUTSHARED_EXPORT QAxisAccumulator : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DInput::QAxis *sourceAxis READ sourceAxis WRITE setSourceAxis NOTIFY sourceAxisChanged) diff --git a/src/input/frontend/qaxissetting.h b/src/input/frontend/qaxissetting.h index 196dec735..979643e39 100644 --- a/src/input/frontend/qaxissetting.h +++ b/src/input/frontend/qaxissetting.h @@ -50,7 +50,7 @@ namespace Qt3DInput { class QAxisSettingPrivate; -class QT3DINPUTSHARED_EXPORT QAxisSetting : public Qt3DCore::QNode +class Q_3DINPUTSHARED_EXPORT QAxisSetting : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(float deadZoneRadius READ deadZoneRadius WRITE setDeadZoneRadius NOTIFY deadZoneRadiusChanged) diff --git a/src/input/frontend/qbuttonaxisinput.h b/src/input/frontend/qbuttonaxisinput.h index 38223b6bf..15c6eec28 100644 --- a/src/input/frontend/qbuttonaxisinput.h +++ b/src/input/frontend/qbuttonaxisinput.h @@ -49,7 +49,7 @@ namespace Qt3DInput { class QButtonAxisInputPrivate; -class QT3DINPUTSHARED_EXPORT QButtonAxisInput : public QAbstractAxisInput +class Q_3DINPUTSHARED_EXPORT QButtonAxisInput : public QAbstractAxisInput { Q_OBJECT Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged) diff --git a/src/input/frontend/qgamepadinput_p.h b/src/input/frontend/qgamepadinput_p.h index c064f1c94..fa47fc17c 100644 --- a/src/input/frontend/qgamepadinput_p.h +++ b/src/input/frontend/qgamepadinput_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { class QGamepadInputPrivate; -class QT3DINPUTSHARED_PRIVATE_EXPORT QGamepadInput : public QAbstractPhysicalDevice +class Q_3DINPUTSHARED_PRIVATE_EXPORT QGamepadInput : public QAbstractPhysicalDevice { Q_OBJECT Q_PROPERTY(int deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged) diff --git a/src/input/frontend/qgenericinputdevice_p.h b/src/input/frontend/qgenericinputdevice_p.h index b46eada67..ea04e7290 100644 --- a/src/input/frontend/qgenericinputdevice_p.h +++ b/src/input/frontend/qgenericinputdevice_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { -class QT3DINPUTSHARED_PRIVATE_EXPORT QGenericInputDevice : public QAbstractPhysicalDevice +class Q_3DINPUTSHARED_PRIVATE_EXPORT QGenericInputDevice : public QAbstractPhysicalDevice { Q_OBJECT Q_PROPERTY(QVariantMap axesMap READ axesMap WRITE setAxesMap NOTIFY axesMapChanged) diff --git a/src/input/frontend/qinputaspect.h b/src/input/frontend/qinputaspect.h index 90781d297..2e9ff76a3 100644 --- a/src/input/frontend/qinputaspect.h +++ b/src/input/frontend/qinputaspect.h @@ -51,7 +51,7 @@ class QAbstractPhysicalDevice; class QInputAspectPrivate; class QInputDeviceIntegration; -class QT3DINPUTSHARED_EXPORT QInputAspect : public Qt3DCore::QAbstractAspect +class Q_3DINPUTSHARED_EXPORT QInputAspect : public Qt3DCore::QAbstractAspect { Q_OBJECT public: diff --git a/src/input/frontend/qinputchord.h b/src/input/frontend/qinputchord.h index cfc5806d7..570590229 100644 --- a/src/input/frontend/qinputchord.h +++ b/src/input/frontend/qinputchord.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QAbstractPhysicalDevice; class QInputChordPrivate; -class QT3DINPUTSHARED_EXPORT QInputChord : public Qt3DInput::QAbstractActionInput +class Q_3DINPUTSHARED_EXPORT QInputChord : public Qt3DInput::QAbstractActionInput { Q_OBJECT Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged) diff --git a/src/input/frontend/qinputdeviceintegration_p.h b/src/input/frontend/qinputdeviceintegration_p.h index a066d7629..4522e2654 100644 --- a/src/input/frontend/qinputdeviceintegration_p.h +++ b/src/input/frontend/qinputdeviceintegration_p.h @@ -72,7 +72,7 @@ class QInputAspect; class QAbstractPhysicalDevice; class QInputDeviceIntegrationPrivate; -class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegration : public QObject +class Q_3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegration : public QObject { Q_OBJECT protected: diff --git a/src/input/frontend/qinputdeviceintegration_p_p.h b/src/input/frontend/qinputdeviceintegration_p_p.h index 31eea4cdf..35317972f 100644 --- a/src/input/frontend/qinputdeviceintegration_p_p.h +++ b/src/input/frontend/qinputdeviceintegration_p_p.h @@ -61,7 +61,7 @@ namespace Qt3DInput { class QInputAspect; class QInputDeviceIntegration; -class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegrationPrivate : public QObjectPrivate +class Q_3DINPUTSHARED_PRIVATE_EXPORT QInputDeviceIntegrationPrivate : public QObjectPrivate { public: QInputDeviceIntegrationPrivate(); diff --git a/src/input/frontend/qinputdeviceplugin_p.h b/src/input/frontend/qinputdeviceplugin_p.h index a2f93eb3f..afce96a19 100644 --- a/src/input/frontend/qinputdeviceplugin_p.h +++ b/src/input/frontend/qinputdeviceplugin_p.h @@ -63,7 +63,7 @@ namespace Qt3DInput { class QInputDeviceIntegration; -class QT3DINPUTSHARED_PRIVATE_EXPORT QInputDevicePlugin : public QObject +class Q_3DINPUTSHARED_PRIVATE_EXPORT QInputDevicePlugin : public QObject { Q_OBJECT public: diff --git a/src/input/frontend/qinputsequence.h b/src/input/frontend/qinputsequence.h index acdad12d2..9d4aea6fc 100644 --- a/src/input/frontend/qinputsequence.h +++ b/src/input/frontend/qinputsequence.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QAbstractPhysicalDevice; class QInputSequencePrivate; -class QT3DINPUTSHARED_EXPORT QInputSequence : public Qt3DInput::QAbstractActionInput +class Q_3DINPUTSHARED_EXPORT QInputSequence : public Qt3DInput::QAbstractActionInput { Q_OBJECT Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged) diff --git a/src/input/frontend/qinputsettings.h b/src/input/frontend/qinputsettings.h index 10f25d6ee..10e883ac4 100644 --- a/src/input/frontend/qinputsettings.h +++ b/src/input/frontend/qinputsettings.h @@ -49,7 +49,7 @@ namespace Qt3DInput { class QInputSettingsPrivate; -class QT3DINPUTSHARED_EXPORT QInputSettings : public Qt3DCore::QComponent +class Q_3DINPUTSHARED_EXPORT QInputSettings : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(QObject *eventSource READ eventSource WRITE setEventSource NOTIFY eventSourceChanged) diff --git a/src/input/frontend/qkeyboarddevice.h b/src/input/frontend/qkeyboarddevice.h index b418be5ff..c3478ec27 100644 --- a/src/input/frontend/qkeyboarddevice.h +++ b/src/input/frontend/qkeyboarddevice.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QKeyboardDevicePrivate; class QKeyboardHandler; -class QT3DINPUTSHARED_EXPORT QKeyboardDevice : public Qt3DInput::QAbstractPhysicalDevice +class Q_3DINPUTSHARED_EXPORT QKeyboardDevice : public Qt3DInput::QAbstractPhysicalDevice { Q_OBJECT Q_PROPERTY(Qt3DInput::QKeyboardHandler *activeInput READ activeInput NOTIFY activeInputChanged) diff --git a/src/input/frontend/qkeyboardhandler.h b/src/input/frontend/qkeyboardhandler.h index 02b4fe1db..056d7c7a4 100644 --- a/src/input/frontend/qkeyboardhandler.h +++ b/src/input/frontend/qkeyboardhandler.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QKeyboardDevice; class QKeyboardHandlerPrivate; -class QT3DINPUTSHARED_EXPORT QKeyboardHandler : public Qt3DCore::QComponent +class Q_3DINPUTSHARED_EXPORT QKeyboardHandler : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DInput::QKeyboardDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged) diff --git a/src/input/frontend/qkeyevent.h b/src/input/frontend/qkeyevent.h index e028438ce..c1e221aae 100644 --- a/src/input/frontend/qkeyevent.h +++ b/src/input/frontend/qkeyevent.h @@ -53,7 +53,7 @@ class QKeyEvent; typedef QSharedPointer<QKeyEvent> QKeyEventPtr; -class QT3DINPUTSHARED_EXPORT QKeyEvent : public QObject +class Q_3DINPUTSHARED_EXPORT QKeyEvent : public QObject { Q_OBJECT Q_PROPERTY(int key READ key CONSTANT) diff --git a/src/input/frontend/qlogicaldevice.h b/src/input/frontend/qlogicaldevice.h index 4b32a0c90..b60000717 100644 --- a/src/input/frontend/qlogicaldevice.h +++ b/src/input/frontend/qlogicaldevice.h @@ -51,7 +51,7 @@ class QLogicalDevicePrivate; class QAction; class QAxis; -class QT3DINPUTSHARED_EXPORT QLogicalDevice : public Qt3DCore::QComponent +class Q_3DINPUTSHARED_EXPORT QLogicalDevice : public Qt3DCore::QComponent { Q_OBJECT public: diff --git a/src/input/frontend/qmousedevice.h b/src/input/frontend/qmousedevice.h index 9e6d2c5ac..01e243790 100644 --- a/src/input/frontend/qmousedevice.h +++ b/src/input/frontend/qmousedevice.h @@ -53,7 +53,7 @@ class QMouseHandler; class QMouseInput; -class QT3DINPUTSHARED_EXPORT QMouseDevice : public Qt3DInput::QAbstractPhysicalDevice +class Q_3DINPUTSHARED_EXPORT QMouseDevice : public Qt3DInput::QAbstractPhysicalDevice { Q_OBJECT Q_PROPERTY(float sensitivity READ sensitivity WRITE setSensitivity NOTIFY sensitivityChanged) diff --git a/src/input/frontend/qmouseevent.h b/src/input/frontend/qmouseevent.h index 9c6386036..a7aa8fe2b 100644 --- a/src/input/frontend/qmouseevent.h +++ b/src/input/frontend/qmouseevent.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DInput { -class QT3DINPUTSHARED_EXPORT QMouseEvent : public QObject +class Q_3DINPUTSHARED_EXPORT QMouseEvent : public QObject { Q_OBJECT Q_PROPERTY(int x READ x CONSTANT) @@ -108,7 +108,7 @@ private: typedef QSharedPointer<QMouseEvent> QMouseEventPtr; #if QT_CONFIG(wheelevent) -class QT3DINPUTSHARED_EXPORT QWheelEvent : public QObject +class Q_3DINPUTSHARED_EXPORT QWheelEvent : public QObject { Q_OBJECT Q_PROPERTY(int x READ x CONSTANT) diff --git a/src/input/frontend/qmousehandler.h b/src/input/frontend/qmousehandler.h index 50f7b028a..aec450cb9 100644 --- a/src/input/frontend/qmousehandler.h +++ b/src/input/frontend/qmousehandler.h @@ -51,7 +51,7 @@ namespace Qt3DInput { class QMouseDevice; class QMouseHandlerPrivate; -class QT3DINPUTSHARED_EXPORT QMouseHandler : public Qt3DCore::QComponent +class Q_3DINPUTSHARED_EXPORT QMouseHandler : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DInput::QMouseDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged) diff --git a/src/input/frontend/qphysicaldevicecreatedchange.h b/src/input/frontend/qphysicaldevicecreatedchange.h index 65cc4004a..6ffe559e9 100644 --- a/src/input/frontend/qphysicaldevicecreatedchange.h +++ b/src/input/frontend/qphysicaldevicecreatedchange.h @@ -47,7 +47,7 @@ namespace Qt3DInput { class QAbstractPhysicalDevice; class QPhysicalDeviceCreatedChangeBasePrivate; -class QT3DINPUTSHARED_EXPORT QPhysicalDeviceCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase +class Q_3DINPUTSHARED_EXPORT QPhysicalDeviceCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase { public: explicit QPhysicalDeviceCreatedChangeBase(const QAbstractPhysicalDevice *device); diff --git a/src/input/qt3dinput_global.h b/src/input/qt3dinput_global.h index 9c76435f9..ee380fbc7 100644 --- a/src/input/qt3dinput_global.h +++ b/src/input/qt3dinput_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DINPUT_LIB) -# define QT3DINPUTSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DINPUTSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DINPUTSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DINPUTSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DINPUTSHARED_EXPORT +# define Q_3DINPUTSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/input/qt3dinput_global_p.h b/src/input/qt3dinput_global_p.h index 1bbc488dc..5ea3a8c5a 100644 --- a/src/input/qt3dinput_global_p.h +++ b/src/input/qt3dinput_global_p.h @@ -53,7 +53,7 @@ #include "qt3dinput_global.h" -#define QT3DINPUTSHARED_PRIVATE_EXPORT QT3DINPUTSHARED_EXPORT +#define Q_3DINPUTSHARED_PRIVATE_EXPORT Q_3DINPUTSHARED_EXPORT #endif // QT3DINPUT_GLOBAL_P_H diff --git a/src/logic/qframeaction.h b/src/logic/qframeaction.h index f67bb9631..35cbf1883 100644 --- a/src/logic/qframeaction.h +++ b/src/logic/qframeaction.h @@ -54,7 +54,7 @@ namespace Logic { class Executor; } -class QT3DLOGICSHARED_EXPORT QFrameAction : public Qt3DCore::QComponent +class Q_3DLOGICSHARED_EXPORT QFrameAction : public Qt3DCore::QComponent { Q_OBJECT diff --git a/src/logic/qlogicaspect.h b/src/logic/qlogicaspect.h index 958c0ce82..a44073ed0 100644 --- a/src/logic/qlogicaspect.h +++ b/src/logic/qlogicaspect.h @@ -49,7 +49,7 @@ namespace Qt3DLogic { class QLogicAspectPrivate; -class QT3DLOGICSHARED_EXPORT QLogicAspect : public Qt3DCore::QAbstractAspect +class Q_3DLOGICSHARED_EXPORT QLogicAspect : public Qt3DCore::QAbstractAspect { Q_OBJECT public: diff --git a/src/logic/qt3dlogic_global.h b/src/logic/qt3dlogic_global.h index 1e6610058..e11bae7af 100644 --- a/src/logic/qt3dlogic_global.h +++ b/src/logic/qt3dlogic_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DLOGIC_LIB) -# define QT3DLOGICSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DLOGICSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DLOGICSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DLOGICSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DLOGICSHARED_EXPORT +# define Q_3DLOGICSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/imports/scene3d/scene3ditem.cpp b/src/quick3d/imports/scene3d/scene3ditem.cpp index ffb1d9112..67785c1e8 100644 --- a/src/quick3d/imports/scene3d/scene3ditem.cpp +++ b/src/quick3d/imports/scene3d/scene3ditem.cpp @@ -101,7 +101,21 @@ namespace Qt3DRender { The Scene3D type renders a Qt3D scene, provided by an \l Entity, into a multisampled Framebuffer object. This object is later blitted into a non-multisampled Framebuffer object, which is then rendered with - premultiplied alpha. + premultiplied alpha. If multisampling is not required, it can be avoided + by setting the \l multisample property to \c false. In this case + Scene3D will render directly into the non-multisampled Framebuffer object. + + If the scene to be rendered includes non-opaque materials, you may need to + modify those materials with custom blend arguments in order for them to be + rendered correctly. For example, if working with a \l PhongAlphaMaterial and + a scene with an opaque clear color, you will likely want to add: + + \qml + sourceAlphaArg: BlendEquationArguments.Zero + destinationAlphaArg: BlendEquationArguments.One + \qml + + to that material. */ Scene3DItem::Scene3DItem(QQuickItem *parent) : QQuickItem(parent) @@ -128,8 +142,12 @@ Scene3DItem::~Scene3DItem() /*! \qmlproperty list<string> Scene3D::aspects - \brief \TODO - */ + The list of aspects that should be registered for the 3D scene. + + For example, if the scene makes use of FrameAction, the \c "logic" aspect should be included in the list. + + The \c "render" aspect is hardwired and does not need to be explicitly listed. +*/ QStringList Scene3DItem::aspects() const { return m_aspects; @@ -140,7 +158,7 @@ QStringList Scene3DItem::aspects() const \default - \brief \TODO + The root entity of the 3D scene to be displayed. */ Qt3DCore::QEntity *Scene3DItem::entity() const { @@ -341,18 +359,7 @@ void Scene3DItem::updateCameraAspectRatio() /*! \qmlproperty bool Scene3D::multisample - \c true if a multi-sample render buffer is in use. - */ -/*! - \return \c true if a multisample renderbuffer is in use. - */ -bool Scene3DItem::multisample() const -{ - return m_multisample; -} - -/*! - Enables or disables the usage of multisample renderbuffers based on \a enable. + \c true if a multisample render buffer is requested. By default multisampling is enabled. If the OpenGL implementation has no support for multisample renderbuffers or framebuffer blits, the request to @@ -362,6 +369,11 @@ bool Scene3DItem::multisample() const and potentially slow initialization of framebuffers and other OpenGL resources. */ +bool Scene3DItem::multisample() const +{ + return m_multisample; +} + void Scene3DItem::setMultisample(bool enable) { if (m_multisample != enable) { diff --git a/src/quick3d/quick3d/items/quick3dentity_p.h b/src/quick3d/quick3d/items/quick3dentity_p.h index 7ba5c62c2..fe895f3ec 100644 --- a/src/quick3d/quick3d/items/quick3dentity_p.h +++ b/src/quick3d/quick3d/items/quick3dentity_p.h @@ -66,7 +66,7 @@ class QComponent; namespace Quick { -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DEntity : public QObject +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DEntity : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DCore::QComponent> components READ componentList) diff --git a/src/quick3d/quick3d/items/quick3dentityloader_p.h b/src/quick3d/quick3d/items/quick3dentityloader_p.h index 611d86cb2..9d3a70147 100644 --- a/src/quick3d/quick3d/items/quick3dentityloader_p.h +++ b/src/quick3d/quick3d/items/quick3dentityloader_p.h @@ -70,7 +70,7 @@ namespace Quick { class Quick3DEntityLoaderPrivate; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DEntityLoader : public QEntity +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DEntityLoader : public QEntity { Q_OBJECT Q_PROPERTY(QObject *entity READ entity NOTIFY entityChanged) diff --git a/src/quick3d/quick3d/items/quick3djoint_p.h b/src/quick3d/quick3d/items/quick3djoint_p.h index bef161643..d66419433 100644 --- a/src/quick3d/quick3d/items/quick3djoint_p.h +++ b/src/quick3d/quick3d/items/quick3djoint_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { namespace Quick { -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DJoint : public QObject +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DJoint : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DCore::QJoint> childJoints READ childJoints) diff --git a/src/quick3d/quick3d/items/quick3dnode_p.h b/src/quick3d/quick3d/items/quick3dnode_p.h index 640a58149..6b146d691 100644 --- a/src/quick3d/quick3d/items/quick3dnode_p.h +++ b/src/quick3d/quick3d/items/quick3dnode_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { namespace Quick { -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DNode : public QObject +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DNode : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<QObject> data READ data) diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h index b92c98133..ac888e0cb 100644 --- a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h +++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h @@ -65,7 +65,7 @@ namespace Quick { class Quick3DNodeInstantiatorPrivate; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DNodeInstantiator : public QNode, public QQmlParserStatus +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DNodeInstantiator : public QNode, public QQmlParserStatus { Q_OBJECT diff --git a/src/quick3d/quick3d/items/quick3dnodev9_p.h b/src/quick3d/quick3d/items/quick3dnodev9_p.h index d969c4b64..a088e72e6 100644 --- a/src/quick3d/quick3d/items/quick3dnodev9_p.h +++ b/src/quick3d/quick3d/items/quick3dnodev9_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DCore { namespace Quick { -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DNodeV9 : public QObject +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DNodeV9 : public QObject { Q_OBJECT Q_PROPERTY(QJSValue propertyTrackingOverrides READ propertyTrackingOverrides WRITE setPropertyTrackingOverrides NOTIFY propertyTrackingOverridesChanged) diff --git a/src/quick3d/quick3d/qqmlaspectengine.h b/src/quick3d/quick3d/qqmlaspectengine.h index a7b09ec8a..1b3922212 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.h +++ b/src/quick3d/quick3d/qqmlaspectengine.h @@ -51,7 +51,7 @@ namespace Quick { class QQmlAspectEnginePrivate; -class QT3DQUICKSHARED_EXPORT QQmlAspectEngine: public QObject +class Q_3DQUICKSHARED_EXPORT QQmlAspectEngine: public QObject { Q_OBJECT public: diff --git a/src/quick3d/quick3d/qquaternionanimation_p.h b/src/quick3d/quick3d/qquaternionanimation_p.h index 172d3bc85..7fb49f670 100644 --- a/src/quick3d/quick3d/qquaternionanimation_p.h +++ b/src/quick3d/quick3d/qquaternionanimation_p.h @@ -63,7 +63,7 @@ namespace Quick { class QQuaternionAnimationPrivate; -class QT3DQUICKSHARED_PRIVATE_EXPORT QQuaternionAnimation : public QQuickPropertyAnimation +class Q_3DQUICKSHARED_PRIVATE_EXPORT QQuaternionAnimation : public QQuickPropertyAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QQuaternionAnimation) @@ -125,7 +125,7 @@ Q_SIGNALS: void toZRotationChanged(float value); }; -QT3DQUICKSHARED_PRIVATE_EXPORT QVariant q_quaternionInterpolator(const QQuaternion &from, const QQuaternion &to, qreal progress); +Q_3DQUICKSHARED_PRIVATE_EXPORT QVariant q_quaternionInterpolator(const QQuaternion &from, const QQuaternion &to, qreal progress); } // namespace Quick } // namespace Qt3DCore diff --git a/src/quick3d/quick3d/qt3dquick_global.h b/src/quick3d/quick3d/qt3dquick_global.h index b2f580335..ae79a6fb6 100644 --- a/src/quick3d/quick3d/qt3dquick_global.h +++ b/src/quick3d/quick3d/qt3dquick_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICK_LIB) -# define QT3DQUICKSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKSHARED_EXPORT +# define Q_3DQUICKSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3d/qt3dquick_global_p.h b/src/quick3d/quick3d/qt3dquick_global_p.h index ffc603f91..87fd4764c 100644 --- a/src/quick3d/quick3d/qt3dquick_global_p.h +++ b/src/quick3d/quick3d/qt3dquick_global_p.h @@ -54,16 +54,16 @@ #include <Qt3DQuick/qt3dquick_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKSHARED_PRIVATE_EXPORT QT3DQUICKSHARED_EXPORT +#define Q_3DQUICKSHARED_PRIVATE_EXPORT Q_3DQUICKSHARED_EXPORT QT_BEGIN_NAMESPACE namespace Qt3DCore { namespace Quick { -QT3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_initialize(); -QT3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_uninitialize(); -QT3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_registerType(const char *className, const char *quickName, int major, int minor); +Q_3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_initialize(); +Q_3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_uninitialize(); +Q_3DQUICKSHARED_PRIVATE_EXPORT void Quick3D_registerType(const char *className, const char *quickName, int major, int minor); template<class T, class E> void registerExtendedType(const char *className, const char *quickName, const char *uri, int major, int minor, const char *name) diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h index 46500b935..9f21f9146 100644 --- a/src/quick3d/quick3d/qt3dquickvaluetypes_p.h +++ b/src/quick3d/quick3d/qt3dquickvaluetypes_p.h @@ -68,11 +68,11 @@ namespace Qt3DCore { namespace Quick { namespace Quick3DValueTypes { -QT3DQUICKSHARED_PRIVATE_EXPORT void registerValueTypes(); +Q_3DQUICKSHARED_PRIVATE_EXPORT void registerValueTypes(); } -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DColorValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DColorValueType { QColor v; Q_PROPERTY(qreal r READ r WRITE setR FINAL) @@ -93,7 +93,7 @@ public: void setA(qreal); }; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector2DValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector2DValueType { QVector2D v; Q_PROPERTY(qreal x READ x WRITE setX FINAL) @@ -120,7 +120,7 @@ public: Q_INVOKABLE bool fuzzyEquals(const QVector2D &vec) const; }; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector3DValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector3DValueType { QVector3D v; Q_PROPERTY(qreal x READ x WRITE setX FINAL) @@ -152,7 +152,7 @@ public: Q_INVOKABLE bool fuzzyEquals(const QVector3D &vec) const; }; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector4DValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DVector4DValueType { QVector4D v; Q_PROPERTY(qreal x READ x WRITE setX FINAL) @@ -186,7 +186,7 @@ public: Q_INVOKABLE bool fuzzyEquals(const QVector4D &vec) const; }; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DQuaternionValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DQuaternionValueType { QQuaternion v; Q_PROPERTY(qreal scalar READ scalar WRITE setScalar) @@ -207,7 +207,7 @@ public: void setZ(qreal); }; -class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DMatrix4x4ValueType +class Q_3DQUICKSHARED_PRIVATE_EXPORT Quick3DMatrix4x4ValueType { QMatrix4x4 v; Q_PROPERTY(qreal m11 READ m11 WRITE setM11 FINAL) diff --git a/src/quick3d/quick3danimation/items/quick3danimationcontroller_p.h b/src/quick3d/quick3danimation/items/quick3danimationcontroller_p.h index a3033e537..d6add010d 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationcontroller_p.h +++ b/src/quick3d/quick3danimation/items/quick3danimationcontroller_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DAnimationController : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DAnimationController : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QAnimationGroup> animationGroups READ animationGroups) diff --git a/src/quick3d/quick3danimation/items/quick3danimationgroup_p.h b/src/quick3d/quick3danimation/items/quick3danimationgroup_p.h index aef202480..53b25cf67 100644 --- a/src/quick3d/quick3danimation/items/quick3danimationgroup_p.h +++ b/src/quick3d/quick3danimation/items/quick3danimationgroup_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DAnimationGroup : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DAnimationGroup : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QAbstractAnimation> animations READ animations) diff --git a/src/quick3d/quick3danimation/items/quick3dchannelmapper_p.h b/src/quick3d/quick3danimation/items/quick3dchannelmapper_p.h index c3ec577a2..a21a67411 100644 --- a/src/quick3d/quick3danimation/items/quick3dchannelmapper_p.h +++ b/src/quick3d/quick3danimation/items/quick3dchannelmapper_p.h @@ -62,7 +62,7 @@ namespace Qt3DAnimation { namespace Animation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT Quick3DChannelMapper : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT Quick3DChannelMapper : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QAbstractChannelMapping> mappings READ qmlMappings CONSTANT) diff --git a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation_p.h b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation_p.h index 944cdbe67..b4eda766c 100644 --- a/src/quick3d/quick3danimation/items/quick3dkeyframeanimation_p.h +++ b/src/quick3d/quick3danimation/items/quick3dkeyframeanimation_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DKeyframeAnimation : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DKeyframeAnimation : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DCore::QTransform> keyframes READ keyframes) diff --git a/src/quick3d/quick3danimation/items/quick3dmorphinganimation_p.h b/src/quick3d/quick3danimation/items/quick3dmorphinganimation_p.h index 31d008a89..3ba018473 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphinganimation_p.h +++ b/src/quick3d/quick3danimation/items/quick3dmorphinganimation_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DMorphingAnimation : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DMorphingAnimation : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QMorphTarget> morphTargets READ morphTargets) diff --git a/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h b/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h index 03b52dfeb..5ca783e6b 100644 --- a/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h +++ b/src/quick3d/quick3danimation/items/quick3dmorphtarget_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DMorphTarget : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DMorphTarget : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QAttribute> attributes READ attributes) diff --git a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation_p.h b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation_p.h index 6be2d662f..f33730fb5 100644 --- a/src/quick3d/quick3danimation/items/quick3dvertexblendanimation_p.h +++ b/src/quick3d/quick3danimation/items/quick3dvertexblendanimation_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -class QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DVertexBlendAnimation : public QObject +class Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QQuick3DVertexBlendAnimation : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DAnimation::QMorphTarget> morphTargets READ morphTargets) diff --git a/src/quick3d/quick3danimation/qt3dquickanimation_global.h b/src/quick3d/quick3danimation/qt3dquickanimation_global.h index 962321b2f..51b38dd96 100644 --- a/src/quick3d/quick3danimation/qt3dquickanimation_global.h +++ b/src/quick3d/quick3danimation/qt3dquickanimation_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICKANIMATION_LIB) -# define QT3DQUICKANIMATIONSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKANIMATIONSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKANIMATIONSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKANIMATIONSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKANIMATIONSHARED_EXPORT +# define Q_3DQUICKANIMATIONSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3danimation/qt3dquickanimation_global_p.h b/src/quick3d/quick3danimation/qt3dquickanimation_global_p.h index 89d755931..c57cd55ea 100644 --- a/src/quick3d/quick3danimation/qt3dquickanimation_global_p.h +++ b/src/quick3d/quick3danimation/qt3dquickanimation_global_p.h @@ -54,15 +54,15 @@ #include <Qt3DQuickAnimation/qt3dquickanimation_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT QT3DQUICKANIMATIONSHARED_EXPORT +#define Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT Q_3DQUICKANIMATIONSHARED_EXPORT QT_BEGIN_NAMESPACE namespace Qt3DAnimation { namespace Quick { -QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT void Quick3DAnimation_initialize(); -QT3DQUICKANIMATIONSHARED_PRIVATE_EXPORT void Quick3DAnimation_registerType(const char *className, const char *quickName, int major, int minor); +Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT void Quick3DAnimation_initialize(); +Q_3DQUICKANIMATIONSHARED_PRIVATE_EXPORT void Quick3DAnimation_registerType(const char *className, const char *quickName, int major, int minor); template<class T, class E> void registerExtendedType(const char *className, const char *quickName, const char *uri, int major, int minor, const char *name) diff --git a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h index 445e7bca6..adc756e96 100644 --- a/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h +++ b/src/quick3d/quick3dextras/items/quick3dlevelofdetailloader_p.h @@ -63,7 +63,7 @@ namespace Quick { class Quick3DLevelOfDetailLoaderPrivate; -class QT3DQUICKEXTRASSHARED_PRIVATE_EXPORT Quick3DLevelOfDetailLoader : public Qt3DCore::QEntity +class Q_3DQUICKEXTRASSHARED_PRIVATE_EXPORT Quick3DLevelOfDetailLoader : public Qt3DCore::QEntity { Q_OBJECT Q_PROPERTY(QVariantList sources READ sources WRITE setSources NOTIFY sourcesChanged) diff --git a/src/quick3d/quick3dextras/items/quick3dspritesheet_p.h b/src/quick3d/quick3dextras/items/quick3dspritesheet_p.h index 38a92dd2a..82409b755 100644 --- a/src/quick3d/quick3dextras/items/quick3dspritesheet_p.h +++ b/src/quick3d/quick3dextras/items/quick3dspritesheet_p.h @@ -61,7 +61,7 @@ namespace Qt3DExtras { namespace Extras { namespace Quick { -class QT3DQUICKEXTRASSHARED_EXPORT Quick3DSpriteSheet : public QObject +class Q_3DQUICKEXTRASSHARED_EXPORT Quick3DSpriteSheet : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DExtras::QSpriteSheetItem> sprites READ sprites CONSTANT) diff --git a/src/quick3d/quick3dextras/qt3dquickextras_global.h b/src/quick3d/quick3dextras/qt3dquickextras_global.h index d9277baee..8f589378e 100644 --- a/src/quick3d/quick3dextras/qt3dquickextras_global.h +++ b/src/quick3d/quick3dextras/qt3dquickextras_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICKEXTRAS_LIB) -# define QT3DQUICKEXTRASSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKEXTRASSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKEXTRASSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKEXTRASSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKEXTRASSHARED_EXPORT +# define Q_3DQUICKEXTRASSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3dextras/qt3dquickextras_global_p.h b/src/quick3d/quick3dextras/qt3dquickextras_global_p.h index a27533517..40c8d8a10 100644 --- a/src/quick3d/quick3dextras/qt3dquickextras_global_p.h +++ b/src/quick3d/quick3dextras/qt3dquickextras_global_p.h @@ -54,15 +54,15 @@ #include <Qt3DQuickExtras/qt3dquickextras_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKEXTRASSHARED_PRIVATE_EXPORT QT3DQUICKEXTRASSHARED_EXPORT +#define Q_3DQUICKEXTRASSHARED_PRIVATE_EXPORT Q_3DQUICKEXTRASSHARED_EXPORT QT_BEGIN_NAMESPACE namespace Qt3DExtras { namespace Quick { -QT3DQUICKEXTRASSHARED_PRIVATE_EXPORT void Quick3DExtras_initialize(); -QT3DQUICKEXTRASSHARED_PRIVATE_EXPORT void Quick3DExtras_registerType(const char *className, const char *quickName, int major, int minor); +Q_3DQUICKEXTRASSHARED_PRIVATE_EXPORT void Quick3DExtras_initialize(); +Q_3DQUICKEXTRASSHARED_PRIVATE_EXPORT void Quick3DExtras_registerType(const char *className, const char *quickName, int major, int minor); template<class T, class E> void registerExtendedType(const char *className, const char *quickName, const char *uri, int major, int minor, const char *name) diff --git a/src/quick3d/quick3dextras/qt3dquickwindow.h b/src/quick3d/quick3dextras/qt3dquickwindow.h index 30f901979..2d0717651 100644 --- a/src/quick3d/quick3dextras/qt3dquickwindow.h +++ b/src/quick3d/quick3dextras/qt3dquickwindow.h @@ -86,7 +86,7 @@ namespace Quick { class Qt3DQuickWindowPrivate; -class QT3DQUICKEXTRASSHARED_EXPORT Qt3DQuickWindow : public QWindow +class Q_3DQUICKEXTRASSHARED_EXPORT Qt3DQuickWindow : public QWindow { Q_OBJECT Q_PROPERTY(CameraAspectRatioMode cameraAspectRatioMode READ cameraAspectRatioMode WRITE setCameraAspectRatioMode NOTIFY cameraAspectRatioModeChanged) diff --git a/src/quick3d/quick3dinput/items/quick3daction_p.h b/src/quick3d/quick3dinput/items/quick3daction_p.h index 86e52eb33..8fb91ed40 100644 --- a/src/quick3d/quick3dinput/items/quick3daction_p.h +++ b/src/quick3d/quick3dinput/items/quick3daction_p.h @@ -63,7 +63,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAction : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAction : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> inputs READ qmlActionInputs CONSTANT) diff --git a/src/quick3d/quick3dinput/items/quick3daxis_p.h b/src/quick3d/quick3dinput/items/quick3daxis_p.h index 58ba32ae7..631139212 100644 --- a/src/quick3d/quick3dinput/items/quick3daxis_p.h +++ b/src/quick3d/quick3dinput/items/quick3daxis_p.h @@ -63,7 +63,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAxis : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DAxis : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractAxisInput> inputs READ qmlAxisInputs CONSTANT) diff --git a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h index 3380fefa4..5bfd15b09 100644 --- a/src/quick3d/quick3dinput/items/quick3dinputchord_p.h +++ b/src/quick3d/quick3dinput/items/quick3dinputchord_p.h @@ -62,7 +62,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputChord : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputChord : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> chords READ qmlActionInputs CONSTANT) diff --git a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h index aea671f12..54e40ec42 100644 --- a/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h +++ b/src/quick3d/quick3dinput/items/quick3dinputsequence_p.h @@ -62,7 +62,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputSequence : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DInputSequence : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAbstractActionInput> sequences READ qmlActionInputs CONSTANT) diff --git a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h index 050d81ab8..e544bbc14 100644 --- a/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h +++ b/src/quick3d/quick3dinput/items/quick3dlogicaldevice_p.h @@ -64,7 +64,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DLogicalDevice : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DLogicalDevice : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAxis> axes READ qmlAxes CONSTANT) diff --git a/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h b/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h index b4c96ac14..0c0940952 100644 --- a/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h +++ b/src/quick3d/quick3dinput/items/quick3dphysicaldevice_p.h @@ -64,7 +64,7 @@ namespace Qt3DInput { namespace Input { namespace Quick { -class QT3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DPhysicalDevice : public QObject +class Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Quick3DPhysicalDevice : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DInput::QAxisSetting> axisSettings READ axisSettings CONSTANT) diff --git a/src/quick3d/quick3dinput/qt3dquickinput_global.h b/src/quick3d/quick3dinput/qt3dquickinput_global.h index d34667dc3..2a5b5f1e5 100644 --- a/src/quick3d/quick3dinput/qt3dquickinput_global.h +++ b/src/quick3d/quick3dinput/qt3dquickinput_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICKINPUT_LIB) -# define QT3DQUICKINPUTSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKINPUTSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKINPUTSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKINPUTSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKINPUTSHARED_EXPORT +# define Q_3DQUICKINPUTSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3dinput/qt3dquickinput_global_p.h b/src/quick3d/quick3dinput/qt3dquickinput_global_p.h index a5d9adcec..0924fcb62 100644 --- a/src/quick3d/quick3dinput/qt3dquickinput_global_p.h +++ b/src/quick3d/quick3dinput/qt3dquickinput_global_p.h @@ -54,7 +54,7 @@ #include <Qt3DQuickInput/qt3dquickinput_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKINPUTSHARED_PRIVATE_EXPORT QT3DQUICKINPUTSHARED_EXPORT +#define Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT Q_3DQUICKINPUTSHARED_EXPORT QT_BEGIN_NAMESPACE @@ -62,8 +62,8 @@ namespace Qt3DInput { namespace Quick { -QT3DQUICKINPUTSHARED_PRIVATE_EXPORT void Quick3DInput_initialize(); -QT3DQUICKINPUTSHARED_PRIVATE_EXPORT void Quick3DInput_registerType(const char *className, const char *quickName, int major, int minor); +Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT void Quick3DInput_initialize(); +Q_3DQUICKINPUTSHARED_PRIVATE_EXPORT void Quick3DInput_registerType(const char *className, const char *quickName, int major, int minor); template<class T, class E> void registerExtendedType(const char *className, const char *quickName, const char *uri, int major, int minor, const char *name) diff --git a/src/quick3d/quick3drender/items/quick3dbuffer_p.h b/src/quick3d/quick3drender/items/quick3dbuffer_p.h index 712e11078..233cc3faf 100644 --- a/src/quick3d/quick3drender/items/quick3dbuffer_p.h +++ b/src/quick3d/quick3drender/items/quick3dbuffer_p.h @@ -70,7 +70,7 @@ namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DBuffer : public Qt3DRender::QBuffer +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DBuffer : public Qt3DRender::QBuffer { Q_OBJECT Q_PROPERTY(QVariant data READ bufferData WRITE setBufferData NOTIFY bufferDataChanged) diff --git a/src/quick3d/quick3drender/items/quick3deffect_p.h b/src/quick3d/quick3drender/items/quick3deffect_p.h index 3b778563d..69c5b2be6 100644 --- a/src/quick3d/quick3drender/items/quick3deffect_p.h +++ b/src/quick3d/quick3drender/items/quick3deffect_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DEffect : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DEffect : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QTechnique> techniques READ techniqueList) diff --git a/src/quick3d/quick3drender/items/quick3dgeometry_p.h b/src/quick3d/quick3drender/items/quick3dgeometry_p.h index 6bf7faf58..19a308076 100644 --- a/src/quick3d/quick3drender/items/quick3dgeometry_p.h +++ b/src/quick3d/quick3drender/items/quick3dgeometry_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DGeometry : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DGeometry : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QAttribute> attributes READ attributeList) diff --git a/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h b/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h index f59be2787..6294d2b98 100644 --- a/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h +++ b/src/quick3d/quick3drender/items/quick3dlayerfilter_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DLayerFilter : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DLayerFilter : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QLayer> layers READ qmlLayers) diff --git a/src/quick3d/quick3drender/items/quick3dmaterial_p.h b/src/quick3d/quick3drender/items/quick3dmaterial_p.h index 646e3b154..2069ba9c6 100644 --- a/src/quick3d/quick3drender/items/quick3dmaterial_p.h +++ b/src/quick3d/quick3drender/items/quick3dmaterial_p.h @@ -66,7 +66,7 @@ namespace Quick { // FIXME - write a custom QML parser and stop mis-using Tag // Tags could be replaced by Parameters directly -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DMaterial : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DMaterial : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QParameter> parameters READ qmlParameters) diff --git a/src/quick3d/quick3drender/items/quick3dmemorybarrier_p.h b/src/quick3d/quick3drender/items/quick3dmemorybarrier_p.h index ab8f72a76..2bbe8f34e 100644 --- a/src/quick3d/quick3drender/items/quick3dmemorybarrier_p.h +++ b/src/quick3d/quick3drender/items/quick3dmemorybarrier_p.h @@ -62,7 +62,7 @@ namespace Quick { // Qt6: Handle QFlags as Q_PROPERTY in QML -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DMemoryBarrier : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DMemoryBarrier : public QObject { Q_OBJECT Q_PROPERTY(int waitFor READ waitFor WRITE setWaitFor) diff --git a/src/quick3d/quick3drender/items/quick3dparameter_p.h b/src/quick3d/quick3drender/items/quick3dparameter_p.h index 948df22a7..939cfaab8 100644 --- a/src/quick3d/quick3drender/items/quick3dparameter_p.h +++ b/src/quick3d/quick3drender/items/quick3dparameter_p.h @@ -63,7 +63,7 @@ namespace Quick { class Quick3DParameterPrivate; -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DParameter : public QParameter +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DParameter : public QParameter { Q_OBJECT public: diff --git a/src/quick3d/quick3drender/items/quick3draycaster_p.h b/src/quick3d/quick3drender/items/quick3draycaster_p.h index 9be11f534..31778dc3b 100644 --- a/src/quick3d/quick3drender/items/quick3draycaster_p.h +++ b/src/quick3d/quick3drender/items/quick3draycaster_p.h @@ -66,7 +66,7 @@ namespace Quick { class Quick3DRayCasterPrivate; -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCaster : public QRayCaster +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCaster : public QRayCaster { Q_OBJECT Q_PROPERTY(QJSValue hits READ hits NOTIFY hitsChanged) diff --git a/src/quick3d/quick3drender/items/quick3draycaster_p_p.h b/src/quick3d/quick3drender/items/quick3draycaster_p_p.h index 0098634bc..ef875eb43 100644 --- a/src/quick3d/quick3drender/items/quick3draycaster_p_p.h +++ b/src/quick3d/quick3drender/items/quick3draycaster_p_p.h @@ -65,7 +65,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCasterPrivate : public QAbstractRayCasterPrivate +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRayCasterPrivate : public QAbstractRayCasterPrivate { public: explicit Quick3DRayCasterPrivate() : QAbstractRayCasterPrivate() { } diff --git a/src/quick3d/quick3drender/items/quick3drenderpass_p.h b/src/quick3d/quick3drender/items/quick3drenderpass_p.h index c9d2fce59..982cab9f4 100644 --- a/src/quick3d/quick3drender/items/quick3drenderpass_p.h +++ b/src/quick3d/quick3drender/items/quick3drenderpass_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderPass : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderPass : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QFilterKey> filterKeys READ filterKeyList) diff --git a/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h b/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h index cab75f4a6..8f81766ef 100644 --- a/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h +++ b/src/quick3d/quick3drender/items/quick3drenderpassfilter_p.h @@ -64,7 +64,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderPassFilter : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderPassFilter : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QFilterKey> matchAny READ includeList) diff --git a/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h b/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h index 7626a2db7..f7b15b0cb 100644 --- a/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h +++ b/src/quick3d/quick3drender/items/quick3drendertargetoutput_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderTargetOutput : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderTargetOutput : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QRenderTargetOutput> attachments READ qmlAttachments) diff --git a/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h b/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h index 610ea1a49..7f4b99749 100644 --- a/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h +++ b/src/quick3d/quick3drender/items/quick3drendertargetselector_p.h @@ -64,7 +64,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderTargetSelector : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DRenderTargetSelector : public QObject { Q_OBJECT Q_PROPERTY(QVariantList drawBuffers READ drawBuffers WRITE setDrawBuffers NOTIFY drawBuffersChanged) diff --git a/src/quick3d/quick3drender/items/quick3dscene_p.h b/src/quick3d/quick3drender/items/quick3dscene_p.h index a7173a6c7..6b7448090 100644 --- a/src/quick3d/quick3drender/items/quick3dscene_p.h +++ b/src/quick3d/quick3drender/items/quick3dscene_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScene : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScene : public QObject { Q_OBJECT public: diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h index b337163c5..63d3f0428 100644 --- a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h +++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p.h @@ -66,7 +66,7 @@ namespace Quick { class Quick3DScreenRayCasterPrivate; -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCaster : public QScreenRayCaster +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCaster : public QScreenRayCaster { Q_OBJECT Q_PROPERTY(QJSValue hits READ hits NOTIFY hitsChanged) diff --git a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h index 5c58e5087..ad5d0b941 100644 --- a/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h +++ b/src/quick3d/quick3drender/items/quick3dscreenraycaster_p_p.h @@ -66,7 +66,7 @@ namespace Quick { class Quick3DScreenRayCaster; -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCasterPrivate : public QAbstractRayCasterPrivate +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DScreenRayCasterPrivate : public QAbstractRayCasterPrivate { public: explicit Quick3DScreenRayCasterPrivate() : QAbstractRayCasterPrivate() { } diff --git a/src/quick3d/quick3drender/items/quick3dshaderdata_p.h b/src/quick3d/quick3drender/items/quick3dshaderdata_p.h index 207096149..481f44446 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdata_p.h +++ b/src/quick3d/quick3drender/items/quick3dshaderdata_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DShaderData : public QShaderData +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DShaderData : public QShaderData { Q_OBJECT public: diff --git a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h index 162f402aa..86d11d13c 100644 --- a/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h +++ b/src/quick3d/quick3drender/items/quick3dshaderdataarray_p.h @@ -69,7 +69,7 @@ namespace Quick { class Quick3DShaderDataArrayPrivate; class Quick3DShaderData; -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DShaderDataArray : public Qt3DCore::QNode +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DShaderDataArray : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QShaderData> values READ valuesList) diff --git a/src/quick3d/quick3drender/items/quick3dstateset_p.h b/src/quick3d/quick3drender/items/quick3dstateset_p.h index b2e63c066..7b532ec83 100644 --- a/src/quick3d/quick3drender/items/quick3dstateset_p.h +++ b/src/quick3d/quick3drender/items/quick3dstateset_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DStateSet : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DStateSet : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QRenderState> renderStates READ renderStateList CONSTANT) diff --git a/src/quick3d/quick3drender/items/quick3dtechnique_p.h b/src/quick3d/quick3drender/items/quick3dtechnique_p.h index 9cdfdfefe..0c02e07c3 100644 --- a/src/quick3d/quick3drender/items/quick3dtechnique_p.h +++ b/src/quick3d/quick3drender/items/quick3dtechnique_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTechnique : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTechnique : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QFilterKey> filterKeys READ filterKeyList) diff --git a/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h b/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h index 2b10bc108..9cd776827 100644 --- a/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h +++ b/src/quick3d/quick3drender/items/quick3dtechniquefilter_p.h @@ -64,7 +64,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTechniqueFilter : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTechniqueFilter : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QFilterKey> matchAll READ matchList) diff --git a/src/quick3d/quick3drender/items/quick3dtexture_p.h b/src/quick3d/quick3drender/items/quick3dtexture_p.h index 6b0430211..54d23a16b 100644 --- a/src/quick3d/quick3drender/items/quick3dtexture_p.h +++ b/src/quick3d/quick3drender/items/quick3dtexture_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTextureExtension : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DTextureExtension : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DRender::QAbstractTextureImage> textureImages READ textureImages) diff --git a/src/quick3d/quick3drender/items/quick3dviewport_p.h b/src/quick3d/quick3drender/items/quick3dviewport_p.h index adf0c983f..8a61b490b 100644 --- a/src/quick3d/quick3drender/items/quick3dviewport_p.h +++ b/src/quick3d/quick3drender/items/quick3dviewport_p.h @@ -64,7 +64,7 @@ namespace Quick { // TO DO : Check if this is required or if this might as well be removed -class QT3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DViewport : public QObject +class Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Quick3DViewport : public QObject { Q_OBJECT public: diff --git a/src/quick3d/quick3drender/qt3dquickrender_global.h b/src/quick3d/quick3drender/qt3dquickrender_global.h index 7c21243e3..d8900265c 100644 --- a/src/quick3d/quick3drender/qt3dquickrender_global.h +++ b/src/quick3d/quick3drender/qt3dquickrender_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICKRENDER_LIB) -# define QT3DQUICKRENDERSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKRENDERSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKRENDERSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKRENDERSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKRENDERSHARED_EXPORT +# define Q_3DQUICKRENDERSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3drender/qt3dquickrender_global_p.h b/src/quick3d/quick3drender/qt3dquickrender_global_p.h index 77378f41b..11a4f2ff1 100644 --- a/src/quick3d/quick3drender/qt3dquickrender_global_p.h +++ b/src/quick3d/quick3drender/qt3dquickrender_global_p.h @@ -55,7 +55,7 @@ #include <Qt3DQuickRender/qt3dquickrender_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKRENDERSHARED_PRIVATE_EXPORT QT3DQUICKRENDERSHARED_EXPORT +#define Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT Q_3DQUICKRENDERSHARED_EXPORT QT_BEGIN_NAMESPACE @@ -63,8 +63,8 @@ namespace Qt3DRender { namespace Quick { -QT3DQUICKRENDERSHARED_PRIVATE_EXPORT void Quick3DRender_initialize(); -QT3DQUICKRENDERSHARED_PRIVATE_EXPORT void Quick3DRender_registerType(const char *className, const char *quickName, int major, int minor); +Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT void Quick3DRender_initialize(); +Q_3DQUICKRENDERSHARED_PRIVATE_EXPORT void Quick3DRender_registerType(const char *className, const char *quickName, int major, int minor); template<class T, class E> void registerExtendedType(const char *className, const char *quickName, const char *uri, int major, int minor, const char *name) diff --git a/src/quick3d/quick3dscene2d/items/qscene2d.cpp b/src/quick3d/quick3dscene2d/items/qscene2d.cpp index 06e9eecd4..ef06f39f1 100644 --- a/src/quick3d/quick3dscene2d/items/qscene2d.cpp +++ b/src/quick3d/quick3dscene2d/items/qscene2d.cpp @@ -36,6 +36,7 @@ #include "qscene2d.h" #include "qscene2d_p.h" +#include <private/qrenderaspect_p.h> #include "scene2d_p.h" #include "scene2dmanager_p.h" #include "scene2devent_p.h" @@ -205,6 +206,12 @@ void QScene2DPrivate::setScene(Qt3DCore::QScene *scene) QScene2D::QScene2D(Qt3DCore::QNode *parent) : Qt3DCore::QNode(*new QScene2DPrivate, parent) { +#ifdef QT_STATIC + static bool isInitialized = false; + if (!isInitialized) { + Qt3DRender::QRenderAspectPrivate::configurePlugin(QLatin1String("scene2d")); + } +#endif } /*! diff --git a/src/quick3d/quick3dscene2d/items/qscene2d.h b/src/quick3d/quick3dscene2d/items/qscene2d.h index c309fc831..eab900ca4 100644 --- a/src/quick3d/quick3dscene2d/items/qscene2d.h +++ b/src/quick3d/quick3dscene2d/items/qscene2d.h @@ -60,7 +60,7 @@ namespace Quick { class QScene2DPrivate; -class QT3DQUICKSCENE2DSHARED_EXPORT QScene2D : public Qt3DCore::QNode +class Q_3DQUICKSCENE2DSHARED_EXPORT QScene2D : public Qt3DCore::QNode { Q_OBJECT diff --git a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d_p.h b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d_p.h index 57734223b..fe4dd157c 100644 --- a/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d_p.h +++ b/src/quick3d/quick3dscene2d/items/qt3dquick3dscene2d_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { namespace Render { namespace Quick { -class QT3DQUICKSCENE2DSHARED_EXPORT QQuick3DScene2D : public QObject +class Q_3DQUICKSCENE2DSHARED_EXPORT QQuick3DScene2D : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<Qt3DCore::QEntity> entities READ entities) diff --git a/src/quick3d/quick3dscene2d/items/scene2d_p.h b/src/quick3d/quick3dscene2d/items/scene2d_p.h index b8999887a..bd7874cd6 100644 --- a/src/quick3d/quick3dscene2d/items/scene2d_p.h +++ b/src/quick3d/quick3dscene2d/items/scene2d_p.h @@ -81,7 +81,7 @@ private: Scene2D *m_node; }; -class QT3DQUICKSCENE2DSHARED_EXPORT Scene2D : public Qt3DRender::Render::BackendNode +class Q_3DQUICKSCENE2DSHARED_EXPORT Scene2D : public Qt3DRender::Render::BackendNode { public: Scene2D(); diff --git a/src/quick3d/quick3dscene2d/items/scene2dsharedobject_p.h b/src/quick3d/quick3dscene2d/items/scene2dsharedobject_p.h index 416a2280d..8de92c574 100644 --- a/src/quick3d/quick3dscene2d/items/scene2dsharedobject_p.h +++ b/src/quick3d/quick3dscene2d/items/scene2dsharedobject_p.h @@ -70,7 +70,7 @@ namespace Quick { class Scene2DManager; -class QT3DQUICKSCENE2DSHARED_EXPORT Scene2DSharedObject +class Q_3DQUICKSCENE2DSHARED_EXPORT Scene2DSharedObject { public: Scene2DSharedObject(Scene2DManager *manager); diff --git a/src/quick3d/quick3dscene2d/qt3dquickscene2d_global.h b/src/quick3d/quick3dscene2d/qt3dquickscene2d_global.h index 509a62024..ac2f34d0d 100644 --- a/src/quick3d/quick3dscene2d/qt3dquickscene2d_global.h +++ b/src/quick3d/quick3dscene2d/qt3dquickscene2d_global.h @@ -43,12 +43,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DQUICKSCENE2D_LIB) -# define QT3DQUICKSCENE2DSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DQUICKSCENE2DSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DQUICKSCENE2DSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DQUICKSCENE2DSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DQUICKSCENE2DSHARED_EXPORT +# define Q_3DQUICKSCENE2DSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/quick3d/quick3dscene2d/qt3dquickscene2d_global_p.h b/src/quick3d/quick3dscene2d/qt3dquickscene2d_global_p.h index e115e3d5e..7b68e002c 100644 --- a/src/quick3d/quick3dscene2d/qt3dquickscene2d_global_p.h +++ b/src/quick3d/quick3dscene2d/qt3dquickscene2d_global_p.h @@ -51,7 +51,7 @@ #include <Qt3DQuickScene2D/qt3dquickscene2d_global.h> #include <QtQml/qqml.h> -#define QT3DQUICKSCENE2DSHARED_PRIVATE_EXPORT QT3DQUICKSCENE2DSHARED_EXPORT +#define Q_3DQUICKSCENE2DSHARED_PRIVATE_EXPORT Q_3DQUICKSCENE2DSHARED_EXPORT QT_BEGIN_NAMESPACE @@ -59,8 +59,8 @@ namespace Qt3DRender { namespace Quick { -QT3DQUICKSCENE2DSHARED_PRIVATE_EXPORT void Quick3DScene2D_initialize(); -QT3DQUICKSCENE2DSHARED_PRIVATE_EXPORT void Quick3DScene2D_registerType(const char *className, +Q_3DQUICKSCENE2DSHARED_PRIVATE_EXPORT void Quick3DScene2D_initialize(); +Q_3DQUICKSCENE2DSHARED_PRIVATE_EXPORT void Quick3DScene2D_registerType(const char *className, const char *quickName, int major, int minor); diff --git a/src/render/backend/abstractrenderer_p.h b/src/render/backend/abstractrenderer_p.h index 29ee16880..f9c8e29eb 100644 --- a/src/render/backend/abstractrenderer_p.h +++ b/src/render/backend/abstractrenderer_p.h @@ -87,7 +87,7 @@ class BackendNode; class OffscreenSurfaceHelper; class Shader; -class QT3DRENDERSHARED_PRIVATE_EXPORT AbstractRenderer +class Q_3DRENDERSHARED_PRIVATE_EXPORT AbstractRenderer { public: virtual ~AbstractRenderer() {} diff --git a/src/render/backend/backendnode_p.h b/src/render/backend/backendnode_p.h index 8db68b11d..f94033c1a 100644 --- a/src/render/backend/backendnode_p.h +++ b/src/render/backend/backendnode_p.h @@ -64,7 +64,7 @@ namespace Render { class RenderBackendResourceAccessor; -class QT3DRENDERSHARED_PRIVATE_EXPORT BackendNode : public Qt3DCore::QBackendNode +class Q_3DRENDERSHARED_PRIVATE_EXPORT BackendNode : public Qt3DCore::QBackendNode { public: BackendNode(Qt3DCore::QBackendNode::Mode mode = ReadOnly); diff --git a/src/render/backend/cameralens_p.h b/src/render/backend/cameralens_p.h index d00358fb8..80a1715cf 100644 --- a/src/render/backend/cameralens_p.h +++ b/src/render/backend/cameralens_p.h @@ -80,7 +80,7 @@ private: QRenderAspect *m_renderAspect; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT CameraLens : public BackendNode +class Q_3DRENDERSHARED_PRIVATE_EXPORT CameraLens : public BackendNode { public: CameraLens(); diff --git a/src/render/backend/entity_p.h b/src/render/backend/entity_p.h index 075871d85..149ac1143 100644 --- a/src/render/backend/entity_p.h +++ b/src/render/backend/entity_p.h @@ -214,25 +214,25 @@ private: #define ENTITY_COMPONENT_TEMPLATE_SPECIALIZATION(Type, Handle) \ /* Handle */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT Handle Entity::componentHandle<Type>() const; \ + Q_3DRENDERSHARED_PRIVATE_EXPORT Handle Entity::componentHandle<Type>() const; \ /* Component */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT Type *Entity::renderComponent<Type>() const; \ + Q_3DRENDERSHARED_PRIVATE_EXPORT Type *Entity::renderComponent<Type>() const; \ /* Uuid */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT Qt3DCore::QNodeId Entity::componentUuid<Type>() const; + Q_3DRENDERSHARED_PRIVATE_EXPORT Qt3DCore::QNodeId Entity::componentUuid<Type>() const; #define ENTITY_COMPONENT_LIST_TEMPLATE_SPECIALIZATION(Type, Handle) \ /* Handle */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT QVector<Handle> Entity::componentsHandle<Type>() const; \ + Q_3DRENDERSHARED_PRIVATE_EXPORT QVector<Handle> Entity::componentsHandle<Type>() const; \ /* Component */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT QVector<Type *> Entity::renderComponents<Type>() const; \ + Q_3DRENDERSHARED_PRIVATE_EXPORT QVector<Type *> Entity::renderComponents<Type>() const; \ /* Uuid */ \ template<> \ - QT3DRENDERSHARED_PRIVATE_EXPORT Qt3DCore::QNodeIdVector Entity::componentsUuid<Type>() const; + Q_3DRENDERSHARED_PRIVATE_EXPORT Qt3DCore::QNodeIdVector Entity::componentsUuid<Type>() const; #define ENTITY_COMPONENT_TEMPLATE_IMPL(Type, Handle, Manager, variable) \ /* Handle */ \ diff --git a/src/render/backend/nodemanagers_p.h b/src/render/backend/nodemanagers_p.h index 0ad668f98..46e7b60f1 100644 --- a/src/render/backend/nodemanagers_p.h +++ b/src/render/backend/nodemanagers_p.h @@ -146,7 +146,7 @@ class OpenGLVertexArrayObject; class ResourceAccessor; -class QT3DRENDERSHARED_PRIVATE_EXPORT NodeManagers +class Q_3DRENDERSHARED_PRIVATE_EXPORT NodeManagers { public: NodeManagers(); @@ -275,94 +275,94 @@ private: // Specializations template<> -QT3DRENDERSHARED_PRIVATE_EXPORT CameraManager *NodeManagers::manager<CameraLens>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT CameraManager *NodeManagers::manager<CameraLens>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT EntityManager *NodeManagers::manager<Entity>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT EntityManager *NodeManagers::manager<Entity>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT MaterialManager *NodeManagers::manager<Material>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT MaterialManager *NodeManagers::manager<Material>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT MatrixManager *NodeManagers::manager<QMatrix4x4*>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT MatrixManager *NodeManagers::manager<QMatrix4x4*>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT VAOManager *NodeManagers::manager<OpenGLVertexArrayObject>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT VAOManager *NodeManagers::manager<OpenGLVertexArrayObject>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ShaderManager *NodeManagers::manager<Shader>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ShaderManager *NodeManagers::manager<Shader>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ShaderBuilderManager *NodeManagers::manager<ShaderBuilder>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ShaderBuilderManager *NodeManagers::manager<ShaderBuilder>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT TechniqueManager *NodeManagers::manager<Technique>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT TechniqueManager *NodeManagers::manager<Technique>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT EffectManager *NodeManagers::manager<Effect>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT EffectManager *NodeManagers::manager<Effect>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT RenderPassManager *NodeManagers::manager<RenderPass>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT RenderPassManager *NodeManagers::manager<RenderPass>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT TextureManager *NodeManagers::manager<Texture>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT TextureManager *NodeManagers::manager<Texture>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT LayerManager *NodeManagers::manager<Layer>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT LayerManager *NodeManagers::manager<Layer>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT LevelOfDetailManager *NodeManagers::manager<LevelOfDetail>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT LevelOfDetailManager *NodeManagers::manager<LevelOfDetail>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT FilterKeyManager *NodeManagers::manager<FilterKey>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT FilterKeyManager *NodeManagers::manager<FilterKey>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT FrameGraphManager *NodeManagers::manager<FrameGraphNode*>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT FrameGraphManager *NodeManagers::manager<FrameGraphNode*>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT TransformManager *NodeManagers::manager<Transform>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT TransformManager *NodeManagers::manager<Transform>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT RenderTargetManager *NodeManagers::manager<RenderTarget>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT RenderTargetManager *NodeManagers::manager<RenderTarget>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT SceneManager *NodeManagers::manager<Scene>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT SceneManager *NodeManagers::manager<Scene>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT AttachmentManager *NodeManagers::manager<RenderTargetOutput>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT AttachmentManager *NodeManagers::manager<RenderTargetOutput>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ParameterManager *NodeManagers::manager<Parameter>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ParameterManager *NodeManagers::manager<Parameter>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ShaderDataManager *NodeManagers::manager<ShaderData>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ShaderDataManager *NodeManagers::manager<ShaderData>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT GLBufferManager *NodeManagers::manager<GLBuffer>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT GLBufferManager *NodeManagers::manager<GLBuffer>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT TextureImageManager *NodeManagers::manager<TextureImage>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT TextureImageManager *NodeManagers::manager<TextureImage>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT BufferManager *NodeManagers::manager<Buffer>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT BufferManager *NodeManagers::manager<Buffer>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT AttributeManager *NodeManagers::manager<Attribute>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT AttributeManager *NodeManagers::manager<Attribute>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT GeometryManager *NodeManagers::manager<Geometry>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT GeometryManager *NodeManagers::manager<Geometry>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT GeometryRendererManager *NodeManagers::manager<GeometryRenderer>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT GeometryRendererManager *NodeManagers::manager<GeometryRenderer>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ObjectPickerManager *NodeManagers::manager<ObjectPicker>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ObjectPickerManager *NodeManagers::manager<ObjectPicker>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT RayCasterManager *NodeManagers::manager<RayCaster>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT RayCasterManager *NodeManagers::manager<RayCaster>() const Q_DECL_NOEXCEPT; //template<> -//QT3DRENDERSHARED_PRIVATE_EXPORT BoundingVolumeDebugManager *NodeManagers::manager<BoundingVolumeDebug>() const Q_DECL_NOEXCEPT; +//Q_3DRENDERSHARED_PRIVATE_EXPORT BoundingVolumeDebugManager *NodeManagers::manager<BoundingVolumeDebug>() const Q_DECL_NOEXCEPT; template<> LightManager *NodeManagers::manager<Light>() const Q_DECL_NOEXCEPT; @@ -371,19 +371,19 @@ template<> EnvironmentLightManager *NodeManagers::manager<EnvironmentLight>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ComputeCommandManager *NodeManagers::manager<ComputeCommand>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ComputeCommandManager *NodeManagers::manager<ComputeCommand>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT RenderStateManager *NodeManagers::manager<RenderStateNode>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT RenderStateManager *NodeManagers::manager<RenderStateNode>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT ArmatureManager *NodeManagers::manager<Armature>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT ArmatureManager *NodeManagers::manager<Armature>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT SkeletonManager *NodeManagers::manager<Skeleton>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT SkeletonManager *NodeManagers::manager<Skeleton>() const Q_DECL_NOEXCEPT; template<> -QT3DRENDERSHARED_PRIVATE_EXPORT JointManager *NodeManagers::manager<Joint>() const Q_DECL_NOEXCEPT; +Q_3DRENDERSHARED_PRIVATE_EXPORT JointManager *NodeManagers::manager<Joint>() const Q_DECL_NOEXCEPT; } // Render diff --git a/src/render/backend/platformsurfacefilter_p.h b/src/render/backend/platformsurfacefilter_p.h index 425ef303e..4fb43bae1 100644 --- a/src/render/backend/platformsurfacefilter_p.h +++ b/src/render/backend/platformsurfacefilter_p.h @@ -108,7 +108,7 @@ private: void markSurfaceAsValid(); }; -class QT3DRENDERSHARED_PRIVATE_EXPORT SurfaceLocker +class Q_3DRENDERSHARED_PRIVATE_EXPORT SurfaceLocker { public: explicit SurfaceLocker(QSurface *surface); diff --git a/src/render/backend/resourceaccessor_p.h b/src/render/backend/resourceaccessor_p.h index 627efcb0d..ec53a04a2 100644 --- a/src/render/backend/resourceaccessor_p.h +++ b/src/render/backend/resourceaccessor_p.h @@ -83,7 +83,7 @@ public: virtual bool accessResource(ResourceType type, Qt3DCore::QNodeId nodeId, void **handle, QMutex **lock) = 0; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT ResourceAccessor : public RenderBackendResourceAccessor +class Q_3DRENDERSHARED_PRIVATE_EXPORT ResourceAccessor : public RenderBackendResourceAccessor { public: ResourceAccessor(NodeManagers *mgr); diff --git a/src/render/backend/trianglesvisitor_p.h b/src/render/backend/trianglesvisitor_p.h index ee206f1c9..d05eaef09 100644 --- a/src/render/backend/trianglesvisitor_p.h +++ b/src/render/backend/trianglesvisitor_p.h @@ -92,7 +92,7 @@ protected: Qt3DCore::QNodeId m_nodeId; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT CoordinateReader +class Q_3DRENDERSHARED_PRIVATE_EXPORT CoordinateReader { public: explicit CoordinateReader(NodeManagers *manager) diff --git a/src/render/framegraph/qblitframebuffer.h b/src/render/framegraph/qblitframebuffer.h index 77b74ab53..79c216d24 100644 --- a/src/render/framegraph/qblitframebuffer.h +++ b/src/render/framegraph/qblitframebuffer.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QBlitFramebufferPrivate; class QRenderTarget; -class QT3DRENDERSHARED_EXPORT QBlitFramebuffer : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QBlitFramebuffer : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QRenderTarget *source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/render/framegraph/qbuffercapture.h b/src/render/framegraph/qbuffercapture.h index ab8c7d2c2..e5073a308 100644 --- a/src/render/framegraph/qbuffercapture.h +++ b/src/render/framegraph/qbuffercapture.h @@ -51,7 +51,7 @@ namespace Qt3DRender class QBufferCapturePrivate; -class QT3DRENDERSHARED_EXPORT QBufferCapture : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QBufferCapture : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qcameraselector.h b/src/render/framegraph/qcameraselector.h index 9aff269ca..861948d94 100644 --- a/src/render/framegraph/qcameraselector.h +++ b/src/render/framegraph/qcameraselector.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QCameraSelectorPrivate; -class QT3DRENDERSHARED_EXPORT QCameraSelector : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QCameraSelector : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(Qt3DCore::QEntity *camera READ camera WRITE setCamera NOTIFY cameraChanged) diff --git a/src/render/framegraph/qclearbuffers.h b/src/render/framegraph/qclearbuffers.h index 7077b3f24..441a83e78 100644 --- a/src/render/framegraph/qclearbuffers.h +++ b/src/render/framegraph/qclearbuffers.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QClearBuffersPrivate; -class QT3DRENDERSHARED_EXPORT QClearBuffers : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QClearBuffers : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(BufferType buffers READ buffers WRITE setBuffers NOTIFY buffersChanged) diff --git a/src/render/framegraph/qdispatchcompute.h b/src/render/framegraph/qdispatchcompute.h index 417796b61..dd6efb3ec 100644 --- a/src/render/framegraph/qdispatchcompute.h +++ b/src/render/framegraph/qdispatchcompute.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QDispatchComputePrivate; -class QT3DRENDERSHARED_EXPORT QDispatchCompute : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QDispatchCompute : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(int workGroupX READ workGroupX WRITE setWorkGroupX NOTIFY workGroupXChanged) diff --git a/src/render/framegraph/qframegraphnode.h b/src/render/framegraph/qframegraphnode.h index 1a15c4df6..9b08c98d3 100644 --- a/src/render/framegraph/qframegraphnode.h +++ b/src/render/framegraph/qframegraphnode.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QFrameGraphNodePrivate; -class QT3DRENDERSHARED_EXPORT QFrameGraphNode : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QFrameGraphNode : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/render/framegraph/qframegraphnodecreatedchange.h b/src/render/framegraph/qframegraphnodecreatedchange.h index f255ff406..96ca0fb38 100644 --- a/src/render/framegraph/qframegraphnodecreatedchange.h +++ b/src/render/framegraph/qframegraphnodecreatedchange.h @@ -47,7 +47,7 @@ namespace Qt3DRender { class QFrameGraphNode; class QFrameGraphNodeCreatedChangeBasePrivate; -class QT3DRENDERSHARED_EXPORT QFrameGraphNodeCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase +class Q_3DRENDERSHARED_EXPORT QFrameGraphNodeCreatedChangeBase : public Qt3DCore::QNodeCreatedChangeBase { public: explicit QFrameGraphNodeCreatedChangeBase(const QFrameGraphNode *node); diff --git a/src/render/framegraph/qfrustumculling.h b/src/render/framegraph/qfrustumculling.h index f0ed6d032..b715a9a6f 100644 --- a/src/render/framegraph/qfrustumculling.h +++ b/src/render/framegraph/qfrustumculling.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QFrustumCulling : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QFrustumCulling : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qlayerfilter.h b/src/render/framegraph/qlayerfilter.h index 3ccbdac54..dd628e74e 100644 --- a/src/render/framegraph/qlayerfilter.h +++ b/src/render/framegraph/qlayerfilter.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QLayer; class QLayerFilterPrivate; -class QT3DRENDERSHARED_EXPORT QLayerFilter : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QLayerFilter : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(FilterMode filterMode READ filterMode WRITE setFilterMode NOTIFY filterModeChanged) diff --git a/src/render/framegraph/qmemorybarrier.h b/src/render/framegraph/qmemorybarrier.h index 244b7ef53..29b439700 100644 --- a/src/render/framegraph/qmemorybarrier.h +++ b/src/render/framegraph/qmemorybarrier.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QMemoryBarrierPrivate; -class QT3DRENDERSHARED_EXPORT QMemoryBarrier : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QMemoryBarrier : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qnodraw.h b/src/render/framegraph/qnodraw.h index 4547aeeda..3782a88fc 100644 --- a/src/render/framegraph/qnodraw.h +++ b/src/render/framegraph/qnodraw.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QNoDraw : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QNoDraw : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qnopicking.h b/src/render/framegraph/qnopicking.h index 217704ee9..e3bd6e2fd 100644 --- a/src/render/framegraph/qnopicking.h +++ b/src/render/framegraph/qnopicking.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QNoPicking : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QNoPicking : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qproximityfilter.h b/src/render/framegraph/qproximityfilter.h index b101f6c09..56bcd6eaf 100644 --- a/src/render/framegraph/qproximityfilter.h +++ b/src/render/framegraph/qproximityfilter.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QProximityFilterPrivate; -class QT3DRENDERSHARED_EXPORT QProximityFilter : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QProximityFilter : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(Qt3DCore::QEntity *entity READ entity WRITE setEntity NOTIFY entityChanged) diff --git a/src/render/framegraph/qrendercapture.h b/src/render/framegraph/qrendercapture.h index 119d6a6f3..8fa5d0455 100644 --- a/src/render/framegraph/qrendercapture.h +++ b/src/render/framegraph/qrendercapture.h @@ -47,7 +47,7 @@ namespace Qt3DRender { class QRenderCapturePrivate; class QRenderCaptureReplyPrivate; -class QT3DRENDERSHARED_EXPORT QRenderCaptureReply : public QObject +class Q_3DRENDERSHARED_EXPORT QRenderCaptureReply : public QObject { Q_OBJECT Q_PROPERTY(QImage image READ image CONSTANT) @@ -78,7 +78,7 @@ private: friend class QRenderCapturePrivate; }; -class QT3DRENDERSHARED_EXPORT QRenderCapture : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QRenderCapture : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qrenderpassfilter.h b/src/render/framegraph/qrenderpassfilter.h index ffb305e14..9fb11757f 100644 --- a/src/render/framegraph/qrenderpassfilter.h +++ b/src/render/framegraph/qrenderpassfilter.h @@ -53,7 +53,7 @@ class QRenderPassFilterPrivate; class QFilterKey; class QParameter; -class QT3DRENDERSHARED_EXPORT QRenderPassFilter : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QRenderPassFilter : public QFrameGraphNode { Q_OBJECT diff --git a/src/render/framegraph/qrenderstateset.h b/src/render/framegraph/qrenderstateset.h index 3df86940b..b08da1ff5 100644 --- a/src/render/framegraph/qrenderstateset.h +++ b/src/render/framegraph/qrenderstateset.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QRenderStateSetPrivate; class QRenderState; -class QT3DRENDERSHARED_EXPORT QRenderStateSet : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QRenderStateSet : public QFrameGraphNode { Q_OBJECT diff --git a/src/render/framegraph/qrendersurfaceselector.h b/src/render/framegraph/qrendersurfaceselector.h index 5d0273187..73d513311 100644 --- a/src/render/framegraph/qrendersurfaceselector.h +++ b/src/render/framegraph/qrendersurfaceselector.h @@ -53,7 +53,7 @@ namespace Qt3DRender { class QRenderSurfaceSelectorPrivate; -class QT3DRENDERSHARED_EXPORT QRenderSurfaceSelector : public Qt3DRender::QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QRenderSurfaceSelector : public Qt3DRender::QFrameGraphNode { Q_OBJECT Q_PROPERTY(QObject *surface READ surface WRITE setSurface NOTIFY surfaceChanged) diff --git a/src/render/framegraph/qrendersurfaceselector_p.h b/src/render/framegraph/qrendersurfaceselector_p.h index 899387b98..70fdc5881 100644 --- a/src/render/framegraph/qrendersurfaceselector_p.h +++ b/src/render/framegraph/qrendersurfaceselector_p.h @@ -64,7 +64,7 @@ namespace Qt3DRender { class QRenderSurfaceSelector; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderSurfaceSelectorPrivate : public Qt3DRender::QFrameGraphNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderSurfaceSelectorPrivate : public Qt3DRender::QFrameGraphNodePrivate { public: QRenderSurfaceSelectorPrivate(); diff --git a/src/render/framegraph/qrendertargetselector.h b/src/render/framegraph/qrendertargetselector.h index 5e8cd0761..c6b7b641d 100644 --- a/src/render/framegraph/qrendertargetselector.h +++ b/src/render/framegraph/qrendertargetselector.h @@ -52,7 +52,7 @@ namespace Qt3DRender { class QRenderTargetSelectorPrivate; class QRenderTarget; -class QT3DRENDERSHARED_EXPORT QRenderTargetSelector : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QRenderTargetSelector : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QRenderTarget *target READ target WRITE setTarget NOTIFY targetChanged) diff --git a/src/render/framegraph/qsetfence.h b/src/render/framegraph/qsetfence.h index 4834601ea..4ad92ae52 100644 --- a/src/render/framegraph/qsetfence.h +++ b/src/render/framegraph/qsetfence.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QSetFencePrivate; -class QT3DRENDERSHARED_EXPORT QSetFence : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QSetFence : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(HandleType handleType READ handleType NOTIFY handleTypeChanged) diff --git a/src/render/framegraph/qsortpolicy.h b/src/render/framegraph/qsortpolicy.h index acc28026f..a302caa8b 100644 --- a/src/render/framegraph/qsortpolicy.h +++ b/src/render/framegraph/qsortpolicy.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QSortPolicyPrivate; -class QT3DRENDERSHARED_EXPORT QSortPolicy : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QSortPolicy : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(QVector<int> sortTypes READ sortTypesInt WRITE setSortTypes NOTIFY sortTypesChanged) diff --git a/src/render/framegraph/qtechniquefilter.h b/src/render/framegraph/qtechniquefilter.h index 243b2d6ec..9fe872915 100644 --- a/src/render/framegraph/qtechniquefilter.h +++ b/src/render/framegraph/qtechniquefilter.h @@ -51,7 +51,7 @@ class QTechniqueFilterPrivate; class QFilterKey; class QParameter; -class QT3DRENDERSHARED_EXPORT QTechniqueFilter : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QTechniqueFilter : public QFrameGraphNode { Q_OBJECT public: diff --git a/src/render/framegraph/qtechniquefilter_p.h b/src/render/framegraph/qtechniquefilter_p.h index d25f10a79..10df8f5bf 100644 --- a/src/render/framegraph/qtechniquefilter_p.h +++ b/src/render/framegraph/qtechniquefilter_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QTechniqueFilter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QTechniqueFilterPrivate : public QFrameGraphNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QTechniqueFilterPrivate : public QFrameGraphNodePrivate { public : QTechniqueFilterPrivate(); diff --git a/src/render/framegraph/qviewport.h b/src/render/framegraph/qviewport.h index 1f6ac8310..01830be6a 100644 --- a/src/render/framegraph/qviewport.h +++ b/src/render/framegraph/qviewport.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QViewportPrivate; -class QT3DRENDERSHARED_EXPORT QViewport : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QViewport : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(QRectF normalizedRect READ normalizedRect WRITE setNormalizedRect NOTIFY normalizedRectChanged) diff --git a/src/render/framegraph/qwaitfence.h b/src/render/framegraph/qwaitfence.h index 4f3e7ae8b..8148fde7d 100644 --- a/src/render/framegraph/qwaitfence.h +++ b/src/render/framegraph/qwaitfence.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QWaitFencePrivate; -class QT3DRENDERSHARED_EXPORT QWaitFence : public QFrameGraphNode +class Q_3DRENDERSHARED_EXPORT QWaitFence : public QFrameGraphNode { Q_OBJECT Q_PROPERTY(HandleType handleType READ handleType WRITE setHandleType NOTIFY handleTypeChanged) diff --git a/src/render/frontend/qabstractfunctor.h b/src/render/frontend/qabstractfunctor.h index e28535041..45492e141 100644 --- a/src/render/frontend/qabstractfunctor.h +++ b/src/render/frontend/qabstractfunctor.h @@ -73,7 +73,7 @@ qintptr functorTypeId() } -class QT3DRENDERSHARED_EXPORT QAbstractFunctor +class Q_3DRENDERSHARED_EXPORT QAbstractFunctor { public: QAbstractFunctor() = default; diff --git a/src/render/frontend/qcamera.h b/src/render/frontend/qcamera.h index e31615741..7d717972e 100644 --- a/src/render/frontend/qcamera.h +++ b/src/render/frontend/qcamera.h @@ -58,7 +58,7 @@ namespace Qt3DRender { class QCameraPrivate; -class QT3DRENDERSHARED_EXPORT QCamera : public Qt3DCore::QEntity +class Q_3DRENDERSHARED_EXPORT QCamera : public Qt3DCore::QEntity { Q_OBJECT // CameraLens diff --git a/src/render/frontend/qcamera_p.h b/src/render/frontend/qcamera_p.h index 1e8464d05..00d0bfd80 100644 --- a/src/render/frontend/qcamera_p.h +++ b/src/render/frontend/qcamera_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QCameraPrivate : public Qt3DCore::QEntityPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QCameraPrivate : public Qt3DCore::QEntityPrivate { public: QCameraPrivate(); diff --git a/src/render/frontend/qcameralens.h b/src/render/frontend/qcameralens.h index d478561ee..da7b426e1 100644 --- a/src/render/frontend/qcameralens.h +++ b/src/render/frontend/qcameralens.h @@ -53,7 +53,7 @@ namespace Qt3DRender { class QCameraLensPrivate; -class QT3DRENDERSHARED_EXPORT QCameraLens : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QCameraLens : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(ProjectionType projectionType READ projectionType WRITE setProjectionType NOTIFY projectionTypeChanged) diff --git a/src/render/frontend/qcameralens_p.h b/src/render/frontend/qcameralens_p.h index 0ec197945..111ab6522 100644 --- a/src/render/frontend/qcameralens_p.h +++ b/src/render/frontend/qcameralens_p.h @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QCameraLensPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QCameraLensPrivate : public Qt3DCore::QComponentPrivate { public: QCameraLensPrivate(); diff --git a/src/render/frontend/qcomputecommand.h b/src/render/frontend/qcomputecommand.h index f0c251a9b..b71007ba0 100644 --- a/src/render/frontend/qcomputecommand.h +++ b/src/render/frontend/qcomputecommand.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QComputeCommandPrivate; -class QT3DRENDERSHARED_EXPORT QComputeCommand : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QComputeCommand : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(int workGroupX READ workGroupX WRITE setWorkGroupX NOTIFY workGroupXChanged) diff --git a/src/render/frontend/qcomputecommand_p.h b/src/render/frontend/qcomputecommand_p.h index fc3376d5b..0a614325b 100644 --- a/src/render/frontend/qcomputecommand_p.h +++ b/src/render/frontend/qcomputecommand_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QComputeCommandPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QComputeCommandPrivate : public Qt3DCore::QComponentPrivate { public: QComputeCommandPrivate(); diff --git a/src/render/frontend/qlayer.h b/src/render/frontend/qlayer.h index 27910f190..4900f30e0 100644 --- a/src/render/frontend/qlayer.h +++ b/src/render/frontend/qlayer.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QLayerPrivate; -class QT3DRENDERSHARED_EXPORT QLayer : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QLayer : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(bool recursive READ recursive WRITE setRecursive NOTIFY recursiveChanged) diff --git a/src/render/frontend/qlayer_p.h b/src/render/frontend/qlayer_p.h index 1c01955f7..3a1fd7f61 100644 --- a/src/render/frontend/qlayer_p.h +++ b/src/render/frontend/qlayer_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QLayerPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QLayerPrivate : public Qt3DCore::QComponentPrivate { public: QLayerPrivate(); diff --git a/src/render/frontend/qlevelofdetail.h b/src/render/frontend/qlevelofdetail.h index fb74659dd..308a4d3c0 100644 --- a/src/render/frontend/qlevelofdetail.h +++ b/src/render/frontend/qlevelofdetail.h @@ -53,7 +53,7 @@ namespace Qt3DRender { class QCamera; class QLevelOfDetailPrivate; -class QT3DRENDERSHARED_EXPORT QLevelOfDetail : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QLevelOfDetail : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DRender::QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged) diff --git a/src/render/frontend/qlevelofdetail_p.h b/src/render/frontend/qlevelofdetail_p.h index 136d2ffa3..7b409e4ca 100644 --- a/src/render/frontend/qlevelofdetail_p.h +++ b/src/render/frontend/qlevelofdetail_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QLevelOfDetailPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QLevelOfDetailPrivate : public Qt3DCore::QComponentPrivate { public: QLevelOfDetailPrivate(); diff --git a/src/render/frontend/qlevelofdetailboundingsphere.h b/src/render/frontend/qlevelofdetailboundingsphere.h index 43ba422a8..81d49d04e 100644 --- a/src/render/frontend/qlevelofdetailboundingsphere.h +++ b/src/render/frontend/qlevelofdetailboundingsphere.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QLevelOfDetailBoundingSpherePrivate; -class QT3DRENDERSHARED_EXPORT QLevelOfDetailBoundingSphere +class Q_3DRENDERSHARED_EXPORT QLevelOfDetailBoundingSphere { Q_GADGET Q_PROPERTY(QVector3D center READ center CONSTANT) diff --git a/src/render/frontend/qlevelofdetailswitch.h b/src/render/frontend/qlevelofdetailswitch.h index 55c7d24c1..1615d16e6 100644 --- a/src/render/frontend/qlevelofdetailswitch.h +++ b/src/render/frontend/qlevelofdetailswitch.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QLevelOfDetailSwitch : public QLevelOfDetail +class Q_3DRENDERSHARED_EXPORT QLevelOfDetailSwitch : public QLevelOfDetail { Q_OBJECT diff --git a/src/render/frontend/qpickingsettings.h b/src/render/frontend/qpickingsettings.h index 741f918b0..11384414b 100644 --- a/src/render/frontend/qpickingsettings.h +++ b/src/render/frontend/qpickingsettings.h @@ -51,7 +51,7 @@ class QPickingSettingsPrivate; // TO DO: Qt 6 -> Make this a QObject -class QT3DRENDERSHARED_EXPORT QPickingSettings : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QPickingSettings : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(PickMethod pickMethod READ pickMethod WRITE setPickMethod NOTIFY pickMethodChanged) diff --git a/src/render/frontend/qpickingsettings_p.h b/src/render/frontend/qpickingsettings_p.h index 780a8b677..73f48c06e 100644 --- a/src/render/frontend/qpickingsettings_p.h +++ b/src/render/frontend/qpickingsettings_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QPickingSettingsPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPickingSettingsPrivate : public Qt3DCore::QNodePrivate { public: QPickingSettingsPrivate(); diff --git a/src/render/frontend/qrenderaspect.h b/src/render/frontend/qrenderaspect.h index bde60c9e2..5571988a7 100644 --- a/src/render/frontend/qrenderaspect.h +++ b/src/render/frontend/qrenderaspect.h @@ -65,7 +65,7 @@ class QRenderAspectPrivate; class QRenderAspectTester; #endif -class QT3DRENDERSHARED_EXPORT QRenderAspect : public Qt3DCore::QAbstractAspect +class Q_3DRENDERSHARED_EXPORT QRenderAspect : public Qt3DCore::QAbstractAspect { Q_OBJECT public: diff --git a/src/render/frontend/qrenderaspect_p.h b/src/render/frontend/qrenderaspect_p.h index 26ca091f6..4a091e164 100644 --- a/src/render/frontend/qrenderaspect_p.h +++ b/src/render/frontend/qrenderaspect_p.h @@ -75,7 +75,7 @@ namespace Render { class OffscreenSurfaceHelper; } -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderAspectPrivate : public Qt3DCore::QAbstractAspectPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderAspectPrivate : public Qt3DCore::QAbstractAspectPrivate { public: QRenderAspectPrivate(QRenderAspect::RenderType type); diff --git a/src/render/frontend/qrenderplugin_p.h b/src/render/frontend/qrenderplugin_p.h index 5144448c1..c34dabefc 100644 --- a/src/render/frontend/qrenderplugin_p.h +++ b/src/render/frontend/qrenderplugin_p.h @@ -64,7 +64,7 @@ namespace Render { class AbstractRenderer; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderPlugin +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderPlugin { public: virtual bool registerBackendTypes(QRenderAspect *aspect, AbstractRenderer *renderer) = 0; diff --git a/src/render/frontend/qrenderpluginfactory.cpp b/src/render/frontend/qrenderpluginfactory.cpp index 51fa068c6..548fa90e0 100644 --- a/src/render/frontend/qrenderpluginfactory.cpp +++ b/src/render/frontend/qrenderpluginfactory.cpp @@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { namespace Render { -#ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QRenderPluginFactoryInterface_iid, QLatin1String("/renderplugins"), Qt::CaseInsensitive)) +#if QT_CONFIG(library) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, (QRenderPluginFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive)) #endif QStringList QRenderPluginFactory::keys(const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QStringList list; if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); @@ -72,14 +72,14 @@ QStringList QRenderPluginFactory::keys(const QString &pluginPath) list.append(loader()->keyMap().values()); return list; #else - return QStringList(); + return loader()->keyMap().values(); #endif } QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringList &args, const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); if (QRenderPlugin *ret @@ -87,10 +87,8 @@ QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringLi return ret; } } - if (QRenderPlugin *ret = qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader(), name, args)) - return ret; #endif - return nullptr; + return qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader(), name, args); } } // namespace Render diff --git a/src/render/frontend/qrenderpluginfactory_p.h b/src/render/frontend/qrenderpluginfactory_p.h index 9cffd500a..26e856613 100644 --- a/src/render/frontend/qrenderpluginfactory_p.h +++ b/src/render/frontend/qrenderpluginfactory_p.h @@ -59,7 +59,7 @@ namespace Render { class QRenderPlugin; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderPluginFactory +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderPluginFactory { public: static QStringList keys(const QString &pluginPath = QString()); diff --git a/src/render/frontend/qrenderpluginfactoryif_p.h b/src/render/frontend/qrenderpluginfactoryif_p.h index d5f0008d2..249552b32 100644 --- a/src/render/frontend/qrenderpluginfactoryif_p.h +++ b/src/render/frontend/qrenderpluginfactoryif_p.h @@ -64,7 +64,7 @@ namespace Render { class QRenderPlugin; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderPluginFactoryIf : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderPluginFactoryIf : public QObject { Q_OBJECT public: diff --git a/src/render/frontend/qrendersettings.h b/src/render/frontend/qrendersettings.h index b759ebd88..9d2baa58b 100644 --- a/src/render/frontend/qrendersettings.h +++ b/src/render/frontend/qrendersettings.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QFrameGraphNode; class QRenderSettingsPrivate; -class QT3DRENDERSHARED_EXPORT QRenderSettings : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QRenderSettings : public Qt3DCore::QComponent { Q_OBJECT diff --git a/src/render/frontend/qrendersettings_p.h b/src/render/frontend/qrendersettings_p.h index 60ebd0f0d..f91397bd2 100644 --- a/src/render/frontend/qrendersettings_p.h +++ b/src/render/frontend/qrendersettings_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderSettingsPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderSettingsPrivate : public Qt3DCore::QComponentPrivate { public: QRenderSettingsPrivate(); diff --git a/src/render/frontend/qrendertarget.h b/src/render/frontend/qrendertarget.h index 69bed5aa5..9faf113da 100644 --- a/src/render/frontend/qrendertarget.h +++ b/src/render/frontend/qrendertarget.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QRenderTargetPrivate; class QRenderTargetOutput; -class QT3DRENDERSHARED_EXPORT QRenderTarget : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QRenderTarget : public Qt3DCore::QComponent { Q_OBJECT public: diff --git a/src/render/frontend/qrendertarget_p.h b/src/render/frontend/qrendertarget_p.h index f1035e846..b08477478 100644 --- a/src/render/frontend/qrendertarget_p.h +++ b/src/render/frontend/qrendertarget_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QRenderTargetOutput; class QRenderTarget; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderTargetPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderTargetPrivate : public Qt3DCore::QComponentPrivate { public: QRenderTargetPrivate(); diff --git a/src/render/frontend/qrendertargetoutput.h b/src/render/frontend/qrendertargetoutput.h index 2eb99df3c..a582c26f0 100644 --- a/src/render/frontend/qrendertargetoutput.h +++ b/src/render/frontend/qrendertargetoutput.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QAbstractTexture; class QRenderTargetOutputPrivate; -class QT3DRENDERSHARED_EXPORT QRenderTargetOutput : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QRenderTargetOutput : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(AttachmentPoint attachmentPoint READ attachmentPoint WRITE setAttachmentPoint NOTIFY attachmentPointChanged) diff --git a/src/render/frontend/qrendertargetoutput_p.h b/src/render/frontend/qrendertargetoutput_p.h index df855f184..e16a5eeb0 100644 --- a/src/render/frontend/qrendertargetoutput_p.h +++ b/src/render/frontend/qrendertargetoutput_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QAbstractTexture; -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderTargetOutputPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderTargetOutputPrivate : public Qt3DCore::QNodePrivate { public: QRenderTargetOutputPrivate(); diff --git a/src/render/frontend/sphere_p.h b/src/render/frontend/sphere_p.h index 14b6f1414..10cf92091 100644 --- a/src/render/frontend/sphere_p.h +++ b/src/render/frontend/sphere_p.h @@ -64,7 +64,7 @@ namespace Qt3DRender { namespace Render { -class QT3DRENDERSHARED_PRIVATE_EXPORT Sphere : public RayCasting::BoundingSphere +class Q_3DRENDERSHARED_PRIVATE_EXPORT Sphere : public RayCasting::BoundingSphere { public: inline Sphere(Qt3DCore::QNodeId i = Qt3DCore::QNodeId()) @@ -158,7 +158,7 @@ inline bool intersects(const Sphere &a, const Sphere &b) } #ifndef QT_NO_DEBUG_STREAM -QT3DRENDERSHARED_EXPORT QDebug operator<<(QDebug dbg, const Sphere &sphere); +Q_3DRENDERSHARED_EXPORT QDebug operator<<(QDebug dbg, const Sphere &sphere); #endif } // Render diff --git a/src/render/geometry/qattribute.h b/src/render/geometry/qattribute.h index 13a0319b5..526a77a59 100644 --- a/src/render/geometry/qattribute.h +++ b/src/render/geometry/qattribute.h @@ -53,7 +53,7 @@ class QAttributePrivate; typedef QSharedPointer<QBuffer> QBufferPtr; -class QT3DRENDERSHARED_EXPORT QAttribute : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QAttribute : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QBuffer *buffer READ buffer WRITE setBuffer NOTIFY bufferChanged) diff --git a/src/render/geometry/qattribute_p.h b/src/render/geometry/qattribute_p.h index d3385345a..8355a042b 100644 --- a/src/render/geometry/qattribute_p.h +++ b/src/render/geometry/qattribute_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { class QAttribute; -class QT3DRENDERSHARED_PRIVATE_EXPORT QAttributePrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QAttributePrivate : public Qt3DCore::QNodePrivate { public: Q_DECLARE_PUBLIC(QAttribute) diff --git a/src/render/geometry/qbuffer.h b/src/render/geometry/qbuffer.h index f04c98a11..1bd1aa8fd 100644 --- a/src/render/geometry/qbuffer.h +++ b/src/render/geometry/qbuffer.h @@ -53,7 +53,7 @@ class QBufferPrivate; class QBufferDataGenerator; typedef QSharedPointer<QBufferDataGenerator> QBufferDataGeneratorPtr; -class QT3DRENDERSHARED_EXPORT QBuffer : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QBuffer : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(BufferType type READ type WRITE setType NOTIFY typeChanged) diff --git a/src/render/geometry/qbuffer_p.h b/src/render/geometry/qbuffer_p.h index a342518e0..7a0ffdfb9 100644 --- a/src/render/geometry/qbuffer_p.h +++ b/src/render/geometry/qbuffer_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QBufferPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_EXPORT QBufferPrivate : public Qt3DCore::QNodePrivate { public: Q_DECLARE_PUBLIC(QBuffer) diff --git a/src/render/geometry/qbufferdatagenerator.h b/src/render/geometry/qbufferdatagenerator.h index 004eb26eb..aea6eaef5 100644 --- a/src/render/geometry/qbufferdatagenerator.h +++ b/src/render/geometry/qbufferdatagenerator.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QBufferDataGenerator : public QAbstractFunctor +class Q_3DRENDERSHARED_EXPORT QBufferDataGenerator : public QAbstractFunctor { public: virtual ~QBufferDataGenerator() {} diff --git a/src/render/geometry/qgeometry.h b/src/render/geometry/qgeometry.h index 6f9f5511f..cae637f1f 100644 --- a/src/render/geometry/qgeometry.h +++ b/src/render/geometry/qgeometry.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QAttribute; class QGeometryPrivate; -class QT3DRENDERSHARED_EXPORT QGeometry : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QGeometry : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QAttribute *boundingVolumePositionAttribute READ boundingVolumePositionAttribute WRITE setBoundingVolumePositionAttribute NOTIFY boundingVolumePositionAttributeChanged) diff --git a/src/render/geometry/qgeometry_p.h b/src/render/geometry/qgeometry_p.h index f53548e43..94f71d780 100644 --- a/src/render/geometry/qgeometry_p.h +++ b/src/render/geometry/qgeometry_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QGeometryPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryPrivate : public Qt3DCore::QNodePrivate { public: Q_DECLARE_PUBLIC(QGeometry) diff --git a/src/render/geometry/qgeometryfactory.h b/src/render/geometry/qgeometryfactory.h index 2e4d5c821..92acbc67d 100644 --- a/src/render/geometry/qgeometryfactory.h +++ b/src/render/geometry/qgeometryfactory.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QGeometry; -class QT3DRENDERSHARED_EXPORT QGeometryFactory : public QAbstractFunctor +class Q_3DRENDERSHARED_EXPORT QGeometryFactory : public QAbstractFunctor { public: virtual ~QGeometryFactory(); diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h index 85bab9fc6..81bd1ff67 100644 --- a/src/render/geometry/qgeometryrenderer.h +++ b/src/render/geometry/qgeometryrenderer.h @@ -53,7 +53,7 @@ class QGeometryFactory; typedef QSharedPointer<QGeometryFactory> QGeometryFactoryPtr; -class QT3DRENDERSHARED_EXPORT QGeometryRenderer : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QGeometryRenderer : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(int instanceCount READ instanceCount WRITE setInstanceCount NOTIFY instanceCountChanged) diff --git a/src/render/geometry/qgeometryrenderer_p.h b/src/render/geometry/qgeometryrenderer_p.h index 8096b4a6b..32ca334e3 100644 --- a/src/render/geometry/qgeometryrenderer_p.h +++ b/src/render/geometry/qgeometryrenderer_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QGeometryRendererPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryRendererPrivate : public Qt3DCore::QComponentPrivate { public: QGeometryRendererPrivate(); diff --git a/src/render/geometry/qmesh.h b/src/render/geometry/qmesh.h index a7b2747f7..458a21fa4 100644 --- a/src/render/geometry/qmesh.h +++ b/src/render/geometry/qmesh.h @@ -54,7 +54,7 @@ class QMeshPrivate; * @brief Simple static mesh * */ -class QT3DRENDERSHARED_EXPORT QMesh : public QGeometryRenderer +class Q_3DRENDERSHARED_EXPORT QMesh : public QGeometryRenderer { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/render/geometry/qmesh_p.h b/src/render/geometry/qmesh_p.h index 2d03e7862..4a4ff4979 100644 --- a/src/render/geometry/qmesh_p.h +++ b/src/render/geometry/qmesh_p.h @@ -69,7 +69,7 @@ namespace Render { class NodeManagers; } -class QT3DRENDERSHARED_PRIVATE_EXPORT QMeshPrivate : public QGeometryRendererPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QMeshPrivate : public QGeometryRendererPrivate { public: QMeshPrivate(); diff --git a/src/render/io/qaxisalignedboundingbox_p.h b/src/render/io/qaxisalignedboundingbox_p.h index 7a88190b7..c77fa1147 100644 --- a/src/render/io/qaxisalignedboundingbox_p.h +++ b/src/render/io/qaxisalignedboundingbox_p.h @@ -86,7 +86,7 @@ public: bool isNull() const { return m_center.isNull() && m_radii.isNull(); } - void QT3DRENDERSHARED_PRIVATE_EXPORT update(const QVector<QVector3D> &points); + void Q_3DRENDERSHARED_PRIVATE_EXPORT update(const QVector<QVector3D> &points); inline QVector3D center() const { return m_center; } inline QVector3D radii() const { return m_radii; } diff --git a/src/render/io/qgeometryloaderfactory_p.h b/src/render/io/qgeometryloaderfactory_p.h index 6e0044c4a..b4f2be2b5 100644 --- a/src/render/io/qgeometryloaderfactory_p.h +++ b/src/render/io/qgeometryloaderfactory_p.h @@ -65,7 +65,7 @@ namespace Qt3DRender { class QGeometryLoaderInterface; -class QT3DRENDERSHARED_PRIVATE_EXPORT QGeometryLoaderFactory : public QObject, public QFactoryInterface +class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryLoaderFactory : public QObject, public QFactoryInterface { Q_OBJECT Q_INTERFACES(QFactoryInterface) diff --git a/src/render/io/qgeometryloaderinterface_p.h b/src/render/io/qgeometryloaderinterface_p.h index 22d4f8bea..36928445f 100644 --- a/src/render/io/qgeometryloaderinterface_p.h +++ b/src/render/io/qgeometryloaderinterface_p.h @@ -63,7 +63,7 @@ namespace Qt3DRender { class QGeometry; -class QT3DRENDERSHARED_PRIVATE_EXPORT QGeometryLoaderInterface : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QGeometryLoaderInterface : public QObject { public: virtual QGeometry *geometry() const = 0; diff --git a/src/render/io/qsceneexporter_p.h b/src/render/io/qsceneexporter_p.h index 3c8b92c77..7b92a0ff3 100644 --- a/src/render/io/qsceneexporter_p.h +++ b/src/render/io/qsceneexporter_p.h @@ -67,7 +67,7 @@ namespace Qt3DRender { Q_DECLARE_LOGGING_CATEGORY(SceneParsers) -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneExporter : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneExporter : public QObject { Q_OBJECT Q_PROPERTY(QStringList errors READ errors NOTIFY errorsChanged) diff --git a/src/render/io/qsceneexportfactory.cpp b/src/render/io/qsceneexportfactory.cpp index 6e1126da8..10db614f4 100644 --- a/src/render/io/qsceneexportfactory.cpp +++ b/src/render/io/qsceneexportfactory.cpp @@ -50,14 +50,14 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -#ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QSceneExportFactoryInterface_iid, QLatin1String("/sceneparsers"), Qt::CaseInsensitive)) +#if QT_CONFIG(library) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, (QSceneExportFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive)) #endif QStringList QSceneExportFactory::keys(const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) QStringList list; if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); @@ -74,14 +74,14 @@ QStringList QSceneExportFactory::keys(const QString &pluginPath) list.append(loader()->keyMap().values()); return list; #else - return QStringList(); + return loader()->keyMap().values(); #endif } QSceneExporter *QSceneExportFactory::create(const QString &name, const QStringList &args, const QString &pluginPath) { -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); if (QSceneExporter *ret = qLoadPlugin<QSceneExporter, @@ -89,10 +89,8 @@ QSceneExporter *QSceneExportFactory::create(const QString &name, const QStringLi return ret; } } - if (QSceneExporter *ret = qLoadPlugin<QSceneExporter, QSceneExportPlugin>(loader(), name, args)) - return ret; #endif - return nullptr; + return qLoadPlugin<QSceneExporter, QSceneExportPlugin>(loader(), name, args); } } // namespace Qt3DRender diff --git a/src/render/io/qsceneexportfactory_p.h b/src/render/io/qsceneexportfactory_p.h index 5ff6149f4..fbb278ebe 100644 --- a/src/render/io/qsceneexportfactory_p.h +++ b/src/render/io/qsceneexportfactory_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QSceneExporter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneExportFactory +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneExportFactory { public: static QStringList keys(const QString &pluginPath = QString()); diff --git a/src/render/io/qsceneexportplugin_p.h b/src/render/io/qsceneexportplugin_p.h index 3515cd425..dcc1c7769 100644 --- a/src/render/io/qsceneexportplugin_p.h +++ b/src/render/io/qsceneexportplugin_p.h @@ -65,7 +65,7 @@ namespace Qt3DRender { class QSceneExporter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneExportPlugin : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneExportPlugin : public QObject { Q_OBJECT public: diff --git a/src/render/io/qsceneimporter_p.h b/src/render/io/qsceneimporter_p.h index 8f83231c3..910a7fc66 100644 --- a/src/render/io/qsceneimporter_p.h +++ b/src/render/io/qsceneimporter_p.h @@ -67,7 +67,7 @@ namespace Qt3DRender { Q_DECLARE_LOGGING_CATEGORY(SceneParsers) -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneImporter : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneImporter : public QObject { Q_OBJECT Q_PROPERTY(ParserStatus status READ status NOTIFY statusChanged) diff --git a/src/render/io/qsceneimportfactory_p.h b/src/render/io/qsceneimportfactory_p.h index c66937fa1..8409ea96d 100644 --- a/src/render/io/qsceneimportfactory_p.h +++ b/src/render/io/qsceneimportfactory_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QSceneImporter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneImportFactory +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneImportFactory { public: static QStringList keys(const QString &pluginPath = QString()); diff --git a/src/render/io/qsceneimportplugin_p.h b/src/render/io/qsceneimportplugin_p.h index 01ab84060..a24d1fa3e 100644 --- a/src/render/io/qsceneimportplugin_p.h +++ b/src/render/io/qsceneimportplugin_p.h @@ -65,7 +65,7 @@ namespace Qt3DRender { class QSceneImporter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneImportPlugin : public QObject +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneImportPlugin : public QObject { Q_OBJECT public: diff --git a/src/render/io/qsceneloader.h b/src/render/io/qsceneloader.h index c69a4ad98..4cb743333 100644 --- a/src/render/io/qsceneloader.h +++ b/src/render/io/qsceneloader.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QSceneLoaderPrivate; -class QT3DRENDERSHARED_EXPORT QSceneLoader : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QSceneLoader : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/render/io/qsceneloader_p.h b/src/render/io/qsceneloader_p.h index 45a6a1a4e..50745c66f 100644 --- a/src/render/io/qsceneloader_p.h +++ b/src/render/io/qsceneloader_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QSceneImporter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSceneLoaderPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSceneLoaderPrivate : public Qt3DCore::QComponentPrivate { public: QSceneLoaderPrivate(); diff --git a/src/render/io/qurlhelper_p.h b/src/render/io/qurlhelper_p.h index c9c4cfd9b..d816d5d31 100644 --- a/src/render/io/qurlhelper_p.h +++ b/src/render/io/qurlhelper_p.h @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QUrlHelper +class Q_3DRENDERSHARED_EXPORT QUrlHelper { public: static QString urlToLocalFileOrQrc(const QUrl &url); diff --git a/src/render/jobs/calcboundingvolumejob_p.h b/src/render/jobs/calcboundingvolumejob_p.h index 41a8bd6c1..3b62c83cd 100644 --- a/src/render/jobs/calcboundingvolumejob_p.h +++ b/src/render/jobs/calcboundingvolumejob_p.h @@ -65,7 +65,7 @@ namespace Render { class NodeManagers; class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT CalculateBoundingVolumeJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT CalculateBoundingVolumeJob : public Qt3DCore::QAspectJob { public: explicit CalculateBoundingVolumeJob(); diff --git a/src/render/jobs/computefilteredboundingvolumejob_p.h b/src/render/jobs/computefilteredboundingvolumejob_p.h index ed336fe08..797a685ee 100644 --- a/src/render/jobs/computefilteredboundingvolumejob_p.h +++ b/src/render/jobs/computefilteredboundingvolumejob_p.h @@ -64,7 +64,7 @@ namespace Render { class Entity; class Sphere; -class QT3DRENDERSHARED_PRIVATE_EXPORT ComputeFilteredBoundingVolumeJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT ComputeFilteredBoundingVolumeJob : public Qt3DCore::QAspectJob { public: ComputeFilteredBoundingVolumeJob(); diff --git a/src/render/jobs/expandboundingvolumejob_p.h b/src/render/jobs/expandboundingvolumejob_p.h index f468cf816..c577c90e2 100644 --- a/src/render/jobs/expandboundingvolumejob_p.h +++ b/src/render/jobs/expandboundingvolumejob_p.h @@ -63,7 +63,7 @@ namespace Render { class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT ExpandBoundingVolumeJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT ExpandBoundingVolumeJob : public Qt3DCore::QAspectJob { public: ExpandBoundingVolumeJob(); diff --git a/src/render/jobs/filterlayerentityjob_p.h b/src/render/jobs/filterlayerentityjob_p.h index 418f3ff3a..33023775f 100644 --- a/src/render/jobs/filterlayerentityjob_p.h +++ b/src/render/jobs/filterlayerentityjob_p.h @@ -65,7 +65,7 @@ namespace Render { class Entity; class NodeManagers; -class QT3DRENDERSHARED_PRIVATE_EXPORT FilterLayerEntityJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT FilterLayerEntityJob : public Qt3DCore::QAspectJob { public: FilterLayerEntityJob(); diff --git a/src/render/jobs/framecleanupjob_p.h b/src/render/jobs/framecleanupjob_p.h index e3700fedc..78938a8cf 100644 --- a/src/render/jobs/framecleanupjob_p.h +++ b/src/render/jobs/framecleanupjob_p.h @@ -64,7 +64,7 @@ namespace Render { class NodeManagers; class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT FrameCleanupJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT FrameCleanupJob : public Qt3DCore::QAspectJob { public: explicit FrameCleanupJob(); diff --git a/src/render/jobs/pickboundingvolumeutils.cpp b/src/render/jobs/pickboundingvolumeutils.cpp index 15bb29948..39069e374 100644 --- a/src/render/jobs/pickboundingvolumeutils.cpp +++ b/src/render/jobs/pickboundingvolumeutils.cpp @@ -145,34 +145,6 @@ bool ViewportCameraAreaGatherer::isUnique(const QVector<ViewportCameraAreaDetail return true; } -QVector<Entity *> gatherEntities(Entity *entity, QVector<Entity *> entities) -{ - if (entity != nullptr && entity->isEnabled()) { - entities.push_back(entity); - // Traverse children - const auto children = entity->children(); - for (Entity *child : children) - entities = gatherEntities(child, std::move(entities)); - } - return entities; -} - -EntityGatherer::EntityGatherer(Entity *root) - : m_root(root) - , m_needsRefresh(true) -{ -} - -QVector<Entity *> EntityGatherer::entities() const -{ - if (m_needsRefresh) { - m_entities.clear(); - m_entities = gatherEntities(m_root, std::move(m_entities)); - m_needsRefresh = false; - } - return m_entities; -} - class TriangleCollisionVisitor : public TrianglesVisitor { public: diff --git a/src/render/jobs/pickboundingvolumeutils_p.h b/src/render/jobs/pickboundingvolumeutils_p.h index 382967be0..fa3e701c2 100644 --- a/src/render/jobs/pickboundingvolumeutils_p.h +++ b/src/render/jobs/pickboundingvolumeutils_p.h @@ -101,19 +101,6 @@ private: bool isUnique(const QVector<ViewportCameraAreaDetails> &vcaList, const ViewportCameraAreaDetails &vca) const; }; -class Q_AUTOTEST_EXPORT EntityGatherer -{ -public: - explicit EntityGatherer(Entity *root); - - QVector<Entity *> entities() const; - -private: - Entity *m_root; - mutable QVector<Entity *> m_entities; - mutable bool m_needsRefresh; -}; - typedef QVector<RayCasting::QCollisionQueryResult::Hit> HitList; class Q_AUTOTEST_EXPORT HierarchicalEntityPicker diff --git a/src/render/jobs/sendbuffercapturejob_p.h b/src/render/jobs/sendbuffercapturejob_p.h index 854414ec6..f47c556df 100644 --- a/src/render/jobs/sendbuffercapturejob_p.h +++ b/src/render/jobs/sendbuffercapturejob_p.h @@ -68,7 +68,7 @@ class Entity; class Renderer; class Buffer; -class QT3DRENDERSHARED_PRIVATE_EXPORT SendBufferCaptureJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT SendBufferCaptureJob : public Qt3DCore::QAspectJob { public: explicit SendBufferCaptureJob(); diff --git a/src/render/jobs/sendrendercapturejob_p.h b/src/render/jobs/sendrendercapturejob_p.h index 53b111ba6..8bc1e2fb0 100644 --- a/src/render/jobs/sendrendercapturejob_p.h +++ b/src/render/jobs/sendrendercapturejob_p.h @@ -63,7 +63,7 @@ namespace Render { class NodeManagers; class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT SendRenderCaptureJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT SendRenderCaptureJob : public Qt3DCore::QAspectJob { public: SendRenderCaptureJob(); diff --git a/src/render/jobs/updateentitylayersjob_p.h b/src/render/jobs/updateentitylayersjob_p.h index 8c73899d9..13cc2fc4c 100644 --- a/src/render/jobs/updateentitylayersjob_p.h +++ b/src/render/jobs/updateentitylayersjob_p.h @@ -65,7 +65,7 @@ class Entity; class NodeManagers; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateEntityLayersJob: public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateEntityLayersJob: public Qt3DCore::QAspectJob { public: UpdateEntityLayersJob(); diff --git a/src/render/jobs/updatelevelofdetailjob_p.h b/src/render/jobs/updatelevelofdetailjob_p.h index 4c80a3205..c7045ee7f 100644 --- a/src/render/jobs/updatelevelofdetailjob_p.h +++ b/src/render/jobs/updatelevelofdetailjob_p.h @@ -66,7 +66,7 @@ class NodeManagers; class LevelOfDetail; class FrameGraphNode; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateLevelOfDetailJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateLevelOfDetailJob : public Qt3DCore::QAspectJob { public: UpdateLevelOfDetailJob(); diff --git a/src/render/jobs/updatemeshtrianglelistjob_p.h b/src/render/jobs/updatemeshtrianglelistjob_p.h index 9b67b9f49..048f8f01a 100644 --- a/src/render/jobs/updatemeshtrianglelistjob_p.h +++ b/src/render/jobs/updatemeshtrianglelistjob_p.h @@ -62,7 +62,7 @@ namespace Render { class NodeManagers; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateMeshTriangleListJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateMeshTriangleListJob : public Qt3DCore::QAspectJob { public: UpdateMeshTriangleListJob(); diff --git a/src/render/jobs/updateshaderdatatransformjob_p.h b/src/render/jobs/updateshaderdatatransformjob_p.h index 2fc06b8f7..bcf4eb6af 100644 --- a/src/render/jobs/updateshaderdatatransformjob_p.h +++ b/src/render/jobs/updateshaderdatatransformjob_p.h @@ -62,7 +62,7 @@ namespace Render { class NodeManagers; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateShaderDataTransformJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateShaderDataTransformJob : public Qt3DCore::QAspectJob { public: UpdateShaderDataTransformJob(); diff --git a/src/render/jobs/updatetreeenabledjob_p.h b/src/render/jobs/updatetreeenabledjob_p.h index 132271eaa..6eac75ea6 100644 --- a/src/render/jobs/updatetreeenabledjob_p.h +++ b/src/render/jobs/updatetreeenabledjob_p.h @@ -63,7 +63,7 @@ namespace Render { class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateTreeEnabledJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateTreeEnabledJob : public Qt3DCore::QAspectJob { public: UpdateTreeEnabledJob(); diff --git a/src/render/jobs/updateworldboundingvolumejob_p.h b/src/render/jobs/updateworldboundingvolumejob_p.h index affe78045..afb8cc6e1 100644 --- a/src/render/jobs/updateworldboundingvolumejob_p.h +++ b/src/render/jobs/updateworldboundingvolumejob_p.h @@ -62,7 +62,7 @@ namespace Render { class EntityManager; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateWorldBoundingVolumeJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateWorldBoundingVolumeJob : public Qt3DCore::QAspectJob { public: UpdateWorldBoundingVolumeJob(); diff --git a/src/render/jobs/updateworldtransformjob_p.h b/src/render/jobs/updateworldtransformjob_p.h index a85310e5c..a0ef25679 100644 --- a/src/render/jobs/updateworldtransformjob_p.h +++ b/src/render/jobs/updateworldtransformjob_p.h @@ -63,7 +63,7 @@ namespace Render { class Entity; -class QT3DRENDERSHARED_PRIVATE_EXPORT UpdateWorldTransformJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT UpdateWorldTransformJob : public Qt3DCore::QAspectJob { public: UpdateWorldTransformJob(); diff --git a/src/render/lights/qabstractlight.h b/src/render/lights/qabstractlight.h index b5dd89222..e92a5ee1d 100644 --- a/src/render/lights/qabstractlight.h +++ b/src/render/lights/qabstractlight.h @@ -52,7 +52,7 @@ namespace Qt3DRender { class QAbstractLightPrivate; -class QT3DRENDERSHARED_EXPORT QAbstractLight : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QAbstractLight : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Type type READ type) diff --git a/src/render/lights/qabstractlight_p.h b/src/render/lights/qabstractlight_p.h index f7831dce2..ebb8092b4 100644 --- a/src/render/lights/qabstractlight_p.h +++ b/src/render/lights/qabstractlight_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QAbstractLight; -class QT3DRENDERSHARED_PRIVATE_EXPORT QAbstractLightPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QAbstractLightPrivate : public Qt3DCore::QComponentPrivate { public: explicit QAbstractLightPrivate(QAbstractLight::Type type); diff --git a/src/render/lights/qdirectionallight.h b/src/render/lights/qdirectionallight.h index 6be1585db..5d572b9ea 100644 --- a/src/render/lights/qdirectionallight.h +++ b/src/render/lights/qdirectionallight.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QDirectionalLightPrivate; -class QT3DRENDERSHARED_EXPORT QDirectionalLight : public QAbstractLight +class Q_3DRENDERSHARED_EXPORT QDirectionalLight : public QAbstractLight { Q_OBJECT Q_PROPERTY(QVector3D worldDirection READ worldDirection WRITE setWorldDirection NOTIFY worldDirectionChanged) diff --git a/src/render/lights/qdirectionallight_p.h b/src/render/lights/qdirectionallight_p.h index ea80913eb..d57a95604 100644 --- a/src/render/lights/qdirectionallight_p.h +++ b/src/render/lights/qdirectionallight_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QDirectionalLight; -class QT3DRENDERSHARED_PRIVATE_EXPORT QDirectionalLightPrivate : QAbstractLightPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QDirectionalLightPrivate : QAbstractLightPrivate { public: QDirectionalLightPrivate(); diff --git a/src/render/lights/qenvironmentlight.h b/src/render/lights/qenvironmentlight.h index 995768d3c..3afc44f28 100644 --- a/src/render/lights/qenvironmentlight.h +++ b/src/render/lights/qenvironmentlight.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QAbstractTexture; class QEnvironmentLightPrivate; -class QT3DRENDERSHARED_EXPORT QEnvironmentLight : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QEnvironmentLight : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DRender::QAbstractTexture *irradiance READ irradiance WRITE setIrradiance NOTIFY irradianceChanged) diff --git a/src/render/lights/qenvironmentlight_p.h b/src/render/lights/qenvironmentlight_p.h index f4fa97b5a..a512f8f5b 100644 --- a/src/render/lights/qenvironmentlight_p.h +++ b/src/render/lights/qenvironmentlight_p.h @@ -62,7 +62,7 @@ namespace Qt3DRender { class QAbstractTexture; class QEnvironmentLight; -class QT3DRENDERSHARED_PRIVATE_EXPORT QEnvironmentLightPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QEnvironmentLightPrivate : public Qt3DCore::QComponentPrivate { public: explicit QEnvironmentLightPrivate(); diff --git a/src/render/lights/qpointlight.h b/src/render/lights/qpointlight.h index 16e048560..1efe1679a 100644 --- a/src/render/lights/qpointlight.h +++ b/src/render/lights/qpointlight.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QPointLightPrivate; -class QT3DRENDERSHARED_EXPORT QPointLight : public QAbstractLight +class Q_3DRENDERSHARED_EXPORT QPointLight : public QAbstractLight { Q_OBJECT Q_PROPERTY(float constantAttenuation READ constantAttenuation WRITE setConstantAttenuation NOTIFY constantAttenuationChanged) diff --git a/src/render/lights/qpointlight_p.h b/src/render/lights/qpointlight_p.h index 147867667..64c971291 100644 --- a/src/render/lights/qpointlight_p.h +++ b/src/render/lights/qpointlight_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QPointLight; -class QT3DRENDERSHARED_PRIVATE_EXPORT QPointLightPrivate : public QAbstractLightPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPointLightPrivate : public QAbstractLightPrivate { public: QPointLightPrivate(); diff --git a/src/render/lights/qspotlight.h b/src/render/lights/qspotlight.h index 8902708a3..760508b79 100644 --- a/src/render/lights/qspotlight.h +++ b/src/render/lights/qspotlight.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QSpotLightPrivate; -class QT3DRENDERSHARED_EXPORT QSpotLight : public QAbstractLight +class Q_3DRENDERSHARED_EXPORT QSpotLight : public QAbstractLight { Q_OBJECT Q_PROPERTY(float constantAttenuation READ constantAttenuation WRITE setConstantAttenuation NOTIFY constantAttenuationChanged) diff --git a/src/render/lights/qspotlight_p.h b/src/render/lights/qspotlight_p.h index eabc00353..2646a72cd 100644 --- a/src/render/lights/qspotlight_p.h +++ b/src/render/lights/qspotlight_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QSpotLight; -class QT3DRENDERSHARED_PRIVATE_EXPORT QSpotLightPrivate : public QAbstractLightPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QSpotLightPrivate : public QAbstractLightPrivate { public: QSpotLightPrivate(); diff --git a/src/render/materialsystem/qeffect.h b/src/render/materialsystem/qeffect.h index 0a65311ba..decae6f39 100644 --- a/src/render/materialsystem/qeffect.h +++ b/src/render/materialsystem/qeffect.h @@ -51,7 +51,7 @@ class QParameter; class QTechnique; class QEffectPrivate; -class QT3DRENDERSHARED_EXPORT QEffect : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QEffect : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/render/materialsystem/qeffect_p.h b/src/render/materialsystem/qeffect_p.h index 39c7d1ecc..c1fe22ec0 100644 --- a/src/render/materialsystem/qeffect_p.h +++ b/src/render/materialsystem/qeffect_p.h @@ -63,7 +63,7 @@ class QEffect; class QParameter; class QTechnique; -class QT3DRENDERSHARED_PRIVATE_EXPORT QEffectPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QEffectPrivate : public Qt3DCore::QNodePrivate { public : QEffectPrivate(); diff --git a/src/render/materialsystem/qfilterkey.h b/src/render/materialsystem/qfilterkey.h index 23c2dd342..d7dd470db 100644 --- a/src/render/materialsystem/qfilterkey.h +++ b/src/render/materialsystem/qfilterkey.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QFilterKeyPrivate; -class QT3DRENDERSHARED_EXPORT QFilterKey : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QFilterKey : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) diff --git a/src/render/materialsystem/qfilterkey_p.h b/src/render/materialsystem/qfilterkey_p.h index 4050bc295..2174841a3 100644 --- a/src/render/materialsystem/qfilterkey_p.h +++ b/src/render/materialsystem/qfilterkey_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QFilterKeyPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QFilterKeyPrivate : public Qt3DCore::QNodePrivate { public: QFilterKeyPrivate(); diff --git a/src/render/materialsystem/qgraphicsapifilter.h b/src/render/materialsystem/qgraphicsapifilter.h index 08b30b1f7..337193673 100644 --- a/src/render/materialsystem/qgraphicsapifilter.h +++ b/src/render/materialsystem/qgraphicsapifilter.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QGraphicsApiFilterPrivate; -class QT3DRENDERSHARED_EXPORT QGraphicsApiFilter : public QObject +class Q_3DRENDERSHARED_EXPORT QGraphicsApiFilter : public QObject { Q_OBJECT Q_PROPERTY(Qt3DRender::QGraphicsApiFilter::Api api READ api WRITE setApi NOTIFY apiChanged) diff --git a/src/render/materialsystem/qgraphicsapifilter_p.h b/src/render/materialsystem/qgraphicsapifilter_p.h index f4581ac05..3961d4f93 100644 --- a/src/render/materialsystem/qgraphicsapifilter_p.h +++ b/src/render/materialsystem/qgraphicsapifilter_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -struct QT3DRENDERSHARED_PRIVATE_EXPORT GraphicsApiFilterData +struct Q_3DRENDERSHARED_PRIVATE_EXPORT GraphicsApiFilterData { GraphicsApiFilterData(); @@ -75,7 +75,7 @@ struct QT3DRENDERSHARED_PRIVATE_EXPORT GraphicsApiFilterData bool operator <(const GraphicsApiFilterData &other) const; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT QGraphicsApiFilterPrivate : public QObjectPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QGraphicsApiFilterPrivate : public QObjectPrivate { public: QGraphicsApiFilterPrivate() diff --git a/src/render/materialsystem/qmaterial.h b/src/render/materialsystem/qmaterial.h index 9d1895294..d7d40f138 100644 --- a/src/render/materialsystem/qmaterial.h +++ b/src/render/materialsystem/qmaterial.h @@ -54,7 +54,7 @@ class QParameter; class QMaterialPrivate; class QEffect; -class QT3DRENDERSHARED_EXPORT QMaterial : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QMaterial : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(Qt3DRender::QEffect *effect READ effect WRITE setEffect NOTIFY effectChanged) diff --git a/src/render/materialsystem/qmaterial_p.h b/src/render/materialsystem/qmaterial_p.h index 9fb8d5de9..273e044e2 100644 --- a/src/render/materialsystem/qmaterial_p.h +++ b/src/render/materialsystem/qmaterial_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QParameter; class QEffect; -class QT3DRENDERSHARED_PRIVATE_EXPORT QMaterialPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QMaterialPrivate : public Qt3DCore::QComponentPrivate { public: QMaterialPrivate(); diff --git a/src/render/materialsystem/qparameter.h b/src/render/materialsystem/qparameter.h index 169543e24..8d56bcbe7 100644 --- a/src/render/materialsystem/qparameter.h +++ b/src/render/materialsystem/qparameter.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QParameterPrivate; class QAbstractTexture; -class QT3DRENDERSHARED_EXPORT QParameter : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QParameter : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) diff --git a/src/render/materialsystem/qparameter_p.h b/src/render/materialsystem/qparameter_p.h index a56a63af4..e8d74ac91 100644 --- a/src/render/materialsystem/qparameter_p.h +++ b/src/render/materialsystem/qparameter_p.h @@ -60,7 +60,7 @@ namespace Qt3DRender { class QParameter; -class QT3DRENDERSHARED_PRIVATE_EXPORT QParameterPrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QParameterPrivate : public Qt3DCore::QNodePrivate { public: QParameterPrivate(); diff --git a/src/render/materialsystem/qrenderpass.h b/src/render/materialsystem/qrenderpass.h index 14bd34b37..b82a0d973 100644 --- a/src/render/materialsystem/qrenderpass.h +++ b/src/render/materialsystem/qrenderpass.h @@ -59,7 +59,7 @@ typedef QVector<QParameter*> ParameterList; class QRenderPassPrivate; -class QT3DRENDERSHARED_EXPORT QRenderPass : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QRenderPass : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QShaderProgram *shaderProgram READ shaderProgram WRITE setShaderProgram NOTIFY shaderProgramChanged) diff --git a/src/render/materialsystem/qshaderdata.h b/src/render/materialsystem/qshaderdata.h index 5e57d11a4..eda009c6a 100644 --- a/src/render/materialsystem/qshaderdata.h +++ b/src/render/materialsystem/qshaderdata.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QShaderDataPrivate; -class QT3DRENDERSHARED_EXPORT PropertyReaderInterface +class Q_3DRENDERSHARED_EXPORT PropertyReaderInterface { public: virtual ~PropertyReaderInterface(); @@ -59,7 +59,7 @@ public: typedef QSharedPointer<PropertyReaderInterface> PropertyReaderInterfacePtr; -class QT3DRENDERSHARED_EXPORT QShaderData : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QShaderData : public Qt3DCore::QComponent { Q_OBJECT public: diff --git a/src/render/materialsystem/qshaderdata_p.h b/src/render/materialsystem/qshaderdata_p.h index 258c962ee..18890aec9 100644 --- a/src/render/materialsystem/qshaderdata_p.h +++ b/src/render/materialsystem/qshaderdata_p.h @@ -86,7 +86,7 @@ class QShaderDataPropertyReader: public PropertyReaderInterface } }; -class QT3DRENDERSHARED_PRIVATE_EXPORT QShaderDataPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QShaderDataPrivate : public Qt3DCore::QComponentPrivate { public: QShaderDataPrivate(); diff --git a/src/render/materialsystem/qshaderprogram.cpp b/src/render/materialsystem/qshaderprogram.cpp index 0ca8a9947..c4e14ea2c 100644 --- a/src/render/materialsystem/qshaderprogram.cpp +++ b/src/render/materialsystem/qshaderprogram.cpp @@ -635,7 +635,7 @@ QShaderProgram::Status QShaderProgram::status() const return d->m_status; } -static QByteArray deincludify(const QString &filePath) +QByteArray QShaderProgramPrivate::deincludify(const QString &filePath) { QFile f(filePath); if (!f.open(QIODevice::ReadOnly | QIODevice::Text)) { @@ -644,20 +644,27 @@ static QByteArray deincludify(const QString &filePath) } QByteArray contents = f.readAll(); + return deincludify(contents, filePath); +} + +QByteArray QShaderProgramPrivate::deincludify(const QByteArray &contents, const QString &filePath) +{ QByteArrayList lines = contents.split('\n'); const QByteArray includeDirective = QByteArrayLiteral("#pragma include"); for (int i = 0; i < lines.count(); ++i) { - if (lines[i].startsWith(includeDirective)) { - QString includeFileName = QFileInfo(filePath).absolutePath() - + QLatin1Char('/') - + QString::fromUtf8(lines[i].mid(includeDirective.count() + 1)); + const auto line = lines[i].simplified(); + if (line.startsWith(includeDirective)) { + const QString includePartialPath = QString::fromUtf8(line.mid(includeDirective.count() + 1)); + + QString includePath = QFileInfo(includePartialPath).isAbsolute() ? includePartialPath + : QFileInfo(filePath).absolutePath() + QLatin1Char('/') + includePartialPath; if (qEnvironmentVariableIsSet("QT3D_GLSL100_WORKAROUND")) { - QString candidate = includeFileName + QLatin1String("100"); + QString candidate = includePath + QLatin1String("100"); if (QFile::exists(candidate)) - includeFileName = candidate; + includePath = candidate; } lines.removeAt(i); - QByteArray includedContents = deincludify(includeFileName); + QByteArray includedContents = deincludify(includePath); lines.insert(i, includedContents); QString lineDirective = QString(QStringLiteral("#line %1")).arg(i + 2); lines.insert(i + 1, lineDirective.toUtf8()); @@ -678,7 +685,7 @@ static QByteArray deincludify(const QString &filePath) QByteArray QShaderProgram::loadSource(const QUrl &sourceUrl) { // TO DO: Handle remote path - return deincludify(Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(sourceUrl)); + return QShaderProgramPrivate::deincludify(Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(sourceUrl)); } Qt3DCore::QNodeCreatedChangeBasePtr QShaderProgram::createNodeCreationChange() const diff --git a/src/render/materialsystem/qshaderprogram.h b/src/render/materialsystem/qshaderprogram.h index efcfa792e..49c1076e5 100644 --- a/src/render/materialsystem/qshaderprogram.h +++ b/src/render/materialsystem/qshaderprogram.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QShaderProgramPrivate; -class QT3DRENDERSHARED_EXPORT QShaderProgram : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QShaderProgram : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(QByteArray vertexShaderCode READ vertexShaderCode WRITE setVertexShaderCode NOTIFY vertexShaderCodeChanged) diff --git a/src/render/materialsystem/qshaderprogram_p.h b/src/render/materialsystem/qshaderprogram_p.h index 92520c3c8..f09b2a30e 100644 --- a/src/render/materialsystem/qshaderprogram_p.h +++ b/src/render/materialsystem/qshaderprogram_p.h @@ -75,6 +75,9 @@ public: void setLog(const QString &log); void setStatus(QShaderProgram::Status status); + + static QByteArray deincludify(const QByteArray &contents, const QString &filePath); + static QByteArray deincludify(const QString &filePath); }; struct QShaderProgramData diff --git a/src/render/materialsystem/qshaderprogrambuilder.h b/src/render/materialsystem/qshaderprogrambuilder.h index 33966b708..184093730 100644 --- a/src/render/materialsystem/qshaderprogrambuilder.h +++ b/src/render/materialsystem/qshaderprogrambuilder.h @@ -52,7 +52,7 @@ namespace Qt3DRender { class QShaderProgram; class QShaderProgramBuilderPrivate; -class QT3DRENDERSHARED_EXPORT QShaderProgramBuilder : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QShaderProgramBuilder : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QShaderProgram* shaderProgram READ shaderProgram WRITE setShaderProgram NOTIFY shaderProgramChanged) diff --git a/src/render/materialsystem/qtechnique.h b/src/render/materialsystem/qtechnique.h index c0c0d0ade..7711cd67f 100644 --- a/src/render/materialsystem/qtechnique.h +++ b/src/render/materialsystem/qtechnique.h @@ -55,7 +55,7 @@ class QParameter; class QTechniquePrivate; class QGraphicsApiFilter; -class QT3DRENDERSHARED_EXPORT QTechnique : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QTechnique : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Qt3DRender::QGraphicsApiFilter *graphicsApiFilter READ graphicsApiFilter CONSTANT) diff --git a/src/render/materialsystem/shaderbuilder.cpp b/src/render/materialsystem/shaderbuilder.cpp index e0683332f..c1ec7f75a 100644 --- a/src/render/materialsystem/shaderbuilder.cpp +++ b/src/render/materialsystem/shaderbuilder.cpp @@ -41,6 +41,7 @@ #include <Qt3DRender/private/qshaderprogrambuilder_p.h> #include <Qt3DRender/qshaderprogram.h> +#include <Qt3DRender/private/qshaderprogram_p.h> #include <Qt3DRender/private/qurlhelper_p.h> #include <QtGui/private/qshaderformat_p.h> @@ -234,47 +235,6 @@ bool ShaderBuilder::isShaderCodeDirty(ShaderBuilder::ShaderType type) const return m_dirtyTypes.contains(type); } -static QByteArray deincludify(const QByteArray &contents, const QString &filePath); - -static QByteArray deincludify(const QString &filePath) -{ - QFile f(filePath); - if (!f.open(QIODevice::ReadOnly | QIODevice::Text)) { - qWarning() << "Could not read shader source file:" << f.fileName(); - return QByteArray(); - } - - QByteArray contents = f.readAll(); - return deincludify(contents, filePath); -} - -static QByteArray deincludify(const QByteArray &contents, const QString &filePath) -{ - QByteArrayList lines = contents.split('\n'); - const QByteArray includeDirective = QByteArrayLiteral("#pragma include"); - for (int i = 0; i < lines.count(); ++i) { - const auto line = lines[i].simplified(); - if (line.startsWith(includeDirective)) { - const QString includePartialPath = QString::fromUtf8(line.mid(includeDirective.count() + 1)); - - QString includePath = QFileInfo(includePartialPath).isAbsolute() ? includePartialPath - : QFileInfo(filePath).absolutePath() + QLatin1Char('/') + includePartialPath; - if (qEnvironmentVariableIsSet("QT3D_GLSL100_WORKAROUND")) { - QString candidate = includePath + QLatin1String("100"); - if (QFile::exists(candidate)) - includePath = candidate; - } - lines.removeAt(i); - QByteArray includedContents = deincludify(includePath); - lines.insert(i, includedContents); - QString lineDirective = QString(QStringLiteral("#line %1")).arg(i + 2); - lines.insert(i + 1, lineDirective.toUtf8()); - } - } - - return lines.join('\n'); -} - void ShaderBuilder::generateCode(ShaderBuilder::ShaderType type) { const auto graphPath = QUrlHelper::urlToLocalFileOrQrc(shaderGraph(type)); @@ -308,7 +268,7 @@ void ShaderBuilder::generateCode(ShaderBuilder::ShaderType type) generator.graph = graph; const auto code = generator.createShaderCode(m_enabledLayers); - m_codes.insert(type, deincludify(code, graphPath + QStringLiteral(".glsl"))); + m_codes.insert(type, QShaderProgramPrivate::deincludify(code, graphPath + QStringLiteral(".glsl"))); m_dirtyTypes.remove(type); // Send notification to the frontend diff --git a/src/render/materialsystem/shaderbuilder_p.h b/src/render/materialsystem/shaderbuilder_p.h index e9378e3c5..00c4e1c28 100644 --- a/src/render/materialsystem/shaderbuilder_p.h +++ b/src/render/materialsystem/shaderbuilder_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { namespace Render { -class QT3DRENDERSHARED_PRIVATE_EXPORT ShaderBuilder : public BackendNode +class Q_3DRENDERSHARED_PRIVATE_EXPORT ShaderBuilder : public BackendNode { public: enum ShaderType { diff --git a/src/render/materialsystem/shadercache_p.h b/src/render/materialsystem/shadercache_p.h index bda629ee5..40b88b53e 100644 --- a/src/render/materialsystem/shadercache_p.h +++ b/src/render/materialsystem/shadercache_p.h @@ -66,7 +66,7 @@ namespace Render { class tst_ShaderCache; #endif -class QT3DRENDERSHARED_PRIVATE_EXPORT ShaderCache +class Q_3DRENDERSHARED_PRIVATE_EXPORT ShaderCache { public: ~ShaderCache(); diff --git a/src/render/materialsystem/technique_p.h b/src/render/materialsystem/technique_p.h index 0ca9d3ae9..d885c1b87 100644 --- a/src/render/materialsystem/technique_p.h +++ b/src/render/materialsystem/technique_p.h @@ -73,7 +73,7 @@ namespace Render { class TechniqueManager; -class QT3DRENDERSHARED_PRIVATE_EXPORT Technique : public BackendNode +class Q_3DRENDERSHARED_PRIVATE_EXPORT Technique : public BackendNode { public: Technique(); diff --git a/src/render/picking/qabstractraycaster.h b/src/render/picking/qabstractraycaster.h index c706a7bd2..592511786 100644 --- a/src/render/picking/qabstractraycaster.h +++ b/src/render/picking/qabstractraycaster.h @@ -53,7 +53,7 @@ namespace Qt3DRender { class QAbstractRayCasterPrivate; class QLayer; -class QT3DRENDERSHARED_EXPORT QAbstractRayCaster : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QAbstractRayCaster : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(RunMode runMode READ runMode WRITE setRunMode NOTIFY runModeChanged) diff --git a/src/render/picking/qabstractraycaster_p.h b/src/render/picking/qabstractraycaster_p.h index 2c4006e70..2dcddbd6a 100644 --- a/src/render/picking/qabstractraycaster_p.h +++ b/src/render/picking/qabstractraycaster_p.h @@ -64,7 +64,7 @@ class QLayer; /*! \internal */ -class QT3DRENDERSHARED_PRIVATE_EXPORT QAbstractRayCasterPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QAbstractRayCasterPrivate : public Qt3DCore::QComponentPrivate { public: QAbstractRayCasterPrivate(); diff --git a/src/render/picking/qobjectpicker.h b/src/render/picking/qobjectpicker.h index 616f23873..8866c99a9 100644 --- a/src/render/picking/qobjectpicker.h +++ b/src/render/picking/qobjectpicker.h @@ -51,7 +51,7 @@ class QAttribute; class QObjectPickerPrivate; class QPickEvent; -class QT3DRENDERSHARED_EXPORT QObjectPicker : public Qt3DCore::QComponent +class Q_3DRENDERSHARED_EXPORT QObjectPicker : public Qt3DCore::QComponent { Q_OBJECT Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged) diff --git a/src/render/picking/qobjectpicker_p.h b/src/render/picking/qobjectpicker_p.h index 1cb99af21..fb83912b0 100644 --- a/src/render/picking/qobjectpicker_p.h +++ b/src/render/picking/qobjectpicker_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { /*! \internal */ -class QT3DRENDERSHARED_PRIVATE_EXPORT QObjectPickerPrivate : public Qt3DCore::QComponentPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QObjectPickerPrivate : public Qt3DCore::QComponentPrivate { public: QObjectPickerPrivate() diff --git a/src/render/picking/qpickevent.h b/src/render/picking/qpickevent.h index 9cce74434..21d072ffe 100644 --- a/src/render/picking/qpickevent.h +++ b/src/render/picking/qpickevent.h @@ -59,7 +59,7 @@ class QPickEventPrivate; class QPickEvent; typedef QSharedPointer<QPickEvent> QPickEventPtr; -class QT3DRENDERSHARED_EXPORT QPickEvent : public QObject +class Q_3DRENDERSHARED_EXPORT QPickEvent : public QObject { Q_OBJECT Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted NOTIFY acceptedChanged) diff --git a/src/render/picking/qpickevent_p.h b/src/render/picking/qpickevent_p.h index 26aa9d95e..4d2f1e2d4 100644 --- a/src/render/picking/qpickevent_p.h +++ b/src/render/picking/qpickevent_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QPickEvent; class QViewport; -class QT3DRENDERSHARED_PRIVATE_EXPORT QPickEventPrivate : public QObjectPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPickEventPrivate : public QObjectPrivate { public: QPickEventPrivate() diff --git a/src/render/picking/qpicklineevent.h b/src/render/picking/qpicklineevent.h index 09697ad22..5941d38d4 100644 --- a/src/render/picking/qpicklineevent.h +++ b/src/render/picking/qpicklineevent.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { class QPickLineEventPrivate; -class QT3DRENDERSHARED_EXPORT QPickLineEvent : public QPickEvent +class Q_3DRENDERSHARED_EXPORT QPickLineEvent : public QPickEvent { Q_OBJECT Q_PROPERTY(uint edgeIndex READ edgeIndex CONSTANT) diff --git a/src/render/picking/qpickpointevent.h b/src/render/picking/qpickpointevent.h index f298f64b9..78ab23d9e 100644 --- a/src/render/picking/qpickpointevent.h +++ b/src/render/picking/qpickpointevent.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { class QPickPointEventPrivate; -class QT3DRENDERSHARED_EXPORT QPickPointEvent : public QPickEvent +class Q_3DRENDERSHARED_EXPORT QPickPointEvent : public QPickEvent { Q_OBJECT Q_PROPERTY(uint pointIndex READ pointIndex CONSTANT) diff --git a/src/render/picking/qpicktriangleevent.h b/src/render/picking/qpicktriangleevent.h index f116af288..48a1da762 100644 --- a/src/render/picking/qpicktriangleevent.h +++ b/src/render/picking/qpicktriangleevent.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { class QPickTriangleEventPrivate; -class QT3DRENDERSHARED_EXPORT QPickTriangleEvent : public QPickEvent +class Q_3DRENDERSHARED_EXPORT QPickTriangleEvent : public QPickEvent { Q_OBJECT Q_PROPERTY(uint triangleIndex READ triangleIndex CONSTANT) diff --git a/src/render/picking/qraycaster.h b/src/render/picking/qraycaster.h index 088c46607..b565c2c25 100644 --- a/src/render/picking/qraycaster.h +++ b/src/render/picking/qraycaster.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QRayCaster : public QAbstractRayCaster +class Q_3DRENDERSHARED_EXPORT QRayCaster : public QAbstractRayCaster { Q_OBJECT Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged) diff --git a/src/render/picking/qraycasterhit.h b/src/render/picking/qraycasterhit.h index 4764994df..9f62889fd 100644 --- a/src/render/picking/qraycasterhit.h +++ b/src/render/picking/qraycasterhit.h @@ -53,7 +53,7 @@ namespace Qt3DRender { class QRayCasterHitData; class QAbstractRayCasterPrivate; -class QT3DRENDERSHARED_EXPORT QRayCasterHit +class Q_3DRENDERSHARED_EXPORT QRayCasterHit { Q_GADGET public: diff --git a/src/render/picking/qscreenraycaster.h b/src/render/picking/qscreenraycaster.h index 09ad94374..216ed47f5 100644 --- a/src/render/picking/qscreenraycaster.h +++ b/src/render/picking/qscreenraycaster.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QScreenRayCaster : public QAbstractRayCaster +class Q_3DRENDERSHARED_EXPORT QScreenRayCaster : public QAbstractRayCaster { Q_OBJECT diff --git a/src/render/qt3drender_global.h b/src/render/qt3drender_global.h index 68e1cb639..0bd34ac8b 100644 --- a/src/render/qt3drender_global.h +++ b/src/render/qt3drender_global.h @@ -46,12 +46,12 @@ QT_BEGIN_NAMESPACE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_3DRENDER_LIB) -# define QT3DRENDERSHARED_EXPORT Q_DECL_EXPORT +# define Q_3DRENDERSHARED_EXPORT Q_DECL_EXPORT # else -# define QT3DRENDERSHARED_EXPORT Q_DECL_IMPORT +# define Q_3DRENDERSHARED_EXPORT Q_DECL_IMPORT # endif #else -# define QT3DRENDERSHARED_EXPORT +# define Q_3DRENDERSHARED_EXPORT #endif QT_END_NAMESPACE diff --git a/src/render/qt3drender_global_p.h b/src/render/qt3drender_global_p.h index bdc35fd86..5caa8d895 100644 --- a/src/render/qt3drender_global_p.h +++ b/src/render/qt3drender_global_p.h @@ -54,6 +54,6 @@ #include "qt3drender_global.h" #include <Qt3DRender/private/qt3drender-config_p.h> -#define QT3DRENDERSHARED_PRIVATE_EXPORT QT3DRENDERSHARED_EXPORT +#define Q_3DRENDERSHARED_PRIVATE_EXPORT Q_3DRENDERSHARED_EXPORT #endif // QT3DRENDER_GLOBAL_P_H diff --git a/src/render/raycasting/boundingsphere_p.h b/src/render/raycasting/boundingsphere_p.h index bcffbaa19..fb76a8496 100644 --- a/src/render/raycasting/boundingsphere_p.h +++ b/src/render/raycasting/boundingsphere_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { namespace RayCasting { -class QT3DRENDERSHARED_EXPORT BoundingSphere : public QBoundingVolume +class Q_3DRENDERSHARED_EXPORT BoundingSphere : public QBoundingVolume { public: BoundingSphere(); diff --git a/src/render/raycasting/qabstractcollisionqueryservice_p.h b/src/render/raycasting/qabstractcollisionqueryservice_p.h index fa35792d0..40137d239 100644 --- a/src/render/raycasting/qabstractcollisionqueryservice_p.h +++ b/src/render/raycasting/qabstractcollisionqueryservice_p.h @@ -77,7 +77,7 @@ public: {} }; -class QT3DRENDERSHARED_EXPORT QAbstractCollisionQueryService : public Qt3DCore::QAbstractServiceProvider +class Q_3DRENDERSHARED_EXPORT QAbstractCollisionQueryService : public Qt3DCore::QAbstractServiceProvider { Q_OBJECT public: diff --git a/src/render/raycasting/qboundingvolume_p.h b/src/render/raycasting/qboundingvolume_p.h index b63463f23..796085b25 100644 --- a/src/render/raycasting/qboundingvolume_p.h +++ b/src/render/raycasting/qboundingvolume_p.h @@ -61,7 +61,7 @@ namespace RayCasting { class QRay3D; -class QT3DRENDERSHARED_EXPORT QBoundingVolume +class Q_3DRENDERSHARED_EXPORT QBoundingVolume { public: QBoundingVolume(); diff --git a/src/render/raycasting/qboundingvolumeprovider_p.h b/src/render/raycasting/qboundingvolumeprovider_p.h index ae9fd65e3..42b95dd30 100644 --- a/src/render/raycasting/qboundingvolumeprovider_p.h +++ b/src/render/raycasting/qboundingvolumeprovider_p.h @@ -60,7 +60,7 @@ namespace RayCasting { class QBoundingVolume; -class QT3DRENDERSHARED_EXPORT QBoundingVolumeProvider +class Q_3DRENDERSHARED_EXPORT QBoundingVolumeProvider { public: virtual ~QBoundingVolumeProvider(); diff --git a/src/render/raycasting/qcollisionqueryresult_p.h b/src/render/raycasting/qcollisionqueryresult_p.h index 24371d30e..67f6a34d0 100644 --- a/src/render/raycasting/qcollisionqueryresult_p.h +++ b/src/render/raycasting/qcollisionqueryresult_p.h @@ -65,7 +65,7 @@ namespace RayCasting { typedef int QQueryHandle; class QCollisionQueryResultPrivate; -class QT3DRENDERSHARED_EXPORT QCollisionQueryResult +class Q_3DRENDERSHARED_EXPORT QCollisionQueryResult { public: struct Hit { diff --git a/src/render/raycasting/qray3d_p.h b/src/render/raycasting/qray3d_p.h index 8b7852cc3..7d1ac874e 100644 --- a/src/render/raycasting/qray3d_p.h +++ b/src/render/raycasting/qray3d_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { namespace RayCasting { -class QT3DRENDERSHARED_EXPORT QRay3D +class Q_3DRENDERSHARED_EXPORT QRay3D { public: QRay3D(); @@ -104,12 +104,12 @@ QT3D_DECLARE_TYPEINFO_2(Qt3DRender, RayCasting, QRay3D, Q_MOVABLE_TYPE) #ifndef QT_NO_DEBUG_STREAM -QT3DRENDERSHARED_EXPORT QDebug operator<<(QDebug dbg, const QRay3D &ray); +Q_3DRENDERSHARED_EXPORT QDebug operator<<(QDebug dbg, const QRay3D &ray); #endif #ifndef QT_NO_DATASTREAM -QT3DRENDERSHARED_EXPORT QDataStream &operator<<(QDataStream &stream, const QRay3D &ray); -QT3DRENDERSHARED_EXPORT QDataStream &operator>>(QDataStream &stream, QRay3D &ray); +Q_3DRENDERSHARED_EXPORT QDataStream &operator<<(QDataStream &stream, const QRay3D &ray); +Q_3DRENDERSHARED_EXPORT QDataStream &operator>>(QDataStream &stream, QRay3D &ray); #endif } // namespace RayCasting diff --git a/src/render/raycasting/qraycastingservice_p.h b/src/render/raycasting/qraycastingservice_p.h index b77c8af9f..792ba2626 100644 --- a/src/render/raycasting/qraycastingservice_p.h +++ b/src/render/raycasting/qraycastingservice_p.h @@ -69,7 +69,7 @@ class QRayCastingServicePrivate; typedef QFuture<QCollisionQueryResult> FutureQueryResult; -class QT3DRENDERSHARED_EXPORT QRayCastingService : public QAbstractCollisionQueryService +class Q_3DRENDERSHARED_EXPORT QRayCastingService : public QAbstractCollisionQueryService { public: QRayCastingService(); diff --git a/src/render/renderers/opengl/graphicshelpers/graphicscontext.cpp b/src/render/renderers/opengl/graphicshelpers/graphicscontext.cpp index 01a1b107a..9bbb5fc5e 100644 --- a/src/render/renderers/opengl/graphicshelpers/graphicscontext.cpp +++ b/src/render/renderers/opengl/graphicshelpers/graphicscontext.cpp @@ -130,6 +130,7 @@ GraphicsContext::GraphicsContext() , m_glHelper(nullptr) , m_shaderCache(nullptr) , m_debugLogger(nullptr) + , m_currentVAO(nullptr) { } @@ -199,15 +200,20 @@ bool GraphicsContext::makeCurrent(QSurface *surface) return false; } + initializeHelpers(surface); + + return true; +} + +void GraphicsContext::initializeHelpers(QSurface *surface) +{ // Set the correct GL Helper depending on the surface // If no helper exists, create one - m_glHelper = m_glHelpers.value(surface); if (!m_glHelper) { m_glHelper = resolveHighestOpenGLFunctions(); m_glHelpers.insert(surface, m_glHelper); } - return true; } void GraphicsContext::doneCurrent() diff --git a/src/render/renderers/opengl/graphicshelpers/graphicscontext_p.h b/src/render/renderers/opengl/graphicshelpers/graphicscontext_p.h index 548a6d9f4..9a9f1416b 100644 --- a/src/render/renderers/opengl/graphicshelpers/graphicscontext_p.h +++ b/src/render/renderers/opengl/graphicshelpers/graphicscontext_p.h @@ -179,6 +179,7 @@ public: bool supportsVAO() const { return m_supportsVAO; } void initialize(); + void initializeHelpers(QSurface *surface); GraphicsHelperInterface *resolveHighestOpenGLFunctions(); bool m_initialized; diff --git a/src/render/renderers/opengl/graphicshelpers/graphicshelpers.pri b/src/render/renderers/opengl/graphicshelpers/graphicshelpers.pri index 5c9479d2b..ad08038c9 100644 --- a/src/render/renderers/opengl/graphicshelpers/graphicshelpers.pri +++ b/src/render/renderers/opengl/graphicshelpers/graphicshelpers.pri @@ -3,6 +3,7 @@ INCLUDEPATH += $$PWD HEADERS += \ + $$PWD/glfence_p.h \ $$PWD/graphicscontext_p.h \ $$PWD/graphicshelperinterface_p.h \ $$PWD/graphicshelperes2_p.h \ @@ -14,7 +15,7 @@ HEADERS += \ $$PWD/graphicshelpergl4_p.h \ $$PWD/graphicshelpergl3_2_p.h \ $$PWD/submissioncontext_p.h \ - $$PWD/glfence_p.h + $$PWD/texturesubmissioncontext_p.h SOURCES += \ $$PWD/graphicscontext.cpp \ @@ -26,4 +27,5 @@ SOURCES += \ $$PWD/graphicshelpergl3_3.cpp \ $$PWD/graphicshelpergl4.cpp \ $$PWD/graphicshelpergl3_2.cpp \ - $$PWD/submissioncontext.cpp + $$PWD/submissioncontext.cpp \ + $$PWD/texturesubmissioncontext.cpp diff --git a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp index a39b900e0..d3bc46c12 100644 --- a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -49,6 +49,7 @@ #include <Qt3DRender/private/buffer_p.h> #include <Qt3DRender/private/attribute_p.h> #include <Qt3DRender/private/rendercommand_p.h> +#include <Qt3DRender/private/renderstates_p.h> #include <Qt3DRender/private/renderstateset_p.h> #include <Qt3DRender/private/rendertarget_p.h> #include <Qt3DRender/private/graphicshelperinterface_p.h> @@ -96,40 +97,18 @@ namespace Qt3DRender { namespace Render { -class TextureExtRendererLocker +static QHash<unsigned int, SubmissionContext*> static_contexts; + +unsigned int nextFreeContextId() { -public: - static void lock(GLTexture *tex) - { - if (!tex->isExternalRenderingEnabled()) - return; - if (s_lockHash.keys().contains(tex)) { - ++s_lockHash[tex]; - } else { - tex->externalRenderingLock()->lock(); - s_lockHash[tex] = 1; - } - } - static void unlock(GLTexture *tex) - { - if (!tex->isExternalRenderingEnabled()) - return; - if (!s_lockHash.keys().contains(tex)) - return; - - --s_lockHash[tex]; - if (s_lockHash[tex] == 0) { - s_lockHash.remove(tex); - tex->externalRenderingLock()->unlock(); - } + for (unsigned int i=0; i < 0xffff; ++i) { + if (!static_contexts.contains(i)) + return i; } -private: - static QHash<GLTexture*, int> s_lockHash; -}; - -QHash<GLTexture*, int> TextureExtRendererLocker::s_lockHash = QHash<GLTexture*, int>(); -static QHash<unsigned int, SubmissionContext*> static_contexts; + qFatal("Couldn't find free context ID"); + return 0; +} namespace { @@ -376,16 +355,6 @@ void applyStateHelper<LineWidth>(const LineWidth *state, SubmissionContext *gc) } // anonymous -unsigned int nextFreeContextId() -{ - for (unsigned int i=0; i < 0xffff; ++i) { - if (!static_contexts.contains(i)) - return i; - } - - qFatal("Couldn't find free context ID"); - return 0; -} SubmissionContext::SubmissionContext() : GraphicsContext() @@ -404,7 +373,6 @@ SubmissionContext::SubmissionContext() , m_stateSet(nullptr) , m_renderer(nullptr) , m_uboTempArray(QByteArray(1024, 0)) - , m_currentVAO(nullptr) { static_contexts[m_id] = this; } @@ -420,7 +388,7 @@ SubmissionContext::~SubmissionContext() void SubmissionContext::initialize() { GraphicsContext::initialize(); - m_activeTextures.resize(maxTextureUnitsCount()); + m_textureContext.initialize(this); } void SubmissionContext::resolveRenderTargetFormat() @@ -472,10 +440,6 @@ bool SubmissionContext::beginDrawing(QSurface *surface) // TODO: cache surface format somewhere rather than doing this every time render surface changes resolveRenderTargetFormat(); - // Sets or Create the correct m_glHelper - // for the current surface - activateGLHelper(); - #if defined(QT3D_RENDER_ASPECT_OPENGL_DEBUG) GLint err = m_gl->functions()->glGetError(); if (err != 0) { @@ -485,22 +449,18 @@ bool SubmissionContext::beginDrawing(QSurface *surface) if (!isInitialized()) initialize(); + initializeHelpers(m_surface); // need to reset these values every frame, may get overwritten elsewhere m_gl->functions()->glClearColor(m_currClearColorValue.redF(), m_currClearColorValue.greenF(), m_currClearColorValue.blueF(), m_currClearColorValue.alphaF()); m_gl->functions()->glClearDepthf(m_currClearDepthValue); m_gl->functions()->glClearStencil(m_currClearStencilValue); - if (m_activeShader) { m_activeShader = nullptr; m_activeShaderDNA = 0; } - // reset active textures - for (int u = 0; u < m_activeTextures.size(); ++u) - m_activeTextures[u].texture = nullptr; - m_boundArrayBuffer = nullptr; static int callCount = 0; @@ -518,10 +478,7 @@ void SubmissionContext::endDrawing(bool swapBuffers) m_gl->swapBuffers(m_surface); if (m_ownCurrent) m_gl->doneCurrent(); - decayTextureScores(); - for (int i = 0; i < m_activeTextures.size(); ++i) - if (m_activeTextures[i].texture) - TextureExtRendererLocker::unlock(m_activeTextures[i].texture); + m_textureContext.endDrawing(); } void SubmissionContext::activateRenderTarget(Qt3DCore::QNodeId renderTargetNodeId, const AttachmentPack &attachments, GLuint defaultFboId) @@ -825,20 +782,6 @@ void SubmissionContext::setOpenGLContext(QOpenGLContext* ctx) m_gl = ctx; } -void SubmissionContext::activateGLHelper() -{ - // Sets the correct GL Helper depending on the surface - // If no helper exists, create one - m_glHelper = m_glHelpers.value(m_surface); - if (!m_glHelper) { - m_glHelper = resolveHighestOpenGLFunctions(); - m_glHelpers.insert(m_surface, m_glHelper); - // Note: OpenGLContext is current at this point - m_gl->functions()->glDisable(GL_DITHER); - } -} - - // Called only from RenderThread bool SubmissionContext::activateShader(ProgramDNA shaderDNA) { @@ -920,126 +863,10 @@ void SubmissionContext::setActiveMaterial(Material *rmat) if (m_material == rmat) return; - deactivateTexturesWithScope(TextureScopeMaterial); + m_textureContext.deactivateTexturesWithScope(TextureSubmissionContext::TextureScopeMaterial); m_material = rmat; } -int SubmissionContext::activateTexture(TextureScope scope, GLTexture *tex, int onUnit) -{ - // Returns the texture unit to use for the texture - // This always return a valid unit, unless there are more textures than - // texture unit available for the current material - onUnit = assignUnitForTexture(tex); - - // check we didn't overflow the available units - if (onUnit == -1) - return -1; - - // actually re-bind if required, the tex->dna on the unit not being the same - // Note: tex->dna() could be 0 if the texture has not been created yet - if (m_activeTextures[onUnit].texture != tex) { - // Texture must have been created and updated at this point - - const int sharedTextureId = tex->sharedTextureId(); - - // We have a valid texture id provided by a shared context - if (sharedTextureId > 0) { - m_gl->functions()->glActiveTexture(GL_TEXTURE0 + onUnit); - const QAbstractTexture::Target target = tex->properties().target; - // For now we know that target values correspond to the GL values - m_gl->functions()->glBindTexture(target, tex->sharedTextureId()); - } else { - QOpenGLTexture *glTex = tex->getGLTexture(); - if (glTex == nullptr) - return -1; - glTex->bind(onUnit); - } - - if (m_activeTextures[onUnit].texture) - TextureExtRendererLocker::unlock(m_activeTextures[onUnit].texture); - m_activeTextures[onUnit].texture = tex; - TextureExtRendererLocker::lock(tex); - } - -#if defined(QT3D_RENDER_ASPECT_OPENGL_DEBUG) - int err = m_gl->functions()->glGetError(); - if (err) - qCWarning(Backend) << "GL error after activating texture" << QString::number(err, 16) - << tex->getGLTexture()->textureId() << "on unit" << onUnit; -#endif - - m_activeTextures[onUnit].score = 200; - m_activeTextures[onUnit].pinned = true; - m_activeTextures[onUnit].scope = scope; - - return onUnit; -} - -void SubmissionContext::deactivateTexturesWithScope(TextureScope ts) -{ - for (int u=0; u<m_activeTextures.size(); ++u) { - if (!m_activeTextures[u].pinned) - continue; // inactive, ignore - - if (m_activeTextures[u].scope == ts) { - m_activeTextures[u].pinned = false; - m_activeTextures[u].score = qMax(m_activeTextures[u].score, 1) - 1; - } - } // of units iteration -} - -void SubmissionContext::deactivateTexture(GLTexture* tex) -{ - for (int u=0; u<m_activeTextures.size(); ++u) { - if (m_activeTextures[u].texture == tex) { - Q_ASSERT(m_activeTextures[u].pinned); - m_activeTextures[u].pinned = false; - return; - } - } // of units iteration - - qCWarning(Backend) << Q_FUNC_INFO << "texture not active:" << tex; -} - -/*! - \internal - Returns a texture unit for a texture, -1 if all texture units are assigned. - Tries to use the texture unit with the texture that hasn't been used for the longest time - if the texture happens not to be already pinned on a texture unit. - */ -GLint SubmissionContext::assignUnitForTexture(GLTexture *tex) -{ - int lowestScoredUnit = -1; - int lowestScore = 0xfffffff; - - for (int u=0; u<m_activeTextures.size(); ++u) { - if (m_activeTextures[u].texture == tex) - return u; - - // No texture is currently active on the texture unit - // we save the texture unit with the texture that has been on there - // the longest time while not being used - if (!m_activeTextures[u].pinned) { - int score = m_activeTextures[u].score; - if (score < lowestScore) { - lowestScore = score; - lowestScoredUnit = u; - } - } - } // of units iteration - - if (lowestScoredUnit == -1) - qCWarning(Backend) << Q_FUNC_INFO << "No free texture units!"; - - return lowestScoredUnit; -} - -void SubmissionContext::decayTextureScores() -{ - for (int u = 0; u < m_activeTextures.size(); u++) - m_activeTextures[u].score = qMax(m_activeTextures[u].score - 1, 0); -} - void SubmissionContext::setCurrentStateSet(RenderStateSet *ss) { if (ss == m_stateSet) @@ -1329,7 +1156,7 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) // to pinable so that we should easily find an available texture unit NodeManagers *manager = m_renderer->nodeManagers(); - deactivateTexturesWithScope(TextureScopeMaterial); + m_textureContext.deactivateTexturesWithScope(TextureSubmissionContext::TextureScopeMaterial); // Update the uniforms with the correct texture unit id's PackUniformHash &uniformValues = parameterPack.uniforms(); @@ -1341,7 +1168,7 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) if (t != nullptr) { UniformValue &texUniform = uniformValues[namedTex.glslNameId]; if (texUniform.valueType() == UniformValue::TextureValue) { - const int texUnit = activateTexture(TextureScopeMaterial, t); + const int texUnit = m_textureContext.activateTexture(TextureSubmissionContext::TextureScopeMaterial, m_gl, t); texUniform.data<int>()[namedTex.uniformArrayIndex] = texUnit; if (texUnit == -1) { if (namedTex.glslNameId != irradianceId && diff --git a/src/render/renderers/opengl/graphicshelpers/submissioncontext_p.h b/src/render/renderers/opengl/graphicshelpers/submissioncontext_p.h index dbfaef148..844e62f15 100644 --- a/src/render/renderers/opengl/graphicshelpers/submissioncontext_p.h +++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext_p.h @@ -54,6 +54,7 @@ #include <Qt3DRender/private/graphicscontext_p.h> +#include <Qt3DRender/private/texturesubmissioncontext_p.h> #include <Qt3DRender/qclearbuffers.h> #include <Qt3DRender/private/glbuffer_p.h> #include <Qt3DRender/qattribute.h> @@ -82,13 +83,6 @@ class Buffer; class ShaderManager; struct StateVariant; -enum TextureScope -{ - TextureScopeMaterial = 0, - TextureScopeTechnique - // per-pass for deferred rendering? -}; - typedef QPair<QString, int> NamedUniformLocation; class Q_AUTOTEST_EXPORT SubmissionContext : public GraphicsContext @@ -102,7 +96,6 @@ public: bool beginDrawing(QSurface *surface); void endDrawing(bool swapBuffers); - void activateGLHelper(); void releaseOpenGL(); void setOpenGLContext(QOpenGLContext* ctx); @@ -126,11 +119,6 @@ public: QRenderTargetOutput::AttachmentPoint outputAttachmentPoint, QBlitFramebuffer::InterpolationMethod interpolationMethod); - - // Material - Material* activeMaterial() const { return m_material; } - void setActiveMaterial(Material* rmat); - // Attributes void specifyAttribute(const Attribute *attribute, Buffer *buffer, @@ -147,10 +135,6 @@ public: // Parameters bool setParameters(ShaderParameterPack ¶meterPack); - // Textures - int activateTexture(TextureScope scope, GLTexture* tex, int onUnit = -1); - void deactivateTexture(GLTexture *tex); - // RenderState void setCurrentStateSet(RenderStateSet* ss); RenderStateSet *currentStateSet() const; @@ -175,10 +159,9 @@ public: private: void initialize(); - // Textures - void decayTextureScores(); - GLint assignUnitForTexture(GLTexture* tex); - void deactivateTexturesWithScope(TextureScope ts); + // Material + Material* activeMaterial() const { return m_material; } + void setActiveMaterial(Material* rmat); // FBO void bindFrameBufferAttachmentHelper(GLuint fboId, const AttachmentPack &attachments); @@ -187,7 +170,6 @@ private: GLuint createRenderTarget(Qt3DCore::QNodeId renderTargetNodeId, const AttachmentPack &attachments); GLuint updateRenderTarget(Qt3DCore::QNodeId renderTargetNodeId, const AttachmentPack &attachments, bool isActiveRenderTarget); - // Buffers HGLBuffer createGLBufferFor(Buffer *buffer, GLBuffer::Type type); void uploadDataToGLBuffer(Buffer *buffer, GLBuffer *b, bool releaseBuffer = false); @@ -207,17 +189,6 @@ private: QHash<GLuint, QSize> m_renderTargetsSize; QAbstractTexture::TextureFormat m_renderTargetFormat; - QHash<QSurface *, GraphicsHelperInterface*> m_glHelpers; - - // active textures, indexed by texture unit - struct ActiveTexture { - GLTexture *texture = nullptr; - int score = 0; - TextureScope scope = TextureScopeMaterial; - bool pinned = false; - }; - QVector<ActiveTexture> m_activeTextures; - // cache some current state, to make sure we don't issue unnecessary GL calls int m_currClearStencilValue; float m_currClearDepthValue; @@ -232,10 +203,10 @@ private: Renderer *m_renderer; QByteArray m_uboTempArray; + TextureSubmissionContext m_textureContext; // Attributes friend class OpenGLVertexArrayObject; - OpenGLVertexArrayObject *m_currentVAO; struct VAOVertexAttribute { diff --git a/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp b/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp new file mode 100644 index 000000000..67d0f9976 --- /dev/null +++ b/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp @@ -0,0 +1,225 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 "texturesubmissioncontext_p.h" + +#include <Qt3DRender/private/graphicscontext_p.h> +#include <Qt3DRender/private/gltexture_p.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { +namespace Render { + +class TextureExtRendererLocker +{ +public: + static void lock(GLTexture *tex) + { + if (!tex->isExternalRenderingEnabled()) + return; + if (s_lockHash.keys().contains(tex)) { + ++s_lockHash[tex]; + } else { + tex->externalRenderingLock()->lock(); + s_lockHash[tex] = 1; + } + } + static void unlock(GLTexture *tex) + { + if (!tex->isExternalRenderingEnabled()) + return; + if (!s_lockHash.keys().contains(tex)) + return; + + --s_lockHash[tex]; + if (s_lockHash[tex] == 0) { + s_lockHash.remove(tex); + tex->externalRenderingLock()->unlock(); + } + } +private: + static QHash<GLTexture*, int> s_lockHash; +}; + +QHash<GLTexture*, int> TextureExtRendererLocker::s_lockHash = QHash<GLTexture*, int>(); + + +TextureSubmissionContext::TextureSubmissionContext() +{ + +} + +TextureSubmissionContext::~TextureSubmissionContext() +{ + +} + +void TextureSubmissionContext::initialize(GraphicsContext *context) +{ + m_activeTextures.resize(context->maxTextureUnitsCount()); +} + +void TextureSubmissionContext::endDrawing() +{ + decayTextureScores(); + for (int i = 0; i < m_activeTextures.size(); ++i) + if (m_activeTextures[i].texture) + TextureExtRendererLocker::unlock(m_activeTextures[i].texture); +} + +int TextureSubmissionContext::activateTexture(TextureSubmissionContext::TextureScope scope, + QOpenGLContext *m_gl, + GLTexture *tex) +{ + // Returns the texture unit to use for the texture + // This always return a valid unit, unless there are more textures than + // texture unit available for the current material + const int onUnit = assignUnitForTexture(tex); + + // check we didn't overflow the available units + if (onUnit == -1) + return -1; + + const int sharedTextureId = tex->sharedTextureId(); + // We have a valid texture id provided by a shared context + if (sharedTextureId > 0) { + m_gl->functions()->glActiveTexture(GL_TEXTURE0 + onUnit); + const QAbstractTexture::Target target = tex->properties().target; + // For now we know that target values correspond to the GL values + m_gl->functions()->glBindTexture(target, tex->sharedTextureId()); + } else { + // Texture must have been created and updated at this point + QOpenGLTexture *glTex = tex->getGLTexture(); + if (glTex == nullptr) + return -1; + glTex->bind(uint(onUnit)); + } + if (m_activeTextures[onUnit].texture != tex) { + if (m_activeTextures[onUnit].texture) + TextureExtRendererLocker::unlock(m_activeTextures[onUnit].texture); + m_activeTextures[onUnit].texture = tex; + TextureExtRendererLocker::lock(tex); + } + +#if defined(QT3D_RENDER_ASPECT_OPENGL_DEBUG) + int err = m_gl->functions()->glGetError(); + if (err) + qCWarning(Backend) << "GL error after activating texture" << QString::number(err, 16) + << tex->getGLTexture()->textureId() << "on unit" << onUnit; +#endif + + m_activeTextures[onUnit].score = 200; + m_activeTextures[onUnit].pinned = true; + m_activeTextures[onUnit].scope = scope; + + return onUnit; +} + +void TextureSubmissionContext::deactivateTexturesWithScope(TextureSubmissionContext::TextureScope ts) +{ + for (int u=0; u<m_activeTextures.size(); ++u) { + if (!m_activeTextures[u].pinned) + continue; // inactive, ignore + + if (m_activeTextures[u].scope == ts) { + m_activeTextures[u].pinned = false; + m_activeTextures[u].score = qMax(m_activeTextures[u].score, 1) - 1; + } + } // of units iteration +} + +void TextureSubmissionContext::deactivateTexture(GLTexture* tex) +{ + for (int u=0; u<m_activeTextures.size(); ++u) { + if (m_activeTextures[u].texture == tex) { + Q_ASSERT(m_activeTextures[u].pinned); + m_activeTextures[u].pinned = false; + return; + } + } // of units iteration + + qCWarning(Backend) << Q_FUNC_INFO << "texture not active:" << tex; +} + +/*! + \internal + Returns a texture unit for a texture, -1 if all texture units are assigned. + Tries to use the texture unit with the texture that hasn't been used for the longest time + if the texture happens not to be already pinned on a texture unit. + */ +int TextureSubmissionContext::assignUnitForTexture(GLTexture *tex) +{ + int lowestScoredUnit = -1; + int lowestScore = 0xfffffff; + + for (int u=0; u<m_activeTextures.size(); ++u) { + if (m_activeTextures[u].texture == tex) + return u; + } + + for (int u=0; u<m_activeTextures.size(); ++u) { + // No texture is currently active on the texture unit + // we save the texture unit with the texture that has been on there + // the longest time while not being used + if (!m_activeTextures[u].pinned) { + int score = m_activeTextures[u].score; + if (score < lowestScore) { + lowestScore = score; + lowestScoredUnit = u; + } + } + } // of units iteration + + if (lowestScoredUnit == -1) + qCWarning(Backend) << Q_FUNC_INFO << "No free texture units!"; + + return lowestScoredUnit; +} + +void TextureSubmissionContext::decayTextureScores() +{ + for (int u = 0; u < m_activeTextures.size(); u++) + m_activeTextures[u].score = qMax(m_activeTextures[u].score - 1, 0); +} + +} // namespace Render +} // namespace Qt3DRender of namespace + +QT_END_NAMESPACE diff --git a/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext_p.h b/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext_p.h new file mode 100644 index 000000000..3c84fe558 --- /dev/null +++ b/src/render/renderers/opengl/graphicshelpers/texturesubmissioncontext_p.h @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2019 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 QT3DRENDER_RENDER_TEXTURESUBMISSIONCONTEXT_H +#define QT3DRENDER_RENDER_TEXTURESUBMISSIONCONTEXT_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 <qglobal.h> +#include <QVector> + +QT_BEGIN_NAMESPACE + +class QOpenGLContext; + +namespace Qt3DRender { +namespace Render { + +class GraphicsContext; +class GLTexture; + +class Q_AUTOTEST_EXPORT TextureSubmissionContext +{ +public: + enum TextureScope + { + TextureScopeMaterial = 0, + TextureScopeTechnique + // per-pass for deferred rendering? + }; + + TextureSubmissionContext(); + ~TextureSubmissionContext(); + + void initialize(GraphicsContext *context); + void endDrawing(); + int activateTexture(TextureScope scope, QOpenGLContext *gl, GLTexture* tex); + void deactivateTexture(GLTexture *tex); + void deactivateTexturesWithScope(TextureScope ts); + +private: + void decayTextureScores(); + int assignUnitForTexture(GLTexture* tex); + + // active textures, indexed by texture unit + struct ActiveTexture { + GLTexture *texture = nullptr; + int score = 0; + TextureScope scope = TextureScopeMaterial; + bool pinned = false; + }; + QVector<ActiveTexture> m_activeTextures; +}; + +} // namespace Render +} // namespace Qt3DRender + +QT_END_NAMESPACE + +#endif // QT3DRENDER_RENDER_TEXTURESUBMISSIONCONTEXT_H diff --git a/src/render/renderers/opengl/jobs/filtercompatibletechniquejob_p.h b/src/render/renderers/opengl/jobs/filtercompatibletechniquejob_p.h index 4f7a7146c..27b3d4ed2 100644 --- a/src/render/renderers/opengl/jobs/filtercompatibletechniquejob_p.h +++ b/src/render/renderers/opengl/jobs/filtercompatibletechniquejob_p.h @@ -64,7 +64,7 @@ namespace Render { class TechniqueManager; class Renderer; -class QT3DRENDERSHARED_PRIVATE_EXPORT FilterCompatibleTechniqueJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT FilterCompatibleTechniqueJob : public Qt3DCore::QAspectJob { public: FilterCompatibleTechniqueJob(); diff --git a/src/render/renderers/opengl/jobs/materialparametergathererjob_p.h b/src/render/renderers/opengl/jobs/materialparametergathererjob_p.h index fbfac3364..6ba060841 100644 --- a/src/render/renderers/opengl/jobs/materialparametergathererjob_p.h +++ b/src/render/renderers/opengl/jobs/materialparametergathererjob_p.h @@ -70,7 +70,7 @@ class Renderer; // TO be executed for each FrameGraph branch with a given RenderPassFilter/TechniqueFilter -class QT3DRENDERSHARED_PRIVATE_EXPORT MaterialParameterGathererJob : public Qt3DCore::QAspectJob +class Q_3DRENDERSHARED_PRIVATE_EXPORT MaterialParameterGathererJob : public Qt3DCore::QAspectJob { public: MaterialParameterGathererJob(); diff --git a/src/render/renderers/opengl/renderer/renderer.cpp b/src/render/renderers/opengl/renderer/renderer.cpp index a3c0b93da..012ec7056 100644 --- a/src/render/renderers/opengl/renderer/renderer.cpp +++ b/src/render/renderers/opengl/renderer/renderer.cpp @@ -1656,7 +1656,6 @@ Renderer::ViewSubmissionResultData Renderer::submitRenderViews(const QVector<Ren ViewSubmissionResultData resultData; resultData.lastBoundFBOId = lastBoundFBOId; resultData.surface = lastUsedSurface; - return resultData; } @@ -1796,14 +1795,16 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs() renderBinJobs.push_back(m_textureGathererJob); - // Layer cache is dependent on layers, layer filters and the enabled flag - // on entities + // Layer cache is dependent on layers, layer filters (hence FG structure + // changes) and the enabled flag on entities + const bool frameGraphDirty = dirtyBitsForFrame & AbstractRenderer::FrameGraphDirty; const bool layersDirty = dirtyBitsForFrame & AbstractRenderer::LayersDirty; - const bool layersCacheNeedsToBeRebuilt = layersDirty || entitiesEnabledDirty; + const bool layersCacheNeedsToBeRebuilt = layersDirty || entitiesEnabledDirty || frameGraphDirty; const bool materialDirty = dirtyBitsForFrame & AbstractRenderer::MaterialDirty; const bool lightsDirty = dirtyBitsForFrame & AbstractRenderer::LightsDirty; const bool computeableDirty = dirtyBitsForFrame & AbstractRenderer::ComputeDirty; const bool renderableDirty = dirtyBitsForFrame & AbstractRenderer::GeometryDirty; + const bool materialCacheNeedsToBeRebuilt = materialDirty || frameGraphDirty; // Rebuild Entity Layers list if layers are dirty if (layersDirty) @@ -1830,11 +1831,10 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs() for (int i = 0; i < fgBranchCount; ++i) { RenderViewBuilder builder(fgLeaves.at(i), i, this); builder.setLayerCacheNeedsToBeRebuilt(layersCacheNeedsToBeRebuilt); - builder.setMaterialGathererCacheNeedsToBeRebuilt(materialDirty); builder.setRenderableCacheNeedsToBeRebuilt(renderableDirty); builder.setComputableCacheNeedsToBeRebuilt(computeableDirty); builder.setLightGathererCacheNeedsToBeRebuilt(lightsDirty); - + builder.setMaterialGathererCacheNeedsToBeRebuilt(materialCacheNeedsToBeRebuilt); builder.prepareJobs(); renderBinJobs.append(builder.buildJobHierachy()); } @@ -1845,6 +1845,7 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs() // FilterLayerEntityJob is part of the RenderViewBuilder jobs and must be run later // if none of those jobs are started this frame notCleared |= AbstractRenderer::EntityEnabledDirty; + notCleared |= AbstractRenderer::FrameGraphDirty; notCleared |= AbstractRenderer::LayersDirty; } diff --git a/src/render/renderers/opengl/renderer/renderer_p.h b/src/render/renderers/opengl/renderer/renderer_p.h index a80a862f7..9a2c99c30 100644 --- a/src/render/renderers/opengl/renderer/renderer_p.h +++ b/src/render/renderers/opengl/renderer/renderer_p.h @@ -157,7 +157,7 @@ typedef QSharedPointer<UpdateLevelOfDetailJob> UpdateLevelOfDetailJobPtr; using SynchronizerJobPtr = GenericLambdaJobPtr<std::function<void()>>; using IntrospectShadersJobPtr = GenericLambdaJobPtr<std::function<void()>>; -class QT3DRENDERSHARED_PRIVATE_EXPORT Renderer : public AbstractRenderer +class Q_3DRENDERSHARED_PRIVATE_EXPORT Renderer : public AbstractRenderer { public: explicit Renderer(QRenderAspect::RenderType type); @@ -190,6 +190,7 @@ public: Entity *sceneRoot() const override { return m_renderSceneRoot; } FrameGraphNode *frameGraphRoot() const override; + RenderQueue *renderQueue() const { return m_renderQueue; } void markDirty(BackendNodeDirtySet changes, BackendNode *node) override; BackendNodeDirtySet dirtyBits() override; diff --git a/src/render/renderers/opengl/renderer/renderview.cpp b/src/render/renderers/opengl/renderer/renderview.cpp index ff43e74f4..8626d0125 100644 --- a/src/render/renderers/opengl/renderer/renderview.cpp +++ b/src/render/renderers/opengl/renderer/renderview.cpp @@ -102,9 +102,10 @@ int LIGHT_COLOR_NAMES[MAX_LIGHTS]; int LIGHT_INTENSITY_NAMES[MAX_LIGHTS]; QString LIGHT_STRUCT_NAMES[MAX_LIGHTS]; +bool wasInitialized = false; + } // anonymous namespace -bool wasInitialized = false; RenderView::StandardUniformsNameToTypeHash RenderView::ms_standardUniformSetters; diff --git a/src/render/renderers/opengl/renderer/renderviewbuilder.cpp b/src/render/renderers/opengl/renderer/renderviewbuilder.cpp index 0ec4d8041..83fab301a 100644 --- a/src/render/renderers/opengl/renderer/renderviewbuilder.cpp +++ b/src/render/renderers/opengl/renderer/renderviewbuilder.cpp @@ -47,7 +47,10 @@ namespace Qt3DRender { namespace Render { -const int RenderViewBuilder::m_optimalParallelJobCount = std::max(QThread::idealThreadCount(), 2); +// In some cases having less jobs is better (especially on fast cpus where +// splitting just adds more overhead). Ideally, we should try to set the value +// depending on the platform/CPU/nbr of cores +const int RenderViewBuilder::m_optimalParallelJobCount = std::max(std::min(4, QThread::idealThreadCount()), 2); namespace { diff --git a/src/render/renderstates/qalphacoverage.h b/src/render/renderstates/qalphacoverage.h index 53636d300..7c4e1c2c8 100644 --- a/src/render/renderstates/qalphacoverage.h +++ b/src/render/renderstates/qalphacoverage.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QAlphaCoveragePrivate; -class QT3DRENDERSHARED_EXPORT QAlphaCoverage : public QRenderState +class Q_3DRENDERSHARED_EXPORT QAlphaCoverage : public QRenderState { Q_OBJECT public: diff --git a/src/render/renderstates/qalphatest.h b/src/render/renderstates/qalphatest.h index 8545d2043..7ec14eaee 100644 --- a/src/render/renderstates/qalphatest.h +++ b/src/render/renderstates/qalphatest.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QAlphaTestPrivate; -class QT3DRENDERSHARED_EXPORT QAlphaTest : public QRenderState +class Q_3DRENDERSHARED_EXPORT QAlphaTest : public QRenderState { Q_OBJECT Q_PROPERTY(AlphaFunction alphaFunction READ alphaFunction WRITE setAlphaFunction NOTIFY alphaFunctionChanged) diff --git a/src/render/renderstates/qblendequation.h b/src/render/renderstates/qblendequation.h index d084113d7..69a06768d 100644 --- a/src/render/renderstates/qblendequation.h +++ b/src/render/renderstates/qblendequation.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QBlendEquationPrivate; -class QT3DRENDERSHARED_EXPORT QBlendEquation : public QRenderState +class Q_3DRENDERSHARED_EXPORT QBlendEquation : public QRenderState { Q_OBJECT Q_PROPERTY(BlendFunction blendFunction READ blendFunction WRITE setBlendFunction NOTIFY blendFunctionChanged) diff --git a/src/render/renderstates/qblendequation_p.h b/src/render/renderstates/qblendequation_p.h index 228e61f15..c8a65de11 100644 --- a/src/render/renderstates/qblendequation_p.h +++ b/src/render/renderstates/qblendequation_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QBlendEquationPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QBlendEquationPrivate : public QRenderStatePrivate { public: QBlendEquationPrivate() diff --git a/src/render/renderstates/qblendequationarguments.h b/src/render/renderstates/qblendequationarguments.h index 1b2e039f7..e454dbae5 100644 --- a/src/render/renderstates/qblendequationarguments.h +++ b/src/render/renderstates/qblendequationarguments.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QBlendEquationArgumentsPrivate; -class QT3DRENDERSHARED_EXPORT QBlendEquationArguments : public QRenderState +class Q_3DRENDERSHARED_EXPORT QBlendEquationArguments : public QRenderState { Q_OBJECT Q_PROPERTY(Blending sourceRgb READ sourceRgb WRITE setSourceRgb NOTIFY sourceRgbChanged) diff --git a/src/render/renderstates/qblendequationarguments_p.h b/src/render/renderstates/qblendequationarguments_p.h index 110039295..d2aae69c7 100644 --- a/src/render/renderstates/qblendequationarguments_p.h +++ b/src/render/renderstates/qblendequationarguments_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QBlendEquationArgumentsPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QBlendEquationArgumentsPrivate : public QRenderStatePrivate { public: QBlendEquationArgumentsPrivate(Render::StateMask type = Render::BlendEquationArgumentsMask) diff --git a/src/render/renderstates/qclipplane.h b/src/render/renderstates/qclipplane.h index fa210d668..94bfaa57d 100644 --- a/src/render/renderstates/qclipplane.h +++ b/src/render/renderstates/qclipplane.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QClipPlanePrivate; -class QT3DRENDERSHARED_EXPORT QClipPlane : public QRenderState +class Q_3DRENDERSHARED_EXPORT QClipPlane : public QRenderState { Q_OBJECT Q_PROPERTY(int planeIndex READ planeIndex WRITE setPlaneIndex NOTIFY planeIndexChanged) diff --git a/src/render/renderstates/qclipplane_p.h b/src/render/renderstates/qclipplane_p.h index 517831e10..9c59675c6 100644 --- a/src/render/renderstates/qclipplane_p.h +++ b/src/render/renderstates/qclipplane_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QClipPlanePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QClipPlanePrivate : public QRenderStatePrivate { public: QClipPlanePrivate() diff --git a/src/render/renderstates/qcolormask.h b/src/render/renderstates/qcolormask.h index 7d28e80c6..980cde5ac 100644 --- a/src/render/renderstates/qcolormask.h +++ b/src/render/renderstates/qcolormask.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QColorMaskPrivate; -class QT3DRENDERSHARED_EXPORT QColorMask : public QRenderState +class Q_3DRENDERSHARED_EXPORT QColorMask : public QRenderState { Q_OBJECT Q_PROPERTY(bool redMasked READ isRedMasked WRITE setRedMasked NOTIFY redMaskedChanged) diff --git a/src/render/renderstates/qcolormask_p.h b/src/render/renderstates/qcolormask_p.h index 1e2386eb9..bd041de3b 100644 --- a/src/render/renderstates/qcolormask_p.h +++ b/src/render/renderstates/qcolormask_p.h @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QColorMaskPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QColorMaskPrivate : public QRenderStatePrivate { public: QColorMaskPrivate() diff --git a/src/render/renderstates/qcullface.h b/src/render/renderstates/qcullface.h index ab60d342e..053e86215 100644 --- a/src/render/renderstates/qcullface.h +++ b/src/render/renderstates/qcullface.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QCullFacePrivate; -class QT3DRENDERSHARED_EXPORT QCullFace : public QRenderState +class Q_3DRENDERSHARED_EXPORT QCullFace : public QRenderState { Q_OBJECT Q_PROPERTY(CullingMode mode READ mode WRITE setMode NOTIFY modeChanged) diff --git a/src/render/renderstates/qcullface_p.h b/src/render/renderstates/qcullface_p.h index 98cf99454..fd85b27a7 100644 --- a/src/render/renderstates/qcullface_p.h +++ b/src/render/renderstates/qcullface_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QCullFacePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QCullFacePrivate : public QRenderStatePrivate { public: QCullFacePrivate() diff --git a/src/render/renderstates/qdepthrange.h b/src/render/renderstates/qdepthrange.h index e6a232a8b..9352f5e3a 100644 --- a/src/render/renderstates/qdepthrange.h +++ b/src/render/renderstates/qdepthrange.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QDepthRangePrivate; -class QT3DRENDERSHARED_EXPORT QDepthRange : public QRenderState +class Q_3DRENDERSHARED_EXPORT QDepthRange : public QRenderState { Q_OBJECT Q_PROPERTY(double nearValue READ nearValue WRITE setNearValue NOTIFY nearValueChanged) diff --git a/src/render/renderstates/qdepthrange_p.h b/src/render/renderstates/qdepthrange_p.h index 32a800836..43eeeb4c7 100644 --- a/src/render/renderstates/qdepthrange_p.h +++ b/src/render/renderstates/qdepthrange_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QDepthRangePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QDepthRangePrivate : public QRenderStatePrivate { public: QDepthRangePrivate() diff --git a/src/render/renderstates/qdepthtest.h b/src/render/renderstates/qdepthtest.h index 91c06c649..419c36b57 100644 --- a/src/render/renderstates/qdepthtest.h +++ b/src/render/renderstates/qdepthtest.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QDepthTestPrivate; -class QT3DRENDERSHARED_EXPORT QDepthTest : public QRenderState +class Q_3DRENDERSHARED_EXPORT QDepthTest : public QRenderState { Q_OBJECT Q_PROPERTY(DepthFunction depthFunction READ depthFunction WRITE setDepthFunction NOTIFY depthFunctionChanged) diff --git a/src/render/renderstates/qdepthtest_p.h b/src/render/renderstates/qdepthtest_p.h index 555be2d4a..82689a50f 100644 --- a/src/render/renderstates/qdepthtest_p.h +++ b/src/render/renderstates/qdepthtest_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QDepthTestPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QDepthTestPrivate : public QRenderStatePrivate { public : QDepthTestPrivate() diff --git a/src/render/renderstates/qdithering.h b/src/render/renderstates/qdithering.h index db6667f8a..4f118977d 100644 --- a/src/render/renderstates/qdithering.h +++ b/src/render/renderstates/qdithering.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QDitheringPrivate; -class QT3DRENDERSHARED_EXPORT QDithering : public QRenderState +class Q_3DRENDERSHARED_EXPORT QDithering : public QRenderState { Q_OBJECT public: diff --git a/src/render/renderstates/qfrontface.h b/src/render/renderstates/qfrontface.h index 9ef32d8ed..10cc9b422 100644 --- a/src/render/renderstates/qfrontface.h +++ b/src/render/renderstates/qfrontface.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QFrontFacePrivate; -class QT3DRENDERSHARED_EXPORT QFrontFace : public QRenderState +class Q_3DRENDERSHARED_EXPORT QFrontFace : public QRenderState { Q_OBJECT Q_PROPERTY(WindingDirection direction READ direction WRITE setDirection NOTIFY directionChanged) diff --git a/src/render/renderstates/qfrontface_p.h b/src/render/renderstates/qfrontface_p.h index 3849714fd..605e78196 100644 --- a/src/render/renderstates/qfrontface_p.h +++ b/src/render/renderstates/qfrontface_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QFrontFacePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QFrontFacePrivate : public QRenderStatePrivate { public: QFrontFacePrivate() diff --git a/src/render/renderstates/qlinewidth.h b/src/render/renderstates/qlinewidth.h index 764ebc82a..3e53a5f29 100644 --- a/src/render/renderstates/qlinewidth.h +++ b/src/render/renderstates/qlinewidth.h @@ -47,7 +47,7 @@ namespace Qt3DRender { class QLineWidthPrivate; -class QT3DRENDERSHARED_EXPORT QLineWidth : public QRenderState +class Q_3DRENDERSHARED_EXPORT QLineWidth : public QRenderState { Q_OBJECT Q_PROPERTY(float value READ value WRITE setValue NOTIFY valueChanged) diff --git a/src/render/renderstates/qmultisampleantialiasing.h b/src/render/renderstates/qmultisampleantialiasing.h index 087f32ce2..5ac0dfdb5 100644 --- a/src/render/renderstates/qmultisampleantialiasing.h +++ b/src/render/renderstates/qmultisampleantialiasing.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QMultiSampleAntiAliasingPrivate; -class QT3DRENDERSHARED_EXPORT QMultiSampleAntiAliasing : public QRenderState +class Q_3DRENDERSHARED_EXPORT QMultiSampleAntiAliasing : public QRenderState { Q_OBJECT diff --git a/src/render/renderstates/qnodepthmask.h b/src/render/renderstates/qnodepthmask.h index 20171595e..221052699 100644 --- a/src/render/renderstates/qnodepthmask.h +++ b/src/render/renderstates/qnodepthmask.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QNoDepthMaskPrivate; -class QT3DRENDERSHARED_EXPORT QNoDepthMask : public QRenderState +class Q_3DRENDERSHARED_EXPORT QNoDepthMask : public QRenderState { Q_OBJECT public: diff --git a/src/render/renderstates/qpointsize.h b/src/render/renderstates/qpointsize.h index 7e50a7953..49fdd5c9c 100644 --- a/src/render/renderstates/qpointsize.h +++ b/src/render/renderstates/qpointsize.h @@ -47,7 +47,7 @@ namespace Qt3DRender { class QPointSizePrivate; -class QT3DRENDERSHARED_EXPORT QPointSize : public QRenderState +class Q_3DRENDERSHARED_EXPORT QPointSize : public QRenderState { Q_OBJECT Q_PROPERTY(SizeMode sizeMode READ sizeMode WRITE setSizeMode NOTIFY sizeModeChanged) diff --git a/src/render/renderstates/qpointsize_p.h b/src/render/renderstates/qpointsize_p.h index eb669b131..fab7baf30 100644 --- a/src/render/renderstates/qpointsize_p.h +++ b/src/render/renderstates/qpointsize_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QPointSizePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPointSizePrivate : public QRenderStatePrivate { public: QPointSizePrivate(QPointSize::SizeMode sizeMode, float value) diff --git a/src/render/renderstates/qpolygonoffset.h b/src/render/renderstates/qpolygonoffset.h index f89203c6b..9ba18f2e4 100644 --- a/src/render/renderstates/qpolygonoffset.h +++ b/src/render/renderstates/qpolygonoffset.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QPolygonOffsetPrivate; -class QT3DRENDERSHARED_EXPORT QPolygonOffset : public QRenderState +class Q_3DRENDERSHARED_EXPORT QPolygonOffset : public QRenderState { Q_OBJECT diff --git a/src/render/renderstates/qpolygonoffset_p.h b/src/render/renderstates/qpolygonoffset_p.h index 66a62674e..11edaf445 100644 --- a/src/render/renderstates/qpolygonoffset_p.h +++ b/src/render/renderstates/qpolygonoffset_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QPolygonOffsetPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPolygonOffsetPrivate : public QRenderStatePrivate { public: QPolygonOffsetPrivate() diff --git a/src/render/renderstates/qrastermode.h b/src/render/renderstates/qrastermode.h index 9448a6932..d9eb5cb05 100644 --- a/src/render/renderstates/qrastermode.h +++ b/src/render/renderstates/qrastermode.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QRasterModePrivate; -class QT3DRENDERSHARED_EXPORT QRasterMode : public QRenderState +class Q_3DRENDERSHARED_EXPORT QRasterMode : public QRenderState { Q_OBJECT Q_PROPERTY(RasterMode rasterMode READ rasterMode WRITE setRasterMode NOTIFY rasterModeChanged) diff --git a/src/render/renderstates/qrastermode_p.h b/src/render/renderstates/qrastermode_p.h index 506689f02..2e8e790de 100644 --- a/src/render/renderstates/qrastermode_p.h +++ b/src/render/renderstates/qrastermode_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QRasterModePrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRasterModePrivate : public QRenderStatePrivate { public : QRasterModePrivate() diff --git a/src/render/renderstates/qrenderstate.h b/src/render/renderstates/qrenderstate.h index 6892432be..3b7ff03bc 100644 --- a/src/render/renderstates/qrenderstate.h +++ b/src/render/renderstates/qrenderstate.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QRenderStatePrivate; -class QT3DRENDERSHARED_EXPORT QRenderState : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QRenderState : public Qt3DCore::QNode { Q_OBJECT public: diff --git a/src/render/renderstates/qrenderstate_p.h b/src/render/renderstates/qrenderstate_p.h index c3457afd7..e43097020 100644 --- a/src/render/renderstates/qrenderstate_p.h +++ b/src/render/renderstates/qrenderstate_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QRenderStatePrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderStatePrivate : public Qt3DCore::QNodePrivate { public: explicit QRenderStatePrivate(Render::StateMask type); diff --git a/src/render/renderstates/qscissortest.h b/src/render/renderstates/qscissortest.h index f94e997f8..c808dc1c6 100644 --- a/src/render/renderstates/qscissortest.h +++ b/src/render/renderstates/qscissortest.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QScissorTestPrivate; -class QT3DRENDERSHARED_EXPORT QScissorTest : public QRenderState +class Q_3DRENDERSHARED_EXPORT QScissorTest : public QRenderState { Q_OBJECT Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftChanged) diff --git a/src/render/renderstates/qscissortest_p.h b/src/render/renderstates/qscissortest_p.h index 7c7bfdfe0..eebf3c326 100644 --- a/src/render/renderstates/qscissortest_p.h +++ b/src/render/renderstates/qscissortest_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QScissorTestPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QScissorTestPrivate : public QRenderStatePrivate { public: QScissorTestPrivate() diff --git a/src/render/renderstates/qseamlesscubemap.h b/src/render/renderstates/qseamlesscubemap.h index 40ae0a955..d2f63a8df 100644 --- a/src/render/renderstates/qseamlesscubemap.h +++ b/src/render/renderstates/qseamlesscubemap.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QSeamlessCubemapPrivate; -class QT3DRENDERSHARED_EXPORT QSeamlessCubemap : public QRenderState +class Q_3DRENDERSHARED_EXPORT QSeamlessCubemap : public QRenderState { Q_OBJECT diff --git a/src/render/renderstates/qstencilmask.h b/src/render/renderstates/qstencilmask.h index 5f6e3b686..08396a86f 100644 --- a/src/render/renderstates/qstencilmask.h +++ b/src/render/renderstates/qstencilmask.h @@ -48,7 +48,7 @@ namespace Qt3DRender { class QStencilMaskPrivate; -class QT3DRENDERSHARED_EXPORT QStencilMask : public QRenderState +class Q_3DRENDERSHARED_EXPORT QStencilMask : public QRenderState { Q_OBJECT Q_PROPERTY(uint frontOutputMask READ frontOutputMask WRITE setFrontOutputMask NOTIFY frontOutputMaskChanged) diff --git a/src/render/renderstates/qstencilmask_p.h b/src/render/renderstates/qstencilmask_p.h index 762b249f8..c9af3d7f1 100644 --- a/src/render/renderstates/qstencilmask_p.h +++ b/src/render/renderstates/qstencilmask_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QStencilMaskPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QStencilMaskPrivate : public QRenderStatePrivate { public: QStencilMaskPrivate() diff --git a/src/render/renderstates/qstenciloperation.h b/src/render/renderstates/qstenciloperation.h index 889bb73dc..90c7da7ba 100644 --- a/src/render/renderstates/qstenciloperation.h +++ b/src/render/renderstates/qstenciloperation.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QStencilOperationPrivate; class QStencilOperationArguments; -class QT3DRENDERSHARED_EXPORT QStencilOperation : public QRenderState +class Q_3DRENDERSHARED_EXPORT QStencilOperation : public QRenderState { Q_OBJECT Q_PROPERTY(Qt3DRender::QStencilOperationArguments *front READ front CONSTANT) diff --git a/src/render/renderstates/qstenciloperation_p.h b/src/render/renderstates/qstenciloperation_p.h index dbce734b1..a1c0cda4a 100644 --- a/src/render/renderstates/qstenciloperation_p.h +++ b/src/render/renderstates/qstenciloperation_p.h @@ -64,7 +64,7 @@ struct QStencilOperationData QStencilOperationArgumentsData back; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT QStencilOperationPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QStencilOperationPrivate : public QRenderStatePrivate { public: QStencilOperationPrivate() diff --git a/src/render/renderstates/qstenciloperationarguments.h b/src/render/renderstates/qstenciloperationarguments.h index 9705c9822..e8e23c6fe 100644 --- a/src/render/renderstates/qstenciloperationarguments.h +++ b/src/render/renderstates/qstenciloperationarguments.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QStencilOperationPrivate; class QStencilOperationArgumentsPrivate; -class QT3DRENDERSHARED_EXPORT QStencilOperationArguments : public QObject +class Q_3DRENDERSHARED_EXPORT QStencilOperationArguments : public QObject { Q_OBJECT Q_PROPERTY(FaceMode faceMode READ faceMode NOTIFY faceModeChanged) diff --git a/src/render/renderstates/qstenciloperationarguments_p.h b/src/render/renderstates/qstenciloperationarguments_p.h index 3babd3373..b24ddf09d 100644 --- a/src/render/renderstates/qstenciloperationarguments_p.h +++ b/src/render/renderstates/qstenciloperationarguments_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QStencilOperationArgumentsPrivate : public QObjectPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QStencilOperationArgumentsPrivate : public QObjectPrivate { public: QStencilOperationArgumentsPrivate(QStencilOperationArguments::FaceMode mode) diff --git a/src/render/renderstates/qstenciltest.h b/src/render/renderstates/qstenciltest.h index 0178ef968..f17baa23f 100644 --- a/src/render/renderstates/qstenciltest.h +++ b/src/render/renderstates/qstenciltest.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QStencilTestPrivate; class QStencilTestArguments; -class QT3DRENDERSHARED_EXPORT QStencilTest : public QRenderState +class Q_3DRENDERSHARED_EXPORT QStencilTest : public QRenderState { Q_OBJECT Q_PROPERTY(Qt3DRender::QStencilTestArguments *front READ front CONSTANT) diff --git a/src/render/renderstates/qstenciltest_p.h b/src/render/renderstates/qstenciltest_p.h index 838ba5bc0..328e34878 100644 --- a/src/render/renderstates/qstenciltest_p.h +++ b/src/render/renderstates/qstenciltest_p.h @@ -64,7 +64,7 @@ struct QStencilTestData QStencilTestArgumentsData back; }; -class QT3DRENDERSHARED_PRIVATE_EXPORT QStencilTestPrivate : public QRenderStatePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QStencilTestPrivate : public QRenderStatePrivate { public: QStencilTestPrivate() diff --git a/src/render/renderstates/qstenciltestarguments.h b/src/render/renderstates/qstenciltestarguments.h index 35447d477..92696806d 100644 --- a/src/render/renderstates/qstenciltestarguments.h +++ b/src/render/renderstates/qstenciltestarguments.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QStencilTestPrivate; class QStencilTestArgumentsPrivate; -class QT3DRENDERSHARED_EXPORT QStencilTestArguments : public QObject +class Q_3DRENDERSHARED_EXPORT QStencilTestArguments : public QObject { Q_OBJECT Q_PROPERTY(StencilFaceMode faceMode READ faceMode NOTIFY faceModeChanged) diff --git a/src/render/renderstates/qstenciltestarguments_p.h b/src/render/renderstates/qstenciltestarguments_p.h index 662301843..9a85c93a6 100644 --- a/src/render/renderstates/qstenciltestarguments_p.h +++ b/src/render/renderstates/qstenciltestarguments_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QStencilTestArgumentsPrivate : public QObjectPrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QStencilTestArgumentsPrivate : public QObjectPrivate { public: QStencilTestArgumentsPrivate(QStencilTestArguments::StencilFaceMode face) diff --git a/src/render/texture/qabstracttexture.h b/src/render/texture/qabstracttexture.h index 2e1127b86..5a10c620b 100644 --- a/src/render/texture/qabstracttexture.h +++ b/src/render/texture/qabstracttexture.h @@ -55,7 +55,7 @@ class QTextureGenerator; class QTextureDataUpdate; typedef QSharedPointer<QTextureGenerator> QTextureGeneratorPtr; -class QT3DRENDERSHARED_EXPORT QAbstractTexture : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QAbstractTexture : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(Target target READ target CONSTANT) diff --git a/src/render/texture/qabstracttexture_p.h b/src/render/texture/qabstracttexture_p.h index 700788787..072bd8159 100644 --- a/src/render/texture/qabstracttexture_p.h +++ b/src/render/texture/qabstracttexture_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QAbstractTexturePrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QAbstractTexturePrivate : public Qt3DCore::QNodePrivate { public : QAbstractTexturePrivate(); diff --git a/src/render/texture/qabstracttextureimage.h b/src/render/texture/qabstracttextureimage.h index 7e840fdd4..e072a26dc 100644 --- a/src/render/texture/qabstracttextureimage.h +++ b/src/render/texture/qabstracttextureimage.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QAbstractTextureImagePrivate; -class QT3DRENDERSHARED_EXPORT QAbstractTextureImage : public Qt3DCore::QNode +class Q_3DRENDERSHARED_EXPORT QAbstractTextureImage : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(int mipLevel READ mipLevel WRITE setMipLevel NOTIFY mipLevelChanged) diff --git a/src/render/texture/qabstracttextureimage_p.h b/src/render/texture/qabstracttextureimage_p.h index f0d836055..a5299acd7 100644 --- a/src/render/texture/qabstracttextureimage_p.h +++ b/src/render/texture/qabstracttextureimage_p.h @@ -61,7 +61,7 @@ namespace Qt3DRender { class QAbstractTextureImage; -class QT3DRENDERSHARED_PRIVATE_EXPORT QAbstractTextureImagePrivate : public Qt3DCore::QNodePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QAbstractTextureImagePrivate : public Qt3DCore::QNodePrivate { public: QAbstractTextureImagePrivate(); diff --git a/src/render/texture/qpaintedtextureimage.h b/src/render/texture/qpaintedtextureimage.h index 5b884a42e..1e8cf90ae 100644 --- a/src/render/texture/qpaintedtextureimage.h +++ b/src/render/texture/qpaintedtextureimage.h @@ -50,7 +50,7 @@ namespace Qt3DRender { class QPaintedTextureImagePrivate; -class QT3DRENDERSHARED_EXPORT QPaintedTextureImage : public QAbstractTextureImage +class Q_3DRENDERSHARED_EXPORT QPaintedTextureImage : public QAbstractTextureImage { Q_OBJECT Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) diff --git a/src/render/texture/qpaintedtextureimage_p.h b/src/render/texture/qpaintedtextureimage_p.h index 4e554f1c1..48553323d 100644 --- a/src/render/texture/qpaintedtextureimage_p.h +++ b/src/render/texture/qpaintedtextureimage_p.h @@ -63,7 +63,7 @@ class QPainter; namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QPaintedTextureImagePrivate : public QAbstractTextureImagePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QPaintedTextureImagePrivate : public QAbstractTextureImagePrivate { public: QPaintedTextureImagePrivate(); diff --git a/src/render/texture/qtexture.h b/src/render/texture/qtexture.h index 991725de2..7556c6fc4 100644 --- a/src/render/texture/qtexture.h +++ b/src/render/texture/qtexture.h @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture { Q_OBJECT public: @@ -63,7 +63,7 @@ public: ~QTexture1D(); }; -class QT3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture { Q_OBJECT public: @@ -71,7 +71,7 @@ public: ~QTexture1DArray(); }; -class QT3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture { Q_OBJECT public: @@ -79,7 +79,7 @@ public: ~QTexture2D(); }; -class QT3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture { Q_OBJECT public: @@ -87,7 +87,7 @@ public: ~QTexture2DArray(); }; -class QT3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture { Q_OBJECT public: @@ -95,7 +95,7 @@ public: ~QTexture3D(); }; -class QT3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture { Q_OBJECT public: @@ -103,7 +103,7 @@ public: ~QTextureCubeMap(); }; -class QT3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture { Q_OBJECT public: @@ -111,7 +111,7 @@ public: ~QTextureCubeMapArray(); }; -class QT3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture { Q_OBJECT public: @@ -119,7 +119,7 @@ public: ~QTexture2DMultisample(); }; -class QT3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture { Q_OBJECT public: @@ -127,7 +127,7 @@ public: ~QTexture2DMultisampleArray(); }; -class QT3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture { Q_OBJECT public: @@ -135,7 +135,7 @@ public: ~QTextureRectangle(); }; -class QT3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture { Q_OBJECT public: @@ -145,7 +145,7 @@ public: class QTextureLoaderPrivate; -class QT3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -169,7 +169,7 @@ private: Q_DECLARE_PRIVATE(QTextureLoader) }; -class QT3DRENDERSHARED_EXPORT QSharedGLTexture : public QAbstractTexture +class Q_3DRENDERSHARED_EXPORT QSharedGLTexture : public QAbstractTexture { Q_OBJECT Q_PROPERTY(int textureId READ textureId WRITE setTextureId NOTIFY textureIdChanged) diff --git a/src/render/texture/qtexture_p.h b/src/render/texture/qtexture_p.h index 726bf2c01..6b06aecd1 100644 --- a/src/render/texture/qtexture_p.h +++ b/src/render/texture/qtexture_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QTextureLoaderPrivate : public QAbstractTexturePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QTextureLoaderPrivate : public QAbstractTexturePrivate { public: QTextureLoaderPrivate(); diff --git a/src/render/texture/qtexturedata.h b/src/render/texture/qtexturedata.h index a86a3ec45..04324ca14 100644 --- a/src/render/texture/qtexturedata.h +++ b/src/render/texture/qtexturedata.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QTextureDataPrivate; -class QT3DRENDERSHARED_EXPORT QTextureData +class Q_3DRENDERSHARED_EXPORT QTextureData { public: QTextureData(); diff --git a/src/render/texture/qtexturedataupdate.h b/src/render/texture/qtexturedataupdate.h index 4aded2369..44986a15d 100644 --- a/src/render/texture/qtexturedataupdate.h +++ b/src/render/texture/qtexturedataupdate.h @@ -51,7 +51,7 @@ namespace Qt3DRender class QTextureDataUpdatePrivate; -class QT3DRENDERSHARED_EXPORT QTextureDataUpdate +class Q_3DRENDERSHARED_EXPORT QTextureDataUpdate { public: QTextureDataUpdate(); diff --git a/src/render/texture/qtexturegenerator.h b/src/render/texture/qtexturegenerator.h index 10f0cde57..7ae3d3a84 100644 --- a/src/render/texture/qtexturegenerator.h +++ b/src/render/texture/qtexturegenerator.h @@ -52,7 +52,7 @@ namespace Qt3DRender { class QTextureData; typedef QSharedPointer<QTextureData> QTextureDataPtr; -class QT3DRENDERSHARED_EXPORT QTextureGenerator : public QAbstractFunctor +class Q_3DRENDERSHARED_EXPORT QTextureGenerator : public QAbstractFunctor { public: virtual ~QTextureGenerator(); diff --git a/src/render/texture/qtextureimage.h b/src/render/texture/qtextureimage.h index d3fccde70..7d08c8e6e 100644 --- a/src/render/texture/qtextureimage.h +++ b/src/render/texture/qtextureimage.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QTextureImagePrivate; -class QT3DRENDERSHARED_EXPORT QTextureImage : public QAbstractTextureImage +class Q_3DRENDERSHARED_EXPORT QTextureImage : public QAbstractTextureImage { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/render/texture/qtextureimage_p.h b/src/render/texture/qtextureimage_p.h index 5a4ea8f5a..3cb704cf8 100644 --- a/src/render/texture/qtextureimage_p.h +++ b/src/render/texture/qtextureimage_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { -class QT3DRENDERSHARED_PRIVATE_EXPORT QTextureImagePrivate : public QAbstractTextureImagePrivate +class Q_3DRENDERSHARED_PRIVATE_EXPORT QTextureImagePrivate : public QAbstractTextureImagePrivate { public: QTextureImagePrivate() diff --git a/src/render/texture/qtextureimagedata.h b/src/render/texture/qtextureimagedata.h index 6d66f2390..68ceebabc 100644 --- a/src/render/texture/qtextureimagedata.h +++ b/src/render/texture/qtextureimagedata.h @@ -51,7 +51,7 @@ namespace Qt3DRender { class QTextureImageDataPrivate; -class QT3DRENDERSHARED_EXPORT QTextureImageData +class Q_3DRENDERSHARED_EXPORT QTextureImageData { public: QTextureImageData(); diff --git a/src/render/texture/qtextureimagedatagenerator.h b/src/render/texture/qtextureimagedatagenerator.h index 0e7e6c782..7c58b3878 100644 --- a/src/render/texture/qtextureimagedatagenerator.h +++ b/src/render/texture/qtextureimagedatagenerator.h @@ -55,7 +55,7 @@ namespace Qt3DRender { class QTextureImageData; typedef QSharedPointer<QTextureImageData> QTextureImageDataPtr; -class QT3DRENDERSHARED_EXPORT QTextureImageDataGenerator : public QAbstractFunctor +class Q_3DRENDERSHARED_EXPORT QTextureImageDataGenerator : public QAbstractFunctor { public: virtual ~QTextureImageDataGenerator() {} diff --git a/src/render/texture/qtexturewrapmode.h b/src/render/texture/qtexturewrapmode.h index 36af013a8..b31ccc17b 100644 --- a/src/render/texture/qtexturewrapmode.h +++ b/src/render/texture/qtexturewrapmode.h @@ -49,7 +49,7 @@ namespace Qt3DRender { class QTextureWrapModePrivate; -class QT3DRENDERSHARED_EXPORT QTextureWrapMode : public QObject +class Q_3DRENDERSHARED_EXPORT QTextureWrapMode : public QObject { Q_OBJECT Q_PROPERTY(WrapMode x READ x WRITE setX NOTIFY xChanged) diff --git a/tests/auto/animation/animationutils/animationutils.qrc b/tests/auto/animation/animationutils/animationutils.qrc index 0b499ed76..af041e8a3 100644 --- a/tests/auto/animation/animationutils/animationutils.qrc +++ b/tests/auto/animation/animationutils/animationutils.qrc @@ -5,5 +5,6 @@ <file>clip3.json</file> <file>clip4.json</file> <file>clip5.json</file> + <file>clip6.json</file> </qresource> </RCC> diff --git a/tests/auto/animation/animationutils/clip2.json b/tests/auto/animation/animationutils/clip2.json index 3faff409c..4c70f8493 100644 --- a/tests/auto/animation/animationutils/clip2.json +++ b/tests/auto/animation/animationutils/clip2.json @@ -242,9 +242,9 @@ ] } ], - "channelName": "Rotation" + "channelName": "rotation" } ] } ] -}
\ No newline at end of file +} diff --git a/tests/auto/animation/animationutils/clip6.json b/tests/auto/animation/animationutils/clip6.json new file mode 100644 index 000000000..ba521df55 --- /dev/null +++ b/tests/auto/animation/animationutils/clip6.json @@ -0,0 +1,82 @@ +{ + "animations": [ + { + "animationName": "Rotation", + "channels": [ + { + "channelComponents": [ + { + "channelComponentName": "W", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ] + }, + { + "coords": [ + 10.0, + 0.707 + ] + } + ] + }, + { + "channelComponentName": "X", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ] + }, + { + "coords": [ + 10.0, + 0.707 + ] + } + ] + }, + { + "channelComponentName": "Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ] + }, + { + "coords": [ + 10.0, + 0.0 + ] + } + ] + }, + { + "channelComponentName": "Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ] + }, + { + "coords": [ + 10.0, + 0.0 + ] + } + ] + } + ], + "channelName": "Rotation" + } + ] + } + ] +} diff --git a/tests/auto/animation/animationutils/tst_animationutils.cpp b/tests/auto/animation/animationutils/tst_animationutils.cpp index 75ae65ea7..ee393b366 100644 --- a/tests/auto/animation/animationutils/tst_animationutils.cpp +++ b/tests/auto/animation/animationutils/tst_animationutils.cpp @@ -1248,6 +1248,17 @@ private Q_SLOTS: << handler << clip << localTime << expectedResults; expectedResults.clear(); } + { + // a clip with slerp interpolation + handler = new Handler(); + clip = createAnimationClipLoader(handler, QUrl("qrc:/clip6.json")); + localTime = clip->duration() / 2.0f; + expectedResults = QVector<float>() << 0.923822f << 0.382626f << 0.0f << 0.0f; + + QTest::newRow("clip6.json, slerp, t = duration/2") + << handler << clip << localTime << expectedResults; + expectedResults.clear(); + } } void checkEvaluateClipAtLocalTime() diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp index 75d7a7799..3f7fb4a75 100644 --- a/tests/auto/core/nodes/tst_nodes.cpp +++ b/tests/auto/core/nodes/tst_nodes.cpp @@ -82,11 +82,14 @@ private slots: void checkConstructionSetParentMix(); // QTBUG-60612 void checkConstructionWithParent(); + void checkConstructionWithNonRootParent(); // QTBUG-73986 void checkConstructionAsListElement(); void checkSceneIsSetOnConstructionWithParent(); // QTBUG-69352 void appendingComponentToEntity(); - void appendingParentlessComponentToEntity(); + void appendingParentlessComponentToEntityWithoutScene(); + void appendingParentlessComponentToEntityWithScene(); + void appendingParentlessComponentToNonRootEntity(); void removingComponentFromEntity(); void changeCustomProperty(); @@ -1119,6 +1122,61 @@ void tst_Nodes::checkConstructionWithParent() QCOMPARE(propertyEvent->value().value<Qt3DCore::QNodeId>(), node->id()); } +void tst_Nodes::checkConstructionWithNonRootParent() +{ + // GIVEN + ObserverSpy spy; + Qt3DCore::QScene scene; + QScopedPointer<MyQNode> root(new MyQNode()); + + // WHEN + root->setArbiterAndScene(&spy, &scene); + root->setSimulateBackendCreated(true); + QScopedPointer<MyQNode> parent(new MyQNode(root.data())); + + // THEN + QVERIFY(Qt3DCore::QNodePrivate::get(root.data())->scene() != nullptr); + QVERIFY(Qt3DCore::QNodePrivate::get(parent.data())->scene() != nullptr); + + // WHEN we create a child and then set it as a Node* property + auto *child = new MyQNode(parent.data()); + root->setNodeProperty(child); + + // THEN we should get + // - one creation change for parent, + // - one creation change for child, + // - one child added change for root->parent, + // - and one property change event, + // in that order. + QCoreApplication::processEvents(); + QCOMPARE(root->children().count(), 1); + QCOMPARE(parent->children().count(), 1); + + QCOMPARE(spy.events.size(), 4); // 2 creation changes, 1 child added changes, 1 property change + + // Ensure first event is parent node's creation change + const auto parentCreationEvent = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QNodeCreatedChangeBase>(); + QVERIFY(!parentCreationEvent.isNull()); + QCOMPARE(parentCreationEvent->subjectId(), parent->id()); + + const auto childCreationEvent = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QNodeCreatedChangeBase>(); + QVERIFY(!childCreationEvent.isNull()); + QCOMPARE(childCreationEvent->subjectId(), child->id()); + + const auto parentNewChildEvent = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QPropertyNodeAddedChange>(); + QVERIFY(!parentNewChildEvent.isNull()); + QCOMPARE(parentNewChildEvent->subjectId(), root->id()); + QCOMPARE(parentNewChildEvent->propertyName(), "children"); + QCOMPARE(parentNewChildEvent->addedNodeId(), parent->id()); + + // Ensure second and last event is property set change + const auto propertyEvent = spy.events.takeFirst().change().dynamicCast<Qt3DCore::QPropertyUpdatedChange>(); + QVERIFY(!propertyEvent.isNull()); + QCOMPARE(propertyEvent->subjectId(), root->id()); + QCOMPARE(propertyEvent->propertyName(), "nodeProperty"); + QCOMPARE(propertyEvent->value().value<Qt3DCore::QNodeId>(), child->id()); +} + void tst_Nodes::checkConstructionAsListElement() { // GIVEN @@ -1209,7 +1267,7 @@ void tst_Nodes::checkSceneIsSetOnConstructionWithParent() QCOMPARE(spy.events.size(), 10); // 5 QComponentAddedChange(entity, cmp) and 5 QComponentAddedChange(cmp, entity) } -void tst_Nodes::appendingParentlessComponentToEntity() +void tst_Nodes::appendingParentlessComponentToEntityWithoutScene() { // GIVEN ObserverSpy entitySpy; @@ -1265,6 +1323,162 @@ void tst_Nodes::appendingParentlessComponentToEntity() } } +void tst_Nodes::appendingParentlessComponentToNonRootEntity() +{ + // GIVEN + ObserverSpy eventSpy; + Qt3DCore::QScene scene; + + { + QScopedPointer<MyQEntity> root(new MyQEntity()); + root->setArbiterAndScene(&eventSpy, &scene); + root->setSimulateBackendCreated(true); + + QCoreApplication::processEvents(); + + QScopedPointer<MyQEntity> entity(new MyQEntity(root.data())); + MyQComponent *comp = new MyQComponent(); + + // THEN + QVERIFY(root->parentNode() == nullptr); + QVERIFY(root->children().count() == 1); + QVERIFY(root->components().empty()); + QVERIFY(entity->parentNode() == root.data()); + QVERIFY(entity->children().count() == 0); + QVERIFY(entity->components().empty()); + QVERIFY(comp->parentNode() == nullptr); + + // WHEN + entity->addComponent(comp); + QCoreApplication::processEvents(); + + // THEN + QVERIFY(entity->components().count() == 1); + QVERIFY(entity->components().first() == comp); + QVERIFY(comp->parentNode() == entity.data()); + + QCOMPARE(eventSpy.events.size(), 5); + // - entity created + // - comp created + // - entity added as child to root + // - component added for entity + // - component added for compontent + QVERIFY(eventSpy.events.first().wasLocked()); + + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QNodeCreatedChangeBase>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::NodeCreated); + QCOMPARE(event->subjectId(), entity->id()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QNodeCreatedChangeBase>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::NodeCreated); + QCOMPARE(event->subjectId(), comp->id()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QPropertyNodeAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::PropertyValueAdded); + QCOMPARE(event->subjectId(), root->id()); + QCOMPARE(event->propertyName(), QByteArrayLiteral("children")); + QCOMPARE(event->addedNodeId(), entity->id()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QComponentAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::ComponentAdded); + QCOMPARE(event->subjectId(), entity->id()); + QCOMPARE(event->entityId(), entity->id()); + QCOMPARE(event->componentId(), comp->id()); + QCOMPARE(event->componentMetaObject(), comp->metaObject()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QComponentAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::ComponentAdded); + QCOMPARE(event->subjectId(), comp->id()); + QCOMPARE(event->entityId(), entity->id()); + QCOMPARE(event->componentId(), comp->id()); + QCOMPARE(event->componentMetaObject(), comp->metaObject()); + } + } +} + +void tst_Nodes::appendingParentlessComponentToEntityWithScene() +{ + // GIVEN + ObserverSpy eventSpy; + Qt3DCore::QScene scene; + + { + QScopedPointer<MyQEntity> entity(new MyQEntity()); + entity->setArbiterAndScene(&eventSpy, &scene); + entity->setSimulateBackendCreated(true); + + QCoreApplication::processEvents(); + + MyQComponent *comp = new MyQComponent(); + + // THEN + QVERIFY(entity->parentNode() == nullptr); + QVERIFY(entity->children().count() == 0); + QVERIFY(entity->components().empty()); + QVERIFY(comp->parentNode() == nullptr); + + // WHEN + entity->addComponent(comp); + QCoreApplication::processEvents(); + + // THEN + QVERIFY(entity->components().count() == 1); + QVERIFY(entity->components().first() == comp); + QVERIFY(comp->parentNode() == entity.data()); + + QCOMPARE(eventSpy.events.size(), 4); + // - entity created + // - child added + // - component added for entity + // - component added for compontent + QVERIFY(eventSpy.events.first().wasLocked()); + + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QNodeCreatedChangeBase>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::NodeCreated); + QCOMPARE(event->subjectId(), comp->id()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QPropertyNodeAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::PropertyValueAdded); + QCOMPARE(event->subjectId(), entity->id()); + QCOMPARE(event->propertyName(), QByteArrayLiteral("children")); + QCOMPARE(event->addedNodeId(), comp->id()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QComponentAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::ComponentAdded); + QCOMPARE(event->subjectId(), entity->id()); + QCOMPARE(event->entityId(), entity->id()); + QCOMPARE(event->componentId(), comp->id()); + QCOMPARE(event->componentMetaObject(), comp->metaObject()); + } + { + const auto event = eventSpy.events.takeFirst().change().dynamicCast<Qt3DCore::QComponentAddedChange>(); + QVERIFY(!event.isNull()); + QCOMPARE(event->type(), Qt3DCore::ComponentAdded); + QCOMPARE(event->subjectId(), comp->id()); + QCOMPARE(event->entityId(), entity->id()); + QCOMPARE(event->componentId(), comp->id()); + QCOMPARE(event->componentMetaObject(), comp->metaObject()); + } + } +} + + void tst_Nodes::appendingComponentToEntity() { // GIVEN diff --git a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp index bbc6fa3b5..e2acff16c 100644 --- a/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp +++ b/tests/auto/render/pickboundingvolumejob/tst_pickboundingvolumejob.cpp @@ -247,36 +247,6 @@ private Q_SLOTS: QCOMPARE(vca.viewport, QRectF(0.0f, 0.0f, 1.0f, 1.0f)); } - void entityGatherer() - { - // GIVEN - QmlSceneReader sceneReader(QUrl("qrc:/testscene_dragenabled.qml")); - QScopedPointer<Qt3DCore::QNode> root(qobject_cast<Qt3DCore::QNode *>(sceneReader.root())); - QVERIFY(root); - QScopedPointer<Qt3DRender::TestAspect> test(new Qt3DRender::TestAspect(root.data())); - - // THEN - QList<Qt3DCore::QEntity *> frontendEntities; - frontendEntities << qobject_cast<Qt3DCore::QEntity *>(root.data()) << root->findChildren<Qt3DCore::QEntity *>(); - QCOMPARE(frontendEntities.size(), 4); - - // WHEN - Qt3DRender::Render::PickingUtils::EntityGatherer gatherer(test->nodeManagers()->lookupResource<Qt3DRender::Render::Entity, Qt3DRender::Render::EntityManager>(root->id())); - QVector<Qt3DRender::Render::Entity *> entities = gatherer.entities(); - - // THEN - QCOMPARE(frontendEntities.size(), entities.size()); - - std::sort(frontendEntities.begin(), frontendEntities.end(), - [] (Qt3DCore::QEntity *a, Qt3DCore::QEntity *b) { return a->id() > b->id(); }); - - std::sort(entities.begin(), entities.end(), - [] (Qt3DRender::Render::Entity *a, Qt3DRender::Render::Entity *b) { return a->peerId() > b->peerId(); }); - - for (int i = 0, e = frontendEntities.size(); i < e; ++i) - QCOMPARE(frontendEntities.at(i)->id(), entities.at(i)->peerId()); - } - void checkCurrentPickerChange_data() { generateAllPickingSettingsCombinations(); diff --git a/tests/auto/render/qshaderprogram/included.frag b/tests/auto/render/qshaderprogram/included.frag new file mode 100644 index 000000000..0c954ed15 --- /dev/null +++ b/tests/auto/render/qshaderprogram/included.frag @@ -0,0 +1 @@ +out vec4 fragColor; diff --git a/tests/auto/render/qshaderprogram/main.frag b/tests/auto/render/qshaderprogram/main.frag new file mode 100644 index 000000000..f30bd8c45 --- /dev/null +++ b/tests/auto/render/qshaderprogram/main.frag @@ -0,0 +1 @@ +#pragma include included.frag diff --git a/tests/auto/render/qshaderprogram/mainabsolute.frag b/tests/auto/render/qshaderprogram/mainabsolute.frag new file mode 100644 index 000000000..85a013111 --- /dev/null +++ b/tests/auto/render/qshaderprogram/mainabsolute.frag @@ -0,0 +1 @@ +#pragma include :/included.frag diff --git a/tests/auto/render/qshaderprogram/qshaderprogram.pro b/tests/auto/render/qshaderprogram/qshaderprogram.pro index 6f40caee9..4ab65c455 100644 --- a/tests/auto/render/qshaderprogram/qshaderprogram.pro +++ b/tests/auto/render/qshaderprogram/qshaderprogram.pro @@ -8,5 +8,8 @@ CONFIG += testcase SOURCES += tst_qshaderprogram.cpp +RESOURCES += \ + shaders.qrc + include(../../core/common/common.pri) include(../commons/commons.pri) diff --git a/tests/auto/render/qshaderprogram/shaders.qrc b/tests/auto/render/qshaderprogram/shaders.qrc new file mode 100644 index 000000000..34a5cd22c --- /dev/null +++ b/tests/auto/render/qshaderprogram/shaders.qrc @@ -0,0 +1,7 @@ +<RCC> + <qresource prefix="/"> + <file>included.frag</file> + <file>main.frag</file> + <file>mainabsolute.frag</file> + </qresource> +</RCC> diff --git a/tests/auto/render/qshaderprogram/tst_qshaderprogram.cpp b/tests/auto/render/qshaderprogram/tst_qshaderprogram.cpp index 901ee7349..3fcc49067 100644 --- a/tests/auto/render/qshaderprogram/tst_qshaderprogram.cpp +++ b/tests/auto/render/qshaderprogram/tst_qshaderprogram.cpp @@ -511,6 +511,24 @@ private Q_SLOTS: QCOMPARE(status(), newStatus); } + void checkIncludes() + { + // GIVEN + Qt3DRender::QShaderProgram shaderProgram; + QByteArray includedContent = shaderProgram.loadSource(QUrl(QStringLiteral("qrc:/included.frag"))); + + // WHEN (test relative include) + QByteArray mainContent = shaderProgram.loadSource(QUrl(QStringLiteral("qrc:/main.frag"))); + + // THEN + QVERIFY(mainContent.indexOf(includedContent) == 0); + + // WHEN (test absolute include) + mainContent = shaderProgram.loadSource(QUrl(QStringLiteral("qrc:/mainabsolute.frag"))); + + // THEN + QVERIFY(mainContent.indexOf(includedContent) == 0); + } }; QTEST_MAIN(tst_QShaderProgram) diff --git a/tests/auto/render/render.pro b/tests/auto/render/render.pro index 5e0381237..ac1ef50dd 100644 --- a/tests/auto/render/render.pro +++ b/tests/auto/render/render.pro @@ -129,7 +129,6 @@ qtConfig(qt3d-opengl-renderer):qtConfig(private_tests) { graphicshelpergl2 \ materialparametergathererjob \ textures \ - scene2d \ renderer \ renderviewutils \ renderviews \ diff --git a/tests/auto/render/renderer/tst_renderer.cpp b/tests/auto/render/renderer/tst_renderer.cpp index 00ded02b0..012cdb1b1 100644 --- a/tests/auto/render/renderer/tst_renderer.cpp +++ b/tests/auto/render/renderer/tst_renderer.cpp @@ -35,6 +35,7 @@ #include <Qt3DRender/private/renderview_p.h> #include <Qt3DRender/private/renderviewbuilder_p.h> #include <Qt3DRender/private/offscreensurfacehelper_p.h> +#include <Qt3DRender/private/renderqueue_p.h> class tst_Renderer : public QObject { @@ -131,6 +132,7 @@ private Q_SLOTS: // GIVEN Qt3DRender::Render::NodeManagers nodeManagers; Qt3DRender::Render::Renderer renderer(Qt3DRender::QRenderAspect::Synchronous); + Qt3DRender::Render::RenderQueue *renderQueue = renderer.renderQueue(); Qt3DRender::Render::OffscreenSurfaceHelper offscreenHelper(&renderer); Qt3DRender::Render::RenderSettings settings; // owned by FG manager @@ -151,6 +153,12 @@ private Q_SLOTS: // NOTE: FilterCompatibleTechniqueJob and ShaderGathererJob cannot run because the context // is not initialized in this test + const int renderViewBuilderMaterialCacheJobCount = 1 + Qt3DRender::Render::RenderViewBuilder::optimalJobCount(); + // syncMaterialGathererJob + // n * materialGathererJob + const int layerCacheJobCount = 2; + // filterEntityByLayerJob, + // syncFilterEntityByLayerJob const int singleRenderViewJobCount = 8 + 1 * Qt3DRender::Render::RenderViewBuilder::optimalJobCount(); // RenderViewBuilder renderViewJob, // syncRenderViewInitializationJob, @@ -175,6 +183,7 @@ private Q_SLOTS: singleRenderViewJobCount); // Only valid for the first call to renderBinJobs(), since subsequent calls won't have the renderqueue reset renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::EntityEnabledDirty, nullptr); @@ -187,9 +196,12 @@ private Q_SLOTS: 1 + // VAOGatherer 1 + // updateSkinningPaletteJob 1 + // SyncLoadingJobs - 1); // EntityEnabledDirty + 1 + // EntityEnabledDirty + singleRenderViewJobCount + + layerCacheJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::TransformDirty, nullptr); @@ -205,9 +217,28 @@ private Q_SLOTS: 1 + // UpdateShaderDataTransform 1 + // updateSkinningPaletteJob 1 + // SyncLoadingJobs - 1); // ExpandBoundingVolumeJob + 1 + // ExpandBoundingVolumeJob + singleRenderViewJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); + + // WHEN + renderer.markDirty(Qt3DRender::Render::AbstractRenderer::MaterialDirty, nullptr); + jobs = renderer.renderBinJobs(); + + // THEN (level + QCOMPARE(jobs.size(), + 1 + // updateLevelOfDetailJob + 1 + // cleanupJob + 1 + // VAOGatherer + 1 + // updateSkinningPaletteJob + 1 + // SyncLoadingJobs + singleRenderViewJobCount + + renderViewBuilderMaterialCacheJobCount); + + renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::GeometryDirty, nullptr); @@ -222,9 +253,13 @@ private Q_SLOTS: 1 + // UpdateMeshTriangleListJob 1 + // updateSkinningPaletteJob 1 + // SyncLoadingJobs - 1); // ExpandBoundingVolumeJob + 1 + // ExpandBoundingVolumeJob + 1 + // RenderableEntityFilterJob + 1 + // CacheRenderableEntitiesJob + singleRenderViewJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::BuffersDirty, nullptr); @@ -239,9 +274,11 @@ private Q_SLOTS: 1 + // SyncLoadingJobs 1 + // CalculateBoundingVolumeJob 1 + // UpdateMeshTriangleListJob - 1); // BufferGathererJob + 1 + // BufferGathererJob + singleRenderViewJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::TexturesDirty, nullptr); @@ -254,10 +291,11 @@ private Q_SLOTS: 1 + // VAOGatherer 1 + // TexturesGathererJob 1 + // updateSkinningPaletteJob - 1); // SyncLoadingJobs + 1 + // SyncTexturesGathererJob + singleRenderViewJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); - + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::FrameGraphDirty, nullptr); @@ -268,9 +306,13 @@ private Q_SLOTS: 1 + // cleanupJob 1 + // VAOGatherer 1 + // updateSkinningPaletteJob - 1); // SyncLoadingJobs + 1 + // SyncLoadingJobs + singleRenderViewJobCount + + layerCacheJobCount + + renderViewBuilderMaterialCacheJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // WHEN renderer.markDirty(Qt3DRender::Render::AbstractRenderer::AllDirty, nullptr); @@ -293,9 +335,19 @@ private Q_SLOTS: 1 + // VAOGatherer 1 + // BufferGathererJob 1 + // TexturesGathererJob - 1); // UpdateEntityLayersJob + 1 + // LightGathererJob + 1 + // CacheLightJob + 1 + // RenderableEntityFilterJob + 1 + // CacheRenderableEntitiesJob + 1 + // ComputableEntityFilterJob + 1 + // CacheComputableEntitiesJob + 1 + // UpdateEntityLayersJob + singleRenderViewJobCount + + layerCacheJobCount + + renderViewBuilderMaterialCacheJobCount); renderer.clearDirtyBits(Qt3DRender::Render::AbstractRenderer::AllDirty); + renderQueue->reset(); // Properly shutdown command thread renderer.shutdown(); diff --git a/tests/auto/render/renderviewbuilder/tst_renderviewbuilder.cpp b/tests/auto/render/renderviewbuilder/tst_renderviewbuilder.cpp index 10c110fdc..3cc23178b 100644 --- a/tests/auto/render/renderviewbuilder/tst_renderviewbuilder.cpp +++ b/tests/auto/render/renderviewbuilder/tst_renderviewbuilder.cpp @@ -346,13 +346,6 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.syncFrustumCullingJob()->dependencies().contains(testAspect.renderer()->updateWorldTransformJob())); QVERIFY(renderViewBuilder.syncFrustumCullingJob()->dependencies().contains(testAspect.renderer()->updateShaderDataTransformJob())); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { - QCOMPARE(materialGatherer->dependencies().size(), 3); - QVERIFY(materialGatherer->dependencies().contains(testAspect.renderer()->introspectShadersJob())); - QVERIFY(materialGatherer->dependencies().contains(renderViewBuilder.syncRenderViewInitializationJob())); - QVERIFY(materialGatherer->dependencies().contains(testAspect.renderer()->filterCompatibleTechniqueJob())); - } - // Step 4 QCOMPARE(renderViewBuilder.frustumCullingJob()->dependencies().size(), 2); QVERIFY(renderViewBuilder.frustumCullingJob()->dependencies().contains(renderViewBuilder.syncFrustumCullingJob())); @@ -366,19 +359,16 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->introspectShadersJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->bufferGathererJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->textureGathererJob())); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { - QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(materialGatherer)); - } // Step 5 - for (const auto renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { + for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { QCOMPARE(renderViewBuilderJob->dependencies().size(), 1); QCOMPARE(renderViewBuilderJob->dependencies().first().data(), renderViewBuilder.syncRenderCommandBuildingJob().data()); } // Step 6 QCOMPARE(renderViewBuilder.syncRenderViewCommandBuildersJob()->dependencies().size(), renderViewBuilder.renderViewBuilderJobs().size()); - for (const auto renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { + for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { QVERIFY(renderViewBuilder.syncRenderViewCommandBuildersJob()->dependencies().contains(renderViewBuilderJob)); } } @@ -386,6 +376,7 @@ private Q_SLOTS: // WHEN Qt3DRender::Render::RenderViewBuilder renderViewBuilder(leafNode, 0, testAspect.renderer()); renderViewBuilder.setLayerCacheNeedsToBeRebuilt(true); + renderViewBuilder.setMaterialGathererCacheNeedsToBeRebuilt(true); renderViewBuilder.prepareJobs(); renderViewBuilder.buildJobHierachy(); @@ -418,9 +409,10 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.syncFrustumCullingJob()->dependencies().contains(testAspect.renderer()->updateWorldTransformJob())); QVERIFY(renderViewBuilder.syncFrustumCullingJob()->dependencies().contains(testAspect.renderer()->updateShaderDataTransformJob())); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { - QCOMPARE(materialGatherer->dependencies().size(), 2); + for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { + QCOMPARE(materialGatherer->dependencies().size(), 3); QVERIFY(materialGatherer->dependencies().contains(renderViewBuilder.syncRenderViewInitializationJob())); + QVERIFY(materialGatherer->dependencies().contains(testAspect.renderer()->introspectShadersJob())); QVERIFY(materialGatherer->dependencies().contains(testAspect.renderer()->filterCompatibleTechniqueJob())); } @@ -429,7 +421,6 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.frustumCullingJob()->dependencies().contains(renderViewBuilder.syncFrustumCullingJob())); QVERIFY(renderViewBuilder.frustumCullingJob()->dependencies().contains(testAspect.renderer()->expandBoundingVolumeJob())); - QCOMPARE(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().size(), renderViewBuilder.materialGathererJobs().size() + 7); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(renderViewBuilder.syncRenderViewInitializationJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(renderViewBuilder.syncFilterEntityByLayerJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(renderViewBuilder.frustumCullingJob())); @@ -437,19 +428,16 @@ private Q_SLOTS: QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->introspectShadersJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->bufferGathererJob())); QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(testAspect.renderer()->textureGathererJob())); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { - QVERIFY(renderViewBuilder.syncRenderCommandBuildingJob()->dependencies().contains(materialGatherer)); - } // Step 5 - for (const auto renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { + for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { QCOMPARE(renderViewBuilderJob->dependencies().size(), 1); QCOMPARE(renderViewBuilderJob->dependencies().first().data(), renderViewBuilder.syncRenderCommandBuildingJob().data()); } // Step 6 QCOMPARE(renderViewBuilder.syncRenderViewCommandBuildersJob()->dependencies().size(), renderViewBuilder.renderViewBuilderJobs().size()); - for (const auto renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { + for (const auto &renderViewBuilderJob : renderViewBuilder.renderViewBuilderJobs()) { QVERIFY(renderViewBuilder.syncRenderViewCommandBuildersJob()->dependencies().contains(renderViewBuilderJob)); } } @@ -569,7 +557,7 @@ private Q_SLOTS: // THEN QCOMPARE(renderViewBuilder.frustumCullingJob()->isActive(), false); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { + for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { QVERIFY(materialGatherer->techniqueFilter() == nullptr); QVERIFY(materialGatherer->renderPassFilter() == nullptr); } @@ -580,7 +568,7 @@ private Q_SLOTS: // THEN QCOMPARE(renderViewBuilder.frustumCullingJob()->isActive(), true); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { + for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { QVERIFY(materialGatherer->techniqueFilter() != nullptr); QVERIFY(materialGatherer->renderPassFilter() != nullptr); } @@ -596,7 +584,7 @@ private Q_SLOTS: QCOMPARE(renderViewBuilder.frustumCullingJob()->isActive(), false); QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->hasLayerFilter(), false); QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->layerFilters().size(), 0); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { + for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { QVERIFY(materialGatherer->techniqueFilter() == nullptr); QVERIFY(materialGatherer->renderPassFilter() == nullptr); } @@ -609,7 +597,7 @@ private Q_SLOTS: QCOMPARE(renderViewBuilder.frustumCullingJob()->isActive(), true); QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->hasLayerFilter(), true); QCOMPARE(renderViewBuilder.filterEntityByLayerJob()->layerFilters().size(), 1); - for (const auto materialGatherer : renderViewBuilder.materialGathererJobs()) { + for (const auto &materialGatherer : renderViewBuilder.materialGathererJobs()) { QVERIFY(materialGatherer->techniqueFilter() != nullptr); QVERIFY(materialGatherer->renderPassFilter() != nullptr); } diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index 718e6a522..f5a51907a 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -61,7 +61,8 @@ SUBDIRS += \ shared_texture_image \ texture_property_updates \ raster-cpp \ - raster-qml + raster-qml \ + qtbug-72236 qtHaveModule(multimedia): { SUBDIRS += \ diff --git a/tests/manual/qtbug-72236/main.cpp b/tests/manual/qtbug-72236/main.cpp new file mode 100644 index 000000000..2bf90c03f --- /dev/null +++ b/tests/manual/qtbug-72236/main.cpp @@ -0,0 +1,149 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QGuiApplication> +#include <QThread> +#include <QTimer> + +#include <Qt3DInput/QInputAspect> + +#include <Qt3DRender/qcamera.h> +#include <Qt3DRender/qcameralens.h> +#include <Qt3DExtras/qcylindermesh.h> +#include <Qt3DRender/qmesh.h> +#include <Qt3DRender/qtechnique.h> +#include <Qt3DExtras/qphongmaterial.h> +#include <Qt3DRender/qeffect.h> +#include <Qt3DRender/qtexture.h> +#include <Qt3DRender/qrenderpass.h> +#include <Qt3DRender/qrenderaspect.h> +#include <Qt3DExtras/qforwardrenderer.h> + +#include <Qt3DCore/qentity.h> +#include <Qt3DCore/qtransform.h> +#include <Qt3DCore/qaspectengine.h> + +#include <Qt3DExtras/qt3dwindow.h> +#include <Qt3DExtras/qorbitcameracontroller.h> + +#include <Qt3DRender/QLayer> +#include <Qt3DRender/QLayerFilter> + +using namespace Qt3DRender; + +int main(int argc, char **argv) +{ + QGuiApplication app(argc, argv); + Qt3DExtras::Qt3DWindow view; + + // Root entity + Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity(); + + // Camera + Qt3DRender::QCamera *camera = view.camera(); + camera->lens()->setPerspectiveProjection(45.0f, 16.0f/9.0f, 0.1f, 1000.0f); + camera->setPosition(QVector3D(0, 0, 20.0f)); + camera->setUpVector(QVector3D(0, 1, 0)); + camera->setViewCenter(QVector3D(0, 0, 0)); + + // For camera controls + Qt3DExtras::QOrbitCameraController *cameraController = new Qt3DExtras::QOrbitCameraController(rootEntity); + cameraController->setCamera(camera); + + // Cylinder shape data + Qt3DExtras::QCylinderMesh *mesh = new Qt3DExtras::QCylinderMesh(); + mesh->setRadius(1); + mesh->setLength(3); + mesh->setRings(100); + mesh->setSlices(20); + + // Transform for cylinder + Qt3DCore::QTransform *transform = new Qt3DCore::QTransform; + transform->setScale(1.5f); + transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f)); + + // Material + Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity); + material->setDiffuse(Qt::red); + + // Cylinder + Qt3DCore::QEntity *cylinder = new Qt3DCore::QEntity(rootEntity); + cylinder->addComponent(mesh); + cylinder->addComponent(transform); + cylinder->addComponent(material); + + QTimer *timer = new QTimer(rootEntity); + QObject::connect(timer, &QTimer::timeout, [=](){ + for (int i = 0; i < 2; i++) { + auto *dummy = new Qt3DCore::QNode(rootEntity); + auto *dummy2 = new Qt3DCore::QNode(dummy); + auto *layerFilter = new QLayerFilter(dummy2); + auto *layer = new QLayer(); + + layerFilter->addLayer(layer); + + cylinder->addComponent(layer); + } + }); + timer->start(1000); + + QTimer *timer2 = new QTimer(rootEntity); + QObject::connect(timer2, &QTimer::timeout, [](){ + QThread::msleep(100); + }); + timer2->start(100); + + // Set root object of the scene + view.setRootEntity(rootEntity); + view.show(); + + return app.exec(); +} diff --git a/tests/manual/qtbug-72236/qtbug-72236.pro b/tests/manual/qtbug-72236/qtbug-72236.pro new file mode 100644 index 000000000..d3db3bc76 --- /dev/null +++ b/tests/manual/qtbug-72236/qtbug-72236.pro @@ -0,0 +1,9 @@ +!include( ../manual.pri ) { + error( "Couldn't find the manual.pri file!" ) +} + +QT += 3dcore 3drender 3dinput 3dextras + +SOURCES += main.cpp + + |