summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * Preparation to enable OpenGLES 2.0 for Windows Mobile.ninerider2010-02-271-3/+9
| | | | | | | | | | | | As there are no SDKs available for our test device (HTC HD2) that support OpenGL, we had to construct the libraries by extracting them from the ROM image. This is still work in progress at this time.
* | Fix build when egl.h includes X11 headers & pollutes namespaceTom Cooksey2010-03-041-7/+1
| | | | | | | | | | | | | | At some point we should fix the include order in all the .cpp files, however #udef'ing the defines we use elsewhere seems to work for now. Reviewed-By: TrustMe
* | Add and use QGLContextPrivate::eglSurfaceForDevice()Tom Cooksey2010-03-021-0/+1
| | | | | | | | | | | | | | | | | | The QGLContext only stores the EGLSurface for QWidgets & QGLWidgets, other device types like QPixmap & QGLPixelBuffer store the surface themsselves. With this patch it is possible to create a QGLContext on a QPixmap, make it current and render GL to that QPixmap on X11. Reviewed-By: TrustMe
* | Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-201-6/+36
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp
| * | Some threading improvements to the GL moduleGunnar Sletta2010-02-171-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-2/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | 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-2/+2
| | | | | | | | | | Reviewed-By: Trond Autotest: tst_QGL::qglContextDefaultBindTexture
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-121-1/+3
|\ \ | |/
| * Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Kim Motoyoshi Kalland2010-02-091-1/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| | * Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
| | * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-091-6/+3
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
| * | Fix GL texture leaks when pixmaps are deletedTom Cooksey2010-01-291-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-16/+0
| | | | | | | | | | | | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* | | Merge branch '4.6'Thiago Macieira2010-01-181-36/+59
|\ \ \ | |/ /
| * | Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-36/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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
* | | | Merge branch '4.6'Thiago Macieira2010-01-081-16/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/opengl.pro
| * | | Remove QGLShareRegister and transfer its functionality to QGLContextGroupRhys Weatherley2010-01-041-16/+9
| | | | | | | | | | | | | | | | | | | | Task-number: QT-2600 Reviewed-by: Samuel
| * | | Track which vertex attrib arrays are enabled in QGLContextPrivateTom Cooksey2009-12-301-0/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Added support for OpenGL up to version 3.2 on Windows.Kim Motoyoshi Kalland2009-12-301-2/+16
|/ / | | | | | | | | Task-number: QTBUG-4438, QT-2662, QT-2663 Reviewed-by: Tom
* | Fix EGL surface leaks when re-parenting QGLWidget on X11/EGLTom Cooksey2009-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Optimize our GL extension checks to avoid mallocs.Trond Kjernåsen2009-12-101-0/+43
| | | | | | | | | | | | | | | | | | | | 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-3/+0
| | | | | | | | | | | | | | | | 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
* | Export QGLShareRegister because qgl_share_reg() is exportedRhys Weatherley2009-12-091-1/+1
| | | | | | | | Reviewed-by: trustme
* | Detect GL2 paint engine based on fragment shaders, not programsRhys Weatherley2009-12-071-1/+2
| | | | | | | | | | | | | | | | The auto-detect logic was looking for fragment programs to check for OpenGL2 support. It should have been looking for fragment shaders. Task-number: QTBUG-5638 Reviewed-by: Sarah Smith
* | Compressed texture binding for QtOpenGL: ETC1 and PVRTCRhys Weatherley2009-12-061-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QGLContext::bindTexture(QString) function has been augmented with support for ETC1, PVRTC2, and PVRTC4 compressed textures, in addition to the existing DDS support. The QGLPixmapData class has also been modified to recognize compressed texture formats in fromFile() and fromData(). This change also fixes a bug in bindTexture() that prevented the same compressed texture file from being bound in multiple contexts. There is now a separate file cache for each context group. Task-number: QT-2547 Reviewed-by: Trond
* | Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms.Samuel Rødal2009-12-041-1/+2
| | | | | | | | | | | | | | The format and internal_format parameters to glTexImage2D need to always match on OpenGL ES 2.0. Reviewed-by: Tom Cooksey
* | Rebind window surface fbo after native GL renderingRhys Weatherley2009-12-041-0/+1
| | | | | | | | | | | | | | | | | | If the user called QGLFramebufferObject::bind()/release() during a beginNativePainting() callout, the release() would reset the context's fbo to zero, not the actual window surface fbo. Task-number: QTBUG-6204 Reviewed-by: Tom
* | Fixed extension checks and usage of the GL 2 engine on old X11 systems.Trond Kjernåsen2009-11-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression from 4.5, where exporting a GL capable display from an old X11 HP/Sun workstation to a modern Linux machine causes crashes and lots of X11 error output. Just relying on the client GL version number is not enough under X11, since the server might only support GL 1.1 with non or very few extensions. Also, the extension checks worked a bit randomly since it checked for sub-strings which might or might not occur within one or more full extension names. Task-number: QTBUG-5853 Reviewed-by: Kim
* | Make isSharing() reset to false when context no longer sharingRhys Weatherley2009-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | The documentation for QGLContext::isSharing() indicates that the function returns true only when the context is sharing. However, previously the sharing flag would stay on if the context was created as sharing but is no longer sharing. Task-number: QTBUG-5578 Reviewed-by: Sarah Smith
* | Separate modification & destruction pixmap cleanup hooksTom Cooksey2009-10-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Before the QExplicitlySharedDataPointer change, the ref-count was 0 when calling the cleanup hooks from ~QPixmap. That enabled the hook to figure out if the pixmap is being modified or deleted. As the ref count is now 1 when calling the cleanup hooks in ~QPixmap, we need to seperate the hooks. This change should make using textre-from-pixmap faster as the EGL/glX surface wont get re-created everytime the pixmap is modified. Reviewed-By: Gunnar
* | Centralize all GL paint engine creations into qt_qgl_paint_engine()Rhys Weatherley2009-10-151-3/+1
| | | | | | | | | | | | | | | | | | The qt_qgl_paint_engine() function was being used by QWS, but there's no reason why it can't be used by other platforms too. This should also fix ES 2.0 paint engine support under QWS, which was stubbed out. Reviewed-by: Sarah Smith Reviewed-by: Gunnar
* | Consistently use QGLShareContextScope for context switchingRhys Weatherley2009-10-051-48/+42
| | | | | | | | | | | | | | | | QGLShareContextScope is safer and more reliable than trying to manually detect how and when to temporarily switch contexts. Replace the few remaining instances of context-switching with it. Reviewed-by: trustme
* | Merge QGLContextReference into QGLContextGroupRhys Weatherley2009-10-041-51/+20
| | | | | | | | Reviewed-by: trustme
* | Move QGLContextResource management into QGLContextGroupRhys Weatherley2009-10-041-10/+12
| | | | | | | | | | | | | | | | | | Context resources are per-group, so they should be managed by the group. This should also improve performance of context shutdown slightly by removing QGLSignalProxy::aboutToDestroyContext() signal dispatches to the resources. Reviewed-by: trustme
* | Add unit tests for QGLContextResourceRhys Weatherley2009-10-041-1/+1
| | | | | | | | Reviewed-by: trustme
* | Remove QHash overhead from QGLShareRegisterRhys Weatherley2009-10-021-6/+2
| | | | | | | | | | | | | | Move the list of shared contexts from QGLShareRegister into QGLContextGroup. There is then no need for the QHash. Reviewed-by: trustme
* | Remove unnecessary reference to QGLContextGroup::extensionFuncs()Rhys Weatherley2009-10-021-2/+0
| | | | | | | | Reviewed-by: Andrew den Exter
* | Remove unnecessary function definition: qt_qgl_egl_display()Rhys Weatherley2009-10-011-2/+0
| | | | | | | | | | | | The qt_qgl_egl_display() function no longer exists. Reviewed-by: trustme
* | QGLContext::areSharing() to check for GL share relationshipsRhys Weatherley2009-10-011-3/+2
| | | | | | | | Reviewed-by: Samuel
* | Add unit tests for QGLShareRegisterRhys Weatherley2009-10-011-1/+1
| | | | | | | | Reviewed-by: Sarah Smith
* | Start to separate the EGLSurface from QEglContext in QtOpenGLRhys Weatherley2009-09-241-0/+1
| | | | | | | | | | | | | | Also, move the EGL makeCurrent(), doneCurrent(), swapBuffers(), and reset() functions into the common qgl_egl.cpp. Reviewed-by: Sarah Smith
* | Reduce overhead of paint engine-specific pixmap filtersRhys Weatherley2009-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Engine-specific pixmap filters were being created, used, and destroyed every time draw() was called on QPixmapColorizeFilter, QPixmapBlurFilter, and so on. This had a heavy performance penalty and made it difficult for the GL paint engine to cache shaders from one request to the next. A generic filter can request an engine-specific filter that matches its parameters. The engine can either create a new one or return a previously allocated filter object. Ownership of engine-specific pixmap filter objects is moved to the paint engine itself. Reviewed-by: Andrew den Exter Reviewed-by: Michael Brasser Reviewed-by: Michael Goddard Reviewed-by: Sarah Smith
* | Performance: reduce TLS overhead of QGLContext::currentContext()Rhys Weatherley2009-09-141-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The handling for the current QGLContext was looking up the same TLS data several times per call (hasLocalData() and localData() calls particularly). This change also refactors the code a little so that the setting of the QGLContext within makeCurrent() and doneCurrent() is in one location in the code instead of six (one per platform). Reviewed-by: Michael Brasser Reviewed-by: Sarah Smith
* | QGLWidget::fontDisplayListBase() is not supported under OpenGL/ESRhys Weatherley2009-09-131-0/+2
| | | | | | | | | | | | Update documentation and #ifdef out the implementation. Reviewed-by: trustme
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-09-091-4/+4
|\ \