summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move the examples under a qt3d subdirLaszlo Agocs2015-03-04315-42/+44
| | | | | | | | Modules cannot have their examples in the top-level examples directory because in the pre-built packages all modules' examples are merged together. Change-Id: I80fdbb8f1ec6f3d8fd793e4d856e705000237127 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Nano optimization to GLTFParserKonstantin Ritt2015-03-041-3/+3
| | | | | | | | Do not load a identity matrix if we're going to initialize its values by hand. Change-Id: I7d745f4090a78ab4ecca99c313f15d689d32fc92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Expose QComponent to QML as Component3D to avoid names clash with QuickKonstantin Ritt2015-03-041-1/+1
| | | | | Change-Id: I44d91eb99f4fbcd94a7f99cf70d1c66070c15a57 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShader: Fix for absence of instance names in UBOPaul Lemire2015-02-282-7/+22
| | | | | | | | | | - Also added debug logging in RenderShader for the Shaders logging category - This restores the deferred-example rendering which was broken since 3abbf9227ada8f68821a5ad473bba4f52e625fb5 Change-Id: Ie1b39c903f8c33f7d9b859317ae185c42043a9e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Logging Category for ShadersPaul Lemire2015-02-282-0/+2
| | | | | | | | Will help have logs only related to shaders Change-Id: I74df08a247e0af075fa14dcf10596dc141a6eaa1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderView: moved the ShaderData name/value map building outPaul Lemire2015-02-284-103/+115
| | | | | | | | | It is now contained in RenderViewJobUtils inside an helper struct called UniformBlockValueBuilder. This allow to simplify the code and will make unit testing easier. Change-Id: Ibbeeda8d913bfa1adc7c93c1fecb9cafda15deb3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QBackendNodeFunctor: get and destroy now take a QNodeIdPaul Lemire2015-02-2821-69/+69
| | | | | | | | This will help fixing the dynamic destruction in follow up patches. Change-Id: Id44fbeac388628c0e563d288e13d1f15d7ac0c24 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ChangeArbiter/SceneChange: use id as change subjectPaul Lemire2015-02-2828-150/+101
| | | | | | | | | | | | Instead of having a QNode* or QObservable as the subject of a change, we use it's unique NodeId instead. That will prevent the ChangeArbiter from trying to distribute changes by looking at a QNode/QObservable id when the QNode/QObservable might have been destroyed in the meantime. Change-Id: Ia419d5b841434fd65522c8c65de552089cfe97cf Task-number: QTBUG-44628 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unit Tests for RenderShaderPaul Lemire2015-02-285-3/+159
| | | | | | | | Note: Only test proper initialization, cleanup and that it matches a frontend peer. Doesn't that shader loading as this requires a context, surface... Change-Id: I05f6ef059005b4781b82876a8d73e46d41d44387 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix: remove QByteArrayLiteral used when setting SceneChange property namesPaul Lemire2015-02-2820-63/+63
| | | | | | | | This was probably forgotten when the property name was changed fron QByteArray to char *. Change-Id: Idd6a988703a241519b3aba7b1d127adae5e1375e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added NodeInstantiatorSean Harmer2015-02-2825-48/+1468
| | | | | | | | | Hopefully in the long term we can make the renderer smart enough that it can automatically use instancing to render such things. Change-Id: I9f5cfabeea11f5e6b925d5ad2466afa8e601e6f8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Dependency handling fix for ThreadPoolerMika Salmela2015-02-271-0/+1
| | | | | | | Add link to dependencyHandler also for the depender task. Change-Id: I751ef6021e2144e2b52766a7b26496b71fc44342 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Disable building benchmarks in debug buildsLaszlo Agocs2015-02-271-1/+5
| | | | | | | Because linking fails on Windows due to the benchmarks being release-only. Change-Id: I386b38f10ec5018f34bbbd45c6ff29ad6925faa5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Include limits header for numeric_limitsLaszlo Agocs2015-02-271-0/+2
| | | | | Change-Id: Ifdd3afa86a7aab56ecd9594cab21b0f1d58f160c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix scene path in assimp examplesPaul Lemire2015-02-262-2/+2
| | | | | | Change-Id: Icf48692501df3647d05d9a5ad9c4017bde650b87 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix for ThreadPooler flushMika Salmela2015-02-262-1/+3
| | | | | | | | | Increment running thread counter before removing task from the queue. This prevents the idle test to pass if queue is empty and job runner hasn't yet increased the counter. Change-Id: I01992ef6e9b437d2ce3d9f62e6025b3122e19fa8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix build with gcc 4.4Laszlo Agocs2015-02-261-11/+11
| | | | | Change-Id: I30a9ce2955a5e0d80ca8f592fe6fb750f0efbb07 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* License header change.Mika Salmela2015-02-261-10/+13
| | | | | | | | | License header update for propertychangehandler_p.h. Apparently the script managed to skip this one. Change-Id: Iabc190c5b85b250ec4efd0abd44d104e2006d438 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/dev' into 5.5Oswald Buddenhagen2015-02-23160-13810/+1311
|\
| * Removes ThreadWeaver code from Qt3DMika Salmela2015-02-1994-11381/+31
| | | | | | | | | | | | | | | | | | Qt3D will be published with commercial licenses and there can't be 3rd party LGPL code. This task will remove the ThreadWeaver code and places the adaptation code inside configuration. Change-Id: I316f23087cdd8fed0afafbb1a3d78e3ff159585a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Remove incomplete bullet and OpenAL aspectsSean Harmer2015-02-1945-2700/+0
| | | | | | | | | | | | | | This can be reverted following the merge from dev -> 5.5. Change-Id: I7b85e64aa91d9ed81e3ef4d866e531056314d72e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Avoid crashing when becoming non-exposedLaszlo Agocs2015-02-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android Qt3D apps used to crash when they got moved to background. beginDrawing() correctly recognized that the window was not exposed anymore, but some of the cleanup for the render queue was not done in this case. This is now corrected, so apps will survive. It is not the full solution because we still continue to attempt to render which is a waste of CPU time. Proper pause and resume will have to be implemented later, similarly to the Quick scenegraph render loops, based on the expose events. Change-Id: Ia567d891fc746bb6851524e0f8a998a8fd53f8b1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Reset the state the Qt Quick scenegraph relies on in Scene3DLaszlo Agocs2015-02-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Qt3D rendering may change state that is relevant also for the Qt Quick scenegraph. This becomes apparent in more complex cases, for example combining a Qt Quick Controls based UI with a scene containing multiple textured objects often ends up in totally garbled frames. To overcome this, call QQuickWindow's resetOpenGLState() which is offered exactly for this purpose. Change-Id: Ic56d2f78e121908335917a89b97ba735ca24e0af Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Fix modifier key handling in input aspectLaszlo Agocs2015-02-191-16/+3
| | | | | | | | | | | | | | | | | | | | | | Relying on Alt press/releases has the annoying side effect that some systems (X11) will not give a KeyRelease for Alt when pressing Alt+Tab. It is better to handle such keys based on the modifier state. This avoids getting into an "Alt is stuck" situation when switching back to the application's window. Change-Id: I8e1675d9d4093e162fe0e42a2def26737d7a7467 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * ThreadPooler to replace ThreadWeaverMika Salmela2015-02-1912-2/+1202
| | | | | | | | | | | | | | | | | | Initial version of ThreadPooler to substitute 3rd party ThreadWeaver. Qt3D will be released under LGPLv3 and commercial licensing terms, therefore we can't share code with free licenses. Change-Id: Ic0956b40e4960002205ee32c19a053813339791c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Use qmath functionsSean Harmer2015-02-183-15/+15
| | | | | | | | | | | | | | Fixes compilation on QNX 6.6. Change-Id: Ib6215d5bc1f86139154deb025beb38c591f78f76 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Remove debug prints from gl3 helperLaszlo Agocs2015-02-181-2/+0
| | | | | | | | | | | | | | No need for these anymore. Change-Id: I0737e2d11878e610b0bec682ee473b696e4d33de Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Make shadow mapping functional on ES 3Laszlo Agocs2015-02-188-0/+326
| | | | | | | | | | | | | | | | | | To preserve our sanity we will only support ES 3.x, not 2.0 + GL_OES_depth_texture + EXT_shadow_samplers. This way we can provide version 300 es shaders and do not have to introduce yet another filter and technique. Change-Id: Ib5c826d6540b4848f0cb4629e5311150169a9697 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Reset the active texture cache in beginDrawingLaszlo Agocs2015-02-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | When using Scene3D the context is shared with the Qt Quick scenegraph and the state can be changed arbitrarily between Qt3D updates. Caching the state is therefore not an option between frames. This fixes texture usage in apps using Scene3D and Qt Quick controls. Change-Id: Ifc67171af5209499bfdd4474230d59f03e22889d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix default OpenGL filter settingsLaszlo Agocs2015-02-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The API should be ES in an ES-only build of Qt, or when dynamically choosing ANGLE on Windows. The profile should be NoProfile. This is particularly important for systems where requesting a version like 2.0 gives a < 3.2 no profile context instead of >= 3.2 compatibility. The default filter should match both, hence using Compatibility is not an option. Change-Id: Ie8f20b0f09d8d6f6569cfda0f8c2b7217a2e23df Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * unit tests for qchangearbiterPaul Lemire2015-02-181-97/+143
| | | | | | | | | | Change-Id: I7f6e37cd010b530bd36e15d8461e6d50da7a42b9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * playground-qml now properly showing ShaderData/UBOPaul Lemire2015-02-182-36/+11
| | | | | | | | | | Change-Id: I939927270786773522ca7a327195cc504dccc412 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Hardwire input aspect into Scene3D when requestedLaszlo Agocs2015-02-172-1/+6
| | | | | | | | | | | | | | | | | | If we do not rely on 3dinput in any form then no factory will ever get registered for "input", simply because the entire input module is not loaded. Change-Id: Ic122f7c046d5fd7c07fd3229254a3e7ae36fd3de Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Fix index buffer size for spheresLaszlo Agocs2015-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the calculation based on the loops below. Having extra uninitialized indices at the end may seem harmless, but only until encountering GL implementations that do include all index buffer values in their validation process. With ANGLE for example the drawElements call was often rejected due to these random, potentially large uint16 values in the index buffer. Change-Id: I7c54dec921961ce1bed29c30a0bfa09c91a287dd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | headersclean: don't shadow members with variablesThiago Macieira2015-02-193-6/+6
| | | | | | | | | | | | | | qnode.h:60:16: error: declaration of ‘clone’ shadows a member of 'this' [-Werror=shadow] Change-Id: I1a800c709d3543699131ffff13c381333ae8cec0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Don't override pure virtual with a pure virtualSergio Martins2015-02-181-2/+0
| | | | | | | | | | | | | | | | | | clang is complaining this is missing Q_DECL_OVERRIDE, so just remove it as it's already in the base class. Change-Id: Ie1a270fd29a3c94e43476a05fb5f15724aabf7f3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Update sync.profileSergio Ahumada2015-02-181-4/+4
| | | | | | | | | | | | | | | | make qt3d's dependencies use the same branch as qt3d Change-Id: I8648092da71d040b135678b5a93b5d815023b537 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Mark it constSergio Martins2015-02-183-3/+3
| | | | | | | | | | Change-Id: Ia2620f1d15400ab4490357f322050846d0deb705 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix inconsistent override warnings [-Winconsistent-missing-override]Sergio Martins2015-02-187-7/+7
|/ | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Change-Id: Ibe3e5a5fdc5cb3fc4c61ab722005c337f5998c26 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix default material shaders for non-core OpenGLLaszlo Agocs2015-02-161-3/+14
| | | | | | | | | | The non-ES shader is an 150 core one. To keep things working with 2.x only and non-core, use the es2 variant. This is in line with how all the other built-in materials work. Change-Id: I63c673506c8be0b9b89aa4470728c40b867306c6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Do not build render jobs without a surfaceLaszlo Agocs2015-02-166-17/+17
| | | | | | | | | | | | | Examples like wireframe tend to crash on exit. This is because the platform surface filter sets the renderer's surface back to null, while we are trying to build some jobs still. Even though everything gets shutdown soon after that, we have to somehow prevent any operations relying on the surface in the meantime. This is also an opportunity to avoid exposing the surface pointer from Renderer. Instead, communicate the surface size to the render views. Change-Id: Ifc739ec50e3f6a67d20bfd0dc1913a12b906a8ab Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix license headerSergio Ahumada2015-02-161-5/+5
| | | | | Change-Id: I391a3e48378579130ec7e18958389775b022843f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Skip benchmark on WinCE for nowLaszlo Agocs2015-02-141-1/+1
| | | | | | | | | | | Some of them do not compile: tst_bench_qresourcesmanager.cpp(115) : error C2039: 'time' : is not a member of 'std' For now let's just skip them in wince builds. Change-Id: Id58ef24431abeb2916836e7ab5a9a05f8c8eeb01 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix texture sampling callsLaszlo Agocs2015-02-144-10/+10
| | | | | | | | texture2D() is not available in core profiles, although some drivers accept it. Instead, use texture() in >=130 shaders. Change-Id: I555d7b1fb7229db1fdb7257bd23a3a38d0087d88 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use Qt wrappers for math functionsLaszlo Agocs2015-02-143-5/+5
| | | | | | | | | Make sure it builds on obscure platforms like WinCE. Functions like cosf live in some unexpected headers there. Best is to avoid the issue altogether by using the qmath functions. Change-Id: I3cbf0f811aef36997ad38db431426e9eb582198b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QOpenGLFilter version comparisonLaszlo Agocs2015-02-131-4/+4
| | | | | | | | | | | 4.0 satisfies a filter of 3.1. Previously this wasn't the case, due to the incorrect condition for the minor version. This makes examples with filters for 3.x working on cards that provide OpenGL 4.y where y < x. Change-Id: Ie443bdb816410c71fe593143c4a58c4d10571abe Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid warning with MSVCLaszlo Agocs2015-02-132-2/+2
| | | | | | | Fix an int - size_t mismatch and a linkage problem. Change-Id: I19a57861850b4e112c98beb42b00d0a05d3f5509 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid instance names in uniform blocksLaszlo Agocs2015-02-132-9/+9
| | | | | | | | Version 140 (OpenGL 3.1) does not support the namespacing features yet. Instance names are introduced only in 150 (OpenGL 3.2). Change-Id: I3917093113beff6049c25c3282c13062d220700b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove failing converter registrationLaszlo Agocs2015-02-131-14/+1
| | | | | | | | | | | The QJSValue -> QVariantList converter will not be registered because there is such a conversion provided by qtdeclarative since Qt 5.4. This avoids a warning on startup. Change-Id: I69572f36f655315d4c91000a26625f44690dcd6f Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make scene parsers operate on URLs instead of raw filenamesLaszlo Agocs2015-02-1316-36/+46
| | | | | | | | This way they are compatible with how mesh and texture source URLs are handled. Change-Id: Ifeee504fd3f5957d23f5cade92a73663488bdaf9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>