| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is totally valid to have actually the same node used for 2 distinct
connections (e.g setting 2 different node properties to the same node).
With the hash, the second setter call would overwrite the first connection
resulting in leaving a dangling connection around potentially resulting in
crashes.
Instead use a QVector<pair<node, connection>> and adjust code accordingly.
Change-Id: I49870c409c3f7b629c8f1bdfcb8757a904db2490
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on macOS, blocking the main thread waiting for current frame to finish
can lead to events flooding the event queue. In particular, moving the
mouse over the window causes the QBasicTimer used by the uniform
timer that drives (qtquick) animations to no longer fire.
Use tryAcquire to get the resources, waiting a short while to avoid
busy main thread.
Task-number: QTBUG-79379
Change-Id: I930aa8ad7d5a15600d7ac7af93e6e72321457089
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a QNode subclass is created doing Subclass(parent) with parent != nullptr
QNodePrivate::_q_postContrustorInit is called through a queued invocation
due to the fact that the QNode ctor is called before the subclass ctor is
(and we need the class to be fully constructed to do proper initialization).
When adding a QNode subclass created as described above, and immediately
referencing it as a property of another QNode, we can end up in cases where
the backend gets aware of the node being referenced in the relationship and
tries to create its backend. Unfortunately due to the queued invocation of
_q_postConstructorInit, the frontend node has yet to be fully initialized,
resulting in the creation of the backend node to assert/crash.
Therefore, when updateNode is called (whenever a subnode is referenced in a
relationship) we now ensure that postConstructorInit gets (or has already been)
called.
Change-Id: Iea6e0b5a59c676f5db2946bec2f8c345accc32b0
Task-number: QTBUG-79350
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
| |
Set the nodes created on the backend properly (assigning parent) so
that the backend nodes get created before the second round of updates.
Change-Id: Ia8ac9aacfc6bdb8938d07dbf714d471b5ddc4999
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Removal breaks BC
Change-Id: I8c324253c3a39c8fd74bf4cc14462f76cd2e4f5e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Made the d_ptr private again.
Change-Id: Ia5ba23b03cd22290d5c922e9a1c657a67ff98977
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I347f6df41c0a4f2295831e78248669b4a2d6b5ef
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Not BIC compatible so they must stay until Qt6. Added TODO above them
to make it easier to track for Qt6.
Change-Id: Ia1adba25be5d55d3fa836727877c7c1f7346b668
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
And matching unit tests
Change-Id: Iff0b13b2ad9ff07d08c767f4b20de2a1685a5570
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ic91a4f168172d6f34d858488e6fc170e8ed875f9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I00c875b48d838170fddf0b92f0ac5592828c6f0f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
| |
Change-Id: Iba2fa5ce9d295706fc50f904cac68f00bd8f02b7
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ib09024017a2d213e50b3acc89d7c411728eb1869
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I5622f9784628b7217f6e37c700ac314b7264f439
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Animation data is now stored in the job which propagates
them to the frontend at the end of the frame.
Animated properties are passed using Qt's property system.
Animated poses are passed via the frontend skeleton node.
Syncing on new frame will take care of propagating both for use in
other aspects.
Callbacks are called by the job directly or stored and invoked on
the main thread depending on the callback setting.
Change-Id: I78675715799300bc1b27f854f1a445c00a2ac734
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Otherwise when using Scene3D rendering, we might not renderer
when using the OnDemand policy.
Change-Id: I32b840751ed10661acef1fb37c827a9ad6f0ff49
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce mechanism to notify backend nodes of changes in relationship
between nodes. If a component is added or removed from an entity,
or if a node is added or removed from a property of another node, then
just rely on the node being marked as dirty when syncing takes place.
For nodes that do not support syncing, messages are delivered as before
but allocated on the stack rather than the heap.
Change-Id: I06affac77e42a9998d9c7f44e231c7724c52b320
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Useful later to sync backend changes back to the frontend.
Change-Id: I874d140fc97462b8e186b66c882647db26d5678e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ibf24099223bd35948f50a492e0d754f6f680a3db
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
This gets called in the main so it's safe for jobs to propagate
results from the run at this point.
Change-Id: I7d2f31472ec1fcd1801dcb9ded735f9f1e5214f9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Remove include statements for classes that are no longer used. Makes
it easier to find remaining use cases that need addressed before
complete removal in Qt 6.
Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I5b1af685c640c218d3720d5339b14dfc913e01c5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
QChannelMapping, QSkeletonMapping and QCallbackMapping updated.
Change-Id: I10b78d86856f6ad01fbb313fdcbe9f87f6d926ac
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Use loadRelaxed(), storeRelaxed(), fixing warnings like:
renderers/opengl/renderer/renderer.cpp:451:22: warning: ‘void QBasicAtomicInteger<T>::store(T) [with T = int]’ is deprecated: Use storeRelaxed [-Wdeprecated-declarations]
qt3d/src/render/renderers/opengl/renderer/renderer_p.h:188:61: warning: ‘T QBasicAtomicInteger<T>::load() const [with T = int]’ is deprecated: Use loadRelaxed [-Wdeprecated-declarations]
Change-Id: Ica946808969e7f311c98e30d1a61c1b4fa22f66a
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ifc8b172414e01cebcaf42c30773376c43aaae9a9
Task-number: QTBUG-77859
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NodePostConstructorInit::processNodes and QAspectManager::processFrame
are both triggered by the event loop which means the frame can happen
before the processNodes call. We want to ensure processNodes is called
first so those pending nodes can be created during the processFrame call
otherwise they will get deferred until the next frame.
Created a test to show this and removed the now unnecessary double calls
to processEvents in several other tests.
Change-Id: I7a3f7b34be2858b4acdb9275804b458f9366ec67
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I2b86f182a61c18cb6608f2f89938ab342160c924
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I9fa6e67607baa66250789b8bf618f30bd45aad98
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
| |
- Stop using messages
- Remove QSceneObserverInterface
- Ensure backend node creation/destruction is done at the right time
Change-Id: I470825af344ab65bf05e93fc149b61d1b9eefc96
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|\
| |
| |
| | |
Change-Id: I4e73060c1941773efcc568f010f5b073ebb10d4a
|
| |\
| | |
| | |
| | | |
Change-Id: I7d7274866129a3c8a3ed3788680a46368120d20d
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I4584d2c879a72eccbaf273d0e84b3b6f6bb55295
Task-number: QTBUG-77675
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Triggered by gcc version 4.8.5 (SUSE Linux):
src/core/nodes/qentity.h: In member function ‘QVector<T*> Qt3DCore::QEntity::componentsOfType() const’:
src/core/nodes/qentity.h:69:32: error: declaration of ‘components’ shadows a member of 'this' [-Werror=shadow]
const QComponentVector components = this->components();
^
Change-Id: I02507b3ff75b0f21d958955f3ce9a8b01f471d05
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(wasn't really needed before)
Change-Id: I213da50ec995015e7a70f2ea1e5c5557f038be0e
Reviewed-by: Jim Albamont <jim.albamont@kdab.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the node type supports syncing, use that rather than the creation
message. The message is still needed since that is passed to the
instantiation functor (none of qt3d's classes appear to use anything
but the node id, but can't be sure no other classes do, and can't add
other virtual method without breaking BC).
Change-Id: Id99f448070b8722a7809b968798772c9eb3c8397
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|\ \ \
| | | |
| | | |
| | | | |
Change-Id: Id73bbecd18edaf46ba481aa018e837a336860223
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since aspect manager is now on main thread, we can directly update
backend nodes safely. Track nodes which have changed properties and
notify the backend nodes as part of the frame loop.
This avoid allocating and delivering many change messages.
To follow:
- implement on all nodes
- look at backend to frontend syncing
- figure out what to do with non property messages (components
added/removed, commands, ...)
Change-Id: Ia0c442b0528e728c4324d168200bae021bc29266
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Handle Manual Drive mode / Scene3D changes jobs stats
Change-Id: Iadd7dd64580ce88145b264df5adcfc8bcb36b66a
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Can be either Automatic (Qt3D is in charge or driving it) or manual
where the user has to call QAspectManager::processFrame() manually.
Change-Id: I3e41d24aea0ddc5cce61328d9731b23f91b54215
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This now makes the Qt3D simulation loop run in the Main Thread.
In theory having the Aspect Thread allowed Qt3D to continue rendering
even if the main thread got locked. In practice however this leads to
a large amount of complexities in the Qt3D implementations and provides
little value as in most cases blocking the main thread would block animations
driven by frontend nodes.
Removing the Aspect Thread will allow to remove the backend tree copies each
aspect had to make which will allow to reduce memory. In addition, getting direct
access to frontend nodes, will now be possible without introducing races which
should allow to make more optimizations and reduce latencies on some operations.
Change-Id: I80e4cd6427de06ddedfa1bb50d40710b91867b24
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Will make it more convenient to retrieve the world transform of a given
QEntity as well as monitor it for changes without having to traverse the
parent hierarchy of QEntity/QTransform
[ChangeLog] Add worldMatrix property on QTransform
Change-Id: Ie9ffb70c03b365850ed08693df2746701ca9a1fb
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also port from QMutexLocker to std::lock_guard, as the former will not
support QRecursiveMutex going forward.
Change-Id: I65e14492fc0583e5d0018aef64e18db8a6023dc8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The event filters are ordered by priority, so don't use a linear scan
in order to find whether one with the same position already exists,
use lower_bound, whose result at the same time gives the position of
an existing filter (if any), as well as the insertion position for the
new element. So no need to do a full sort afterwards, either.
Change the exisitng op< into an aptly-named lambda, and don't depend on
transitive includes.
Also, since this code does not need the CoW feature of QVector, port to
std::vector, which is faster and produces more compact code.
Altogether saves ~2KiB (0.47%) in text size on optimized Linux AMD64
GCC 9.1 builds.
Change-Id: Ie46ca2fbb2dcbea23a0098a72336604776dcc296
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I402937171aca2eaaeaea5ced3fd9095db08a38d5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|\| |
| | |
| | |
| | | |
Change-Id: I942a33e63084b346702577e28c70f2111e40a4d5
|
| |\|
| | |
| | |
| | | |
Change-Id: I903f92a7b910eee165a2dd708a2d5fb25192ab14
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Automatic removal of components when they are destroyed is based on
connecting to the destroyed() signal. This however means that by the
time removeComponent() is called, the pointer is no longer a valid
QComponent (just a QNode). While accessing member data of derived
classes such as nodeId is fine, emitting signals from derived class
does nothing, and in some cases asserts.
Fix this by:
- doing the QComponent clean up from it's destructor
- implementing a separate method on QEntity to simply clear the now
partly invalid pointer from the list.
Change-Id: Id7632ee2ceaff6548c44c7a43ae40a0372febde9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.
Change-Id: Id6a813ed5c0a457f003dbd118b64f77d9d82cb13
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
jobs/qaspectjobmanager.cpp:90:72: warning: 'T* QWeakPointer<T>::data() const [with T = Qt3DCore::QAspectJob]' is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations]
defaults/qtexturematerial.cpp:66:431: warning: 'QVariant qVariantFromValue(const T&) [with T = QGenericMatrix<3, 3, float>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
...
testpostmanarbiter.cpp:75:51: warning: 'static QVector<T> QVector<T>::fromStdVector(const std::vector<T>&) [with T = QSharedPointer<Qt3DCore::QSceneChange>]' is deprecated: Use QVector<T>(vector.begin(), vector.end()) instead. [-Wdeprecated-declarations]
tst_qray3d.cpp:510:100: warning: 'QVariant qVariantFromValue(const T&) [with T = Qt3DRender::RayCasting::QRay3D]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
tst_renderviewbuilder.cpp:331:120: warning: 'T* QWeakPointer<T>::data() const [with T = Qt3DCore::QAspectJob]' is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations]
...
Change-Id: I446f3ddeb7aa2c5698d2a976fa163b443e01cc0c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before, the Scene3DRenderer marked the sg-node dirty in render, which
would then already mark it dirty for the next frame. This only works as
long as we always render, which is undesireble in some cases.
fa12f14b2 changed rendering to not always happen anymore. Thus, that
commit broke rendering under certain circumstances.
Now, Scene3DRenderer listens on a signal from the QChangeArbiter about
new pending changes. In reaction to this signal, we set an internal
dirty-flag in Scene3DRenderer. Only if this flag is set, synchronization
and rendering will happen on the Qt3D side.
Change-Id: I3b33faa5d60c270bd9b903b0e34c8fa24e2e29fd
Task-number: QTBUG-69985
Task-number: QTBUG-72923
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|