summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when a referenced shader program isn't found in a gltf file.Volker Krause2016-05-281-3/+3
| | | | | | | | This makes tests/manual/gltf start at least (but still not render anything). Change-Id: I828ba32d79aebf6b9081bd58071f394cba910cb9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replace Q_DECL_NOEXCEPT by Q_DECL_NOTHROWPaul Lemire2016-05-231-2/+2
| | | | | | Change-Id: Ia991da557483704055e0ccf17b4a6b273568a1ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Move QTextureImageDataGenerator to its own headerPaul Lemire2016-05-201-0/+1
| | | | | Change-Id: I0f80f7bafefb904c8171ff89f24687d15acd4b50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enable QT_NO_FOREACH for all Qt3D libraries and pluginsMarc Mutz2016-05-142-0/+6
| | | | | | | | 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>
* plugins: eradicate all Q_FOREACH loopsMarc Mutz2016-05-141-2/+6
| | | | | | | | | ... by replacing them with C++11 range-for loops. In assimp, there were only these low-risk changes. Change-Id: I114d6bd62bb37b6347f5d3bda41125198a282f7e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: claim copyright for the substantial recent changesMarc Mutz2016-05-051-1/+1
| | | | | Change-Id: Ie2e57e27d7a2c181d0620e76ccf1c11d9dabfcce Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: move QFile::readAll() into resolveLocalData()Marc Mutz2016-05-052-10/+7
| | | | | | | | | | | The only caller had to handle the naked returned QFile manually. By hiding the loading in the callee, we can allocate the QFile on the stack and simplify the caller. Saves a few bytes in text size, too. Change-Id: I5b9d7991a39edf8245ae3609fde47f2e15e49817 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: replace QMap with QHashMarc Mutz2016-05-051-11/+11
| | | | | | | | | | They should not be (much) slower, because we don't need the sorted ordering of a QMap, and they produce a lot less code: ~12KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I3dabd8a6be62657b8028e7baaf3bef13ab241492 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: includemocsMarc Mutz2016-05-051-0/+2
| | | | | | | | | Text size almost unchanged, but now the compiler can see all of the class in one TU, to provide better diagnostics (e.g. unused member functions and variables). Change-Id: I4076ca6cdeba1a389d1307d6471bb1e53b213a77 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: use printf-style qWarning/qDebug where possibleMarc Mutz2016-05-051-58/+81
| | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days) and you cannot stream complex Qt types, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. Saves ~2.2KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: Ie7642ad57c1a150b72034d62b68abb397c2d5d51 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: wrap remaining qWarning()s in Q_UNLIKELYMarc Mutz2016-05-051-27/+27
| | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qWarning() or similar, by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. Costs ~100B in text size. Change-Id: I38389d13ff19762db9e2e91a363e7210bdb43aea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: replace static const QLatin1Strings with #definesMarc Mutz2016-05-051-69/+69
| | | | | | | | | | | | | This allows the compiler to more freely place the data, and reduces relocations. Effects on optimized GCC 6.0 Linux AMD64 builds: text: -1280B data: -1024B relocs: -64 Change-Id: Id02fc7dabe93096a62c3456028d3263afa5884ca Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: brush up ctors of nested structsMarc Mutz2016-05-052-19/+16
| | | | | | | | | | | | - pass QJsonObject by cref instead of by value - make ctors explicit - use ctor-init-list as much as possible Saves ~350B in text size on optimized GCC 6 Linux AMD64 builds. Change-Id: I343bf4a36cce6c04de62097db7bbae34e7309863 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: avoid some hidden detachesMarc Mutz2016-05-051-2/+2
| | | | | | | | | | ... using qAsConst() or just declaring variables const in the first place. Saves a few bytes on text size, too. Change-Id: I2f4510cf3cdd092b1e1308f9f09c8b694de355e6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: remove {QMap,QMultiHash}::remove() callsMarc Mutz2016-05-051-4/+6
| | | | | | | | | | | | | They are preceded by operator[] calls with the same argument, causing the node to be looked up twice each time (once in op[] and then again in remove()). Just call find() and use erase(it) to remove the node later. Costs ~32B in text size. Reason unknown. Change-Id: I1bef16a6871ff7922c6b3fc5e1449defbaa582b4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: eradicate remaining Q_FOREACH loopsMarc Mutz2016-05-051-12/+14
| | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(), where needed. Saves ~1.8KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I1f2cb0098a61a80b6ca0d1ca7623b6c715714591 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: remove {QMap,QMultiHash}::contains() callsMarc Mutz2016-05-051-38/+53
| | | | | | | | | | | | | | | | | | They are all followed by value() or op[] calls with the same argument, causing it to be looked up twice each time (once in contains() and then again in value()). Just call find() or, for QMultiHash, equal_range(), and check the iterators to see whether the value was found. Sprinkle with Q_UNLIKELY as a drive-by (when the consequence is a qWarning(), which indicates an unlikely event). Even saves ~1.9KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I9bbab8c2ec5eb9070917c60c303b98564fcbd674 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: fix leak of QShaderProgram in processJSONProgram()Marc Mutz2016-05-051-3/+2
| | | | | | | | | | Perform all checking before allocating a new QShaderProgram, so we can return early without leaking the new object. Even saves a few bytes in text size... Change-Id: I1e3aabd7ea7cea0bc8dfded2911a8b415ef678fc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: don't iterate over QMap::values()Marc Mutz2016-05-051-20/+15
| | | | | | | | | | | | | | | | ... iterate using (const_)iterators instead. This avoids the creation of a temporary QList to hold the keys as well as the following binary search inside value() on each iteration. Factored common code into a helper function as a drive-by. Saves almost 5KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: Ie0cc7e7c353cd08a5dd68de6129eb24a9ec243c8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: don't iterate over QMap::keys()Marc Mutz2016-05-051-6/+6
| | | | | | | | | | | | | | ... iterate using (const_)iterators instead. This avoids the creation of a temporary QList to hold the keys as well as the following binary search inside value() on each iteration. Saves ~1.9KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: Id5f3be23adf0ea5beccf64e906eef221eefacae9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: don't iterate over QJsonObject::keys()Marc Mutz2016-05-051-57/+52
| | | | | | | | | | | | | | | | ... iterate using (const_)iterators instead. This avoids the creation of a temporary QList to hold the keys as well as the following binary search inside value() on each iteration. Given the sorry implementation of QJsonObject iterators (basically just an int, indexing ino QJsonObject::at(int)), I was surprised to see that this even saves ~1.8KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I98c27feeaf26e03fefe67692ea6aeee30d95268c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: replace QStringLiteral and C literals with QLatin1Strings in comparisonsMarc Mutz2016-05-051-36/+36
| | | | | | | | | | | Saves temporary QString creations and isn't even slower as QString has a QLatin1String comparison fast-path. Also saves 2KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I625fdea9e3f249a03c2651c4ded1353543f0d468 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: the standard uniform name isn't actually neededMarc Mutz2016-05-052-32/+26
| | | | | | | | | | | | | ... so make standardUniformNamefromSemantic() return bool instead of QString, and adjust its name accordingly. Replace QStringLiteral with QLatin1String in this function. Saved ~1.7KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: Iea9afa19d7fc3056697d0f5127ac16f3421cdb32 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: use QLatin1String instead of QStringLiteralMarc Mutz2016-05-051-73/+69
| | | | | | | | | | ... for looking up via QJsonObject::value(). Saves ~4.5KiB in text size and costs 1KiB in data size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I52649e04d2a58adc88972bafdfdd1be54eb2e505 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFIO: remove QJsonObject::contains() callsMarc Mutz2016-05-051-47/+62
| | | | | | | | | | | | | | | | | | | | They are all followed by QJsonObject::value() calls with the same ID, causing the ID to be looked up twice each time (once in contains() and then again in value()). Just call value() and check the result for isUndefined() to see whether the value was found. In some cases, not even that is necessary, and we just continue to convert the value to, e.g., an array. Sprinkle with Q_UNLIKELY as a drive-by (when the consequence is a qWarning(), which indicates an unlikely event). Even saves ~420B in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: If5ead96df3083a0ceeede25ad8f6477c5c092a04 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexImageData to QTextureImageDataFranck Arrecot2016-05-031-3/+3
| | | | | | | | Adding unit testing to QTextureImageData Task-number: QTBUG-51478 Change-Id: Icacdf8e5ba953eb2e637e46b16845745d06bd3ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QSceneIOPlugin private for the time beingKevin Ottens2016-05-032-2/+2
| | | | | | Change-Id: I0bbd3a6efa3ea362f42002da1944ee883c49b837 Task-number: QTBUG-51455 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix CLANG reported warningsMike Krus2016-05-022-6/+6
| | | | | | | Ignored 3rd party libraries Change-Id: I20e1feac64a8fbfafc736b24d6d8c591192e817b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QSceneParserPlugin to QSceneIOPluginFranck Arrecot2016-05-028-172/+170
| | | | | | Change-Id: I643e690b131a3739c6df39d73df7b2cd80047fe4 Task-id: QTBUG-51452 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make QAbstractNodeFactory privateSean Harmer2016-05-011-1/+1
| | | | | | Task-number: QTBUG-51497 Change-Id: I0517aead1f2ab004e3b5e053d96561d88feb060c Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-013-66/+66
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Strip out cloning subsystemSean Harmer2016-04-291-1/+0
| | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Adapt the assimp scene parser to use the node factorySean Harmer2016-04-281-22/+69
| | | | | | | | Necessary since we no longer have the cloning phase but still need to ensure we create the correct object types (QML vs C++). Change-Id: I28535e6d92b3e4169be928025cb7b6a44f125ece Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move defaults and geometries out of Qt3DRender and into Qt3DExtrasPaul Lemire2016-04-235-19/+21
| | | | | | | QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge branch '5.6' into 5.7Sean Harmer2016-04-162-8/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-252-8/+10
| | | | | | | | | | | | | | | | 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>
* | Removed QBlendStateSeparateWieland Hagen2016-04-071-7/+7
| | | | | | | | | | | | | | | | | | Added slots+signals to QBlendEquationArguments that provide glBlendFunc behavior (treat RGB+A uniformly) Task-number: QTBUG-51511 Change-Id: Icfa6c87d3a2ce2803170d22ea8a36533f738cb0f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QAbstractTextureProvider renamed to QAbstractTexturePaul Lemire2016-04-064-16/+16
| | | | | | | | | | | | Change-Id: If8ea2c9806e28f6d97eb3fb852686647c0c04d8f Task-number: QTBUG-51504 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QAbstractTextureImage API review changesRobert Brock2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | dataFunctor -> dataGenerator update -> notifyDataGeneratorChanged Made them protected Change-Id: I38e3e07cd014717ff19295d6049201ea6fce4b92 Task-number: QTBUG-51427 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QDepthMask transformed into QNoDepthMaskPaul Lemire2016-03-211-3/+6
| | | | | | | | | | | | | | | | | | By default the absence of a QNoDepthMask node in a RenderStateSet implies depth mask is enabled. Its presence, disables it. Change-Id: Iaa22b6cee12ee76e64d66a00e97f8aadfa82398b Task-number: QTBUG-51433 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | SceneIOHandler is now private APIFranck Arrecot2016-03-092-2/+2
| | | | | | | | | | Change-Id: I7e624c6fcdf36a221d332b8dbfea9108a46adcf5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Class QAbstractSceneParser renamed to QSceneIOHandlerFranck Arrecot2016-03-096-8/+8
| | | | | | | | | | | | Task-number: QTBUG-51451 Change-Id: Icb92f564b4d02ceb29400efce8fad11563075a68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QTechnique renamingRobert Brock2016-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | annotations -> filterKeys addPass -> addRenderPass removePass -> removeRenderPass Change-Id: Ica1731ee3100b249e4fef04f45c0e6326732d644 Task-number: QTBUG-51458 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QPolygonOffset renamed units to depthStepsRobert Brock2016-03-081-1/+1
| | | | | | | | | | | | | | | | | | Carried changes into the QML examples (planets and shadow map) for both PolygonOffset name changes As per API review Change-Id: Idd2676d53794eb6025696a79ddb59a26ac98b085 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Rename QTextureDataFunctor to QTextureImageDataGeneratorFranck Arrecot2016-03-071-7/+7
| | | | | | | | | | | | Task-number: QTBUG-51447 Change-Id: I3cb1cd3e2e225288e781c04f274518dde483a69a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QBlendState cleanupPaul Lemire2016-03-051-4/+4
| | | | | | | | | | | | | | | | | | * renamed to QBlendEquationArguments * property names expanded Change-Id: Id25f0181415b4f093f2054238dbf3be26e36ff32 Task-number: QTBUG-51509 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QBlendEquation renamed mode to functionRobert Brock2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | BlendMode became BlendFunction mode became blendFunction removed Func prefix in enums As per API review Change-Id: I95271abc3ba4b8d04b3caf46845e1a5e47d47322 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QColorMask properties renamedRobert Brock2016-03-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | red -> redMasked green -> greenMasked blue -> blueMasked alpha -> alphaMasked Change-Id: I5df99a6cf79b77ee344c9b9e45c940b084b65ad7 Task-number: QTBUG-51437 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QAbstractSceneParser property renamingRobert Brock2016-03-034-4/+4
| | | | | | | | | | | | | | | | | | | | | | renamed parserStatus to statusChanged renamed isExtensionSupported to isFileTypeSupported As per API review Change-Id: I22bdfca53ae7d7b1c8dd07642261a98ddcdbebed Task-number: QTBUG-51485 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QAttribute API changesPaul Lemire2016-02-293-4/+4
| | | | | | | | | | | | | | | | - rename dataType to vertexBaseType - rename dataSize to vertexSize Change-Id: I0eca7054dd69e8aac69bc1d7d5023a7ca6ca9da2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>