summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use "OpenGL" instead of just "GL" in documentation.Samuel Rødal2012-02-241-1/+1
| | | | | Change-Id: I81a0beebc0241b9699ce321174e13a93e76e45e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Added documentation for QOpenGLContext and QOpenGLContextGroup.Samuel Rødal2012-02-231-43/+233
| | | | | | Change-Id: I00e3e3b3fd37b27b31d4705de3c8c34be9211707 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.Friedemann Kleint2012-02-201-0/+1
| | | | | | | Forward-declare instead. Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed typo in QOpenGLContext warning message.Samuel Rødal2012-02-061-1/+1
| | | | | Change-Id: I967279f4b4875ae80ce45744d559fc7380bc0125 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Improve QSurface / QWindow API a bit and use that to avoid errorsGunnar Sletta2012-02-021-0/+11
| | | | | Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qopenglcontext not checking for null and failing with platform minimalKurt Korbatits2012-02-021-0/+2
| | | | | | | | | | - The minimal platform plugin returns null and was causing segfault. Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Introduced QOpenGLContext::defaultFramebufferObject().Samuel Rødal2012-01-271-2/+69
| | | | | | | | Also add some debugging helpers to make sure applications are correctly written even on less restrictive platforms. Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0 Reviewed-by: Jørgen Lind <jorgen.lind@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>
* Use QFunctionPointer in QOpenGLContext as well.Samuel Rødal2012-01-161-1/+1
| | | | | Change-Id: I7192e6aea721c75257bfbd1d205d5ce7764d915f Reviewed-by: Kim M. Kalland <kim.kalland@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>
* Introduced QOpenGLContext::aboutToBeDestroyed() signal.Samuel Rødal2012-01-051-0/+13
| | | | | | | | | This signal can be used to clean up OpenGL resources in a safe way before the context is destroyed. Task-number: QTBUG-20083 Change-Id: I45a4be01b06af4ee7196fa502116f099d50afeab Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Better handling of GLX / EGL errors.Samuel Rødal2011-12-071-4/+6
| | | | | | | | | | If context creation fails, try again without a shared context. Added QPlatformOpenGLContext::isSharing() and QPlatformOpenGLContext::isValid() to propagate whether the platform context was successfully created with or without sharing. Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Call invalidateResource() on QOpenGLMultiGroupSharedResource-owned resourcesKent Hansen2011-11-171-0/+1
| | | | | | | | | Commit 202127f860208c21145e05685bc54219e1655dbd ensured that QOpenGLMultiGroupSharedResource-owned resources are deleted, but it was missing a call to invalidateResource(). Change-Id: I166ce8a7298772408081331fe1a91bd2cd88aebb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Ensure that QOpenGLMultiGroupSharedResources are cleaned upKent Hansen2011-11-151-17/+12
| | | | | | | | | | | | | | | | | When a GL context group is destroyed, all multi-group shared resources associated with the group should be cleaned up. Otherwise we could get a double deletion in the resource's destructor, because it still retained a pointer to the deleted group. The missing cleanup resulted in a crash when the global static qt_gl_functions_resource was destroyed, first seen in the tst_examples autotest in qtdeclarative. It possibly didn't manifest before because it's event loop-dependent (the contexts are deleted via deleteLater()). Change-Id: I6b1e0bfdfbbb2bff8e795f545e680fcdfa094768 Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Do not call swapBuffers when surfaceHandle is NULL.Laszlo Agocs2011-10-181-1/+3
| | | | | | | | | | Calling swapBuffers with the surfaceHandle of 0 returned by QWindow during application exit causes a crash when using GLX. The patch avoids swapBuffer calls to platformGLContext when there is no surface handle anymore. Change-Id: I09c5bbafd4e7af6648ca54a58ed0267d0a2f343d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-281-0/+3
| | | | | | | 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>
* Implemented texture cache for GL paint engine in QtGui.Samuel Rødal2011-09-121-0/+11
| | | | | | | | | | | This is simpler than the existing texture cache in QtOpenGL, as it only serves the GL paint engine. There's one per context group, to simplify the design and to prevent performance degradations. Change-Id: I61e3c9a444d8e246a8b38da019a56f2c0a533c0c Reviewed-on: http://codereview.qt-project.org/4674 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Clean up shared resources immediately as the last context is destroyed.Samuel Rødal2011-09-011-12/+21
| | | | | | | | | | | By not waiting until deleteLater() kicks in it's easier to auto-test. We can now add a test case for what happens when a shared resource is still valid while the last context is destroyed. Change-Id: I72963928e6a921e49ed59a79e2579b497ba37ccf Reviewed-on: http://codereview.qt.nokia.com/3732 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Cause fatal error when trying to make a context current in wrong thread.Samuel Rødal2011-08-301-0/+3
| | | | | | | | | | Since QOpenGLContext is now a QObject, it needs to be moved to, or created in, the thread where it's going to be used. Change-Id: I7ed12b25e75c84bb12be8c7102e46e9a242fc2df Reviewed-on: http://codereview.qt.nokia.com/3858 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Added some documentation for internal OpenGL resource handling classes.Samuel Rødal2011-08-301-0/+51
| | | | | | | Change-Id: Ib9a9442199a29d5781013155190ad0f20741198e Reviewed-on: http://codereview.qt.nokia.com/3859 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-291-0/+531
Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>