summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix plugin name for static builds (iOS)Mike Krus2015-12-301-1/+1
| | | | | Change-Id: I6e588218f02f4d60b196d211e932ce8342588f0a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Stop using enum references that require C++11.Raphael Kubo da Costa2015-12-303-29/+29
| | | | | | | | | | | Use Qt::Foo instead of Qt::Enum::Foo, which is a C++11 extension. When building with clang without -std=c++11, this results in warnings. With older GCC versions, the code simply does not build. This is similar to commit deffdaf9 ("GraphicsHelper: fix switch"). Change-Id: I28389b90bafb3df87187742ef55267ce2df1ba1a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added QPointSize RenderStateWieland Hagen2015-12-279-3/+257
| | | | | | | | | Point Sizes may be specified 2 ways: either statically via glPointSize() (OpenGL 2.0+) or by enabling GL_PROGRAM_POINT_SIZE. Task-number: QTBUG-49997 Change-Id: I98887484cf31df01b98801e1f324487ee7bf7492 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add glPointSize() helper functionsWieland Hagen2015-12-2713-0/+67
| | | | | | | | | | OpenGL ES 2.0 doesn't support glPointSize(), but OpenGL 2.0+ does, so we need to call it though a QGraphicsHelperInterface. When on OpenGL ES 2.0, just print a warning. Task-number: QTBUG-49562 Change-Id: Icbd5f602cae38f95925d99003ec3ee9aebb3719e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add debug code to catch errors with removing job dependenciesSean Harmer2015-12-222-0/+8
| | | | | | | Helps to catch problems fixed in the parent commit. Change-Id: I6209fd3bac7e127d88f917f5aad54c668651e8a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix slow down seen with long running applicationSean Harmer2015-12-221-1/+7
| | | | | | | | | | | | | | | | When Qt3D applications are left running for extended periods a gradual slow down was noticed. This turned out to be caused by spending a long time sorting the job dependencies in the thread pooler caused by an ever increasing number of dependencies. This in turn is caused by the render aspect not properly clearing out old dependencies between one frame and the next. This change fixes this kind of mistake in two places. Qt3D applications now no longer slow down over time. Change-Id: I32c258009c98120b38c8c8fa47641dcf336e9588 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Allow device integration impls to see the aspectKevin Ottens2015-12-212-0/+9
| | | | | Change-Id: I257ecd56a454ba7ad969859fad94fc45a8e729c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move the signals earlier in definitionKevin Ottens2015-12-182-8/+8
| | | | | | | | | Mainly to satisfy my OCD, this way we got all the public first, then signals, then protected, then private. It's the usual ordering in most places. Change-Id: I63a96714e9027b3a0a7fead4bda141922d51ddff Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make parentEntityId privateKevin Ottens2015-12-184-8/+11
| | | | | | | | It is used only once in the whole of Qt3D and looks rather foreign to the rest of the nodes API. Change-Id: I6d8d40590a1f8a5c2019a8d16a7abff4f19ae9bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* The Renderer depends only on the QServiceLocatorKevin Ottens2015-12-185-11/+9
| | | | | | | | | This way the only thing Renderer knows about QRenderAspect is the enum controlling the render more (threaded or synchronous). We properly decoupled both now. Change-Id: I0023efec541d40f7b499da4355d5cd8b796d2194 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move the time property to the rendererKevin Ottens2015-12-187-12/+21
| | | | | Change-Id: I60adff0ece408bb4ee21b9cbd329e21da2c1f95c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Pass the QBackendNodeFactory to setSceneRootKevin Ottens2015-12-184-7/+5
| | | | | | | This helps to reduce the dependencies from the Renderer to the QRenderAspect. Change-Id: Id54e38642061f787649ba3794cafb8b8bbbde3f1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Destroy allocators in aspect not the rendererKevin Ottens2015-12-184-3/+4
| | | | | | | | | Otherwise it was creating a weird confusion of responsibility. The aspect asked for the creation of the allocators while the renderer itself was asking for their destruction. Change-Id: Ib06a315b39dc654d5a9bb97d4d2153884c457443 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QAspectJobProviderInterface privateKevin Ottens2015-12-176-10/+33
| | | | | Change-Id: Ib56156893b974110e0ceec1685b791828afd7ecb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QSceneObserverInterface privateKevin Ottens2015-12-178-21/+30
| | | | | Change-Id: I98454ea6ed5bd5bbfed550317fedbf8ee47a1f8f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBackendNodeFactory privateKevin Ottens2015-12-178-30/+42
| | | | | Change-Id: I0edb9fb0444d8a4a9b77550d5dd32d36d501683c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QuaternionAnimationLaszlo Agocs2015-12-175-4/+397
| | | | | Change-Id: I266d745e13fe0c1a3aa6a381a3b43f1b751d1445 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make clearBackendNode privateKevin Ottens2015-12-173-7/+8
| | | | | Change-Id: I8645116f21a5c0b7a9c0785c1eeebd019bad7ad3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* executeCommand is meant to be reimpl not calledKevin Ottens2015-12-171-2/+4
| | | | | | | | We make sure it can be reimplemented in sub-classes but it will be called only by QAspectEngine own executeCommand method. Change-Id: I777889fd082a56af70cdadbba9b55d2532db8869 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Get rid of isShuttingDown()Kevin Ottens2015-12-173-9/+3
| | | | | | | | | It is misplaced (if need be it'd be more logical on QAspectEngine API) and used only once from a place where we already depend on private API anyway. Change-Id: I55fcee3a11830515c90e984a186040312898df56 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move services() and jobManager() to the pimplKevin Ottens2015-12-177-19/+20
| | | | | | | This way we avoid leaking private types through public API. Change-Id: Ifb30d7e57d8b995bba8cf9a95ae77f8d7818d79a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move QAbstractAspect::registerAspect() to the pimplKevin Ottens2015-12-174-9/+9
| | | | | Change-Id: Iabc9afe59052e69725a82fb6bdb42f0dfae7fc91 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove QAbstractAspect::setRootEntityKevin Ottens2015-12-174-15/+16
| | | | | | | We switch to a more resilient private virtual instead. Change-Id: I90710c7873571ca0a40f7cc939282344b20a59f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QInputDeviceIntegration can register backend typesKevin Ottens2015-12-173-2/+24
| | | | | | | | No need to make registerBackendType() public on QInputAspect anymore, it's properly exposed to the QInputDeviceIntegration sub classes only. Change-Id: Ica44e0d37f9e6eecb099d87b0420a7b8bbc6ab59 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QInputDeviceIntegration::initialize() saferKevin Ottens2015-12-175-4/+17
| | | | | | | | initialize() is now public and non virtual, only recording the aspect pointer, while doInitialize() is private and pure virtual. Change-Id: Ic68b7b729205d9ec01927e9dc576cab16f53d18e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing pimpl to QInputeDeviceIntegrationKevin Ottens2015-12-174-2/+91
| | | | | Change-Id: I87cc1525adf0dc0665affe3797f3be79ae1294b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make jobsToExecute privateKevin Ottens2015-12-161-0/+6
| | | | | Change-Id: I536691c30cc1f30064be1b822dfacb4ed63fee5b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove useless reimplementationsKevin Ottens2015-12-164-20/+0
| | | | | Change-Id: I0b19646de41014274674c75650028980076b8349 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove dead codeKevin Ottens2015-12-162-16/+0
| | | | | Change-Id: I10a42393baacf8788383e81c75f77b29898f2213 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* visitNode is not needed as virtual anymoreKevin Ottens2015-12-162-9/+2
| | | | | Change-Id: I2cd3cd7db8722d63e58be701aa2ae00fb19a1d2a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QNodeVisitor work with non-void functionsKevin Ottens2015-12-161-15/+15
| | | | | Change-Id: I280bfdeb383939903c65d7f3ffa8c97166b20030 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Only aspect subclasses register backend typesKevin Ottens2015-12-162-4/+6
| | | | | | | | Also make registerBackendType public on QInputAspect for now since its plugins will also need to register backend types. Change-Id: I7b07162d806b5644daf12f6b22161677f16da38e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make sceneNodeAdded/Removed privateKevin Ottens2015-12-162-3/+9
| | | | | Change-Id: Id559daa0d4e0fe714fd9742ec0146172f4b9be9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Smoothly transition from deadzone by adjusting gradient of responseSean Harmer2015-12-161-2/+25
| | | | | Change-Id: Ibb76111afb7d7ae6fb14aadf2e7225895e45152e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Change the idiom to clear null job dependenciesKevin Ottens2015-12-164-15/+10
| | | | | | | | | | The "clearNull" method is kind of surprising so make QAspectJob API more usual. Also the "clearNull" method was only used twice so change the idiom to go through removeDependency if that one receives a null pointer. Change-Id: Ib74e1054ba52754b1a19d6c3e9268fa9ff14edaf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QAspectJob::removeDependency()Kevin Ottens2015-12-162-0/+8
| | | | | Change-Id: Id67338fa5cae61161674d9efb345a475a7ae93ac Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement low pass filtering of axis valuesSean Harmer2015-12-164-7/+38
| | | | | Change-Id: Ie9a7677db6c86cfd51732d0e009e5de6442ee931 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Implement dead zone supportSean Harmer2015-12-169-17/+180
| | | | | Change-Id: Icd5d31ba690484dc310de872be9df3ec9a520c63 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Add we mean it headersLaszlo Agocs2015-12-153-0/+33
| | | | | Change-Id: I0ad651a68441d3cd0f836c37304cdcb1effac455 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing precision qualifiersLaszlo Agocs2015-12-153-3/+3
| | | | | Change-Id: I362d40cc7861551b49d97120751b107d3d7f674e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove initialize/shutdown from APIv5.6.0-beta1Kevin Ottens2015-12-146-23/+22
| | | | | | | | Hiding them in QAspectEnginePrivate and calling them when needed from setRootEntity. Change-Id: I4c3dfb19d84ae90cc15bbff29a4abd0705bb61dc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make the p-impl really privateKevin Ottens2015-12-122-14/+1
| | | | | | | | We don't inherit from that class and it's not designed to be inherited from. So make the p-impl completely private and remove the useless ctor. Change-Id: If66c8aa171a2293da6a068db68e61e516fafac42 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move initNodeTree to the p-implKevin Ottens2015-12-123-6/+4
| | | | | Change-Id: Idbf911e5fdd642356b8088a55fbc264e2418af17 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Turn all services private for nowKevin Ottens2015-12-1228-100/+134
| | | | | Change-Id: I9da605c77c5489b9bef4f07079e05f8babb9559f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTransform: Add convenience properties for Euler angle rotationsAndy Nichols2015-12-113-0/+99
| | | | | | | | | | | | | | | | Since refactoring the QTransform API to enable matrix decomposition, it has become more inconvenient to apply rotation transforms through the QML API. This is due to the need to set QQuaternion values for the rotation property, which makes using the Qt Quick animation framework difficult. To remedy this, there are now some additional properties added to Qt3DCore::QTransform which enable direct usage of Euler angles instead of just QQuaternion. Internally the rotation property is still used by translating the Euler angle transforms to a QQuaternion. Change-Id: Iad48542a7b125f7615f7a69516fb10a973d8395b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename Q3D*Event to Q*Event and handle namespaceMike Krus2015-12-1029-204/+201
| | | | | | | | Q3DMouseEvent, Q3DWheelEvent, Q3DKeyEvent Also removed unused variables and fixed some formatting Change-Id: Ie4c531f2084875fe4d8b6ac9bafd2b3c085dead4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move all raycasting code as private in Qt3DRenderKevin Ottens2015-12-1031-454/+289
| | | | | Change-Id: I871cbc57166493f30ea307305d8664e2f8a8873f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Bring the GLSL 1.00 fallback shader up-to-dateLaszlo Agocs2015-12-101-35/+170
| | | | | | | | | Add support for spotlights and increase the number of lights supported from 3 to 4. It is now on feature parity with the normal lighting shader code. Change-Id: I784ffb8bd0142253b5c8980e654fa25d683d93f0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Reduce specular reflectivity defaultsLaszlo Agocs2015-12-1011-12/+12
| | | | | | | | 0.95 -> 0.01 to prevent eye-poppingly white specular highlights. Change-Id: I3e765bad13afe991053932e73cea13b95c950c1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Do lighting calculation in world spaceLaszlo Agocs2015-12-1034-157/+118
| | | | | | | | | | | | | | | | As opposed to (mostly) camera space. Oops. While somewhat hidden with point lights, the problem became apparent with directional lights. Now that we have proper directional lights, change the default light, that is used when no light components are specified at all, from point to directional since this is cheaper and provides less surprises with arbitrary scenes. Also remove the duplicate phongalpha vertex shader in the process. Change-Id: I295660a1400b16b69e1516672e31794312ee48d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>