summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-01-2647-523/+664
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Technique: cleanup properly clears thingsPaul Lemire2016-01-131-0/+3
| | | | | Change-Id: Idbe854bdea0dca784fd1ac40cb34560bd7c22862 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QUniformPack to ShaderParameterPackPaul Lemire2016-01-132-2/+2
| | | | | | | | This will make it more clear that it also contains other things like UBO/SSBO which are pure Uniform values. Change-Id: I641246798b8c868d7bfdfde381221d9a97ed2d35 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QParameter: only copy QNodeId when parameter value is a QNodeSubclassPaul Lemire2016-01-134-49/+19
| | | | | | | | | | | | | This avoid doing useless clones and will be further improved to support UBO/SSBO when Buffer are used as a Parameter's value. QNode subclasses that can be used as the value of an attribute are: QAbstractTextureProvider -> default uniform block QShaderData -> UBO (could be made to work with SSBO as well) Buffer -> UBO / SSBO Change-Id: I4928b95107656afc64db1ef989dde5dde8a92df8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename UniformBuffer to GLBufferPaul Lemire2016-01-132-2/+2
| | | | | | | | This class could be reused for any kind of GLBuffer (not just uniform buffer) so rename it accordingly. Change-Id: I978696534f64fc3717ac135af94e9fe44aa23fba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Shaders: retrieve SSBO blockPaul Lemire2016-01-132-12/+55
| | | | | Change-Id: I62065d30b197367c8e5e03099c3af034892c4038 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added parameters to signals and made setters Q_SLOTSTomi Korpipää2015-12-0914-65/+71
| | | | | | Change-Id: Icec2f9f207221e35ffdeeb594bb9b4dc6ef890f1 Task-number: QTBUG-49797 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Separate GLSL 1.00 and newer shader snippets for lightsLaszlo Agocs2015-12-071-2/+9
| | | | | | | | | | | | | | | | | | | | Many but not all OpenGL ES 2.0 implementations support dynamic indexing. For these the normal for loop is fine. For simple GLSL 1.00 compilers without dynamic indexing support (e.g. RPi) a separate, limited version is provided that supports a lower number of lights and uses copy-paste instead of the loop. Right now there is no sane way to choose which snippet to use as that requires the OpenGL context at minimum (and even then we could only rely on vendor/renderer checks). Therefore a QT3D_GLSL100_WORKAROUND environment variable is used for now. This is temporary until we figure out something more sophisticated. The default GL2/ES2 lighting shader is now equivalent to the GL3 version, supporting up to 8 lights. Change-Id: I0244c920a1f2c2516b130991996afca68207a7db Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QParameterMapping: Add enum values for UBO/SSBOPaul Lemire2015-12-041-1/+3
| | | | | Change-Id: I3bd95ec273fb760df9113d59acd1ab430a767a84 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move core/io content to render/geometry and ioKevin Ottens2015-12-021-2/+2
| | | | | Change-Id: I79e0b0d62e07a269ebfce99edff56d30da28494c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QChar and QStringBuilder warnings in qshaderprogram.cppLaszlo Agocs2015-11-301-1/+1
| | | | | Change-Id: I24cf5c49473ef080675510bd7f1f8c7f4f35fa69 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for include in shader sourcesLaszlo Agocs2015-11-271-8/+27
| | | | | | | | | Implement our own custom include pragma. This is essential for introducing features that involve common snippets of code, for example lighting. Change-Id: Ia94d2492b399b5fb879ff2729654962677334a29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-262-45/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix QDoc warnings and do further cleanupTopi Reinio2015-11-237-25/+24
| | | | | | | | | Fix the documentation issues that still remained broken after renaming the namespaces/QML modules. Do further cleanup and minor doc editing. Change-Id: Iff38c8c1b99e7f712dc3f9ad07ecd37a747b3a26 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Technique: only create the QGraphicsApiFilter when neededPaul Lemire2015-11-161-2/+7
| | | | | | | | Otherwise we have hundred of QObject objects created for nothing Change-Id: I76340157dc562b2893fd70ee4f38cd63c04eb21e Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* QTechnique mark opengl filter property as CONSTANTPaul Lemire2015-11-161-1/+1
| | | | | | Change-Id: I8d83915b38bc02bdfa4bfef7588525fea22016ec Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Remove some uncessary QOpenGL* includesAndy Nichols2015-11-031-1/+0
| | | | | | | These includes seem to be left over from previous iterations. Change-Id: I58945b72c354bfa8ebbe687d52d3eb146f021f70 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QOpenGLFilter to QGraphicsApiFilterAndy Nichols2015-11-038-134/+134
| | | | | | | | | | | | | | | | | | | | | | This API change is part of an effort to remove anything specific to one graphics API (in this case OpenGL) from the public APIs. In addition to the name of the class being changed, the QGraphicsApiFilter::Api has been refactored to reference the Graphics API, rather than an OpenGL API. Now this list includes OpenGL, and OpenGLES, but could also include Vulkan, DirectX, or any other graphics rendering API we wish to support in the future. Right now the properties in this class are still reflective of the OpenGL APIs, and may need to be extended with other properties in the future for other rendering technologies. The QGraphicsApiFilter::Profile enum has also been changed to be more more clear. So for now there are enums NoProfile, CoreProfile, and CompatibilityProfile. Task-number:QTBUG-49078 Change-Id: Ib5f9c3b7adee5badec6bce8a12b23683eb43b4cb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QTechniquePrivate: Remove unnecessary exportAndy Nichols2015-10-301-2/+1
| | | | | Change-Id: I05f33a158b48a4694a1097eade7bd36a8e44290b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QRenderPassPrivate: Remove unnecessary exportAndy Nichols2015-10-301-2/+1
| | | | | Change-Id: I6b13de683ae66b2e4aae6b83c0e0ac904484f34e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QMaterialPrivate: Remove unnecessary exportAndy Nichols2015-10-301-2/+1
| | | | | Change-Id: I4ba852cb7129fca5b945549e91d4868a26ff85bb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QEffectPrivate: Remove unnecessary exportAndy Nichols2015-10-301-1/+1
| | | | | Change-Id: I59e20f786b0f2f7394f4f2d6ac47f7bd8bfcbd2f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAspectManager: Explicitly mark as private APIAndy Nichols2015-10-301-1/+0
| | | | | | | Also remove some unnecessary includes. Change-Id: I35539566e530f7800bbbe7884be65a93a7ee91eb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Updated the docs for the namespace changesVenugopal Shivashankar2015-10-273-3/+3
| | | | | | | | | | | | | | | | Each of the submodules now have there own namespace so the following changes are required to adapt: - Added \namespace docs for the new namespaces. - Updated all the \class and \instantiates entries to use the appropriate namespace qualifier. - Changed the \module and \qmlmodule names for Qt 3D Core and Qt 3D Render modules. - Added the missing \module and \qmlmodule pages for the Qt 3D Collision module. Change-Id: Ibc5bf30e4f50aecb6a3b24bc8536f17ed19d681d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-1933-85/+85
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QMaterial: remove NodeAdded/Remove notifications on EffectPaul Lemire2015-10-142-18/+4
| | | | | | | | | | Rely on the parent being set for inline declaration and the emit effectChanged to automatically send notifications. Updated unit tests accordingly. Change-Id: I7304309ea248da5e15db3dea4d556162af5e940e Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* RenderShaderData/UBO: improve nested shader data buffer updatePaul Lemire2015-10-141-5/+6
| | | | | | | | | Although the actual implementation is not optimal when having an array of nested children (as we need to reupload all the children if only one of them as changed), only trigger this update if at least one of the children was updated. Change-Id: I0688323b78a0db70f9f0115e1e8447296506f0c8 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-1343-170/+170
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add "We mean it" warnings to private headersSean Harmer2015-10-1318-0/+198
| | | | | Change-Id: Ic4a69123255c33990765ea3601e01914c2d8cb70 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move material system into own directorySean Harmer2015-10-1348-0/+6314
Change-Id: Iddc3a5d41dc0aff858d8bc3c5b2f7982bd693d00 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>