summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-107/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-072-160/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix typo in QtOpenGL module docsLaszlo Agocs2020-12-161-1/+1
| | | | | | | Fixes: QTBUG-89493 Pick-to: 6.0 Change-Id: I92255da2f68ec8dc0503654787e7861abe431504 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Use (new) erase()/erase_if() algorithmsMarc Mutz2020-12-051-3/+1
| | | | | Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix various documentation warningsTopi Reinio2020-11-301-3/+0
| | | | | | | | | | | | | - QList iterators are now nested classes inside QList. - Drop reference to Qt OpenGL Widgets landing page, there is no such page. - Fix typos and linking issues. Fixes: QTBUG-86295 Pick-to: 6.0 Change-Id: I964843deb81aa55ff8ddb9a1c2b004cb72e68de9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-11-301-1/+1
| | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix link to Qt OpenGL C++ classesVolker Hilsheimer2020-11-251-1/+1
| | | | | | Pick-to: 6.0 6.0.0 Change-Id: Ia8d71cf48b2d0c3d0f6d3de81335c263eb5466c4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update landing pages and module pages in qtbaseJerome Pasion2020-11-172-11/+21
| | | | | | | | | | -Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets, Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core -language edits for consistency, add links Task-number: QTBUG-87155 Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update Qt OpenGL docs and add porting docsv6.0.0-beta5Eskil Abrahamsen Blomfeldt2020-11-133-14/+99
| | | | | | | | | | | This fleshes out the Qt OpenGL documentation, since this is now a first class citizen and no longer a compatibility module. It also adds Qt OpenGL-related info on porting to Qt 6. Fixes: QTBUG-88150 Change-Id: I85fcaa2eb5ae574416dcebcc0104bf97428ff42d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove Qt4Compatible paintingAllan Sandfeld Jensen2020-11-121-2/+2
| | | | | Change-Id: Ie54206ca9b509875568f2158e229fca9cb1860a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix documentation warnings for Qt OpenGLTopi Reinio2020-11-123-1/+8
| | | | | | | | | Use a custom module header for the documentation build that pulls in also QtOpenGLWidgets' headers. Fixes: QTBUG-88275 Change-Id: I4e1144b179a124b01114de24cc183289fa05fb33 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-3/+3
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib59de7976fae19e7b39962e80161df6628e4070b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Prefer versioned CMake library targetsv6.0.0-beta3Kai Koehne2020-11-011-1/+1
| | | | | | | | The non-versioned one's do miss some properties. It's therefore best to not advocate using them. Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Hide comparison operators for QtOpenGLVersion types from ADLVolker Hilsheimer2020-10-302-22/+23
| | | | | | | | | | Make hidden friends. Also add noexcept. No documentation to adjust. Fixes: QTBUG-87978 Change-Id: I6e757b7c37fb8aabdfd395ab057a84696104e640 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Fix documentation warnings for Qt OpenGLTopi Reinio2020-10-304-5/+14
| | | | | | Task-number: QTBUG-86295 Change-Id: I4fff2d61f8f0513181150954440c9357acf73c1d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix links to the CMake manualTopi Reinio2020-10-301-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I7b2208284d65ec9182352490bd4c92458c5e5e37 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove do-not-use warning in Qt OpenGL landing pageJerome Pasion2020-10-291-10/+2
| | | | | | | | | -Qt OpenGL is part of Qt 6.0 and graphics offering -Edited introduction Task-number: QTBUG-87155 Change-Id: I1581d5d962c62a3731d77e4e4dd58154257dc1fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Organize QtOpenGLWidgets documentationVolker Hilsheimer2020-10-297-5/+544
| | | | | | | | | | | Move snippets to the right place, and give the widgets class a place to live. QtOpenGLWidgets is just a library, not a separate module, but we need a module page that the class can refer to for correct build instructions. Change-Id: I6d955ad3c4cd1003a828cc1f256deb6e7fb50ec4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove methods that shouldn't be in the OpenGL wrappersLars Knoll2020-10-079-1404/+0
| | | | | | | | | Those methods where only kept for BC in Qt 5.x, but were actually asserting at runtime. Get rid of them. Fixes: QTBUG-86475 Change-Id: I19e6e4ada22b6a4427a2cb13962792c5a3b461af Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Centralize the implementation of move assignment operatorsGiuseppe D'Angelo2020-10-032-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we have two main strategies for dealing with move assignment in Qt: 1) move-and-swap, used by "containers" (in the broad sense): containers, but also smart pointers and similar classes that can hold user-defined types; 2) pure swap, used by containers that hold only memory (e.g. QString, QByteArray, ...) as well as most implicitly shared datatypes. Given the fact that a move assignment operator's code is just boilerplate (whether it's move-and-swap or pure swap), provide two _strictly internal_ macros to help write them, and apply the macros across corelib and gui, porting away from the hand-rolled implementations. The rule of thumb when porting to the new macros is: * Try to stick to the existing code behavior, unless broken * if changing, then follow this checklist: * if the class does not have a move constructor => pure swap (but consider ADDING a move constructor, if possible!) * if the class does have a move constructor, try to follow the criteria above, namely: * if the class holds only memory, pure swap; * if the class may hold anything else but memory (file handles, etc.), then move and swap. Noteworthy details: * some operators planned to be removed in Qt 6 were not ported; * as drive-by, some move constructors were simplified to be using qExchange(); others were outright broken and got fixed; * some contained some more interesting code and were not touched. Change-Id: Idaab3489247dcbabb6df3fa1e5286b69e1d372e9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-232-14/+15
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add links to Qt 6 changes files from module indexPaul Wicking2020-09-181-0/+4
| | | | | | Task-number: QTBUG-84051 Change-Id: Iac25df135c9d73a990b41243e08cd38ea78296a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Add porting guide documentsPaul Wicking2020-09-161-0/+46
| | | | | | | | Also add existing such docs to the new document group Task-number: QTBUG-84051 Change-Id: I76f033f0846e09943f249d2beeb1606869eef382 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QOpenGLTexture: Remove obsolete data upload overloadsVolker Hilsheimer2020-09-102-145/+0
| | | | | | | Address ### Qt 6 comment Change-Id: I2952175ec72c5c4c7b4e518754fb1bc6f88b21df Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QOpenGLFramebufferObject: merge toImage overloadsVolker Hilsheimer2020-09-102-15/+1
| | | | | | | Address ### Qt 6 comment Change-Id: I60b1dba72dbf2490294c84e5d1a85ae7e7181fc3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Change QByteArray to handle large arraysLars Knoll2020-08-271-2/+2
| | | | | | | | | | Use qsizetype throughout. Change-Id: I787af7fcfa17e1be87decb64c41c609cc24be117 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Smart pointers: port to explicit operator boolGiuseppe D'Angelo2020-08-261-1/+1
| | | | | | | | | | | | | Enough with the restricted bool trick; use the established solution. [ChangeLog][Potentially Source-Incompatible Changes] QScopedPointer, QSharedPointer and QWeakPointer's conversion operator towards bool is now explicit. In some cases this may require an explicit cast towards bool that was not needed before (notably, when returning an object of these types from a function that actually returns bool). Change-Id: I02b89278e75b7e7493ee7e35460504719e00f028 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-142-33/+33
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Register QPlatformBackingStoreOpenGLSupport when neededTor Arne Vestbø2020-07-292-9/+8
| | | | | | | | | | | | Static builds can not rely on a constructor function in the QtOpenGL library, as that will be linked out unless something in the application pulls it in. Instead we export a helper function that clients that depend on OpenGL support in QPlatformBackingStore can use to bring it it. Change-Id: Ic54058bf413a476287884c78df5624b862f97695 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move glxconvenience into QtGuiFriedemann Kleint2020-07-107-586/+0
| | | | | | | | | OpenGL is not quite as dead as initially assumed. Task-number: QTBUG-83255 Change-Id: I953040149812a5258caad5fe6bac0835e1982dd0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move qglxconvenience to QtOpenGLFriedemann Kleint2020-07-087-0/+588
| | | | | | Task-number: QTBUG-83255 Change-Id: I7640caf8afbae0a7310a264f333bb3a6cfa3c6ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix floating point clip rectangle rounding in raster and opengl paint engineJani Hautakangas2020-07-071-1/+1
| | | | | | | Fixes: QTBUG-83229 Pick-to: 5.15 Change-Id: If94028f27c9085e391acb9c423cde1b7c12bca36 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use qsizetype in QListLars Knoll2020-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unnecessary ; after function implementationsLars Schmertmann2020-07-061-3/+3
| | | | | | Task-number: QTBUG-82978 Change-Id: Iea3bcaec1ef9f4bd0f73e5dccca33354650f5bf4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Switch to qvla where makes sense in openglLaszlo Agocs2020-06-303-4/+4
| | | | | | | | | For all of these we know in advance that the vast majority of usages will not exceed a certain number of elements. Also, none of these are copied or moved ever. Change-Id: I265afec154939c2fd0d1f902d97a86315ec7bc20 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Update docs with cmake package informationNico Vertriest2020-06-301-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in openglJarek Kobus2020-06-2613-74/+62
| | | | | | Task-number: QTBUG-84469 Change-Id: I26c1cfab7f2d9aa5c71847ae02bfe0cf15c04a1b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Enable access to the VAO resolvers through QOpenGLContextPrivateGiuseppe D'Angelo2020-06-222-35/+48
| | | | | | | | | | | | | | | | | | | This is a commit in preparation for an upcoming change in QtQuick. We want to store the resolved functions for managing VAOs somewhere; the "least worst" choice is next to the all other function resolvers, which are in QOpenGLContext(Private). To avoid moving the VAO resolvers themselves, leave a hook in QOGLCPrivate, similar to e.g. the texture function resolvers. The hook gets populated when the VAO resolvers for a given context are requested. This removes memory management burden from the users of those functions (again, just like other function resolvers), and makes the initialization of the functions automatic. Change-Id: I0eba30a85bf8ad82946a5d68e91009d8b4bd91cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QOGLVAO::Binder: unexport a value classGiuseppe D'Angelo2020-06-181-1/+1
| | | | | Change-Id: Idd0261a30599d0eaeb6faffd0ff5615b5c45b670 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add more LTTNG tracing pointsJosé Dapena Paz2020-06-116-1/+23
| | | | | | | | | | | | * QImage and QPixmap copy and transform operations. * OpenGL paint engine texture cache texture upload * OpenGL paint engine draw texture Task-number: QTBUG-83347 Pick-to: 5.15 Change-Id: I03150d6ff80cbbcd787133d75854715cb81b5571 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Long live std::pair!Giuseppe D'Angelo2020-06-102-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QPair an alias for std::pair, and qMakePair just a forwarder towards std::make_pair. Why? Fundamentally to ditch a bunch of NIH code; gain for free structured bindings, std::tuple and std::reference_wrapper compatibility, and so on. Breakages: * Some that code manually forward declares QPair. We don't care about it (<QContainerFwd> is the proper way). * Some code that overloads on std::pair and QPair. Luckily it's mostly centralized: debug, metatypes, testing macros. Just remove the QPair overload. * Usages of qMakePair forcing the template type parameters. There are a handful of these in qtbase, but only one was actually broken. * std::pair is NOT (and will never likely be) trivially copiable. This is agreed to be a mistake done by practically all implementations in C++11, can can't be fixed without breaking ABI. Some code using QPair assuming it's trivially copiable may break; exactly one occurrence was in qtbase. * QMetaType logic extracts the type names in two different ways, one by looking at the source code string (e.g. extracted by moc) and one via some ad-hoc reflection in C++. We need to make "QPair" (as spelled in the source code) be the same as "std::pair" (gathered via reflection, which will see through the alias) when compared. The way it's already done e.g. for QList is by actually replacing the moc-extracted name with the name of the actual type used in C++; do the same here. On libc++, std::pair is actually in an inline namespace -- i.e. std::__1::pair; the reflection will extract and store "std::__1::pair" so we need an ad-hoc fix to QMetaType. [ChangeLog][QtCore][QPair] QPair is now an alias to std::pair, and does not exist as a class in Qt any more. This may break code such as functions overloaded for both QPair and std::pair. Usually, the overload taking a QPair can be safely discarded, leaving only the one taking a std::pair. QPair API has not changed, and qMakePair is still available for compatibility (although new code is encouraged to use std::pair and std::make_pair directly instead). Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Regenerate src/openglAlexandru Croitor2020-05-292-5/+17
| | | | | Change-Id: I6a648c5fd2fa90e6e70d0ccffb34fd3cb1161e5e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move QPlatformBackingStoreOpenGLSupport handling out of platform pluginsTor Arne Vestbø2020-05-292-2/+12
| | | | | | | | Allows them to not depend on QtOpenGL just to provide the default backing store OpenGL support backend. Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-288-2/+1389
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Document how to use CMake for Qt OpenGLKai Koehne2020-05-267-97/+23
| | | | | | Task-number: QTBUG-73058 Change-Id: I8ba85fbba533c882ef63c56c1b9f20becfb36ebc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-224-0/+306
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-221-3/+2
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove a bunch of deprecated members from src/gui/painting classesVolker Hilsheimer2020-05-061-8/+1
| | | | | | | | Also remove dead code that isn't compiled anymore in Qt 6 builds. Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Avoid using qGuiApp in QOpenGLVao::destroy()Laszlo Agocs2020-04-211-1/+5
| | | | | | | | | | | | | There are convoluted cases, based on the backtrace attached to the associated bug report, where we attempt to destroy a QOpenGLVertexArrayObject during the destruction of Q(Gui)Application. Just avoid accessing qGuiApp in destroy(). Rather, store it in create(). Fixes: QTBUG-75138 Pick-to: 5.15 Change-Id: If8e67301c0843cbf3a409dcf427f44c42079de2f Reviewed-by: Christian Strømme <christian.stromme@qt.io>