summaryrefslogtreecommitdiffstats
path: root/src/render
Commit message (Collapse)AuthorAgeFilesLines
* NoDraw backend node for QNoDraw addedPaul Lemire2015-04-274-3/+142
| | | | | Change-Id: I085353a1e2779b3283dbb99101569198c782efc3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNoDraw: added missing export and Q_OBJECT macrosPaul Lemire2015-04-271-1/+2
| | | | | Change-Id: Id11de82193ea7a646e3eda58e588bbc01481a185 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNoDraw FrameGraph node addedPaul Lemire2015-04-253-2/+133
| | | | | | | | This will offer a way of preventing a RenderView from processing meshes but rather only setting rendering states and/or clearing buffers. Change-Id: I76b9f8c0b3e8410944e9e80f3d6688416adf2edf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QFrameGraphNode copy takes care of copying FrameGraphNode childrenPaul Lemire2015-04-2510-20/+5
| | | | | | | | This avoids having each QFrameGraphNode subclass do a clone of the children in their copy methods. Change-Id: I2e1ef2b924a3e2a9eb7b90b69711162493dea89f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renderer: apply per RenderView global RenderStatePaul Lemire2015-04-256-9/+35
| | | | | | | | | | | Each RenderView now has a RenderStateSet. If the FrameGraph tree contains a StateSet node, the RenderStateSet will be created and filled correctly in the RenderView. Otherwise the RenderView's RenderStateSet will remain null. When comes render time, foreach RenderView, if the RenderStateSet is not null, it will be applied before processing the rest of the RenderView. Change-Id: Id0aecce1f77950665e17ff759336d7fc29a0afcf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* StateSetNode: backend framegraph node for QStateSetPaul Lemire2015-04-254-3/+190
| | | | | Change-Id: I9f7a08b1315d1c2ffce1823edb52a41c33bce656 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move RenderState creator to renderstate for further reusePaul Lemire2015-04-253-85/+91
| | | | | | | | Otherwise only renderrenderpass can create backend renderstates from a frontend QRenderState. Change-Id: I94b8c527af78113b1fdd5cb654db47e1ce5e3c70 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QStateSet FrameGraph Node addedPaul Lemire2015-04-254-2/+282
| | | | | | | | Will allow to set RenderState in a global manner instead of relying on per Material states Change-Id: I629a06968b07ebdc3aecbb91679c9e9f1a50db1a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTechnique use private slot to send OpenGLFilter ChangesPaul Lemire2015-04-253-11/+13
| | | | | Change-Id: I070360e5b05c7e974664ea0825f3d8ef231ef006 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QRenderPass use QNodePtr to send clonesPaul Lemire2015-04-252-2/+3
| | | | | | | and updated tst_renderrenderpass Change-Id: I9fae01de6c1c343cdc327cfed5ffa0cf16b01988 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix multiple C++ documentation issuesTopi Reinio2015-04-1453-362/+545
| | | | | | | | | | | | | | | | | | | - Remove multiple \namespace commands for namespace Qt3D. QDoc in 5.5 is now able to collate namespace members from multiple modules. - Mark 'Q...Private' classes and functions taking private arguments as \internal - Use correct \qtvariable for Qt 3D Core and Render - Add src/plugins directory to Qt 3D Core documentation build to correctly generate Assimp-related documentation. - Ensure documentation for C++ properties is visible by using the \property command instead of documenting the setter/getter functions. - Add export and logging macros to qdoc ignore directives - Remove unnecessary use of \fn command - Language and styling fixes Change-Id: I2481fa30ad2f6869b85c038c20ff1730b8522d46 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fill the whole window on retina Macs.Gunnar Sletta2015-03-211-0/+4
| | | | | Change-Id: Iaa45e456bf884ed53491a8add453e9c7830cd520 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Add Qt3D landing pageTopi Reinio2015-03-171-1/+1
| | | | | | | | | | | | Add a top-level landing (index) page for Qt3D that links to information about the Qt3D modules, overviews, reference pages and examples. Add the Core and Render modules into a 'qt3d-modules' group so they will be listed on the index page. Change-Id: I18f0ec82a676f24e89c5eb068463482a6bd9e59d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Add skeleton documentation for the examplesTopi Reinio2015-03-172-3/+18
| | | | | | | | | | | | Add a skeleton version of the example documentation for each example, create a group page for them and link to it from the module landing pages. This allows browsing the example code from the docs and also enables listing them in Qt Creator's Welcome mode. Change-Id: I1ba16399b115bb8c5503bc91d2a8dee46417cd01 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Review doc Qt3DNico Vertriest2015-03-162-1/+16
| | | | | | Task-number: QTBUG-44180 Change-Id: Ia5ce031397f9b03c5ba692aa30b6097dc60e59e3 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* Prefer q_func() over direct access to q_ptrKonstantin Ritt2015-03-167-7/+7
| | | | | | | | Similarly to d_ptr/d_func(), q_ptr should be accessed from the base class, whilst q_func() is a Qt'ish way to access it from subclasses. Change-Id: Iab2cf870f7b3f7d1aea89e827b52b8a7c958b907 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* [.*SceneParser] Minor clean-upKonstantin Ritt2015-03-164-27/+25
| | | | | Change-Id: I171a3e44383f2f5160b24113de6d92725ed19fe9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Do not update eye position if there's no cameraKonstantin Ritt2015-03-161-3/+1
| | | | | | | Sorting by depth wouldn't make sense in this case. Change-Id: I02ceef82970ead2a84170ffe4e559f2281408915 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Correct use of std::numeric_limits::maxThiago Macieira2015-03-121-1/+1
| | | | | | | | It requires #include <limits> and extra set of parentheses due to windows.h max() macro. Change-Id: Iee8cbc07c4434ce9b560ffff13ca7dd7c94a7af1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix MSVC warnings.Friedemann Kleint2015-03-121-1/+1
| | | | | | | | | | | | aspects\qabstractaspect.cpp(50) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data resources\qframeallocator.cpp(276) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data resources\qframeallocator.cpp(284) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data qchangearbiter.cpp(108) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data qt3d/src/render/backend/jobs/renderviewjobutils_p.h(64) : warning C4099: 'Qt3D::Render::ShaderUniform' : type name first seen using 'struct' now seen using 'class' Change-Id: I055f2021cbecf0765a811aedd87eb2cee97e6431 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add another missing limits includev5.5.0-alpha1Laszlo Agocs2015-03-111-0/+2
| | | | | Change-Id: Ia11e7d53e95b2575f4ba9100c36a9d203979213a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Log the actual context formatLaszlo Agocs2015-03-111-1/+3
| | | | | | | | What we get may differ from what was requested. To ease debugging we must dump format() after create(). Change-Id: If6bc99096679b222f41283a229c42095a73846cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add new material QPerVertexColorMaterialLorenz2015-03-1111-2/+457
| | | | | | | | The new QPerVertexColorMaterial class provides color per vertex rendering. Change-Id: Idc87c21a07c2c8cd1ebfd5bed54c300c55e307ba Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix for ShaderDataPaul Lemire2015-03-094-7/+20
| | | | | | | | | Wasn't using the right index to retrieve the ShaderUniformBlock. Combined with the use of resize instead of reserve this lead to an unexpected behavior. Task-number: QTBUG-44874 Change-Id: If66554cf0ea133df33a72a63b256d80a4c4ce823 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Units test for RenderViewUtils and RenderViewPaul Lemire2015-03-093-9/+24
| | | | | | | | Mostly focused on ShaderData for now, RenderView unit tests will be completed over time. Change-Id: I279a49a294ff83d5ab5ec06c48e14796cf00b7b0 Reviewed-by: Sean Harmer <sean.harmer@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>
* 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-2815-50/+50
| | | | | | | | 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-2813-41/+41
| | | | | | | | | | | | 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-282-2/+20
| | | | | | | | 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-2813-41/+41
| | | | | | | | 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>
* Include limits header for numeric_limitsLaszlo Agocs2015-02-271-0/+2
| | | | | Change-Id: Ifdd3afa86a7aab56ecd9594cab21b0f1d58f160c 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>
* Merge remote-tracking branch 'origin/dev' into 5.5Oswald Buddenhagen2015-02-239-20/+58
|\
| * 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>
| * 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-182-0/+34
| | | | | | | | | | | | | | | | | | 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>
* | 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>
* | 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>
* | Fix inconsistent override warnings [-Winconsistent-missing-override]Sergio Martins2015-02-186-6/+6
|/ | | | | | | | 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 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>
* Make scene parsers operate on URLs instead of raw filenamesLaszlo Agocs2015-02-1312-30/+37
| | | | | | | | 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>