summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
Commit message (Collapse)AuthorAgeFilesLines
* gl on openkode. QGLWidget only works for toplevel widgetsJørgen Lind2010-06-011-3/+15
| | | | and QGLWindowSurface is used for anything else
* Merge remote branch 'qt/4.7' into lighthouse-4.7Paul Olav Tvete2010-05-104-26/+492
|\ | | | | | | | | | | Conflicts: src/gui/egl/egl.pri src/gui/painting/qwindowsurface_p.h
| * 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
* | Compile fix qegl_lite.cppJørgen Lind2010-04-271-6/+5
| |
* | Merge remote branch 'origin/4.7' into lighthouseJørgen Lind2010-04-216-118/+177
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/kernel/qapplication.cpp src/gui/painting/qbackingstore.cpp src/opengl/qgl.cpp src/opengl/qgl_p.h src/plugins/plugins.pro tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir tools/tools.pro
| * 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
* | Compile fix the openkode graphicssystemJørgen Lind2010-03-291-8/+15
| | | | | | | | Does not work well yet though :(
* | Merge remote branch 'qt/4.7' into lighthouse-4.7Paul Olav Tvete2010-03-181-1/+1
|\ \ | |/
| * 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
* | Merge remote branch 'origin/4.7' into 4.7-lighthouseJørgen Lind2010-03-1110-279/+861
|\ \ | |/ | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp
| * 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
| * | Add QEglContext::configAttrib(int name) helperTom Cooksey2010-03-022-0/+11
| | | | | | | | | | | | Reviewed-By: TrustMe
| * | Add getCompatibleVisualId to QEgl on X11Tom Cooksey2010-03-022-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | This method takes an EGLConfig and hands back an X11 VisualID which can be used to create native windows/pixmaps which will have an EGL surface created for them using the given EGL config. Reviewed-By: TrustMe
| * | Add QEgl::defaultConfig method to select configs suitable for QtTom Cooksey2010-03-023-0/+188
| | | | | | | | | | | | Reviewed-By: TrustMe
| * | Make QEgl::createSurface cross-platform and add native gettersTom Cooksey2010-03-026-123/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEgl::createSurface was virtually identical for every platform apart from the line which returned the native window type. This patch just adds QEgl::nativePixmap and QEgl::nativeWindow which are platform specific (though the default widget->winId() works for everything apart from symbian). Reviewed-By: Aleksandar Sasha Babic
| * | Move chooseConfig and createSurface logic to QEgl functionsTom Cooksey2010-03-026-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | We keep the methods in QEglContext, but these are useful helpers which wrap the QEgl version of the functions, which is where the bulk of the logic is (for these functions anyway). Reviewed-By: Aleksandar Sasha Babic
| * | Move static methods from QEglContext to QEgl namespaceTom Cooksey2010-03-026-64/+75
| | | | | | | | | | | | Reviewed-By: Aleksandar Sasha Babic
| * | Move qegl_p.h -> qeglcontext_p.h and add a new qegl_p.hTom Cooksey2010-03-0210-110/+186
| |/ | | | | | | | | | | | | | | This puts the QEgl namespace in a single file which can be used by both qeglcontext and qeglproperties. Files which need QEglContext should now include qeglcontext_p.h. Reviewed-By: Aleksandar Sasha Babic