summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use QFlags::setFlag where prudent in qtbaseAndre Somers2016-02-121-5/+2
| | | | | | | | | | | | | | | | | QFlags::setFlag is most useful to replace explicit constructs like if (condition) { someFlags |= TheConditionFlag; } else { someFlags &= ~TheConditionFlag; } with someFlags.setFlag(TheConditionFlag, condition); Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960 Reviewed-by: Marc Mutz <marc.mutz@kdab.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 QDebugStateSaver to restore space setting in stream operators.Friedemann Kleint2015-03-301-1/+2
| | | | | | | | Returning dbg.space() breaks formatting on streams that already have nospace() set. Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e Reviewed-by: David Faure <david.faure@kdab.com>
* Add a note about not requesting a profileLaszlo Agocs2015-03-201-1/+1
| | | | | | | | As per spec not requesting a profile on 3.2+ is same as requesting core since the profile mask defaults to core. Change-Id: I5d03ac08bcba20c273c1c32a51f6a105eba0629f Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Improve setDefaultFormat docs regarding AA_ShareOpenGLContextsLaszlo Agocs2015-02-251-0/+6
| | | | | | | | | | | When using core profile contexts, sharing with the global share context may not work if the global one is a non-core context. This can happen when setDefaultFormat() is called only after Q(Gui)Application is constructed. This is a typical issue on OS X, so document it. Change-Id: I6a8dca442ffeb884faedb9c6346351bb6eef3cff Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.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>
* WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-031-0/+4
| | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Deprecate implementations of functions deprecated in headersShawn Rutledge2014-11-271-0/+2
| | | | | | | | | If you build with configure -DQT_NO_DEPRECATED this will avoid some build errors. Change-Id: If2b2e57b6919091f3f077ebc2aeca0c3fd2421aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add default format to QSurfaceFormatLaszlo Agocs2014-08-081-0/+40
| | | | | | | | | | | | | | | | | | | | | | Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat. These define the default values for the requestedFormat members of QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow, QQuickWindow, etc.) This replaces QQuickWindow::setDefaultFormat() which can now be removed. The main inspiration here is not the convenience (avoiding setFormat() calls for all windows/widgets), but robustness: by setting the format once at the start of the application, all windows and contexts, including the internal share context used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating the possibility of failing due to trying to share between incompatible contexts. Furthermore, since such a functionality is anyway mandatory for QQuickWindow (due to the possibility of creating windows from QML code), extending it to QSurfaceFormat and QOpenGLContext/QWindow is the next logical step. Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix some documentation errors.Friedemann Kleint2014-03-241-1/+1
| | | | | | | | Correct links and fix typos, remove obsolete documentation, fix some snippets, mark some classes as internal. Change-Id: I9a3266605f060783413d32740057a57a820c8929 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QOpenGLContext: Use color depth information from QSurfaceFormatKurt Pattyn2014-03-191-0/+12
| | | | | | | | | | | When a new QOpenGLContext is requested, the color depth information is now also taken into account on OS X and WGL. Task-number: QTBUG-37411 Change-Id: I69d04989a20de3ace041b009fbbdc03fa02cfdf8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Doc: Fix broken linksSze Howe Koh2013-11-051-2/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Add swapInterval to QSurfaceFormatLaszlo Agocs2013-11-131-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement swap interval support for EGL, GLX and WGL. The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications' setting of the swap interval. Task-number: QTBUG-31939 Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Introduce proper QSurfaceFormat's setters/testers for format optionsGiuseppe D'Angelo2013-11-071-3/+72
|/ | | | | | | | | | | | | | | Fixes several things * setOption(options) has the wrong name (singular) * setOption(options) doesn't set the current options to the argument, but ORs the current options with the argument and sets the result * testOption(options) has the wrong name The old methods get deprecated, and new methods and overloads get introduced here. Old code behavior is thereby preserved. Change-Id: I51bba49f22810c80e6b4980892600d616503af6b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove doc references to non-existing functions in QSurfaceFormatSean Harmer2013-10-241-2/+2
| | | | | | Change-Id: I5a9de5b719e111e47a1ea7334609695f1db6149a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-6/+6
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Touch up QSurfaceFormat documentation.Mitch Curtis2013-06-281-2/+2
| | | | | Change-Id: I439ffa7632dbfe6d9e2c4e40447bfabfeac76f7b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Fixed QSurfaceFormat documentation about DebugContext requiring GL3+.Samuel Rødal2013-02-121-1/+0
| | | | | | | | | | | | | | GL_ARB_debug_output only requires OpenGL 1.1 and above. Change-Id: Ib79d370fac36fa737817ea678f0dee25283dfa31 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Added version() and setVersion() convenience API to QSurfaceFormat.Samuel Rødal2013-02-081-0/+24
|/ | | | | | | | | | This lets you write code like format.version() >= qMakePair(3, 2), and format.setVersion(4, 2) instead of format.setMajorVersion(4); format.setMinorVersion(2); Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Do not refer to non-existant member in QSurfaceFormat docsLaszlo Agocs2012-09-201-2/+2
| | | | | | | | | | Sample buffers should be enabled automatically under the hood when samples is > 0 and therefore the getter and setter are gone. Change-Id: I9cd6438e89060f901598a6aacacb99362fac4718 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fixed qdoc complaints for qsurface and qsurfaceformat.Shawn Rutledge2012-08-211-12/+23
| | | | | | | Also QTBUG-25231 Change-Id: I54e1f2d4ca9a52590b28e4d5ea04a8ae4a48d318 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+1
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed missing way of choosing EGL renderable type with QSurfaceFormat.Samuel Rødal2012-06-271-0/+26
| | | | | | | | | | | This has been long overdue, since EGL now lets you choose between desktop and ES based OpenGL. We also add OpenVG for those who want to use raw OpenVG with a QOpenGLContext. The underlying EGL API for using OpenGL / OpenVG is the same, with eglMakeCurrent() and eglSwapBuffers(). Change-Id: Ib0146b3fde5fe632069ebf99e7712f496ee7ea4d Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Added missing \since 5.0 and tweaked some docs in QtGui.Samuel Rødal2012-03-151-0/+1
| | | | | Change-Id: I91564f7a61962f97b9fb78c96d94d5695a3924db Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Added documentation for QSurfaceFormat.Samuel Rødal2012-02-231-15/+136
| | | | | Change-Id: I3b42b09e6e42092c098e4fc20c5ba7dd7e354116 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-added hellogl_es and ES 1 support for QOpenGLContext.Samuel Rødal2011-10-311-2/+6
| | | | | Change-Id: I576cf3595cdeeefb4ed840bb3b2b7097b3609cc7 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-1/+1
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSurfaceFormat: Use version in comparison and debug, fix setter.Friedemann Kleint2011-10-181-5/+13
| | | | | Change-Id: Id123ca9366b97a172e08a4608ccdffafb7caaf09 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-281-0/+4
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-291-1/+53
| | | | | | Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix comparison.Friedemann Kleint2011-08-191-1/+1
| | | | | | | Change-Id: Id90a49e57d25d12936678fecfa9c4e0c6dbe676b Reviewed-on: http://codereview.qt.nokia.com/3255 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QSurfaceFormat: Add missing 'profile' accessors, fix detaching.Friedemann Kleint2011-08-191-24/+70
| | | | | | | | | | | | No longer initialize FormatOptions to SwapBehaviour::DoubleBuffer in the constructor as it is a different enumeration. Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: Id69e0345d4395ee88532ac3ee0e89c35e6c5b083 Reviewed-on: http://codereview.qt.nokia.com/3254 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* OpenGL API refactor.Samuel Rødal2011-06-211-0/+368
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of having QPlatformGLSurface accessor in QWindow.