Static library containing helpers for unit tests to avoid having to
build the same files 200 times.
Change-Id: I89d63abbd7777a96276154298c2748e2d6774514
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
qlevelofdetail.cpp:270: warning: Can't link to Qt3dRender::QLevelOfDetailBoundingSphere
Change-Id: I29b023f5a2c60a62dd7bdacf63182649dd947059
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The lights must be part of entities that are actually included in the
final scene effect layer. So the light world positions have to be
forwarded from the actual scene entities to some "dummy" light entities
that exist just for the final scene effect render step.
Also correct model / modelNormal matrices must be used for global
normal/position calculation in the GBuffer render step.
Task-number: QTBUG-46707
Change-Id: I380d2e2ecb008ab0606dcd36cd5d98dd1ec41ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
- Remove type punning mechanism that was used to filter previously (could lead
to undefined behavior)
- Properly filter based on shader and material
- Add unit tests
Change-Id: I8d0fd4a49d586e6ec26515e2cafe1ea94d38f8f1
Task-number: QTBUG-60183
Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes: none.
Change-Id: Ic6368521ebf5841267ffe7917cc652627f7b26a7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Add deallocation guard agains resources allocated by the assimpimporter and
deallocate them when the scene is deallocated.
Task-number: QTBUG-61856
Change-Id: I2f7ddb1654da1674fa448861dfd2b368a55eb4f0
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Up until now, RenderCapture would read back from the back buffer. In cases
where it's used within a RenderTargetSelector, it should instead read back
from the ColorAttachment0 of the framebuffer.
Later on we might allow to specify the ColorAttachment.
Change-Id: I9ca94333184338b2fdb79c5c2668d5929ac8d405
Task-number: QTBUG-61547
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
When rendering distance field text, z-fighting may occur between
adjacent glyphs. To prevent this, we apply a very slight Z offset
to each rendered glyph.
Change-Id: I19f9808267547ae9521757c6022b4f65c1ca4ba5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Fixes glitches in the distancefield text rendering
Change-Id: If957904906025d7eeb974a8fa808f9e6fafd1b79
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
... or you won't be able to load a file called "FOO.DDS".
Task-number: QTBUG-61760
Change-Id: Id46163f62e20e37a844fa60e0be6be2881280a2c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
When passing around animator handles, care must be taken before
actually using them since the animator component may have been
destroyed in the meantime.
Change-Id: Ib963d1422e1626b5a06e5bb157a0b6aab76b961d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
We need to reset the state before and after rendering,
because it may have been dirty before and it might be dirty
afterwards.
Change-Id: Iaa32243aa5721d3e2319b2a58987624f30d6482d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
RGB32F and RGB16F will not work on some drivers.
Shader variables must be initialized to zero, will flicker if not done.
Task-number: QTBUG-56248
Change-Id: Iead5df1a607db80b733aefa73d7a59c8310a8d81
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Entities would try to render and get their projection-matrix based uniforms
from the camera lens, but that is NULL. Print a warning in that case,
as that means that either a NoDraw is missing or a CameraSelector.
Task-number: QTBUG-61656
Change-Id: Ie2bd0d115f3f61568c5b176c6a22500d29495328
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Change render-qml-to-texture-qml and video-texture to use TextureMaterial.
This removes the dependency to the render-qml-to-texture manual test from
these tests. This also fixes the controls in the render-qml-to-texture-qml
test, which were 'upside down'.
Change-Id: I248014decd8f9d06b0e0922d035afe8c0b0f78ff
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Access to the vectors needs to always be protected with mutex
Change-Id: I460a1010fec02c445012e371be73ba0175521c02
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Add deallocation guard and set parent of the reply.
Task-number: QTBUG-61508
Change-Id: Ia299450d792b2254c2944472382c8241b271ebf6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This allows detecting problems with the render capture if the capture
fails.
Change-Id: I20f630eb9a1adb677513ff225d21c7e338c57809
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
qclipanimator.cpp:55: warning: Can't link to AbstractAnimationClip
qparameter.cpp:47: warning: Can't link to 'Texture'
qclipanimator.cpp:55: warning: Can't link to 'ChannelMapper'
Change-Id: I84d8de99d5cfdc390b4e33fdae5882d60842b519
Reviewed-by: Martin Smith <martin.smith@qt.io>
Currently the parent for elements created by NodeInstantiator are set to
the instantiator's parent. This doesn't work for nested instantiators,
since at the time the inner instantiator's children are being created
the instantiator itself doesn't yet have a parent node yet.
Update the parent of elements created by the instantiator when the
instantiator's parent changes.
Change-Id: I6f260ad2a8a81af5551799e6c643d8849f46e342
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Needs isValid() to check for a default constructed QVariant with
no underlying type yet. Using isNull() was a mistake since it will
be true for many default constructed types (0.0f, QVector3D(0), etc.)
Change-Id: I1c7ac10bbb0732a40b67e7dbf61ae5d4185ebac2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Was found when Nathan tried extending QCamera.
Probably good to go through other parts of Qt3D.
Change-Id: I317acaa36ffe3fd0b1ac0bbf4af70eabb1111ab7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Animating a Parameter node would be impossible otherwise since
the 'value' property is a QVariant so QChannelMapping has no chance
of know what really is expected there.
If a value is already set, we can automatically determine the QVariant's
underlying type. If not, show a warning since we have no chance then.
Start handling QMetaType::Float as well since a QVariant will ofen
contain this, not a Double.
Change-Id: I0ba2abbb2c8d85f2aa1a152ed4b8c6cd26f1fc97
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Objects are managed by the instance model, so delete instead of deleting
objects directly.
Task-number: QTBUG-61293
Change-Id: I6ff17e646fce60bf12d575c4c377bee3c82a60cb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Using components R, G, B and expecting redF(), greenF() and blueF()
in the corresponding keyframes.
Change-Id: Ibac1488fe87bdf39d3446b23120114952874a5dc
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Release scene importers on destruction.
Task-number: QTBUG-61293
Change-Id: I48dfcc3f029cc90e32bb81ae47d53aa27b8ce5de
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
The render states AlphaCoverage and SeamlessCubemap will only be added
to the render set when their nodes are enabled, so there's no need for
an additional boolean field in their backend nodes.
Task-number: QTBUG-60419
Change-Id: I3184c665b1d1bd10c067428b2acac6cfb68bd638
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Trigger also on -1, which is what QAbstractClipAnimator::Infinite
is defined as. Updated tests to reflect this change.
Change-Id: Ib33a5e9b58f48b3810a0238b7682e532e382c050
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>