summaryrefslogtreecommitdiffstats
path: root/src/render/backend/rendershaderdata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename RenderShaderData -> ShaderDataSean Harmer2015-10-131-315/+0
| | | | | Change-Id: I254f2205cd1587bb599d26a087c515d526bf289b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Render aspect into the Qt3DRender namespaceSean Harmer2015-10-131-11/+11
| | | | | | | Updated examples and tests accordingly. Change-Id: I8848a88472de2302aa072fa11f21ea934672b7e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBackendNodeFunctor: get and destroy now take a QNodeIdPaul Lemire2015-02-281-4/+4
| | | | | | | | 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>
* Copyright header change.Mika Salmela2015-02-091-19/+14
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBackendNode use QBackendNodeFactoryKevin Ottens2015-02-081-1/+2
| | | | | | | | | For convenience we also provide a protected createBackendNode in QBackendNode itself. From now on it should be the preferred way to deal with node resolving. Change-Id: I22f490763026848a4dc8b55c98f649c36df258a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData: ModelToEye/ModelToWorld property transformPaul Lemire2015-01-241-4/+84
| | | | | | | | | | | | | | * Reuse jobs in QRenderAspect * Added FramePreparationJob which: - updates RenderShaderData with node world matrix - create bounding volume for nodes * RenderShaderData slightly modified to accommodate the transformed properties - needsUpdate now takes the viewMatrix - fix a bug where for a nested array, order wasn't maintained if not all the elements had been updated Change-Id: I0d91dc1d52c4333be74cce56c334aea70498138e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData handling entirely reworkedPaul Lemire2015-01-181-80/+135
| | | | | | | | | | | | | | | | | | | | - UBO created for each Shader/ShaderData - We deal with nested QShaderData by looking for QNodeId only instead of looking for QShaderData* - We update only the values that have changed into the UBO - A CleanupFrameJob was added to properly clear all RenderShaderData set for updates after a frame - RenderShaderData is cleared of all UBO rendering logic - BlockToUBO contains all the updated properties for a given UBO in a RenderView, that solves the issue of properties being updated in the RenderShaderData while performing a draw call Note: the QShaderData transformed properties were commented for now deferred-examples and playground qml updates to follow Change-Id: I8ecf155288c154f41b505cf465d31f5eb8a71b5d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* UBO handling arrays and structsPaul Lemire2014-12-121-8/+21
| | | | | | | | Naive implementation that works but definitely needs to be approved in follow-up patches. Change-Id: Idcec9b17f9c5709ec092706c0b77038dec6db0a7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Quick3DShaderData for QJSValue handlingPaul Lemire2014-12-121-12/+17
| | | | | | | | | | | | | | | | Quick3DShaderData subclasses QShaderData. QShaderData now provides a PropertyReaderInterface that returns a correct QVariant from the QVariant return when reading a QProperty. That way Quick3DShaderData properties (var) can be transformed to a QVariantList that the Renderer can use without introducing a QtQml dependency in core. RenderShaderData was updated to use propertyReader as well on creation and NodeUpdated events. A QJSValue -> QVariantList QMetatype converter was introduced to ease that process. Change-Id: Ifde5e7b85a1a84342846cd0ac0f047bd2c6ec4ef Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData: thread synchronization primitives addedPaul Lemire2014-12-121-5/+17
| | | | | | | | I had overlooked the fact that the uniform properties could be updated in the Aspect thread or Job thread while being rendered by the RenderThread. Change-Id: I4cd43b82875ce4220624b1494958ef4a1a5611ac Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData: update UBO uniform by uniformPaul Lemire2014-12-121-8/+23
| | | | | | | | | Instead of updating the whole UBO at once, we keep track of the QShaderData/member in the uniform block that have changed and upload only the buffer from the uniform offset to uniform offset + size. Change-Id: Ib69302183b17dbe15985b405406c8fed88c022bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData: index properties by QString instead of char*Paul Lemire2014-12-121-7/+8
| | | | | | | | | | This is easier for comparing key values. Also use QShaderData::staticMetaObject for introspection in updateFromPeer otherwise, if QShaderData is subclassed, we will be missing the properties defined in the subclass. Change-Id: I1fd09c2a19c6581a544d78a120e34ef7dec5826c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData completed to build UBOPaul Lemire2014-12-121-1/+51
| | | | | | | | | | | | Contains a UniformBuffer internally. Once initialized created UBO on the GPU. When properties of the QShaderData are updated, updated data is uploaded to the UBO. Some room for improvement, we'll improve that once the whole UBO/QShaderData architecture is in place. Change-Id: I26e55b78ad9633f75b988d8976ba496a7c7738fc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderDataPaul Lemire2014-12-121-0/+2
| | | | | | | | -Property getter -Do not store default QNode properties (data, childNodes) Change-Id: I54c687592274ebbf56d296a9404c73f038d5dc91 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData backend class for QShaderDataPaul Lemire2014-12-101-0/+86
Change-Id: I2f303485d66446fc46a000ae6ebe564493d181e8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>