| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Allows to render several 3D scenes using a single Scene3D. To be used when
you need multiple Scene3D instances.
[ChangeLog] Introduce Scene3DView to render multiple distinct 3D scenes
Change-Id: I5d51c5935218cc84c15d57def3703aa0d92040ba
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
| |
Change-Id: I6c9313616587c7930560a5abd962ad73d0bfff70
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default compositing mode is FBO.
One of the problematic aspects of Scene3D is its round trip
through a FBO, which is moderately expensive on low-end hardware,
although it makes it a fully fledged Qt Quick 2 item. If one
wants MSAA then things are even worse, as an intermediate MS'ed
FBO is needed, then resolving into the final one, whose color
texture is then sampled.
However, there's a significant use case for which these FBOs
can be avoided, and that's the case of a 3D scene "below" other
QQ2 content. In this setup, Qt3D can simply render to the
screen, driven by QQ2; then QQ2 can draw on top.
(It's the typical "underlay" scenario.) This can be enabled by setting
the compositing mode to Underlay
[ChangeLog] Scene3D add compositingMode property. Allows underlay rendering.
Task-number: QTBUG-74977
Change-Id: I1ec5f5d60eab45835dbdb2596a7bf1b2ac3624e0
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we only create a backend node for the first RenderSettings component that
is inserted in the scene, we should only destroy that instance. Otherwise, in
the case we have several QRenderSettings components in a scene, if one of them
gets destroyed we might end up destroying the RenderSettings instanced actually
used by the Renderer.
We so far assumed there would only be a single QRenderSettings per application
but introducing Scene3DView might change that.
Change-Id: Ibef1328253b871f3b40a2298ccd8504130d75d86
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Needed for cases where Scene3D is used as an Underlay
Change-Id: I13889efc146d278a6331000f886b8fcb33448f65
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now makes Scene3D rendering fully synchronous and blocking:
- All Qt3D jobs have to be executed before we can render the GL
commands
This makes the blocking mode that could be activated with
SCENE3D_BLOCKING_RENDERMODE the default behavior now and therefore
we could remove references to it in the code.
This now means that Qt3D and QtQuick will be rendering at the same
refresh rate, which in most cases won't be noticeable and will ensure
that content from Qt3D scenes matches content from QtQuick scenes.
The only downside is if the Qt3D rendering takes longer than the time
expected by QtQuick, the whole QtQuick rendering will be slowed down.
Previously the QtQuick rendering might have still run at 60fps while
the Qt3D rendering at a lower fps. Now the QtQuick fps would be the
same as the Qt3D fps. That being said, the old behavior also meant
that if Qt3D didn't catch up, the delay between QtQuick and Qt3D
would only increase frame after frame.
This change allow to simplify the internals by making Scene3D and regular Qt3D
use the same code paths internally.
Please note that Scene3D relies on QQuickWindow::afterAnimating being called
each frame. When using a QQuickRenderControl this means you might have to call
it manually as part of your rendering code.
Task-number: QTBUG-72385
Change-Id: I887daf6df632e296a892b844e738a67e973fee7f
Reviewed-by: Mike Krus <mike.krus@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>
|
|\ |
|
|/|
| |
| |
| | |
Change-Id: I61324b258ed28d420c96acafd4e624655ffb40e1
|
| |
| |
| |
| |
| | |
Change-Id: Idbf02a3852c5128e41f79d376900e6d06ba1a0c5
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since QSkyboxEntity creating empty cube map first and using QTimer to
delay loading real cube map, in render thread, GLTexture will use the
generator function of empty cube map to generate a QTextureImageDataPtr
at first, this will set the format of property of GLTexture to NoFormat,
and terminate the creation of GLTexture. Although GLTexture read real
real cube map next time, format will not be reset and the creation of
GLTexture terminates.
[ChangeLog][Qt3DRender][QImageTextureDataFunctor] return a invalid
image data when url is invalid to ensure the property of GLTexture will
not be set to NoFormat
Fixes: QTBUG-74017
Change-Id: If48f727dba817a931d618b2b88c7ebd54c508c47
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |\ |
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
tests/manual/manual.pro
Change-Id: I15d497da84d3fe684c3a598831171d6aed7534ca
|
| | | |\ |
|
| | | |/|
| | | | |
| | | | |
| | | | | |
Change-Id: Id2885cdbb45f8aa701e218b6201f0a3732b7ef11
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
But only markDirty(ParametersDirty) as that's the only thing
this is affecting.
Change-Id: I450d013dc266ca70ca51cfa866b731a6e8b6499a
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Id82777c111827e8db8924d2d39b5844386344b69
Task-number: QTBUG-76767
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I8d56836f1f075c7239b262454131062c10058026
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |\ \ |
|
| | | |/| |
| | | | |/
| | | | |
| | | | | |
Change-Id: I2a66e9344b72524431885bdf5f59fcaedb94c718
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's common while textures are loading
Change-Id: I360c88c72fbd0a034aff07451fd49be17b348d40
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were instead checking against the last surface used (which could be null)
instead of the last known good surface to reset the render states. This could
result in not resetting the render states and keeping dangling pointers around.
To know if we can render, we check find the first non null surface in the list
of RV. In most cases we can safelly assume that if first RV has a surface, all
following ones will likely use the same surface.
If we have no good surface we skip the rendering. However in the case you have
a FG where the first RV has a surface but not the last one (which wouldn't
really make sense but can happen if you mess up), we could end up in the above
case where surface is nullptr though we have partially rendered something for
the RV which had valid surfaces.
Change-Id: I902b8c7a943ad2ca7e2f487873f73990cf8db433
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
State and parameter handling are the same between the two branches
Change-Id: Ic8394a969184daead33253c9303c20ecf1a97484
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When merging states, make sure we don't add several states of the same types
with possibly different values. We should only add states with type we don't
already have.
Since the FG traversal is done from leaf to root, we know that the states we
already contain should override any state that may have been specified higher
up in the FG branch.
Change-Id: I9bd1eadd37e8addf740a4b85b2318f9be269fedb
Task-number: QTBUG-76766
Reviewed-by: Sean Harmer <sean.harmer@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>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit d2c52680884095238ec3859fabaad03157af3985.
That was a temporary measure to get qt5 integration going. The code
has since been ported, so this can now be removed again.
Change-Id: I96e0470481ad8744048bef72a45f07a3bb63e2ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Inline the function's QtBase implementations into the code here.
Change-Id: I9e9b8b7612f3ca5dcbff7bb8cd33d3355ea170f5
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
... in an attempt to unblock qt5 integration.
Put the warning suppression macros further apart than necessary to
avoid clashing with the actual fix.
Change-Id: I362712d1c6b3035966179755cdc6e631d1954255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ie36f38180d7cca5d8586aec765608bb2cdfb3d4a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
But only markDirty(ParametersDirty) as that's the only thing
this is affecting.
Change-Id: I450d013dc266ca70ca51cfa866b731a6e8b6499a
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |\ \ \ |
|
| |/| | |
| | |/ /
| | | |
| | | | |
Change-Id: I8c12142e4733d0d95fde3e673eb684c47363ff6f
|
| | |\ \ |
|
| | |/| |
| | | |/
| | | |
| | | | |
Change-Id: I0f68ab1277617c32b1c31f29d8793d23d9909208
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Iead857526a06b104080ab843b26c49efc22f05cc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It can be created with a non normalized dir vector but we should
always perform the computations with a normalized dir vector for
correct results.
Change-Id: Ie9108de7ed2092f6b979a70ad9391267fe6c4696
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I4499e945481a22adfbafcc82198f7c411d04301b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In case a joint is added and destroyed within the same loop of the event loop,
we need to remove it from the list of dirty joints to process as this otherwise
results in an assert.
Change-Id: If2f4ece6e2d69a7801ce9c4ec2cb732f48895ad1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Id886decd4f2bd83a2319b4ad792a15b7280cb448
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
colorbuffer -> colorBuffer
Fixes: QTBUG-76342
Change-Id: Ic63ac9b333710ebab17aa7c4ccd9e864f10e6fcf
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The keys are statically known, short, and few, so replace the
QMap<QByteArray, OpenMode> with a C array of a {char[2]; OpenMode}
struct, which occupies just 40B in read-only memory. We don't even
need to sort the list, as binary search in a list of ten entries is
slower than linear search (five comparisons each, on average, with the
linear scan having a predictable memory access pattern.
This is a port of dd1d8f51e67ec93031fdd7f7930d63761d1238e6 to the
other copy of this code, which shows that arguments like 'this is just
a tool, not a library' are ill-advised. Code _will_ be copied.
Change-Id: Ie04137f94e487ce998ec077daf655b09bcbbcfc7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The variable is referenced no-where else.
Change-Id: Iad385c83a1fd3de260f830bf27edabeab7f17cb5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I402937171aca2eaaeaea5ced3fd9095db08a38d5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Found because it's full of Q_FOREACH when the module compiles fine with QT_NO_FOREACH...
Change-Id: I8e34a3f54c1070d4dcc9b5c7b578760860eab72c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
f39178a415cb41470775a86e0aa358faa3686d81 makes QtQuick redraw only when
something in the 3D scene has triggered a change.
A function is connected to QQuickWindow::afterSynchronizing to check
whether the 3D scene needs to be drawn again and if so the corresponding
SceneGraph nodes are marked as dirty. However, we need to ensure the SceneGraph
picks up that we've marked a node as dirty by calling QQuickItem::update().
This forces updatePaintNode to be called at the next frame since the
afterSynchronizing stage occurs after that step.
This fixes rendering freezes with the Always render policy.
Change-Id: I041dbe69d12a7e6e884c8ee0e29720d74ce5fa2f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |\ \ \ |
|