summaryrefslogtreecommitdiffstats
path: root/src/extras
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-205-53/+203
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/render/framegraph/qrendersurfaceselector.cpp src/render/frontend/qrendersettings.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/render.pro Change-Id: Ibe9eb962e3990e07f01a5608a2d60c79bc4c160f
| * Fix non-symmetric extents and resolutions for QCuboidMeshMiikka Heikkinen2016-09-081-17/+17
| | | | | | | | | | | | Task-number: QTBUG-55836 Change-Id: Ic5ee72f5ffb236fe15e46fa667159a139ad05b03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix QForwardRenderer docsMiikka Heikkinen2016-09-051-29/+70
| | | | | | | | | | Change-Id: Ic9fcfa41caa8773a1fa12fa42c6345292ae6160e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix camera controllersMiikka Heikkinen2016-09-053-7/+116
| | | | | | | | | | | | | | | | | | | | Fixed a few bugs and inconsistencies between qml and c++ implementations of the camera controllers. Also documented them. Task-number: QTBUG-55697 Change-Id: Ie490b0ca46f60a2a34c04f91572505e908ce65ba Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-0521-280/+601
|\| | | | | | | | | | | | | Conflicts: tests/manual/manual.pro Change-Id: Ie1186d3465516d8d50b8261f72e64d8d454d377b
| * Qt3DExtra materials documentation fixesMiikka Heikkinen2016-09-029-131/+179
| | | | | | | | | | | | | | | | | | | | Materials that were moved to Qt3DExtras were still part of Qt3DRender according to the documentation. Also added documentation for QML versions. Change-Id: Icd918599cf9a97a14e65f38a28309316a5f504dd Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Update mesh and geometry documentationMiikka Heikkinen2016-09-0212-149/+422
| | | | | | | | | | | | | | | | | | | | Meshes and geometries that were moved to Qt3DExtras were still part of Qt3DRender according to the documentation. Also added some missing documentation and a few clarifications. Change-Id: I62216d718758b9f6b82df2ccc060b3c1e91b9ad4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | QOrbitCameraController: disable logical device when disabledPaul Lemire2016-08-271-0/+4
| | | | | | | | | | | | Change-Id: I924528efa760bed5c2d86e3a0233e1836ef003c0 Task-number: QTBUG-55469 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | QFirstPersonCameraController: disable logical device when disabledPaul Lemire2016-08-271-0/+4
| | | | | | | | | | | | Change-Id: If5c9e381c4c07e3b2ce92a016cf6755ec799abf3 Task-number: QTBUG-55469 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | QSkyboxEntity: remove camera translation propertyPaul Lemire2016-08-265-42/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we convert a mat4 matrix to a mat3 matrix, then back to a mat4, this removes the translation component from it. Making the skybox shaders use that property allows to remove references to the camera translation in QSkyboxEntity. This makes using a skybox neater as we don't need to care about the Camera position anymore. This also allows to render the same skybox with different cameras which required to have duplicate QSkyboxEntity previously. Change-Id: I1adddd17d151e4d26d0f19b048df88dbf738042b Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | QForwardRenderer: use modern style connectPaul Lemire2016-08-261-5/+6
| | | | | | | | | | | | | | So that we can benefit from compile time check Change-Id: Idefd4f59d498255162a09aae0e5db372d258b242 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Merge branch '5.7' into 5.8Sean Harmer2016-08-252-2/+4
|\| | | | | | | | | | | | | Conflicts: tests/auto/input/input.pro Change-Id: Ic89c7d9093c95bc1c5ca50f04ed34c00b5f261f4
| * Use trilinear filtering for normal mapsKevin Ottens2016-08-242-2/+4
| | | | | | | | | | | | | | | | | | Porting over fixes from Sean which were only done in the QML variants of the default materials (1791e4b and 17d5edb). Change-Id: Id347066aa56b896c9e044850f55267e348f47db8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-233-0/+95
|\| | | | | | | Change-Id: I2ba85f57eb5801d720b5a8f2e8477e8ca9abefec
| * QPhongAlphaMaterial: allow to specify the blending argumentsPaul Lemire2016-08-192-0/+94
| | | | | | | | | | | | Change-Id: I4448e59f52ab8101c26448de5e0b8d3832461c53 Task-number: QTBUG-54591 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * QConeGeometryPrivate: initialize m_positionBufferEdward Welbourne2016-08-161-0/+1
| | | | | | | | | | | | | | Coverity (CID 161408) justly grumbles. Change-Id: Icac4b5bc4740a8716072d554c70cd3600c4a9e02 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QForwardRenderer: add externalRenderTargetSize propertyPaul Lemire2016-08-192-0/+17
| | | | | | | | | | | | Change-Id: I6582790c69861ee7a3920880873d43b427aeb955 Task-number: QTBUG-55333 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Merge branch '5.7' into devSean Harmer2016-08-143-71/+138
|\| | | | | | | Change-Id: Id62e225062a030f4864fb7af2ed6f60d6be87460
| * Qt3DWindow rename defaultFramegraph to defaultFrameGraphPaul Lemire2016-08-112-2/+2
| | | | | | | | | | | | | | | | | | | | For coherency with other function names. This kind of API change is allowed since Qt3DWindow is in the Extras module which is still in tech preview for 5.7 Change-Id: Ic67f96cfb2dfcb3b2d724c97f2cf472bfaf40a07 Task-number: QTBUG-54841 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix cube geometry to have correct texture coords and tangent vectorsSean Harmer2016-08-091-69/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The normal lighting materials were behaving weirdly with cubes. Some faces were behaving correctly whilst others were inverting the lit and shadowed sides of normal mapped areas (the slopes). Tracked this down to some inconsistencies in the generation of the cube geometry. The cube geometry now generates data consistently such that: * when you look at each face from the following locations and orientations: ** Positive X face with positive y as up vector ** Negative X face with positive y as up vector ** Positive Z face with positive y as up vector ** Negative Z face with positive y as up vector ** Positive Y face with negative z as up vector ** Negative Y face with positive z as up vector then: * the u texture coordinate always increases to the right as you look at any face of the cube * the v texture coordinate always increases up the face * the tangent vector is aligned with the u texture coordinate and taking special care that the w component is correctly oriented. This can be tested by using a normal mapped cube with a point light orbiting around above it takign note of the regions that are lit and shadowed. Change-Id: I834749b08efb9e03548e8c749c6281958a4e6329 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Fix API consistency in QAttributeKevin Ottens2016-07-216-48/+48
|/ | | | | Change-Id: Ifb155a11cd36642ccfa30ec4d597ff72adfc0fc2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Improve the lighting shadersSean Harmer2016-07-122-80/+146
| | | | | | | | | | Reworked to reduce repeated calculations of some quantities such as the view vector and sDotN. Also added comments as to what is being done and which coordinate systems various quantities are in to make it easier to maintain in the future. Change-Id: I2944e38f187b429dfd663c3a12b5b4f6033618d2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Apply Gram-Schmidt when generating the world -> tangent matrixSean Harmer2016-07-121-11/+19
| | | | | Change-Id: I0801f5a4bb13efb77405c6af02367be0a7213d0f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DWindow: Call QSurfaceFormat::setDefaultFormatHarald Vistnes2016-07-011-0/+1
| | | | | Change-Id: Id5fb71be811b1da4f7c403b66bcd6ba527532f0f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix normal mapped ads lighting modelMäättä Antti2016-06-172-28/+48
| | | | | | | | | | | Check the spot direction in correct coordinate space. Check light direction against surface normal so that the normal mapping doesn't bleed the light through the surface. Task-number: QTBUG-54164 Change-Id: Ieec837cc82d181d850e5b06012221df8c6f67787 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Adding QDoc to QConeGeometryRobert Brock2016-06-031-1/+57
| | | | | | | | | | Adding documentation to aid in the explanation of how to use the QConeGeometry and its general functionality. Change-Id: I2ed05795b550f8be354f5311a578fa8744de1abb Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* De-inline dtors of public polymorphic classesMarc Mutz2016-05-1928-0/+96
| | | | | | | | | | | | | | 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>
* Connect parameter notifications for QNormalDiffuseAlphaMaterialJanne Koskinen2016-05-181-0/+13
| | | | | | | | | Added missing connects to init function Task-number: QTBUG-50130 Change-Id: Ic1d60c3b5c9cfebdad04c4cbbdf4ad58e14dc36e Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix face count computation when updating the cylinder index buffer.Volker Krause2016-05-161-1/+2
| | | | | | | | | This caused an out of bounds access in the index buffer that resulted in rendering glitches on AMD GPUs. Change-Id: I41b872c294181c9b714ac6776ff746b6b86ec5bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@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 some librariesMarc Mutz2016-05-141-0/+3
| | | | | | | | | The core, extras, input, logic and render libraries contain no Q_FOREACH loops anymore. Enable QT_NO_FOREACH so it stays that way. Change-Id: Ie2fa6b7621cce2c89f76cf37d1511bf8c16c13ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Introduce local macros for declaring types as movable/primitive/sharedMarc Mutz2016-05-051-1/+1
| | | | | | | | | | | | | | | 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>
* Change QList<int> properties to QVector<int>Kevin Ottens2016-05-042-18/+18
| | | | | | | | | Now that QVector<int> is supported by QML, let's switch to it and avoid the conversion cost altogether. Change-Id: I1f6bfb29cab38547d62fc7ec3ee6a322ca400f70 Task-number: QTBUG-51467 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Camera controller naming conventionRobert Brock2016-05-034-48/+48
| | | | | | | | | 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>
* Bring more type safety to the buttons propertiesKevin Ottens2016-05-022-18/+18
| | | | | | | | | | | | | | | | The API uses QList<int> now to benefit from the default support for this type in QML. We internally store it as a QVector<int> though so that the whole backend uses QVector<int> for them. It means we still have a conversion going on but it's not really on any hot patch and those lists will be small anyway. This conversion could be eliminated by hacking qv4sequenceobject.cpp in qtdeclarative but we're close enough to deadline that it's not worth the effort IMHO. Change-Id: I7ef16ec351cc54cc418a8f5c340397f58422add3 Task-number: QTBUG-51467 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Split QAnalogAxisInput out of QAxisInputKevin Ottens2016-05-024-12/+12
| | | | | | | | 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-024-24/+28
| | | | | | | | | 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>
* Q_NULLPTR -> nullptrSean Harmer2016-05-0130-85/+85
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add we mean it to qfirstpersoncameracontroller_p.hPaul Lemire2016-05-011-0/+11
| | | | | Change-Id: I38489c9029e563aa7f140e0c6fc2151a8341b502 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move last remaining pieces of examples-common to Qt3DExtrasPaul Lemire2016-05-0110-3/+1363
| | | | | | | Also created a Quick3DExtras for QML related extras (Qt3DQuickWindow) Change-Id: I1b95ea841e07ac8d68a07a1911d783b722e6fe03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* geometries: use QSharedPointer::create() for QBufferDataGeneratorsMarc Mutz2016-04-306-30/+30
| | | | | | | | More efficient, because control block and tracked object are co-located in a single memory allocation. Change-Id: I9a6fe07753620eb44814b9c9e4514c391f06a8ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Repair attenuation handlingKevin Ottens2016-04-281-7/+15
| | | | | | | | The property name changed, it used to be a single QVector3D but now it is three floats. Change-Id: I8ad7d502fdee648f5d8e8316829c9af8838dc506 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGoochMaterial export and documentation fixTomi Korpipää2016-04-253-13/+14
| | | | | | | Change-Id: I5395c3bb1fe8402aca6a6253ec92ffcd30a76692 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Antti Määttä <antti.maatta@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGoochMaterial namespace fixTomi Korpipää2016-04-253-48/+52
| | | | | Change-Id: Ie0eb9465e5247a6527c68ff4f0e657fabdadb442 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNode: make cleanup a private slotPaul Lemire2016-04-2326-108/+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-23107-0/+13441
QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>