summaryrefslogtreecommitdiffstats
path: root/src/quick3d
Commit message (Collapse)AuthorAgeFilesLines
* Scene3DItem: allow to instantiate Logic aspectPaul Lemire2016-05-272-2/+6
| | | | | Change-Id: I55334c9169cb157387896819b6bcffe9a381f603 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* TextureMaterial.qml change remaining annotations to filterKeys.Unai IRIGOYEN2016-05-231-3/+3
| | | | | Change-Id: I265a1820ee8f02abe7f8c67c269a4842e583469d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add hook to set QNode parent when creating a QNode in QMLSean Harmer2016-05-231-0/+27
| | | | | | | | | | Just need to be a little careful in QNode::setParent() and the helper in case the qml engine sets a QObject parent but QNode doesn't know about it yet. Task-number: QTBUG-47055 Change-Id: I30269bd230ee6eacd2816282fd48f879cfb7c83a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Replace Q_DECL_NOEXCEPT by Q_DECL_NOTHROWPaul Lemire2016-05-234-7/+7
| | | | | | Change-Id: Ia991da557483704055e0ccf17b4a6b273568a1ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make sure the axisSettings is found by QtCreatorKevin Ottens2016-05-231-28/+4
| | | | | Change-Id: Ic9d8cd875afa80bd2761df4205b521f3d4aa59c3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use QVector instead of QVariantList propertiesKevin Ottens2016-05-231-3/+3
| | | | | Change-Id: I183bac3fb423d068df4f65ae96a7706f83cfa20f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use QVector instead of QVariantList propertiesKevin Ottens2016-05-231-4/+26
| | | | | Change-Id: If7b2688c6032132cfabe5ff02ecbbcf3efbb29d0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow the QtQuick + Scene3D case to shutdown cleanlySean Harmer2016-05-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | ...by having the Scene3D item exit the simulation loop before asking the renderer to shutdown. This is necessary because if we let the simulation loop keep running then the render aspect keeps creating and executing jobs as we pull the rug out form under it by shutting down the renderer. This exhibited quite regularly as a crash caused by a race in the Shader::cleanup() function which tried to access the GraphicsContext that was destroyed by the renderer shutdown. This approach sequences things very similarly to the pure Qt 3D shutdown method. The main difference is that we explicitly stop the simulation loop whereas in the pure Qt 3D case, that is done for us by the QAspectEngine::setRootEntity(null) call. This is still done in the QAspectEngine dtor but by that time, the simulation loop is already stopped. The exit simulation logic has been adapted to handle this case. Task-number: QTBUG-51035 Task-number: QTBUG-42353 Change-Id: I08d16e301eab421fa6eb99e558f38e832534c151 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Merge branch '5.6' into 5.7Sean Harmer2016-05-191-1/+1
|\ | | | | | | Change-Id: Ie0fc178d3c0f818ea32aac0e98c97861d4c0f671
| * Eliminate references to dead memoryWieland Hagen2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | Buffer data upload from QML would not copy the buffer data from the JS buffer class, but just store a pointer to it. JS Garbage collection may free that memory while it is still used by QBuffer Task-number: QTBUG-51667 Change-Id: I366e4e8ad601f058ae022ec4b4978e18eed0e395 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | De-inline dtors of public polymorphic classesMarc Mutz2016-05-192-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. It also allows to add code to them later, if necessary. Change-Id: I0da301cd788162abba6cdbbb21910090a22adb9a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add more explicitMarc Mutz2016-05-141-1/+1
| | | | | | | | | | | | Change-Id: Iaa91d6248cbc3822ed3380e360d2880d4894446d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Enable QT_NO_FOREACH for all Qt3D libraries and pluginsMarc Mutz2016-05-1410-0/+30
| | | | | | | | | | | | | | | | Qt3D contains no Q_FOREACH loops anymore. Enable QT_NO_FOREACH so it stays that way. Change-Id: I1079ff1d87a7d6b38b9e9684e9d9f85561602b0a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | quick3d: eradicate remaining Q_FOREACH loopMarc Mutz2016-05-141-1/+1
| | | | | | | | | | Change-Id: I7878347cc3d921512dc5e8f34dcdd0813ea2be50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Quick3DNode: eradicate Q_FOREACH loops [const-& returns]Marc Mutz2016-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. The function QObject::children() returns by const-reference, so its result can be passed to range-for without further changes. Change-Id: Ia0c51e585f9b10f0a98ad6cbf294182051f14069 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | quick3d: eradicate Q_FOREACH loops [low-risk]Marc Mutz2016-05-1423-44/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. This is the batch with low-risk changes. They operate on local containers or the loop body clearly does not cause the container to change. Sprinkled in a reserve() or two. Change-Id: I5a3da485213791ae58c82f4a81829cfba558a3d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Qt3D: replace QStringLiteral with QLatin1String when appending or comparingMarc Mutz2016-05-143-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes little sense to use QStringLiteral in the following situations: - for comparison to a QString, because operator== is overloaded for QLatin1String. - when constructing an empty QString, because QLatin1String("") resolves to sharedEmpty() when converted to QString, which is preferable to an independent copy of sharedEmpty(). - for strings which are immediately appended to, or which are appended to other strings. because no dynamic memory allocation is saved by doing so. But if the only advantage of QStringLiteral does not apply, all its disadvantages dominate, to wit: injection of calls to the qstring dtor, non-sharability of data between C strings and QStringLiterals and among QStringLiterals, and doubled storage requirements. Fix by replacing QStringLiteral with QLatin1String or QLatin1Char, as needed. Ported one use of QString::number(i) to QLatin1Char('0' + i) where i is guaranteed to be < 10. Saves 179B and 2150B, resp., in Input and Render text size on optimized Linux AMD64 GCC 6.0 builds. Change-Id: I2e8f43ed085875ce387ffddb18bba37ff21f6cf0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Update QML type info due to Input API changesKevin Ottens2016-05-121-8/+46
| | | | | | | | | | Change-Id: Ifbfab3d9ee5946be2a73d57f22fca85b7753f135 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | FirstPersonCameraController: acceleration controlKevin Ottens2016-05-121-0/+14
| | | | | | | | | | Change-Id: I9dcb713c5f39b298d4c4f418cdfaae99358ca5a9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Introduce local macros for declaring types as movable/primitive/sharedMarc Mutz2016-05-053-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QtCore macros aren't really suited to a namespaced library like Qt3D. In particular, the use of Q_DECLARE_SHARED is wrong, because it places the free swap() function in the Qt's namespace when it should be in the same (inner) namespace the type is in. Q_DECLARE_TYPEINFO, otoh, is just inconvenient to use because it requires exiting and later re-entering of the Qt3D namespace(s). The new macros do this implicitly. Change-Id: Ic91f447656f08ed59c118ce09cb5ac90ad212955 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Get rid of QLayer::namesKevin Ottens2016-05-044-2/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't reinvent a variable naming system (string based global variables even) and instead use pointer to QLayer instance everywhere, even with QLayerFilter. The wave and deferred-renderer-cpp examples have been ported to the new API. Change-Id: I82a858770954a8743a5c3d2ce0c463e62844871f Task-number: QTBUG-51440 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Camera controller naming conventionRobert Brock2016-05-033-2/+2
| | | | | | | | | | | | | | | | | | Renamed the QOrbitControl to QOrbitCameraController to be more in line with the FirstPerson version. Change-Id: Ibf5fb0d3cc548b7dc25d56ea385a64c7a76770aa Task-number: QTBUG-50660 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix qmltypes generation, add them to the sourcesKevin Ottens2016-05-0312-0/+3905
| | | | | | | | | | | | Change-Id: I2e64e3abd36a6783c89a12432f2f9d1c3621e76a Task-number: QTBUG-45661 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Don't crash when introspected by qmlplugindumpKevin Ottens2016-05-031-3/+7
| | | | | | | | | | | | | | | | | | | | We delay the creation of the render aspect until we know we'll be in the QQ scene graph. Creating the render aspect at construction time kicks off too much of Qt3D for qmlplugindump sake. Change-Id: I12f401c809eaf686721de4ae3acf12cf5b5688a6 Task-number: QTBUG-45661 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Turn QAxisInput into QAbstractAxisInputKevin Ottens2016-05-023-15/+15
| | | | | | | | | | | | Change-Id: If31fe8612c177b3383d63cf5f50c34d088f0d72b Task-number: QTBUG-51474 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Split QAnalogAxisInput out of QAxisInputKevin Ottens2016-05-023-5/+6
| | | | | | | | | | | | | | | | The axis property of QAxisInput goes there. Change-Id: Ie226de652848909fc6e3a425612d877ef18b35f3 Task-number: QTBUG-51474 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Splitting of QAxisInputRobert Brock2016-05-023-12/+14
| | | | | | | | | | | | | | | | | | Placed buttons and scale into a new class named QButtonAxisInput Change-Id: I0e8407dc361d9d6eda38973a8950f77b17119467 Task-number: QTBUG-51474 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make QAbstractNodeFactory privateSean Harmer2016-05-013-3/+3
| | | | | | | | | | | | Task-number: QTBUG-51497 Change-Id: I0517aead1f2ab004e3b5e053d96561d88feb060c Reviewed-by: Volker Krause <volker.krause@kdab.com>
* | Q_NULLPTR -> nullptrSean Harmer2016-05-0128-67/+67
| | | | | | | | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Move last remaining pieces of examples-common to Qt3DExtrasPaul Lemire2016-05-017-3/+722
| | | | | | | | | | | | | | Also created a Quick3DExtras for QML related extras (Qt3DQuickWindow) Change-Id: I1b95ea841e07ac8d68a07a1911d783b722e6fe03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Strip out cloning subsystemSean Harmer2016-04-298-47/+24
| | | | | | | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Don’t expose QGenericInputDevice to QMLMike Krus2016-04-281-1/+1
| | | | | | | | | | | | Task-number: QTBUG-51426 Change-Id: I650777a075e080fe4e14c1e641cd85301d17f2a1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Prevent QAbstractLight instances creationKevin Ottens2016-04-281-1/+1
| | | | | | | | | | | | Change-Id: I7cd0f780e0ca411f9b3a210989952eccf236554e Task-number: QTBUG-51489 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Rename QLight to QAbstractLightKevin Ottens2016-04-281-2/+2
| | | | | | | | | | | | Change-Id: I3ee3f6e3c9eef554fce7d79407825894b1be2450 Task-number: QTBUG-51489 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Scene3DItem: add the hoverEnabled propertyPaul Lemire2016-04-282-2/+17
| | | | | | | | | | | | | | | | | | | | | | If set to true, the item will receive HoverEvents that will be transmitted as positionChanged events to MouseHandlers in the scene. For most cases this would result in high traffic for events that aren't handled. If hoverEnabled is set to true, then that processing will take place, otherwise it won't (unless you are pressing a mouse button). The default is hoverEnabled set to false. Change-Id: I8fc2d519ee902349ace8f4e130cd12f3018c01af Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix static buildsMike Krus2016-04-273-2/+5
| | | | | | | | | | | | | | Make sure right dependencies are built and resources are loaded Change-Id: Ia3693c2d0df8849c544a9b6d346168cd4569a26c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Rename QTechniqueFilter::criteria() to matchAll()Sean Harmer2016-04-271-3/+3
| | | | | | | | | | | | | | As per API review. Change-Id: Icaf9d489b760f5df101141f2662e44658575e850 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Moves QSortCriterion flag to QSortPolicy and remove itFranck Arrecot2016-04-264-193/+2
| | | | | | | | | | | | Change-Id: I44f71671ead23256d5fdc621545492885ff940a5 Task-id: QTBUG-51486 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QNode: make cleanup a private slotPaul Lemire2016-04-236-18/+0
| | | | | | | | | | | | | | | | | | | | QT3D_CLONEABLE now implements a default dtor that calls _q_ cleanup QT3D_CLONEABLE_CUSTOM_DTOR is used for classes that really need to implement their own dtor but they need to invoke _q_cleanup manually Change-Id: I2937a3b9edeb5a763749f0044360d78ab4461a5e Task-number: QTBUG-51464 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move defaults and geometries out of Qt3DRender and into Qt3DExtrasPaul Lemire2016-04-2320-94/+404
| | | | | | | | | | | | | | QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QVectorize Quick3DShaderDataArrayRobert Brock2016-04-213-4/+4
| | | | | | | | | | Change-Id: I68f7ce1995534a6775d26ecaa936c47f3a18e35a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QVectorize QRenderTargetSelectorWieland Hagen2016-04-201-1/+1
| | | | | | | | | | Change-Id: Icae15aef51a623ea543edad9d04513d59e94273b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | AntiAliasing added as RenderstateRobert Brock2016-04-201-0/+2
| | | | | | | | | | | | | | | | Adding antialiasing that can be enabled in renderstates Change-Id: I0728e69dba5896ca86e56b940682990fafd0a297 Task-number: QTBUG-52191 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Minor documentation fixesTomi Korpipää2016-04-191-0/+9
| | | | | | | | | | Change-Id: I5eee874b68c17252acbeccd3f1bde2c2108dc674 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.6' into 5.7Sean Harmer2016-04-1610-27/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qt3d/examples-common/qorbitcontrol.h src/core/qnodecreatedchange.cpp src/core/qnodecreatedchange.h src/input/frontend/qaxisactionhandler.h src/input/frontend/qinputaspect.h src/input/frontend/qkeyboardhandler.h src/input/frontend/qmousedevice.h src/input/frontend/qmousehandler.h src/input/frontend/qphysicaldevicecreatedchange.h src/input/input.pro src/logic/qframeaction.h src/plugins/sceneparsers/assimp/assimp.pro src/quick3d/imports/input/importsinput.pro src/quick3d/imports/render/importsrender.pro src/render/backend/trianglesextractor.cpp src/render/framegraph/qclearbuffer.h src/render/framegraph/qlighting.h src/render/framegraph/qstateset.h src/render/frontend/qrenderattachment.h src/render/geometry/qabstractattribute.h src/render/geometry/qabstractbuffer.h src/render/geometry/qattribute.h src/render/geometry/qboundingvolumespecifier.h src/render/geometry/qbuffer.h src/render/materialsystem/qfilterkey.h src/render/materialsystem/qparameter.h src/render/materialsystem/qparametermapping.h src/render/renderstates/qblendstate.h src/render/renderstates/qdepthmask.h src/render/renderstates/qpointsize.cpp src/render/renderstates/qrenderstatecreatedchange.cpp src/render/renderstates/qstencilop.h src/render/renderstates/qstencilopseparate.h src/render/renderstates/qstenciltestseparate.h src/render/texture/qabstracttexture.h src/render/texture/qabstracttextureimage.h src/render/texture/qtextureproviders.h Change-Id: I894d7781042cabdaa0cac690c198b57a41127bd4
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-011-1/+1
| | | | | | | | | | | | | | | | ... or equivalent. Task-number: QTBUG-45291 Change-Id: I1453477ad718335ca6c5c0c3447539cb93e21176 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * standardize statement order in project files a bitOswald Buddenhagen2016-02-253-6/+3
| | | | | | | | | | Change-Id: I0e9e180145dcedb5afb8a534b6ac2bfd773262f9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * rely on the automatically defined QT_BUILD_*_LIBOswald Buddenhagen2016-02-256-9/+3
| | | | | | | | | | Change-Id: Ib4667e1d11309e76f60150eb4e474dbc1b4191ce Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-256-12/+9
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ied46fc47e5f998053ab8a31547e09676144a65c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Remove QAbstractAggregateActionInputPaul Lemire2016-04-156-34/+215
| | | | | | | | | | | | Change-Id: I48109b0149cf16699f5d3a6cafbaec4555d4db0b Task-number: QTBUG-51493 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>