summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add missing overrideHEADdevAlexander Volkov2020-06-291-1/+1
| | | | | Change-Id: I20cec71db97cbf896255d4f6d7e947072a86e2bb Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-262-8/+8
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I66f620431011d02cb1542e8ad613dadd28fdd843 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-2514-80/+67
| | | | | | | Task-number: QTBUG-84469 Change-Id: I4dc064b70adb054ca4add2dd662e7227255ff970 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependenciesFriedemann Kleint2020-03-261-1/+1
| | | | | | | Add missing Q_MOC_INCLUDE and adapt to OpenGL split. Change-Id: I6150876a62ca55ad63c09a128226c2bac428b821 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-262-15/+8
| | | | | | | It is being deprecated. Change-Id: I38e6bc29ac03108f56f445069b2dbbe8a3db201a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix deprecation warnings about QString::sprintf()Friedemann Kleint2019-05-271-3/+3
| | | | | | | | | | Fix warnings: utils/utils.cpp:268:55: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] utils/utils.cpp:270:56: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] utils/utils.cpp:272:47: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] Change-Id: I27628b7a3d7daa75399ef4952efe373a65d8974e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix QFont-related deprecation warningsFriedemann Kleint2019-02-061-2/+2
| | | | | | | | | | | Replace QFontMetrics::width() by horizontalAdvance(), fixing: utils/utils.cpp:87:43: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] ^~~~~ utils/utils.cpp:139:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] engine/axisrendercache.cpp:204:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] Change-Id: I8cfc466cee55b14060feae9b16a087c1db92cf90 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fix mesa checkJoni Poikelin2019-01-221-1/+1
| | | | | | | | VMware virtual machines have "OpenGL ES 3.0 Mesa x.x.x" as the version string. Change-Id: I5c23524a021732e84b78090de2913b4d974e9f34 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
| | | | | Change-Id: Idc9a7a0ebcc986c8def79ac56f7defceea1e4432 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix QDoc error by using #ifndef Q_QDOC to omit unused functionLeena Miettinen2017-03-171-0/+2
| | | | | | | | Also fix the function signature in the qdoc file. Change-Id: If8a7cb83f94efb9a5a999c99fce722e4ffb96312 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@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>
* Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-04-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/datavisualization/utils/qutils.h Change-Id: Ic882590b5386697fb4af068e435704849ed5405c
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Change-Id: I579e8714f94884dc555b673c9f85508f17cdc99d Task-number: QTBUG-45291 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
| * qutils.h: pass the headerclean checkMarc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | C-style casts aren't allowed in public headers. Change-Id: I1c1d6efb534b767d2ac06ecfae782b7a34bf37eb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* | Only use OpenGL ES2 for Mesa on WindowsJonathan Liu2016-01-192-2/+8
| | | | | | | | | | | | | | | | | | Mesa is used on Linux desktops for open source graphics drivers which support more than OpenGL ES2. This fixes the volumetric example not rendering correctly when using the open source ATI graphics driver. Change-Id: Ibf4df6cc84881a15464653b65d1221b20c853b19 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* | Copyright file update to GPLMiikka Heikkinen2016-01-1223-207/+391
| | | | | | | | | | Change-Id: Ib264fe1f2cd1589e2ba1ef2dc7d8f3951e125708 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* | Fix build with -Werror=old-style-castSimon Hausmann2015-12-171-1/+1
|/ | | | | | | It appears to be enabled in developer builds in Qt 5.7 Change-Id: Ib96cc866b511d8b947323d27f172dc3dd5f3e46f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix issues with COIN buildsMiikka Heikkinen2015-10-223-17/+26
| | | | | | | | | | | | -Fix miscellaneous compile errors -Move manual tests to manual folder and enable export of autotests -Added widgets requirement -Fixed autotests -Fixed renderer and controller synchronization in QML case -Treat fallback Mesa as ES2 similar to setting AA_UseSoftwareOpenGL Change-Id: If6619733725d079e339bef16262e5ea1450ab20f Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* Update license headersMiikka Heikkinen2015-10-2023-253/+322
| | | | | Change-Id: I0581aefcf9dabc64b05eb8c97b5b92da1fb26299 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Fixed OpenGL 3.x crashTomi Korpipää2015-10-191-0/+2
| | | | | | Change-Id: I43bd6f8d2f565a989e4d48d68a8c610240ed35fb Task-number: QTRD-3492 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix compilation with namespaced Qt.Friedemann Kleint2015-09-213-2/+4
| | | | | | Task-number: QTRD-3655 Change-Id: Id68e9cec8d1093fe1557b07a148ae04a27656284 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Copyright header changesMika Salmela2015-04-1423-69/+69
| | | | | | | Copyright header changes for 5.5. Change-Id: I0361cfe1ebdb28955cb927700f14cf7b72694421 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Once more crash fix on texture adding.Mika Salmela2014-11-211-5/+13
| | | | | | | B2Qt device called uvs creation before array creation. Change-Id: Ia0cac175a3e0769f2571a0eadc7c764ae4092cc2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix crash when adding a texture on QMLMika Salmela2014-11-211-5/+7
| | | | | | | | When texture was attached on the qmlsurface example, the smoothUVs was called before the actual model mesh was created. Change-Id: I5a62b06291232df54ce08d586d8794b332a4eece Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Support larger custom meshes.Miikka Heikkinen2014-11-189-117/+14
| | | | | | | | | | 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-0723-161/+161
| | | | | | Change-Id: I453438fee92f18c983c1bef04c68b24a7ff72cf9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Added flags to software renderer test Tomi Korpipää2014-11-052-0/+4
| | | | | | Change-Id: I0667a0e53fd07fe9c6ce7b2d63887eda1692bf3b Change-Id: I0667a0e53fd07fe9c6ce7b2d63887eda1692bf3b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fixed font size jumping in ES2 Tomi Korpipää2014-11-051-1/+1
| | | | | | | | Task-number: QTRD-3412 Change-Id: I7f19ee34ccdde3a227033e3a88994e157b0092c4 Change-Id: I7f19ee34ccdde3a227033e3a88994e157b0092c4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Force software renderer to using ES2 Tomi Korpipää2014-11-052-10/+55
| | | | | | | Task-number: QTRD-3410 Change-Id: I86b240b6548ec4c94f6be0dc352ed112965926f3 Change-Id: I86b240b6548ec4c94f6be0dc352ed112965926f3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fixed surface slice problemTomi Korpipää2014-10-311-1/+1
| | | | | | Task-number: QTRD-3402 Change-Id: I70ef641fc7249b144d6e98971f1fb74f2935d706 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Use QOffscreenSurface instead of QWindow for dummy surfaces.Miikka Heikkinen2014-10-301-4/+3
| | | | | | | | | 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>
* Fix crash when initializing QCustom3DLabel out of context.Miikka Heikkinen2014-10-292-32/+40
| | | | | | Task-number: QTRD-3391 Change-Id: I5c2f2b674e50e7d39bc9355ebc9bcf05f22d5a39 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Add missing includes to utils.cpp.Miikka Heikkinen2014-10-291-0/+2
| | | | | Change-Id: I46db1f02575b8d140890708bf04633fa23f28a15 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Support for dynamic opengl builds.Miikka Heikkinen2014-10-2910-143/+167
| | | | | | Task-number: QTRD-3392 Change-Id: I786bbf5ee9252b92d43d02d6b88ed9b986b4a5eb Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Squeeze labels on ES2Mika Salmela2014-10-283-10/+28
| | | | | | | | | | If the label text with slightly smaller font would fit into smaller texture, force to use the smaller one. Task-number: QTRD-3395 Change-Id: Ib70f6722ea8403e4aa25ed190b21c059d9d0e062 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Regenerate render bufferMika Salmela2014-10-161-2/+4
| | | | | | | | | | Looks like the render buffer for depth gets incomplete and that causes resets. Regenerating the buffers seems to be helpful. Task-number: QTRD-3372 Change-Id: I1f0fb40f06fac44e062f2f2b512bc9424479328c Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Small cleanups for surfaceMika Salmela2014-10-151-1/+1
| | | | | | | | | 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>
* Gradient adjustment logic was broken.Miikka Heikkinen2014-10-141-5/+5
| | | | | | | | Bug in adjustment logic caused adjustment to happen pretty much always. Task-number: QTRD-3374 Change-Id: Id6151d2d3eb8369bbf9252e4eb4b76ed57fb1f3c Reviewed-by: Mika Salmela <mika.salmela@digia.com>
* Fix gradient artifacts on some edge casesMiikka Heikkinen2014-10-141-0/+13
| | | | | | | | | | | | | | When static optimization is in use with mesh objects and range gradient, and the object Y-value resolves into a texture coordinate that is exactly on the texel boundary, the rendered fragments of the object are not all same colors on some graphics cards, despite all vertices having the same UV value. Fixed by adjusting the Y-value slightly if it is close to the boundary. Task-number: QTRD-3370 Change-Id: Ie028602cbd9a00bb0e17049eb8f40feb8b18a6bf Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* If GL_MAX_TEXTURE_SIZE cannot be read, don't check for itMiikka Heikkinen2014-10-101-1/+1
| | | | | | | | | | In QML apps, the texture for custom labels can get created before glGenIntegerv returns a valid value for GL_MAX_TEXTURE_SIZE. Do not check for max size when it is zero. Change-Id: I114ac8494bd5aa509490bd38ae58827fd21e2729 Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fixed recurring GL_INVALID_VALUE OpenGL errors Tomi Korpipää2014-10-092-105/+135
| | | | | | | | | Now that these are not generated all the time, makes it easier to use glGetError to find actual errors. Change-Id: I4e10f5798e4e79466a47a0d671c04b445899c62c Change-Id: I4e10f5798e4e79466a47a0d671c04b445899c62c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix minor issues found in testingMiikka Heikkinen2014-10-081-0/+3
| | | | | | Change-Id: If40f10043951409b3d6597776b60d7eb55c73eec Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Texture UVs for surface to follow data dimensionMika Salmela2014-10-072-3/+16
| | | | | | | | | Change texture UVs to be generated according to data dimension. Also utilise this change on texturesurface example. Change-Id: Ideacfba409dc2e7cf579fb38d897e08c9f9a1b71 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Clang warning fixesTomi Korpipää2014-10-061-2/+2
| | | | | Change-Id: Ic51682f7e3465c75d505e582f212eaa2cdc28c8b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix surface normals on ascending/descendingMika Salmela2014-10-062-200/+379
| | | | | | | | | Normals and triangles are generated according to data direction. Task-number: QTRD-3160 Change-Id: Ia4286467682628930da3d82b204fd1ec078a396a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix static optimization errorsMiikka Heikkinen2014-10-033-6/+24
| | | | | | | | | | - Buffer ids were not cleared appropriately - Update didn't account for items outside axis ranges - In some cases wrong shader was used for point series Task-number: QTRD-3353 Change-Id: Iea465d99eb557402feb5fb017ae92393ee8f377f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fix changing items in static optimization modeMiikka Heikkinen2014-10-033-59/+125
| | | | | | Task-number: QTRD-3344 Change-Id: I8c1d2e2ae4afd6f9058c59adfc3d784b5f724358 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Fixed window blend bugTomi Korpipää2014-10-021-1/+0
| | | | | | | | Alpha buffer size should not be set for the window's surface format. Task-number: QTRD-3351 Change-Id: I64ee61990e8ceb88bdbab715a2902b454619f3e5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Reduce font size if label gets too wide to fit textureTomi Korpipää2014-10-011-19/+56
| | | | | | | | Task-number: QTRD-3230 Change-Id: I0cb76f077c1930033c03f833c9c9f2d347c41f9c Reviewed-by: Mika Salmela <mika.salmela@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Implement zooming to cursorMiikka Heikkinen2014-09-262-0/+27
| | | | | | | | | 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>