summaryrefslogtreecommitdiffstats
path: root/src/extras
Commit message (Collapse)AuthorAgeFilesLines
* QDistanceFieldMaterial: Use a smaller Z offsetMartin Andersson2019-12-181-1/+1
| | | | | | | | The previous Z offset was too large because it sometimes caused the text to be placed on top of objects it was supposed to be under. Change-Id: I99bde5a93ea8c6443b1195d818075cebf3d082a4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QText2DEntity: Support display of empty stringsVolker Enderlein2019-12-131-8/+5
| | | | | | | | | | | | | The DistantFieldTextRenderer of a QText2DEntity was not properly updated for empty strings. The dereferencing of previous QGlyphRuns needs to be done before the number of DistantFieldTextRenderers is adjusted as a DistandFieldTextRenderer may be the parent of a QTextureAtlas that is referenced by a Glyph. Task-number: QTBUG-80569 Change-Id: I0dba8b749148bef088864dc7200ae0513965745a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QDistanceFieldMaterial: Don't scale rgb colors with distance field alphaMartin Andersson2019-12-092-2/+2
| | | | | | | | | | Scaling the rbg colors with the calculated distance field alpha value can result in faint text and different colors across the same text. These issues are most obvious when the text is small. Change-Id: Ia12e54e3f344cb918575739a15e519e34d67e0f1 Reviewed-by: Wieland Hagen <wieland.hagen@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix a crash in Qt3DWindow when the window has no heightJean-Michaël Celerier2019-11-261-1/+1
| | | | | Change-Id: Iaf09d3ada0db25794ec6e517301d054641cb41a0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix documentation warningsTopi Reinio2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - Add (basic) documentation for Qt3DAnimation::QAnimationCallback. - Add missing namespace qualifiers for \class, \fn, \instantiates, \sa, and \property commands. - Remove linking to example file pages, as QDoc no longe treats them as linkable targets. - Fix function/QML method parameter documentation - Fix missing \qmlproperty types - Fix linking to QKeyEvent in QtGui. - Move Qt3DRender::Quick namespace documentation to where QDoc can see it. - Add enum documentation for Qt3DRender::QBlitFramebuffer::InterpolationMethod and Qt3DRender::QMesh::Status. - Other minor fixes This brings the current warning count to zero. Fixes: QTBUG-79822 Change-Id: I1154a7f9c34917a3f240e99da0e7a300be7d65a0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QForwardRenderer: rename clearBuffers to buffersToClearPaul Lemire2019-10-072-9/+9
| | | | | Change-Id: Ifda1f6f69a6dc58d426dfddbd711620c185a30ab Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Clean up includesMike Krus2019-10-011-3/+0
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-301-0/+4
|\ | | | | | | | | | | | | Conflicts: src/render/texture/qtexture.cpp Change-Id: Ibc0b8d87c172ea8fac521b2c85d2b2a42c5fc290
| * Reset input axis changes when enabling camera controllerMike Krus2019-09-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | When input axis are enabled or disable, we now reset the value to 0. And enabling or disabling the camera controller, we now do the same for the axis. This prevents residual movement when re-enabling the controller due to the asynchronous updates. Task-number: QTBUG-77996 Change-Id: I5ac016d5b708e1f8d8eaa996bbd28c00c0f05e79 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update QRenderSettings to use direct syncPaul Lemire2019-09-251-2/+6
| | | | | | | | | | Change-Id: I610d06ac788f839653055a80f78c3f3be5ca68f8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QForwardRenderer: fix doc and add REVISION on clearBuffersPaul Lemire2019-09-192-1/+3
| | | | | | | | | | | | Task-number: QTBUG-77839 Change-Id: Idc33626c604a247044c9f682fac0f8dfc5ff3fcd Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-116-11/+12
|\| | | | | | | Change-Id: I4e73060c1941773efcc568f010f5b073ebb10d4a
| * Disable frame action when camera controller is disabledMike Krus2019-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | If a camera controller gets disabled while a movement is in progress, it may start moving indefinitely without any mouse events, or not respond to mouse events to stop the movement. Disabling the frame action will prevent this. Task-number: QTBUG-77996 Change-Id: I0120436a8ff9ff8b4306c41053aa494ac2ec3f42 Reviewed-by: Akihito Izawa <akihito.izawa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-315-10/+10
| |\ | | | | | | | | | Change-Id: Iae9a2903afd5da09cfd9288ff6cf74d7f069c83b
| | * Minor fixes for QSprite* classesMichael Brasser2019-08-303-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Fix off-by-one errors * Allow non-integer cell sizes Change-Id: I081cb5050a6805cbc9183fb2a7a1ee07b5594187 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | * Update MetalRoughMaterial documentionMichael Brasser2019-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | These properties are not strongly typed. Change-Id: I02c8b793cc7b7f9e88a8b8598ea27efa93fa0468 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Add missing * for SkyboxEntity QML type documentationMats Honkamaa2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-77789 Change-Id: I3dcee435562c86ea9db98ee7c50a42d06bd576f9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | QDistanceFieldGlyphCache: make sure the arbiter of atlas can be setWang Chuan2019-08-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QText2DEntity to display text, the node of QTextureAtlas will be create when traversing the node tree, and it will use root node as its parent node. However, since the children node of root node is being traversed in this moment, QTextureAtlas will not be traversed, that means the change arbiter won't be set, and the change in frontend cannot notify backend. [ChangeLog][Qt3DExtras][QDistanceFieldGlyphCache] make sure the change arbiter of atlas for QText2DEntity can be set when traversing node tree, and add new auto test for this. Fixes: QTBUG-77084 Change-Id: Iad09efe4376ba61f54624965118358a160be42a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-311-0/+45
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/manual/manual.pro Change-Id: I15d497da84d3fe684c3a598831171d6aed7534ca
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-301-0/+45
| |\| | | | | | | | | | Change-Id: Id2885cdbb45f8aa701e218b6201f0a3732b7ef11
| | * Add QML documentation to QSkyboxEntityPaul Lemire2019-07-241-0/+45
| | | | | | | | | | | | | | | | | | Change-Id: Id82777c111827e8db8924d2d39b5844386344b69 Task-number: QTBUG-76767 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-236-0/+31
|\| | | | | | | | | | | Change-Id: I8c12142e4733d0d95fde3e673eb684c47363ff6f
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-166-0/+31
| |\| | | | | | | | | | Change-Id: I0f68ab1277617c32b1c31f29d8793d23d9909208
| | * Document an example of how textureScale might be usedMichael Brasser2019-07-156-0/+31
| | | | | | | | | | | | | | | Change-Id: Iead857526a06b104080ab843b26c49efc22f05cc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-111-1/+8
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id34a7e40a1bd8f5bfbf87d3f3c06129bdfaebdf1
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-271-1/+8
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iae5fa92dfdf8012315c043e20950368e42451e20
| | * Doc: Extend Qt3D documentationPaul Wicking2019-06-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds missing C++ and/or QML documentation for: * enum QBuffer::AccessType * QBuffer::accessType() * QBuffer::dataAvailable() * ForwardRenderer::externalRenderTargetSize * enumeration Qt3D.Render.Light::type * Qt3D.Render.Light::color * Qt3D.Render.Light::intensity Fixes: QTBUG-73071 Change-Id: I48b13cb8001558b20bd801b6f96f5b5933144d82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Replace QLatin1Literal with QLatin1StringGiuseppe D'Angelo2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QLatin1Literal is an undocumented and deprecated typedef for QLatin1String, just use the original. Change-Id: Id6a813ed5c0a457f003dbd118b64f77d9d82cb13 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devPaul Lemire2019-06-031-1/+50
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/renderer/renderer.cpp tests/auto/render/textures/tst_textures.cpp Change-Id: I4da0eafe7ddd4dd822c3dcb5f5fa826653a335b4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-261-1/+50
| |\| | | | | | | | | | Change-Id: I4a35126d98e04ed228e5b3a4ed9157995bef3a0a
| | * Doc: Add MetalRoughMaterial QML documentationPaul Wicking2019-05-161-1/+50
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-73072 Change-Id: Ifea7152c77c4f6f1759e4872001336bae6d3d2c3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add clearBuffers to QForwardRendererJoni Poikelin2019-05-292-1/+28
| | | | | | | | | | | | | | | Change-Id: Ie58dc01a3796c5ba130fc3c2cc30d492a9387582 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Fix some deprecation warningsFriedemann Kleint2019-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Eradicate Q_FOREACH loops and mark the module cleanMarc Mutz2019-05-221-3/+0
|/ / | | | | | | | | | | | | | | | | | | The only noteworth change is where a loop around spy.events modified the container using takeFirst(). There was no reason to do so, so it was changed to use the loop variable instead of the result of taking. Change-Id: I02c62a7c2efc5d042c6e669fe5daddd7da7e85d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* / Switch export macros to standard formKai Koehne2019-04-0240-42/+42
|/ | | | | | | | | | | | Qt expects the export macros to have Q_ prefixes, otherwise the symbol versioning script won't find them and mark them. Also remove non-exising QT3DLOGIC_PRIVATE_EXPORT macro from src/doc/qt3d.qdocconf Task-number: QTBUG-74752 Change-Id: I71b9e85ff09c002fb283824aa51a5a8f50e937f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix light attenuation for ES 2Michael Brasser2019-03-064-8/+18
| | | | | | | | These shaders were never updated to be in sync with the renames made for Qt 5.7+. Change-Id: I95c64c150e0c4060374467942a2973b7687a88ca Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: clarify some propertiesJoni Poikelin2019-02-143-17/+36
| | | | | | | Change-Id: Ie0e9183ec4fe1730018f695374d32cb78d0e77ed Reviewed-by: Andy Maloney <asmaloney@gmail.com> Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* dFdx/dFdy require GL_OES_standard_derivatives under ES 2Michael Brasser2019-02-041-0/+1
| | | | | Change-Id: Ia697f4951acb94b281c43bf2788d3879fe5213d3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Document that QMetalRoughMaterial has an ES 3 techniqueMichael Brasser2019-01-281-1/+1
| | | | | Change-Id: Ia8467962fae689498a1f48c8784cf58d22c6a7a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix env-map less renderingMike Krus2019-01-092-28/+0
| | | | | | | | | Assign texture units to env map samplers even if they are not used. Remove previous work around from pbr material. Change-Id: I5060bfb61c4658339d2b74df71574c39cddfeb18 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Enable ES3 rendering of MetalRoughMaterialMichael Brasser2018-12-052-1/+32
| | | | | | Change-Id: I1cc6700c9d16db1ad3e17f63a89d65c02bd8a202 Task-number: QTBUG-64390 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing precision specifiers for ES3Michael Brasser2018-12-052-11/+11
| | | | | Change-Id: I008d42f09b587c0a6317ddb583b640b15e3b32ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add ES3-specific coordinate systems shader fragmentMauro Persano2018-11-082-0/+74
| | | | | Change-Id: Ie7f469278b0a74b4c059ad99ad182059c6752cd8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add documentation for QText2DEntityMike Krus2018-11-083-11/+88
| | | | | | | | Also fix the shaders to work on macOS Change-Id: If1fb183741c21b284474c9d747c8dd4c70b9d779 Reviewed-by: Wieland Hagen <wieland.hagen@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix various documentation warningsTopi Reinio2018-11-071-0/+2
| | | | | Change-Id: I3eecd06bba9438b5aa472f3ba7ecaecdeda985e2 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Qt3DWindow: Redraw scene on expose events when using OnDemand renderingChristian Andersen2018-11-062-0/+16
| | | | | | | | | | | | This adds an InvalidateFrame QNodeCommand in QRenderSettings that is sent to the RenderSettings backend node. The command will mark the current frame as dirty. This ensures that whenever an expose event is received, a redraw happens some time in the future. Task-number: QTBUG-70885 Fixes: QTBUG-59785 Change-Id: I9fd2e19dbc282300479131d95ff8320269f95f24 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make floating point precision explicit in ES3 MetalRough shaderMauro Persano2018-11-051-92/+94
| | | | | Change-Id: Ibd59dd30e31ded3cbf169fa583d537a7d67fee96 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix normal calculation in MorphPhongMaterialJoni Poikelin2018-10-052-2/+2
| | | | | Change-Id: Iad160f2d454633b558bee91b1e01c287d4202451 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix QMorphPhongMaterialMäättä Antti2018-10-012-6/+23
| | | | | | | | Replace the removed phong.frag with graph-based fragment shader. Task-number: QTBUG-69751 Change-Id: I196be25aff656d6934d6179e4f082430b109b2a1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add metalRoughFunction to ES3Mauro Persano2018-09-274-0/+458
| | | | | | Change-Id: I5ac330462bf051285dafbfa4554aa97e6657ac65 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>