summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3drenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Copyright header changesMika Salmela2015-04-141-3/+3
| | | | | | | Copyright header changes for 5.5. Change-Id: I0361cfe1ebdb28955cb927700f14cf7b72694421 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Support larger custom meshes.Miikka Heikkinen2014-11-181-2/+1
| | | | | | | | | | Vertex index was limited to unsigned short, meaning even slightly complex meshes couldn't be used. Changed to unsigned int. Also removed unused vertex indexer methods. Change-Id: Iebe62bd3a501dc79ee2857cca28ac0d05bd4a55e Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Change copyright headers.Miikka Heikkinen2014-11-071-7/+7
| | | | | | Change-Id: I453438fee92f18c983c1bef04c68b24a7ff72cf9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Support for dynamic opengl builds.Miikka Heikkinen2014-10-291-206/+182
| | | | | | Task-number: QTRD-3392 Change-Id: I786bbf5ee9252b92d43d02d6b88ed9b986b4a5eb Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Surface shadow improvementMika Salmela2014-10-221-1/+1
| | | | | | | | | Not allowing bias go below 0.001 prevents the shadow acne. Faulty formula for lighning direction. Task-number: QTRD-3382 Change-Id: Ided8bf423a961744ace8bef32ae18d6fa2c443ef Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Small cleanups for surfaceMika Salmela2014-10-151-13/+6
| | | | | | | | | Unnecessary modelMatrix multiplications removed. Intentional whitespace removal. Change-Id: I78b8e6f984d44baf7015c9551701b04cb869fc8b Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix context cleanupMiikka Heikkinen2014-10-131-15/+10
| | | | | | | | | | Context was not getting properly cleaned up in cases where render thread stopped before the cleanup took place. Now we ensure that required cleanup is done before context thread terminates. Change-Id: I1489914dafec928eebb69bac737f6f858ff49432 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Remove separate depth texture for surface shadowsMika Salmela2014-10-131-43/+6
| | | | | | | | | | Use the same depth texture for the backwall and the surfaces. No need to any culled texture. Task-number: QTRD-3160 Change-Id: I7a4e8aa61b98d5264a92173174e911e50af8d52a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix screen position based queries in threaded rendering environmentMiikka Heikkinen2014-10-091-0/+1
| | | | | | | | | | | | | | | | QtQuick's threaded renderer doesn't seem to always pair up sync and render (or more accurately, beforeSynchronizing and node's preprocess calls). Sometimes sync comes without a followup render, or there are two syncs in a row, even though the sync is using direct connection. Both of these cases broke the old logic for handling position based queries. Changed the logic to actually ensure we have resolved the query before emitting the relevant signal. Task-number: QTRD-3358 Change-Id: Ica6c8c311f53a06311c21532aaabc18c28556655 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Grid line color bug in surface fixed Tomi Korpipää2014-10-081-2/+2
| | | | | | | Task-number: QTRD-3361 Change-Id: Id40db146efb84f6a9b642e7e0678d6b656cdbd19 Change-Id: Id40db146efb84f6a9b642e7e0678d6b656cdbd19 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Make background margin configurableMiikka Heikkinen2014-09-301-7/+65
| | | | | | | | | | | Added margin as abstract graph property. If the margin is narrow, the positions of theedge labels of the axes are adjusted to avoid overlap with edge labels on other axes. Task-number: QTRD-3204 Change-Id: I7fa5a04c8f2091519d99689ef2f6cbcf799fb15e Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Implement zooming to cursorMiikka Heikkinen2014-09-261-5/+12
| | | | | | | | | Zooming to cursor is now default operating mode of the default input handler. Task-number: QTRD-3263 Change-Id: I5699fc0ce7393059538972cd52f31f06d87e3d8d Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Change custom labels to use label shaderMiikka Heikkinen2014-09-191-12/+0
| | | | | | | | | This fixes the problem with specular highlight making camera-facing labels unreadable. Task-number: QTRD-3276 Change-Id: If16424b07a1f3362428980353c5fb5213c33d06b Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix to slice crash bug fixTomi Korpipää2014-09-161-2/+5
| | | | | | | Task-number: QTRD-3301 Change-Id: Ia0ae6d5e3ac9aabc9af9199df27bbbe7f7908d60 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Invalid slice usage crash fixedTomi Korpipää2014-09-161-0/+5
| | | | | | | | Task-number: QTRD-3301 Change-Id: I0e39348a2e9392b4c1f0bd7ef26c5613272460e2 Reviewed-by: Pasi Keränen <pasi.keranen@digia.com> Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
* Limit volume to axis rangesMiikka Heikkinen2014-09-101-0/+40
| | | | | | | | | The volume object that would go partially outside axis ranges is scale and repositioned so that it only renders the portion that is inside the axis ranges. Change-Id: I792494e437998ba6276f58fab645767276c1476d Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Add option to use low definition volume shader.Miikka Heikkinen2014-09-021-7/+3
| | | | | | | | Low definition volume shader samples the texture at even intervals, so it will sometimes skip texels, causing flickering. Change-Id: Iee6cb0e8893498b89ce1a40f34701a53d100283e Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix build issue with Qt 5.2.1Miikka Heikkinen2014-08-271-2/+2
| | | | | | | | | | | | | | QImage is not a QObject, and therefore QImage::Format doesn't seem to be a supported type for a Q_PROPERTY, either. At least this was the case in Qt 5.2.1. In Qt 5.3.1 this worked. In any case, worked around the issue by removing textureFormat as a property. This shouldn't be an issue, since texture cannot meaningfully be manipulated from QML anyway. Also fixed some compile warnings. Change-Id: I257c1502d3340c49c24085fb8bf2e6176d875215 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Implement volume rendering supportMiikka Heikkinen2014-08-181-8/+15
| | | | | | | | New subclass of QCustom3DItem, QCustom3DVolume is provided. The documentation for the example will be done in a separate commit. Change-Id: Idb3fdb0654c6bec7606ca012b75852a5a8412397 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Enable camera targeting.Miikka Heikkinen2014-08-061-12/+12
| | | | | | | | | | | | | | | Also fix custom item positioning in absolute mode as it was completely broken in bars and z-coord was flipped in others. Clarified Q3DObject::position property usage, namely that it is reserved for internal use for now. Some refactoring also done. Task-number: QTRD-2567 Change-Id: I5da65b83a2f8ecf20f8fd054e59748278ef1a714 Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Reduce the size of surface selection textureMiikka Heikkinen2014-08-041-23/+12
| | | | | | | | | | Now four times more vertices are supported. Task-number: QTRD-3244 Change-Id: I80594f4c4f80f485d94dbc2f73892251bb20c521 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Fix polar background margin not reacting to titles correctlyMiikka Heikkinen2014-07-041-4/+3
| | | | | | | | Hiding angular axis title didn't cause the background margin to reduce appropriately. Change-Id: Icf62aaf62b978524dc4ac13c1f8561b517103c55 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Improved the visuals in slice modes.Miikka Heikkinen2014-07-041-12/+43
| | | | | | | | | | | | | | | Grid lines should no longer vanish into white background due to excessive ambient light multiplier when using high ambient with no specular. I'm still not happy with how bars slice mode colors look. The colors seem washed out compared to main view. Also, on bars, some specular is needed to make bars look 3D, but too much makes it ugly. Also fixes some misc issues in surface slice mode. Task-number: QTRD-3237 Change-Id: I4bed3d922cbc8f5191cc01ab3396849db767cae9 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Remove obsolete fillDepthTexture functionMika Salmela2014-07-041-2/+0
| | | | | | | | Not needed anymore. The m_noShadowTexture takes care of this. Task-number: QTRD-3212 Change-Id: I30d8b6a9cfa7561914c4210cb7334d8ef8a4cca8 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Texture to surfaceMika Salmela2014-07-041-20/+92
| | | | | | | | API for setting a texture to surface. Task-number: QTRD-3232 Change-Id: Icd9de61882b54b9c1fc84a742e49980926ca681d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix labels and grid lines changing size when aspect ratio is changedMiikka Heikkinen2014-07-021-22/+46
| | | | | | | | | | | Since shaders needed fixing anyway for surface because of this, also implements the support for object gradients for surface, which was missing. Task-number: QTRD-2666 Task-number: QTRD-3211 Change-Id: I0c5da7fdfef308a96ec0bae4750fd22035da4e82 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Added horizontal aspect ratio property for abstract graphsMiikka Heikkinen2014-07-011-8/+17
| | | | | | | | Value 0.0 indicates automatic scaling (the default). Task-number: QTRD-3192 Change-Id: I5e4cc1b7a03c0ba811e2ed3916a440906429af57 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Fix custom item position in polar graphsMiikka Heikkinen2014-06-301-2/+6
| | | | | | Task-number: QTRD-3184 Change-Id: Id2550a143021771341d5bfef7e08cd5868404ca5 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Adjust background margins based on angular labels and titleMiikka Heikkinen2014-06-301-26/+56
| | | | | | | | Also separated the vertical and horizontal background margins. Task-number: QTRD-3184 Change-Id: I988217d4df7749585dd85b5ea8f3f50254dca6ad Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Fix polar axis title positioningMiikka Heikkinen2014-06-271-2/+21
| | | | | | Task-number: QTRD-3184 Change-Id: I366f41b928e06931784c6ff74e9b6b8a52414e3f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Removed unnecessary texture enablingsTomi Korpipää2014-06-271-12/+2
| | | | | Change-Id: Ia35d2b73a76372c7e92670bb2c379ebc2f387b4a Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Polar chart for scatterMiikka Heikkinen2014-06-261-26/+23
| | | | | | Task-number: QTRD-3184 Change-Id: Ie8e10050e58a3630eda87ec44fb342776d667ae6 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Add radialLabelOffset property for graphsMiikka Heikkinen2014-06-261-8/+15
| | | | | | | | | This property indicates where radial labels of the polar chart are drawn Task-number: QTRD-3184 Change-Id: I1500e67da5e578b90d679876130c2d56c1d08039 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Add flipHorizontalGrid property for surfaceMiikka Heikkinen2014-06-261-11/+30
| | | | | | | | | | | | This property allows drawind the horizontal grid and axis labels on top of the graph rather than on the bottom. This is useful when surface graph is used for 2D spectrograms in orthographic mode, as otherwise the grid is covered by the surface itself. Particularly relevant for polar plots of the same. Task-number: QTRD-3184 Change-Id: I9dbcdbfc754e13af52d2cf31a1d9991ef4b241f7 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Polar graph support, phase oneMiikka Heikkinen2014-06-261-163/+240
| | | | | | | | | | - Polar property for toggling the polar mode - Example added. Example docs will be added in another patch once all of the functionality the example needs has been implemented. - Only surface graph supports polar so far. Scatter to be added later. Change-Id: I54d36f764ac1771ac88f73a5f3a2142f2309f6e8 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Added some extra checking for selection texture creationMiikka Heikkinen2014-06-241-5/+8
| | | | | Change-Id: Iedeaa2581c32b6d46168568fef736b234ac17e95 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Revert surface shadow cull disableMiikka Heikkinen2014-06-091-0/+3
| | | | | | | | The fix caused weird self-shadowing issues in some cases, needs to be done differently. Change-Id: Ie66b03b6d8c7f480a5822774de76b033586b6a3a Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix missing axis titles with zero rotation and fixed titlesMiikka Heikkinen2014-06-061-7/+8
| | | | | Change-Id: I026578b224772fe9d96f6f7789e253d433690091 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Change label polygon offset to follow draw orderMiikka Heikkinen2014-06-051-3/+6
| | | | | Change-Id: I6b0bbb458fe9eae9664cd50f9b20f672b08cf4b9 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Android surface selection fix Tomi Korpipää2014-06-041-1/+1
| | | | | | | Task-number: QTRD-3163 Change-Id: I61589f9848ebcce7b0166e22d504c2375e564347 Change-Id: I61589f9848ebcce7b0166e22d504c2375e564347 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Misc fixes found during testingMiikka Heikkinen2014-06-041-0/+2
| | | | | | | | | - Memory leaks - Y-axis placement issues in scatter and surface Change-Id: I7ec6c9c3e53502445b52c049c973186a7c54c95f Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Clean up Tomi Korpipää2014-06-041-7/+11
| | | | | | | Task-number: QTRD-3149 Change-Id: I37ae7bc7e88b7d8a2c81585333ab87e7fcb8fcc0 Change-Id: I37ae7bc7e88b7d8a2c81585333ab87e7fcb8fcc0 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix surface shadows and other misc fixesMiikka Heikkinen2014-06-031-3/+0
| | | | | | | | | | | - Remove culling from surface shadows to make them look correct - Remove unnecessary metatype registration from qmloscilloscope - itemmodeltest multi-change fixed - Valgrind fixes Task-number: QTRD-3160 Change-Id: I2da8b3e024dae56c52afb6b915535f49c6c987fc Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Clean up renderersTomi Korpipää2014-06-031-10/+0
| | | | | | | Task-number: QTRD-3149 Change-Id: I71b9b7533ad3730d0d203c3d07e66d824b690fbb Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Misc fixes found while valgrinding.Miikka Heikkinen2014-06-021-8/+8
| | | | | Change-Id: If744721eff62f07f20bff95ca815ca80ca50fee1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix surface selection texture generationMiikka Heikkinen2014-05-301-3/+3
| | | | | | Task-number: QTRD-3157 Change-Id: Ida6cdac83a9f233a57ab5a621799bd1af2dd0cfc Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
* Implement binary search for determining surface sample spaceMiikka Heikkinen2014-05-281-69/+78
| | | | | | Task-number: QTRD-3066 Change-Id: I3a6d727c528e37e914aa1c3f08ee6d268a2c5230 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix labels transparency within each axisMiikka Heikkinen2014-05-281-71/+90
| | | | | | Task-number: QTRD-3141 Change-Id: I8ca51b411e2d92e0c615c81d215d89575d614acd Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Optionally show axis titles on the graphMiikka Heikkinen2014-05-271-33/+28
| | | | | | Task-number: QTRD-2961 Change-Id: I6a344156bd29fa8fb1ede0546af4d0e67e5e2db4 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Added API for changing data aspect ratioTomi Korpipää2014-05-261-4/+3
| | | | | | Task-number: QTRD-3144 Change-Id: I9acd1be13083d7fbbed840882260a60f46c5f698 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>