summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
Commit message (Collapse)AuthorAgeFilesLines
* Added another missing EGL stub.Samuel Rødal2010-07-011-0/+8
| | | | Reviewed-by: Shane Kearns
* Fixed compilation on Symbian.Samuel Rødal2010-07-011-2/+2
| | | | | | Use EGLint, not GLint here, as GLint might not be defined. Reviewed-by: Shane Kearns
* Added missing EGL stub function.Samuel Rødal2010-07-011-0/+9
| | | | Reviewed-by: Shane Kearns
* Adding func prototypes for EGL_NOK_swap_region2 extension.Michael Dominic K2010-07-013-0/+46
| | | | | Merge-request: 712 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Warn if surface creation failsHarald Fernengel2010-06-251-1/+4
| | | | | | | Output the same warning that qegl.cpp does also in the X11 implementation. Reviewed-by: Trond Kjernåsen <trond.kjernasen@nokia.com>
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-271-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/spectrum/app/engine.h demos/spectrum/app/mainwidget.h demos/spectrum/app/settingsdialog.h demos/spectrum/app/spectrograph.h demos/spectrum/app/spectrumanalyser.h demos/spectrum/app/tonegenerator.h demos/spectrum/app/tonegeneratordialog.h demos/spectrum/app/utils.h demos/spectrum/app/waveform.h tests/auto/qtextcodec/tst_qtextcodec.cpp
| * Don't use QAtomicInt in statics because they are non-POD.Thiago Macieira2010-05-251-4/+4
| | | | | | | | Reviewed-By: Olivier Goffart
* | Fix compilation of qegl.cpp after the last mergeThiago Macieira2010-05-251-1/+2
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-251-5/+33
|\ \ | |/ | | | | | | | | | | | | Conflicts: demos/spectrum/app/app.pro src/gui/egl/qegl.cpp tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qmenu/tst_qmenu.cpp
| * Call eglTerminate() when the last QEglContext is destroyed to free mem.Trond Kjernåsen2010-05-211-4/+33
| | | | | | | | | | | | | | | | | | | | We never called eglTerminate() to free memory allocated by eglInitialize() since it was a fixed allocation that would be used for the lifetime of an application. The new behavior is to call eglTerminate() when the last EGL context in the app is destroyed. Task-number: QT-3383 Reviewed-by: Rhys Weatherley
| * Fix for EGL for symbian on 3.1/3.2/5.0, define QT_NO_EGL.Liang Qi2010-04-234-2/+25
| | | | | | | | Reviewed-by: Jason Barron
| * stub implementations for EGL for symbianShane Kearns2010-04-234-19/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done to keep binary compatibility between Qt built with openvg vs Qt built without openvg support. The problem is that Symbian uses .def files to map between exported symbol names and ordinals in the DLL export table. The alternative of manually maintaining two versions of the QtGui def files proved to be too error prone and time consuming. Note that the EGL exports are defined in a private header, for use by the openvg and opengl graphics system plugins. These plugins should always be compiled against Qt configured with support for the graphics system, as the headers contain default parameters which are inlined into the plugin binary. Task-number: QTBUG-7870 Reviewed-by: Tom Cooksey
* | Opt out of visual-config size checks with extensionNicolai de Haan2010-05-101-0/+5
| | | | | | | | | | | | | | | | EGL_NV_post_convert_replication. QTBUG-9444. Task-number: QTBUG-9444 Merge-request: 612 Reviewed-by: Trond
* | Some EGL implementations does not return a EGLNativeDisplayTypeJørgen Lind2010-05-061-1/+1
| | | | | | | | | | | | | | when using EGL_DEFAULT_DISPLAY. Actualy what was being returned was a void * Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* | Correction to EGL stub implementationShane Kearns2010-04-282-8/+6
| | | | | | | | | | | | | | | | | | Symbian typedefs EGLImageKHR as int rather than the reference void * For ARM builds this causes a symbol mismatch for eglDestroyImageKHR() when using the stubs. Task-number: QTBUG-7870 Reviewed-by: Miikka Heikkinen
* | Fix for EGL for symbian on 3.1/3.2/5.0, define QT_NO_EGL.Liang Qi2010-04-231-0/+1
| | | | | | | | Reviewed-by: Jason Barron
* | Stub implementations for EGL for symbianShane Kearns2010-04-234-22/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done to keep binary compatibility between Qt built with openvg vs Qt built without openvg support. The problem is that Symbian uses .def files to map between exported symbol names and ordinals in the DLL export table. The alternative of manually maintaining two versions of the QtGui def files proved to be too error prone and time consuming. Note that the EGL exports are defined in a private header, for use by the openvg and opengl graphics system plugins. These plugins should always be compiled against Qt configured with support for the graphics system, as the headers contain default parameters which are inlined into the plugin binary. Task-number: QTBUG-7870 Reviewed-by: Tom Cooksey
* | Set EGL_SWAP_BEHAVIOR to EGL_BUFFER_PRESERVED for regular QWidgetsTom Cooksey2010-04-161-0/+3
| | | | | | | | | | | | | | | | | | QGLWidgets are assumed to be buffer destroyed, however regular QWidgets assume they can to partial updates and thus need the preserved swap behaviour. Reviewed-By: Trond Task-number: QTBUG-9554
* | Cleanup & remove unused function overloads from QEgl* APIsTom Cooksey2010-04-165-84/+1
| | | | | | | | | | | | This should make stubbing out these APIs slightly easier. Reviewed-By: TrustMe
* | Wrap EGL image function pointers and move into QEgl namespaceTom Cooksey2010-04-152-20/+41
| | | | | | | | | | | | | | QtGui exporting a symbol called eglCreateImageKHR seems a pretty silly idea. Much better to have them in the QEgl namespace. Reviewed-By: Iain
* | Support building with desktop OpenGL managed via EGLTom Cooksey2010-04-142-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mostly replaces lots of QT_OPENGL_ES defines with QT_NO_EGL instead. It also switches off EGL auto-detection by default. This is to make sure we default to using GLX on systems with both EGL and desktop OpenGL. If -opengl es1|es2 or -openvg is specified, then EGL auto-detection is switched back on (as a requirement. If configure auto-detects OpenGL ES it also switches on EGL auto-detection, but failue then just disables both EGL & OpenGL. As a side effect, this patch also fixes building Qt when both EGL and glx are avaliable, as they are in Mesa >= 7.8.0. Reviewed-by: Trond Task-number: QTBUG-9691
* | Print more information when debugging X11 Visual selectionTom Cooksey2010-04-141-0/+10
| | | | | | | | Reviewed-By: TrustMe
* | Improve matching X11 VisualIDs to EGL configsTom Cooksey2010-04-091-24/+53
| | | | | | | | | | | | | | | | Use the individual channel sizes to match rather than the combined per-pixel sizes. Task-number: QTBUG-9444 Reviewed-By: Trond
* | Fix EGLImage & re-enable its use in QtOpenGLTom Cooksey2010-04-071-3/+6
| | | | | | | | | | | | | | | | Make sure we set the EGL_KHR_image_base define when we define the reset of the extension defines. This also makes eglCreateImageKHR get defined when previously it wasn't. Reviewed-By: TrustMe
* | Change the ifdef for resolving function ptrs to match declarationTom Cooksey2010-04-061-1/+1
| | | | | | | | Reviewed-By: TrustMe
* | Work-around Symbian 10.1's broken egl.hTom Cooksey2010-03-292-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | In Symbian 10.1, egl.h itself includes eglext.h. This leads to EGL_KHR_image & EGL_KHR_image_base being defined, but not the actual function prototypes for eglCreateImageKHR/eglDestroyImageKHR. But, because the extension defines were set, Qt assumed (wrongly) that the EGL library would define eglCreateImageKHR. This left these functions undefined. The work-around is to check the define EGL_EGLEXT_PROTOTYPES and still define the function pointers if it isn't set. Reviewed-By: TrustMe
* | Add some #warnings to debug Symbian EGL build failureTom Cooksey2010-03-291-0/+24
| | | | | | | | | | | | This should probably be reverted before we release. Reviewed-By: TrustMe
* | Don't try to resolve EGLImage function pointers if they are definedTom Cooksey2010-03-291-0/+2
| | | | | | | | | | | | | | | | We assume the presence of EGL_KHR_image or EGL_KHR_image_base means that the eglCreateImageKHR/eglDestroyImageKHR methods are exported by the EGL library and thus do not need to be resolved. Reviewed-By: TrustMe
* | Change ORs to ANDs when checking EGLImage extension definesTom Cooksey2010-03-292-4/+4
| | | | | | | | | | | | | | We should only define the EGLImage functions if both EGL_KHR_image _and_ EGL_KHR_image_base are undefined. Reviewed-By: TrustMe
* | Protect EGLImage function definitions in #ifdefTom Cooksey2010-03-291-0/+2
| | | | | | | | | | | | This should fix the build on Symbian. Reviewed-By: TrustMe
* | Implement Texture-From-Pixmap using EGLImage extensions on X11/EGLTom Cooksey2010-03-262-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's lots of EGLImage extensions, split between EGL and client rendering APIs like OpenGL ES & OpenVG. To implement texture-from- pixmap using EGLImage, both EGL extensions and OpenGL ES extensions are needed. This patch resolves the EGL extension function pointers after the display is initialized in QEgl::display(). These are then exported from QtGui so they can be used in QtOpenGL. The OpenGL ES extension function pointers are resolved using the usual qglextensions.cpp mechanism. Using EGLImage seems to remove a fixed ~10 millisecond overhead per pixmap bind when compared to using EGLSurface. Exact results per bind for 100 QPixmaps are: 8x8 Pixmap: 12 -> 1.71 msecs (EGLSurface -> EGLImage) 64x64 Pixmap: 11.6 -> 1.83 msecs (EGLSurface -> EGLImage) 128x128 Pixmap: 12.8 -> 2.74 msecs (EGLSurface -> EGLImage) 256x256 Pixmap: 16 -> 6.20 msecs (EGLSurface -> EGLImage) Reviewed-By: Trond
* | Delete the QGLContext in ~QX11GLPixmapDataTom Cooksey2010-03-111-1/+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
* | Handle EGLSurfaces better, including more error detectionTom Cooksey2010-03-102-2/+7
| | | | | | | | | | | | | | Note: This changes QX11PixmapData::gl_surface to a void* to enable build on 64-bit systems where EGLSurface is a pointer. Reviewed-By: TrustMe
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-081-5/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: fix to mainwindow demo Fix build on Maemo X11 Fix crash on Win with 16bit screendepth when copy/pasting images Enable cleanup hooks when creating an EGL surface for a pixmap
| * | Enable cleanup hooks when creating an EGL surface for a pixmapTom Cooksey2010-03-081-5/+7
| | | | | | | | | | | | Reviewed-By: TrustMe
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-062-6/+7
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-051-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix build with Mesa 7.8's EGL implementatioon Reset the byte order in the iconv codec after using it. fix "using namespace" recursion crash Fixed key mappings on X11 QDom: prevent infinite loop when cloning a DTD QPrintPreviewDialog number of pages is partially blocked from view in OSX Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( f3110d2f94c825477afac054ed448e45d47f5670 )
| | * Fix build with Mesa 7.8's EGL implementatioonBernhard Rosenkraenzer2010-03-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, when Mesa 7.8 is used, qtextstream.h (included by qdebug.h) complains that it has to be included before any header that defines Status Merge-request: 483 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * | Compile fix for Windows Mobile and OpenGLES2ninerider2010-03-051-3/+1
| |/ | | | | | | The native device is now the default screen device.
| * Preparation to enable OpenGLES 2.0 for Windows Mobile.ninerider2010-02-272-4/+11
| | | | | | | | | | | | 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.
* | Make QEgl::createSurface store the surface in the pixmapdata tooTom Cooksey2010-03-051-3/+5
| | | | | | | | | | | | | | This means the same surface can then later be used to bind the pixmap as a texture using eglBindTexImage2D. Reviewed-By: TrustMe
* | Make QEgl::ConfigOptions use QFlagsTom Cooksey2010-03-051-1/+8
| | | | | | | | Reviewed-By: Trustme
* | Compile fix for Windows Mobile and OpenGLES2ninerider2010-03-051-2/+1
| | | | | | | | The native device is now the default screen device.
* | Fix build when egl.h includes X11 headers & pollutes namespaceTom Cooksey2010-03-041-0/+2
| | | | | | | | | | | | | | 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
* | Fix build on EGL implementations where EGLConfig is a pointerTom Cooksey2010-03-041-8/+11
| | | | | | | | | | | | | | EGLConfig is an opaque type which we really shouldn't cast to an int. Instead, we get the config id for the EGLConfig. Reviewed-By: TrustMe
* | Fix & move QEgl::native* to platform-specific filesTom Cooksey2010-03-025-20/+49
| | | | | | | | | | | | This should fix build on Symbian & WinCE Reviewed-By: TrustMe
* | Make bindTextureFromNativePixmap use new QEgl APIsTom Cooksey2010-03-023-12/+25
| | | | | | | | | | | | | | The old qt_chooseEGLConfigForPixmap & qt_createEGLSurfaceForPixmap code will remain until QX11GLPixmapData can be re-written properly. Reviewed-By: TrustMe
* | Move QGLWidget::setContext logic into QEgl & QGLContextTom Cooksey2010-03-022-1/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEgl::createSurface() on X11 will now check to see if the device's X11 Visual is compatible with the EGLConfig passed in. If it is not compatible, the function will re-create the QPaintDevice's native drawable with a different Visual (one which is compatable with the EGLConfig). This represented the bulk of the QGLWidget::setContext method which is now much simpler. As a consequense of this change, QWidgets with graphicssystem opengl will behave much more like QGLWidget as most of the code is re-used. So things like WA_TranslucentBackground should now work with opengl graphicssystem too. Reviewed-By: TrustMe
* | Move EGL surface type setting to new QEglProperties::setDeviceTypeTom Cooksey2010-03-022-2/+13
| | | | | | | | | | | | Also renamed qt_egl_set_format->qt_eglproperties_set_glformat Reviewed-By: TrustMe
* | Make QGLWidget use new QEgl::getCompatibleVisualId APITom Cooksey2010-03-021-2/+3
| | | | | | | | Reviewed-By: TrustMe