summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-3/+3
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Ulf Hermann2019-12-031-2/+6
|\ | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
| * wasm: Disable TextureSwizzleFredrik Orderud2019-11-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | The WebGL 2.0 specification explicitly does not support texture swizzles. Therefore, disabling it when targeting WASM. This fixes "WebGL: INVALID_ENUM: texParameter: invalid parameter name" when running in Chrome or Firefox. Change-Id: Ic7e22e0f623095245274924095cb63fd0ff7e8c2 Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.19 Fixes: QTBUG-80287 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-2/+2
|/ | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGui/Network/OpenGl/Widgets/Xml: use \nullptr in documentationChristian Ehrlicher2019-02-201-3/+4
| | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: I58934eea06943309ba895833f1991629870ab45b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Qt GUI: Fix documentation warningsTopi Reinio2018-11-061-0/+1
| | | | | | | | | These are minor typos or documentation warnings that snuck in with new features. Task-number: QTBUG-71502 Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-58/+5
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Move texture uploading out of QOpenGLTextureCacheAllan Sandfeld Jensen2018-07-271-1/+19
| | | | | | | | | | | This way the logic can be reused elsewhere. At the same time a standard OpenGL ES/3 way of handling BGRA is added, so we don't depend on extensions, and handling of NPOT and max size which QSGTexture will need. Change-Id: I475bc7127f44be3964fdb482c9e86a20db1fbca5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-358/+358
|\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Documentation: Fix URLs to GL(ES) functionsFriedemann Kleint2018-05-181-358/+358
| | | | | | | | | | | | | | | | Replace the XML pages which are typically displayed as broken by the XTHML pages. Strip some suffixes. Change-Id: Idf2b9706f169484c659582a1a2d38904d5dd81aa Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add support for advanced blend equations to our OpenGL QPainterAllan Sandfeld Jensen2018-03-051-5/+18
|/ | | | | | | | | Mesa and NVidia have been supporting these extensions several years now. It also means we can get rid of the dead unused code we had for advanced compositions. Change-Id: I6a2fcda13490abd977eb4cc3d8b34f186d05ca25 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-111-44/+44
|\ | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * Doc: Swap unresolved variables with actual function namesPaul Wicking2018-01-101-44/+44
| | | | | | | | | | | | | | | | Original documentation commit included unresolved link target names. This fix replaces them with the actual OpenGL function names. Change-Id: I36a24eb237ef35d7207f3bae0771dc96476d7b19 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | doc: Add default openGL typedefs for clangqdocMartin Smith2017-12-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Q_CLANG_QDOC is defined, ensure that the following openGL types are defined: typedef int GLint; typedef int GLsizei; typedef unsigned int GLuint; typedef unsigned int GLenum; typedef unsigned int GLbitfield; typedef float GLfloat; typedef float GLclampf; typedef bool GLboolean; typedef void GLvoid; typedef char GLchar; Running clangqdoc with these on macOS fixed over 500 qdoc errors! There were also some functions that declared the parameter list as void. It was also shown as void in the \fn command for each function in the .cpp file, which is wrong. When the function is declared in the header as int func(void), it should just be \fn int classname::func() in the .cpp file. Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-2/+2
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix some qdoc warnings for 5.10Friedemann Kleint2017-07-251-3/+3
| | | | | | | | | | | | | | | | src/corelib/io/qfiledevice.cpp:741: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:772: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:790: warning: No such parameter 'time' in QFileDevice::setFileTime() src/corelib/io/qfiledevice.cpp:790: warning: Undocumented parameter 'fileTime' in QFileDevice::setFileTime() src/corelib/io/qfileinfo.cpp:1344: warning: Can't link to 'FileTime' src/corelib/kernel/qcoreapplication.cpp:2007: warning: Can't link to 'isTranslatorInstalled()' src/gui/opengl/qopenglextrafunctions.h:468: warning: No documentation for 'QOpenGLExtraFunctions::glBlendBarrier(void )' src/gui/opengl/qopenglextrafunctions.h:494: warning: No documentation for 'QOpenGLExtraFunctions::glGetGraphicsResetStatus(void )' src/gui/opengl/qopenglextrafunctions.h:475: warning: No documentation for 'QOpenGLExtraFunctions::glPopDebugGroup(void )' src/sql/models/qsqlquerymodel.cpp:217: warning: Unknown command '\override' Change-Id: Ide0ce911f6faf964fda8f32fac433da7d2cb11de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for OpenGL ES 3.2 in QOpenGLExtraFunctionsLaszlo Agocs2017-06-301-5/+577
| | | | | | | | | | | | | | | | | | | Follow the usual pattern: Add a config test and automatic include of GLES3/gl32.h if there is a GLES 3.2 capable header+lib at build time. Then, regardless of this being enabled, expose all new 3.2 API functions in QOpenGLExtraFunctions and resolve them dynamically at run time. This way 3.2 functions will be available when deployed to a 3.2 capable system (or OpenGL 3/4.x with the functions in question available) regardless of what was present in the sysroot at build time. Change-Id: Ia52551f3178591e1e56ceac8e45d89c6b13f4927 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove unused logging category from QOpenGLFunctionsLaszlo Agocs2017-01-311-4/+0
| | | | | Change-Id: I54b533036f24ee9bd63004d1c5513f847e12065d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make sure we call glClearDepth(double) on desktop GLGunnar Sletta2017-01-191-2/+3
| | | | | | | Task-number: QTBUG-56798 Change-Id: I028510c0f75df5c7d2dce539c32ea503009467db Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com>
* Make the eglfs and eglfs-viv detection and build work for INTEGRITY.Rolland Dudemaine2016-04-131-0/+4
| | | | | | | | | | The majority of these changes is about #ifdef-ing the Linux-specific use of /dev/fb0. The display handle is also acquired using fbGetDisplay(), which is equivalent to fbGetDisplayByIndex(0) but is also portable. Change-Id: I6f460edc9c06ae7461a6aab2a816ac6f645208c4 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* QtGui: use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "..."; with qWarning("..."); In QTransform shared warning strings. Saves 3KiB in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I142a8020eaab043d78465178192f2c8c6d1cc4f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* CleanupsLars Knoll2016-03-011-39/+27
| | | | | | | | | | Remove the different flags when trying to resolve opengl functions. Rather we simply try hard to find a matching method by resolving over possible suffixes when we can't find the standard name. Change-Id: Ic73085faec3bd406f5214ed4219eb7b796651d8d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Generate more compact code to resolve the QOpenGLExtraFunctionsLars Knoll2016-03-011-193/+9
| | | | | | | | Similar to the parent commit, this reduces binary size significantly. Change-Id: Idd6753ec5e04ec84d93bf6f86b5c71550b90ae9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Generate more compact code to resolve the QOpenGLFunctionsLars Knoll2016-03-011-232/+38
| | | | | | | | | Use a similar mechanism as in QOpenGLVersionFunctions and resolve the methods in a loop. This requires some macro magic but significantly reduces the size of the generated code. Change-Id: If5f5e5551af0d1aed4b4ce7ce82932d8988dab59 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Remove some now unused codeLars Knoll2016-03-011-346/+2
| | | | | | | | The old Resolver class to resolve GL symbols is not being used any longer, get rid of it. Change-Id: I835860eb1c42aea05458ca32cf652659500312da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Get rid of the gles3helper classLars Knoll2016-03-011-636/+175
| | | | | | | | | Since the backends can now resolve all possible GL functions, there's no need for the special handling for GLES that this class did anymore. Change-Id: Ib48aecc9a892f3c883d76ffc82217f346dbb3adc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Resolve GLES3 function pointers at construction timeLars Knoll2016-03-011-1586/+363
| | | | | | | | | | | | Remove the wrapper methods resolving themselves at first run also here and instead resolve all GL entry points when the QOpenGLExtraFunctions object gets constructured. Keep the gles3helper for now until all backends are fixed to be able to resolve these methods directly. Change-Id: I194bd4465605f57d27c79808a016592c101ac04c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Avoid repeated QByteArray creation when resolving opengl functionsLars Knoll2016-03-011-26/+29
| | | | | | | | | | Add an getProcAddress(const char *) overload to QOpenGLContext, and refactor the QPA interface to take a const char *. Like this we can avoid lots of mallocs when resoving GL methods. Change-Id: Ic45b985fbaa0da8d32ba3e3b485351173352ca6f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Simplify part of the resolving code in QOpenGLFunctionsLars Knoll2016-03-011-852/+170
| | | | | | | | | | | | | Directly resolve the GL symbols in the constructor instead of wrapping them in another method that resolves on first call. Simplifies the code and reduces the the size of QtGui by around 50k. Change-Id: If1fc575d0113d3d9b48ad1918429254c827e42c7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* De-inline the code resolving the GL symbolsLars Knoll2016-03-011-19/+41
| | | | | | | | Saves around 200k in QtGui.so. Change-Id: I1a020445093a5612ed64ca98bf51435580478cda Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-1/+1
|\
| * Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Doc: add missing semi-colonThiago Macieira2016-01-151-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I408dcb81ba654c929f25ffff14291c57198e7367 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Remove support for old/deprecated gl function namesLars Knoll2016-01-261-46/+17
|/ / | | | | | | | | | | | | These are nowadays standardized. Change-Id: I3931859bba0b4c34a9336c7f537e3093e07d9b2d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-3/+3
|/ | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc: Fix QDoc warnings for QOpenGLFunctions and QOpenGLExtraFunctionsTopi Reinio2015-08-261-75/+90
| | | | | | | | | | | | - Use \a commands when listing the arguments for OpenGL methods - Document functions taking a single argument of type 'void' verbatim. Otherwise, QDoc refuses to generate their docs - Add constructor docs for QOpenGLExtraFunctions (copied from QOpenGLFunctions). Change-Id: I64a436365572a80319ba0a8eaba2f5d9b751e84d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Support MRT in QOpenGLFramebufferObjectLaszlo Agocs2015-07-291-5/+7
| | | | | | | | | | | | Introduce overloads in the API to allow specifying multiple color attachment sizes and formats. When these are in use and MRT is supported, a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ... [ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject Task-number: QTBUG-39235 Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Expose GLES 3.0 and 3.1 functionsLaszlo Agocs2015-07-231-125/+4129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the approach we already do for some GLES 3.0 functions we can provide a cross-platform, cross-GL-GLES wrapper for ES 3.0 and 3.1 functions too. Applications only have to take extra care about the version requests (context version and version directives in shader code), the rest of their code can stay the same across desktop/mobile/embedded, even when ES 3 functions are used. The new functions are placed to a new subclass which is placed between QOpenGLFunctions and the internal QOpenGLExtensions. This is necessary because, unlike with QOpenGLFunctions, there is no guarantee that these functions are always available in all configurations. When running on desktop OpenGL, we resolve as usual. If the OpenGL version contains the function in question, either in core or as an extension, it will all just work. This is handy because it does not rely on 4.x extensions like GL_ARB_ESx_compatibility, and so ES 3.0 functions will be functional on OpenGL 3.x systems too by just setting a 3.x version number in the QSurfaceFormat. We will no longer qFatal on broken systems where the driver returns a 3.0 or 3.1 context without the corresponding functions present. Instead, we show a warning and gracefully fall back to resolving as usual, via eglGetProcAddress or similar. For functions that are available in ES2 as an extension this may just work fine. Added also an example that runs identically both with OpenGL and OpenGL ES 3 and utilizes some ES 3.0 features like instanced drawing. [ChangeLog] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and 3.1 function wrappers in a cross-platform manner. Task-number: QTBUG-46161 Change-Id: I9f929eb61946c35c415b178c4d6ab2c1c958684e Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-2/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * Do not claim TextureRGFormats on Mesa with GLESLaszlo Agocs2015-06-221-2/+6
| | | | | | | | | | | | | | | | | | Mesa provides GL ES 3.0 so using GL_RED in place of GL_ALPHA should work. This is apparently not the case. Task-number: QTBUG-46605 Change-Id: I4f661487b47e9cc11f5de110196ec37150c99c7f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix gles lib loading on AndroidLaszlo Agocs2015-06-161-0/+4
| | | | | | | | | | | | | | | | | | Setting the version breaks on Android as it has no .so versions, leading to aborting apps on devices that support GLES 3.x. Change-Id: Id4381e08a2615a0898def8f075ce5a5c5b9c7a7d Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Load GLESv2 library with correct major versionJaeyoon Jung2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | Make sure GLESv2 library to be loaded even when the symlink of .so is not installed. Change-Id: Ie7c810a137cebc7fa59612830e3643861b532fdb Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Do not use 16 bits per color on GLESLaszlo Agocs2015-06-291-2/+5
| | | | | | | | | | | | | | unless GL_EXT_texture_norm16 (and so GL_RGBA16) is present. Change-Id: Ic15b81b8134fda147e96301b7f78cabe07a05d9e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Don't try to load opengl extensions or functions without QLibraryUlf Hermann2015-06-121-2/+7
|/ | | | | Change-Id: If77ca6e04c83d94fd3063b68963b1bcd90980d99 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix GLES3 functions on iOSLaszlo Agocs2015-05-181-24/+46
| | | | | | | Task-number: QTBUG-45933 Change-Id: I784e34c1cfee5ea69955c221f0448c1d04e0b6d7 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Make data tables const.Volker Krause2015-05-051-1/+1
| | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Use glFinish() in QOpenGLWidget unless glFlush() is known to be enoughLaszlo Agocs2015-03-231-1/+31
| | | | | | | | | | | | | | | | | | | | The driver used on the Odroid-XU3 does not like doing just glFlush() before accessing the texture in another context. There is no guarantee that glFlush() is enough to sync access to resources between contexts, so start using glFinish() as the default, except on common desktop hw + iOS where flush is enough and presumably more efficient. To unify the code pathes, remove the separate flushes and do it only once, before the backingstore compositor indicates that it is about to access the textures. This should improve performance a bit, esp. when doing multisampling since we flush only once then. A helper function is added to the internal QOpenGLExtensions because it is highly likely that QQuickWidget will need the same. Task-number: QTBUG-45106 Change-Id: Ifb405c5723f29f2f6c04df8e15fb70280681755e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Prevent crashing on ES2 SDK - ES3 device scenarios with AndroidLaszlo Agocs2015-02-121-1/+4
| | | | | | | | | | | | | | Making a build with an older NDK having only gl2.h results in crashing QOpenGLTexture on devices that provide ES 3.0 or 3.1. This is because immutable storage is supported (based on runtime checks) but the function pointers are not there (due to ifdef checks). Fix this like we did in other places: get rid of the ifdef and dlsym the ES3-only symbols. Task-number: QTBUG-44397 Change-Id: Ief518ec8c7d532aeea0075ba166baf8d22e66ec5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>