summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Made QGLExtensions::glExtensions() thread-safe.Trond Kjernåsen2010-03-121-19/+18
| | | | Reviewed-by: Gunnar
* Delete the QGLContext in ~QX11GLPixmapDataTom Cooksey2010-03-111-0/+1
| | | | | | | | This also includes changes which allow QGLContext to not own it's own QEglContext. With X11GL, the QEglContext gets reused by multiple QGLContexts so it is important QGLContext doesn't delete it. Reviewed-By: TrustMe
* Made QGLTextureCache::instance() threadsafe.Trond Kjernåsen2010-03-111-20/+7
| | | | Reviewed-by: Tom Cooksey
* Make calls to QGLFormat::set*BufferSize also update flagsTom Cooksey2010-03-101-1/+5
| | | | Reviewed-By: Trond
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-261-1/+1
|\ | | | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * Fix off-by-one error in mipmap count when loading PVRTC filesRhys Weatherley2010-02-241-1/+1
| | | | | | | | | | Task-number: QT-2988 Reviewed-by: Julian de Bhal
* | Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-201-6/+16
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp
| * | Some threading improvements to the GL moduleGunnar Sletta2010-02-171-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Make bindTexture threadsafe - Document which areas of QGLWidget needs locking in order to do out-of-gui thread rendering - Testcases to prove that these cases work Reviewed-by: Trond
* | | Merge branch '4.6' into qt-master-from-4.6Thiago Macieira2010-02-171-23/+21
|\ \ \ | |/ / |/| / | |/ | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/helpviewer.cpp
| * Fix several bugs with GL texture cacheTom Cooksey2010-02-121-23/+21
| | | | | | | | | | Reviewed-By: Trond Autotest: tst_QGL::qglContextDefaultBindTexture
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-121-1/+8
|\ \ | |/
| * Fixed drawing QPixmaps on QGLWidgets on different X11 screens.Trond Kjernåsen2010-02-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | Don't try to use the texture_from_pixmap extension when drawing a pixmap from one X11 screen onto a different X11 screen in the GL 2 engine. For that to work, the pixmap will have to be re-created on the new screen, which is exactly what the default bind method does (via QImage conversion). Task-number: QTBUG-8054 Reviewed-by: Kim
* | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-091-18/+13
|\ \ | |/ | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
| * Fixed a failure in tst_qgl.Trond Kjernåsen2010-02-021-1/+0
| | | | | | | | | | | | | | The assert wrong, it may be that the texture isn't removed from the cache if it doesn't have the MemoryManaged bind option set. Reviewed-by: Samuel
| * Fix GL texture leaks when pixmaps are deletedTom Cooksey2010-01-291-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes quite a lot of issues: * QtOpenGL only registered qpixmap destruction hooks on X11 and those only cleanup the EGL/GLX surface, not the texture object. * The QPixmap destruction hooks were only being called from the QPixmap destructor. However, this means when a QPixmap is assigned to another QPixmap, the hooks don't get called. Task-number: QTBUG-7647 Reviewed-By: Samuel Reviewed-By: Trond
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-041-6/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Use a shared QScriptEngine for debugger console command scripts Fix QtScript debugger hang/crash issue with updating locals model doc: Fixed some qdoc warnings. Always activate popup windows on show doc: Fixed some qdoc warnings. Add the QMAKE_FILE_EXT variable to extra compilers generation. Cocoa: Tool Windows steal focus from the main window qdoc3: Removed a debug output. Update QTestLib documentation with chart use case.
| * | doc: Fixed some qdoc warnings.Martin Smith2010-02-041-6/+8
| | |
* | | Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-37/+32
|/ / | | | | | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-011-2/+27
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Added a warning to QGLWidget::renderText().Trond Kjernåsen2010-01-271-2/+20
| | | | | | | | | | | | | | | | | | renderText() can't be used while a GL 2 paint engine is active on the same device, because it will clash with the GL 1 engine and wreck havoc. We simply don't support that scenario. Task-number: QTBUG-7592 Reviewed-by: Samuel
| * Updated docs regarding QGLWidget::renderText() limitations.Trond Kjernåsen2010-01-251-0/+7
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6'Thiago Macieira2010-01-181-29/+68
|\ \ | |/
| * Fix QGLWidget::renderPixmap() on Windows.Trond Kjernaasen2010-01-141-6/+6
| | | | | | | | | | | | | | | | Using renderPixmap() with scenes that contained textures might not work due to the wrong texture format being used under certain circumstances. Task-number: QTBUG-7213 Reviewed-by: Gunnar
| * Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-23/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt used to store the GL extensions a particular implementation supported in a global cache, which was initialized once and never updated. This could cause problems because different types of context might support different kinds of extensions (e.g. the difference between sw and hw contexts). With this patch, the GL extensions are cached and updated within each QGLContext. It also makes the extension initialization lazy, which saves application initialization costs for embedded platforms. The patch introduces a internal cross platform QGLTemporaryContext class that is used to create a light-weight GL context without going via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks for now). Reviewed-by: Kim Reviewed-by: Samuel
* | Merge branch '4.6'Thiago Macieira2010-01-131-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-1/+1
| |\ | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-081-2/+0
| | |\ | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| | * \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071-1/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| | | * | Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | | Fixed bug where QGLPixmapData::toImage() returned too dark image.Kim Motoyoshi Kalland2010-01-121-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | QGLPixmapData::toImage() called qt_gl_read_texture() which didn't take into account that the texture was in a premultiplied format. Task-number: QTBUG-7190 Reviewed-by: Trond
* | | | Merge branch '4.6'Thiago Macieira2010-01-081-34/+52
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/opengl.pro
| * | | Remove unnecessary call to QWidget::setAttribute().Trond Kjernåsen2010-01-071-2/+0
| |/ / | | | | | | | | | | | | | | | This is already done in the QGLWidget constructor. Reviewed-by: Kim
| * | Remove QGLShareRegister and transfer its functionality to QGLContextGroupRhys Weatherley2010-01-041-13/+15
| | | | | | | | | | | | | | | Task-number: QT-2600 Reviewed-by: Samuel
| * | Fixed QGLWidget::renderText().Trond Kjernaasen2009-12-301-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fall back and use the GL 1 engine for the renderText() functions. Getting it to work with the GL 2 engine is a futile effort. Making it work with renderPixmap() in the GL 2 engine is not possible at all, since software contexts in general do not support shader programs. Task-number: QTBUG-5002, QTBUG-6931 Reviewed-by: Kim
| * | Track which vertex attrib arrays are enabled in QGLContextPrivateTom Cooksey2009-12-301-0/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The GL2 engine (and probably Qt/3D) needs to track which vertex attribute arrays are currently enabled and which are disabled. As this is per-context state, the logical place to track this is in the context and not in the paint engine. This patch also makes the GL2 engine's shader manager enable/disable the appropriate attribute arrays for a given shader program when it is used. Reviewed-By: Kim
* | Fixed QGLFormat::operator== to handle new fields.Kim Motoyoshi Kalland2010-01-041-3/+13
| | | | | | | | | | | | | | | | When I added new fields to QGLFormat in commit 592dc597, I forgot to update operator==. It has now been fixed and the auto-test updated. Reviewed-by: Trond
* | Added support for OpenGL up to version 3.2 on Windows.Kim Motoyoshi Kalland2009-12-301-2/+99
| | | | | | | | | | Task-number: QTBUG-4438, QT-2662, QT-2663 Reviewed-by: Tom
* | Format qOpenGLVersionFlagsFromString() according to Qt coding style.Kim Motoyoshi Kalland2009-12-301-22/+16
|/
* Disable depth testing during the 2D QGLWidget::renderText()Rhys Weatherley2009-12-171-0/+12
| | | | | | | | Also document the depth testing conditions for the 2D and 3D versions of the function. Task-number: QTBUG-5041 Reviewed-by: Daniel Pope
* Fix EGL surface leaks when re-parenting QGLWidget on X11/EGLTom Cooksey2009-12-151-0/+5
| | | | | | | | | | | | When a QGLWidget is re-parented, it's native X11 window usually gets destroyed and re-created. This also happens when you set a window attribute or flag. On EGL, we must destroy the surface for the window before destroying the window itself, otherwise we can leak the surface. This also fixes lots of BadDrawable errors when running the autotests (which were due to surface leaks!). Reviewed-By: TrustMe
* Optimized blur / drop shadow effects for the GL 2 paint engine.Samuel Rødal2009-12-141-17/+24
| | | | | | | | | Do the blur in half the resolution in software and then upload the result as a texture and smooth-scale it on the GPU. This leads to stable and decent performance regardless of the blur radius, and simplifies the implementation quite a bit. Reviewed-by: Bjørn Erik Nilsen
* Optimize our GL extension checks to avoid mallocs.Trond Kjernåsen2009-12-101-23/+24
| | | | | | | | | | We want to avoid any unnecessary mallocs when checking GL/GLX extensions. The GL extension string can be quite long and contain several hundred extensions. The old code forced one malloc for each extension + 1 extra malloc for the extension string itself when it was copied into the QByteArray. Reviewed-by: Kim
* GLES 2 should *not* use a multisampled format by default.Trond Kjernåsen2009-12-091-2/+1
| | | | | | | | This is a platform regression and should never have been there in the first place. Having this as the default format on embedded devices may drop the framerates with as much as 30% on selected HW. Reviewed-by: Tom Cooksey
* Merge upstream/4.6 into oslo-staging-2/4.6Olivier Goffart2009-12-091-1/+1
|\ | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def
| * Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-12-091-119/+381
| |\
| * \ Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-12-061-1/+1
| |\ \
| | * | Replace glColor4ub() calls with glColor4f()Rhys Weatherley2009-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel Q45/Q43 Express Chipset has problems with glColor4ub() not updating GL_CURRENT_COLOR correctly. Replace all references with calls to glColor4f() instead as it is more likely to be implemented correctly on all chipsets. Task-number: QTBUG-6217 Reviewed-by: Sarah Smith
| | * | Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | Fix upside down PVR compressed textures.Rhys Weatherley2009-12-081-3/+4
| |_|/ |/| | | | | | | | | | | | | | | | | The "vertical flip" flag in the PVR format is the inverse of the "inverted y" state that we use in Qt. Reviewed-by: trustme
* | | Fix GL_BGRA formats under OpenGL/ES systemsRhys Weatherley2009-12-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL/ES requires that the internal and external formats be the same when calling glTexImage2D(). This caused problems with devices that had the GL_EXT_bgra extension. This change makes the formats the same just before the upload and also makes sure that the pixel type is GL_UNSIGNED_BYTE when GL_BGRA is used. No change for desktop systems. Reviewed-by: Donald Carr