summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7.1' into 5.7Liang Qi2016-11-246-37/+59
|\ | | | | | | Change-Id: Idb141c715c7d06d2ecdce403d0f3740ee18b2b8f
| * NodeInstantiator created nodes go to its parentv5.7.1Kevin Ottens2016-10-146-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, elements created by the NodeInstantiator are children of the instantiator itself. Change that to parent them in the instantiator parent instead. Rationale for that is that it will behave similarly to Repeater this way, and gives a chance of using NodeInstantiator in frame graphs. Indeed, anything which is not a FrameGraphNode gets pruned in that context that would include branches starting from NodeInstantiator. Change-Id: I651a51471d92fcf466c9abd5dbbbfa2960ef1247 Task-Id: QTBUG-55908 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Readd doc that was removed by e3c70ea206eaef9fe310ebc880070b173977530eAndy Shaw2016-11-181-0/+21
|/ | | | | Change-Id: I8fd9fde776b81b09b3d107f2ad95f90672a354ab Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit test for QTorusGeometrySean Harmer2016-10-103-1/+380
| | | | | | | | | | | | | | | Also fix up some more problems with the torus. We were drawing some triangles more than once due to problems in the indexing. Fixed this by factoring out the calculations of number of vertices and triangles and takign care about needing more vertices to handle the texture coordinate wrapping at the seams but not more indices. Also renamed some members in the functors to be more consistent. Now the torus geometry should be perfect. Change-Id: I1198469531a5fd5e4ec8b86d47c9e66850fe50c7 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Factor out the geometry test helper functionsSean Harmer2016-10-104-71/+114
| | | | | | | They will be needed to test other geometry convenience classes. Change-Id: Ibece97c393e3b0239454f28e7862cfffd400a0e8 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Silence some warnings in tests with MSVC2015Sean Harmer2016-10-108-22/+22
| | | | | Change-Id: I81634986b22871f2c0cb9175925ca6ac4714694f Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Unit Tests for QAbstractPhysicalDeviceBackendNodePaul Lemire2016-10-103-1/+259
| | | | | Change-Id: Id41b28c19cba2997547931e2cddfe394c82b3fe3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Have sane default for QButtonAxisInput::scaleKevin Ottens2016-09-281-0/+12
| | | | | | | | | It doesn't quite make sense to have a null scale by default. It basically forces to always touch the property to get something moving. Use a scale of 1 instead by default. Change-Id: I813997d23ffedf1a934f79868f1f71f886b0303f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* FrameGraphNode: properly handle dynamic tree changesPaul Lemire2016-09-271-3/+122
| | | | | | Change-Id: Ifa2c7f3c33cb410938e484f023e965d5ca5220cb Task-number: QTBUG-55908 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix non-symmetric extents and resolutions for QCuboidMeshMiikka Heikkinen2016-09-081-12/+168
| | | | | | Task-number: QTBUG-55836 Change-Id: Ic5ee72f5ffb236fe15e46fa667159a139ad05b03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ShaderData: add getter to retrieve transform type of propertiesPaul Lemire2016-09-071-4/+6
| | | | | | | | Replaces isPropertyToBeTransformed by propertyTransformType which returns the TransformType (NoTransform) if the property isn't transformed. Change-Id: Ib7d91bdcfe18409e6ad6d6f5bc119c46dd7fb143 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for LoadSceneJobPaul Lemire2016-09-073-1/+301
| | | | | Change-Id: I6a570f16a303277b8305b36bef805991680ae1ea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ShaderData: refactoringPaul Lemire2016-09-051-0/+44
| | | | | | | | | | | | | | | | | | | | Only store the original properties (does not store transformed values anymore as these can change on a per thread basis and lead to races in the ShaderData). Instead introduce a method to check if a property needs to be transformed and a method which given a viewMatrix returns the transformed value. This can then be used concurrently by each UniformBlockValueBuilder without introducing races. Also since building UBO from a ShaderData has been disabled since 5.7, remove all the nested ShaderData update logic. Unit tests updated. Change-Id: Id0e5956b9f7d93f8d019c3d8999268fc3ad68e79 Task-number: QTBUG-54818 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Remove excess slashes from include statementsMiikka Heikkinen2016-09-052-3/+3
| | | | | Change-Id: I64f815587947ad2f63462bb38027c533c7aa4bdc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add new multiplewindows-qml manual testAntti Määttä2016-08-306-1/+321
| | | | | | | | | | Add the new test, which renders to multiple windows simultaniously. Can be used to test that the resume/suspend of render thread works, among other things. Change-Id: I9ace3e833a701674d6021498fca6d8e837e94adf Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Frontend is in ms but backend in nsKevin Ottens2016-08-252-38/+38
| | | | | Change-Id: Id57a69a80f9eddb28fd2e75ea55baf98dcac452c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix order handling in input sequencesKevin Ottens2016-08-241-1/+1
| | | | | | Change-Id: I79c159c70ed81345b58c6dabfd60437e20554e94 Task-Id: QTBUG-54585 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix spurious sequence trigger on first key pressKevin Ottens2016-08-241-7/+4
| | | | | | Change-Id: I2c8a34009d3bac400f5e156fe6321af744960de5 Task-Id: QTBUG-54585 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix timeout handling in input chordsKevin Ottens2016-08-241-2/+2
| | | | | Change-Id: Ic4ab2d781403ada1206e7429ad1cd16ea2330aed Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix spurious chord trigger on first key pressKevin Ottens2016-08-241-4/+2
| | | | | Change-Id: If5a28e670e8eef0a9b5a75dc3451ee584f22e72c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move input, chord and sequence logic out of jobKevin Ottens2016-08-245-2/+441
| | | | | | | | | | The bookkeeping and activation logic of ActionInput, InputChord and InputSequence now move outside of the job, which make them testable properly. The tests already show bugs which will be fixed in following commits. Change-Id: I4e434118a6ba285d08632c43d487b17ee5b4cb66 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Complete the test harness around physical devicesKevin Ottens2016-08-247-5/+110
| | | | | | | | Now it also comes with a backend node and a device integration implementation so that one can simulate button presses for instance. Change-Id: I87a3ecf9e68904fdd52f7c94f55abbfed28c6e9c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Tests for ActionInput, InputChord & InputSequenceKevin Ottens2016-08-247-0/+463
| | | | | Change-Id: I7e560a35f989890c2555808d0a86e0fa05b0e60b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move tests for QCuboidGeometry into extrasPaul Lemire2016-08-245-5/+6
| | | | | Change-Id: I6ffb9e0a743dfad78624b2edcfa2d93d69d685dd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for QComputeCommandPaul Lemire2016-08-233-1/+296
| | | | | Change-Id: Ia600d227a2511b15f9305b69c135dc09188fbf68 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit Tests for QCameraLensPaul Lemire2016-08-233-1/+731
| | | | | Change-Id: I2e580ea9cd382aff0224b38a9a1431c67661666b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QRenderTargetOuput: add unit testsPaul Lemire2016-08-233-1/+421
| | | | | Change-Id: I8a598a0edad751d3e92c7e6893f5761d5b553070 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QSceneLoader: status is updated from the backendPaul Lemire2016-08-231-1/+67
| | | | | | Change-Id: I52159b0fa78ab915e73c2dc84bda9bccc3dbd0ef Task-number: QTBUG-54889 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Scene: add a setStatus methodPaul Lemire2016-08-231-0/+22
| | | | | | | | Will allow to set the status in the backend and update the frontend with it. Change-Id: Iac47e9960b8ef56c4e45ea31c616c4bc2a8f3444 Task-number: QTBUG-54889 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for QSceneLoaderPaul Lemire2016-08-223-1/+138
| | | | | Change-Id: I6f92482750e5e013dc951a3028b5aab7c1c7de4c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for scene loaderPaul Lemire2016-08-223-1/+171
| | | | | Change-Id: I9cbb718347605b5ea048e9f37251817339b42412 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* transparency-qml-scene3d: updated to use cubemap as backgroundPaul Lemire2016-08-193-5/+12
| | | | | | | | | Help reveal potential issues. Also adjusted blending arguments to work properly. Change-Id: I86687aefe3bbc24cd9de559fa813d7c815e321e0 Task-number: QTBUG-54591 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Entity: fix -> properly clear childrenHandles vectorPaul Lemire2016-08-161-0/+17
| | | | | | | | | | | | | When cleanup is called that means an Entity needs to be recycled for reuse later on. The children handles vector wasn't cleared which resulted in it containing invalid handles when the Entity element was reused. In turn that eventually resulted in asserts in the handle manager when that Entity was released again (which explains crashes with the QSceneLoader changing sources). Change-Id: Ic2e69132e4a5186f92936593ddcf3da72a7e1446 Task-number: QTBUG-54889 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_renderviewutils.cpp: add comments to make things easier to readPaul Lemire2016-08-111-0/+32
| | | | | Change-Id: I5f8c7f0d1de5e54964d54711daa39703a003736d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DWindow rename defaultFramegraph to defaultFrameGraphPaul Lemire2016-08-113-3/+3
| | | | | | | | | | 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>
* HandleManager: do not allow counter to overflowPaul Lemire2016-08-111-1/+101
| | | | | | | | This could otherwise have happened if an element was acquired and released repeatedly. Change-Id: I29a327f32fdd9d9a02460bff26c9ff56fdd3dd61 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix regression: remove disabled entities from the renderingPaul Lemire2016-08-101-5/+24
| | | | | Change-Id: I40bbe3cb61e6ee825401a1ae55a12f3362b1a95f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_qgraphicsapifilter: add a few more test casesPaul Lemire2016-08-101-0/+26
| | | | | Change-Id: I16c60a9cce1b003847a60b0f3e4a0f3f5127c70b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-qml: fix debug layer techniquesPaul Lemire2016-08-106-40/+92
| | | | | Change-Id: I3602e2c837d351966d7b4216ecde458f80ba53a2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-qml: properly handle window size changesPaul Lemire2016-08-101-2/+7
| | | | | | Change-Id: If3f9e1e240f6323bf505f81424cba319c912c03a Task-number: QTBUG-55163 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-cpp: properly handle window size changesPaul Lemire2016-08-102-8/+31
| | | | | | Change-Id: I8e89a6c0adc2b99e5fe2af61629df2f2a6ae3ccd Task-number: QTBUG-55163 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix deferred-renderer-cppPaul Lemire2016-08-101-2/+2
| | | | | | | | | The window size needs to be set as a QSizeF and not a QSize as the shader expects a vec2. int to float conversion was failing and giving unexpected values to the shader. Change-Id: Ide4b4a884011e320bc909da27633e6adee1956c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* deferred-renderer-cpp: fix technique to use proper profile/versionPaul Lemire2016-08-101-2/+2
| | | | | Change-Id: Ieb2fe26d46279ef29a00194429889c0987f6ad40 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Mark QTransform component as non-shareableSean Harmer2016-08-091-0/+17
| | | | | | | | | | Add test for default construction. Making transforms non- shareable will make it easier to implement feeding back the world transform as a new property later without introducing ambiguities. Change-Id: I6d472b3da90ce1dacdfcc6f8366a23706044eb5c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* ClipPlane: fix was using wrong layerPaul Lemire2016-08-091-1/+1
| | | | | | Change-Id: I776c5104579d500e557f4ca5b72271a5ff1b4a79 Task-number: QTBUG-55117 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ClipPlane: set proper profile on techniquesPaul Lemire2016-08-092-2/+2
| | | | | | | | Otherwise technique selection fails Change-Id: I2ae2ca6fab83bcb3a7ce9cb17aac276d1d9890e3 Task-number: QTBUG-55117 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix cube geometry to have correct texture coords and tangent vectorsSean Harmer2016-08-093-1/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 SortPolicy backend node parentingKevin Ottens2016-08-083-1/+120
| | | | | | | | Also comes with unit tests showing the bug and testing the basic SortPolicy node behavior. Change-Id: Ied522dcce4faaa7c6750c289f6aafb18f92ffc74 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Convenience to locate QRenderSurfaceSelectorKevin Ottens2016-08-073-1/+119
| | | | | | | | This is in fact done at several places nowadays, sometimes with bugs, so let's provide a single tested implementation for it. Change-Id: I782ba18a15e5b4a3b320ac6b472173b1f8e417a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix graphics api filter compatibility test and add unit testSean Harmer2016-08-053-1/+235
| | | | | | | | | Also needed to properly specify namespace and class name for signal arguments so they are picked up in old style connections. Task-number: QTBUG-54711 Change-Id: Id752a3dd0703aa6bf02da4ec4252c6207fa60acb Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>