summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/abstract3drenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix GCC 4.8 build of abstract3drendererVille Voutilainen2019-08-221-1/+1
| | | | | | Task-number: QTBUG-77730 Change-Id: I827d727b103a9923a8b82163bfa4f77c81c0906b Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix hanging at application exitTomi Korpipaa2019-04-291-29/+9
| | | | | | | Task-number: QTBUG-75256 Task-number: QTBUG-69627 Change-Id: If4221c8fcf783daf4bf6a38dbf1b9633a20eafb0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Render custom items at insertion orderMika Salmela2017-11-161-1/+5
| | | | | | | | | Changes the rendering order of custom items to insertion order. Task-number: QTBUG-64312 Change-Id: I1ce865a3492c145ffa269cd12baa15ffff8d6a59 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Allow light position modification by userTomi Korpipää2016-11-181-2/+11
| | | | | | Change-Id: I7efd56754bae16990fd11081493da0a37698f76b Task-number: QTRD-1803 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Check if we got OpenGL2.1 functions before trying to use themTomi Korpipää2016-11-171-1/+5
| | | | | | Change-Id: Ia8b4a25094d4a608d3a20b808fd14c3941ae2dff Task-number: QTRD-2116 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Copyright file update to GPLMiikka Heikkinen2016-01-121-9/+17
| | | | | Change-Id: Ib264fe1f2cd1589e2ba1ef2dc7d8f3951e125708 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* Fix the leaking framebuffer on graph resizeMiikka Heikkinen2015-10-291-0/+2
| | | | | Change-Id: I97e32b56a81afe22aa237055ff6d7db2399b70d3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* Update license headersMiikka Heikkinen2015-10-201-11/+14
| | | | | Change-Id: I0581aefcf9dabc64b05eb8c97b5b92da1fb26299 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* 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>
* Fix flickering in android on some examples when zooming.Miikka Heikkinen2014-11-211-0/+5
| | | | | Change-Id: I3c9de6801430dc74c97fb6563ded6114befc6968 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix incorrect shader initialization for static optimized es2Miikka Heikkinen2014-11-211-2/+2
| | | | | | Change-Id: I8fdacfde272ace4c25c74c316de514cd4275da74 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.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>
* Use QOffscreenSurface instead of QWindow for dummy surfaces.Miikka Heikkinen2014-10-301-3/+2
| | | | | | | | | Android doesn't like creating extra QWindows, so changed dummy surfaces used to do static initialization and cleanup to use QOffscreenSurface. Change-Id: Ia42e288a05ef49524252c457f3a3494677e3fc63 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Support for dynamic opengl builds.Miikka Heikkinen2014-10-291-144/+137
| | | | | | Task-number: QTRD-3392 Change-Id: I786bbf5ee9252b92d43d02d6b88ed9b986b4a5eb Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Simplify context handling at cleanup.Miikka Heikkinen2014-10-151-13/+9
| | | | | | | | | | | | | If the context exists at renderer deletion, it is possible that it no longer has valid surface, which means it won't be possible to set it back to current if we change context for deletion cleanup. Since the current context will be one of our shared contexts anyway, there is no need to do a dummy context for cleanup unless the current context is null. Change-Id: Ibabe081742beb975ee848ccb3690703ef5b027a9 Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix context cleanupMiikka Heikkinen2014-10-131-1/+41
| | | | | | | | | | 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>
* Fix screen position based queries in threaded rendering environmentMiikka Heikkinen2014-10-091-8/+11
| | | | | | | | | | | | | | | | 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>
* Polar coordinates angle grid lines fixes Tomi Korpipää2014-10-081-0/+4
| | | | | | | Task-number: QTRD-3360 Change-Id: I33177ccfe93136e6ce048fad0dbed70fe560b204 Change-Id: I33177ccfe93136e6ce048fad0dbed70fe560b204 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix changing items in static optimization modeMiikka Heikkinen2014-10-031-0/+2
| | | | | | Task-number: QTRD-3344 Change-Id: I8c1d2e2ae4afd6f9058c59adfc3d784b5f724358 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix selection color and gradient for static optimizationMiikka Heikkinen2014-10-011-0/+24
| | | | | | | | | | Added separate shaders for rendering selected items, as the texture mapping that the regular static optimization shaders expect is not correct for single objects. Task-number: QTRD-3306 Change-Id: I6eb6cef94a4d2b4e5bdd03748f18db641a9fc4f6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Make background margin configurableMiikka Heikkinen2014-09-301-0/+9
| | | | | | | | | | | 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>
* Fix absolutely scaled volumesMiikka Heikkinen2014-09-261-2/+3
| | | | | | | Min/max bounds were set incorrectly. Change-Id: I54e115ef98321531410bcb64146ae32230375d4e Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Implement zooming to cursorMiikka Heikkinen2014-09-261-9/+115
| | | | | | | | | 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-4/+18
| | | | | | | | | 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>
* Fixed custom item wrong side reflectionTomi Korpipää2014-09-171-2/+4
| | | | | | | Task-number: QTRD-3311 Change-Id: Ia5aea90259c249a5ffd48e16fae4e2dc33902afd Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix volume frame translation for rotated volumesMiikka Heikkinen2014-09-171-1/+1
| | | | | | Task-number: QTRD-3323 Change-Id: I08823f257a1a273da97a9e9e8597e4ffdb87d93b Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Implement volume slice framesMiikka Heikkinen2014-09-121-22/+157
| | | | | Change-Id: I409f3c95892b26ca6097dd4509109fc9978b9900 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Limit volume to axis rangesMiikka Heikkinen2014-09-101-24/+70
| | | | | | | | | 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 possibility to scale custom items according to data rangesMiikka Heikkinen2014-09-081-16/+44
| | | | | | | | Proper behavior of volume objects that are shown only partially will be added in a separate patch later. Change-Id: I1fcd98faa6c4a7d09e3fef1645ed9816ff54654f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* ES2 gradient support for static optimizationMika Salmela2014-09-041-4/+12
| | | | | Change-Id: I3d5d5d006a26225a3a7ab5795fceb97630db0011 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Remove undeclared identifierMika Salmela2014-09-031-4/+0
| | | | | | Task-number: QTRD-3303 Change-Id: I8f43df8f0d90997c05ffaf93e451a52baacefa63 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Make volume items draw after regular custom itemsMiikka Heikkinen2014-09-031-155/+171
| | | | | | | | | Since volume items typically contain transparencies, make them draw after regular custom items, which are less likely to be transparent. Change-Id: Id7c48b6c77d7ed8654b72923d7dccf4158c9c088 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Add option to use low definition volume shader.Miikka Heikkinen2014-09-021-22/+45
| | | | | | | | 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>
* Pixel perfect volume shaderMiikka Heikkinen2014-09-011-6/+6
| | | | | | | | | Now the volume should render with pixel perfect accuracy. The drawback is that it is significantly slower than the old approximate solution. Change-Id: I4df7e9a28a27b56150c71a85a4c1fb69a215dabc Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Diffuse and specular color for static optimizationMika Salmela2014-08-271-8/+25
| | | | | Change-Id: I2c51ba06c6af9193a70f4a268dfd2fbd6c6910b3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix build issue with Qt 5.2.1Miikka Heikkinen2014-08-271-1/+1
| | | | | | | | | | | | | | 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>
* Reflection API addedTomi Korpipää2014-08-261-44/+34
| | | | | | | Task-number: QTRD-3287 Change-Id: I6c06b8fe025e0f1f87be00be906cab0e1f18a19f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Add alpha multiplier to QCustom3DVolume apiMiikka Heikkinen2014-08-251-0/+10
| | | | | | Change-Id: I856c4166513f6d6f7b73fd52bc46d52ab1b8fdff Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Make volume shading sample once per texture layer.Miikka Heikkinen2014-08-191-0/+12
| | | | | | Change-Id: Ia3a13e2cb8d7dcf744a55dcb827f5cb436a043c4 Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Implement volume rendering supportMiikka Heikkinen2014-08-181-14/+162
| | | | | | | | 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-14/+21
| | | | | | | | | | | | | | | 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>
* Fix labels and grid lines changing size when aspect ratio is changedMiikka Heikkinen2014-07-021-13/+12
| | | | | | | | | | | 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-0/+9
| | | | | | | | Value 0.0 indicates automatic scaling (the default). Task-number: QTRD-3192 Change-Id: I5e4cc1b7a03c0ba811e2ed3916a440906429af57 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Adjust background margins based on angular labels and titleMiikka Heikkinen2014-06-301-1/+38
| | | | | | | | 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-3/+20
| | | | | | Task-number: QTRD-3184 Change-Id: I366f41b928e06931784c6ff74e9b6b8a52414e3f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Add radialLabelOffset property for graphsMiikka Heikkinen2014-06-261-0/+6
| | | | | | | | | 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-7/+15
| | | | | | | | | | | | 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-6/+146
| | | | | | | | | | - 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>
* Bars: Moved bar, background and grid line drawing to separate methodsTomi Korpipää2014-06-241-4/+38
| | | | | | | + Added floor reflection support in ifdefs Change-Id: I1060aee1bc8f7a0360ad01675c36c0f1a2120f1c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix missing axis titles with zero rotation and fixed titlesMiikka Heikkinen2014-06-061-2/+1
| | | | | Change-Id: I026578b224772fe9d96f6f7789e253d433690091 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>