summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11egl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-102/+92
| | | | | | | | | | | | | | | | | | 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' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-081-67/+67
|\ | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| * Fixed indentation and typo.Trond Kjernåsen2010-01-071-67/+67
| | | | | | | | Reviewed-by: TrustMe
* | 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
* | Improved initial startup time for a QGLWidget ontop of EGL/X11.Trond Kjernåsen2010-01-061-5/+111
|/ | | | | | | Exchanged the temporary QGLWidget with a lightweight internal class. Measured on a device it can be upto 20 ms faster to construct. Reviewed-by: Tom Cooksey
* Fix QGLWidgets created with an alpha channel on X11/EGLTom Cooksey2009-12-151-1/+1
| | | | | | | | If the QGLWidget's QGLFormat says it should have an alpha channel, try to find an ARGB Visual. Reviewed-By: Trond Task-number: QT-2602
* Add QT_DEBUG_X11_VISUAL_SELECTION to aid debugging X11/EGLTom Cooksey2009-12-151-15/+31
|
* Fix WA_TranslucentBackground for QGLWidgets on X11/EGLTom Cooksey2009-12-041-45/+73
| | | | | | | Also check for existing QEglContext before creating a new one and leaking a context. Reviewed-by: TrustMe
* Mark both the new and original EGL contexts as sharingRhys Weatherley2009-11-091-0/+2
| | | | | | | If we succeed in creating a shared context, then mark the original as shared as well. Reviewed-by: Sarah Smith
* Detect context sharing on EGL systemsRhys Weatherley2009-11-091-0/+1
| | | | | | | | Context sharing was enabled on EGL systems, but QGLContext::isSharing() was still returning false because the flag in QGLContextPrivate was not updated. Reviewed-by: Sarah Smith
* Added QImagePixmapCleanupHooks functions for enabling hooks.Samuel Rødal2009-10-291-1/+2
| | | | | | | Better than having to befriend QPixmapData and setting is_cached manually. Reviewed-by: Tom Cooksey
* Fix bug for message error "Texture updload failed, error code 0x500"Stefano Pironato2009-10-281-1/+0
| | | | | | | | | | | | The error message come from the QGLContextPrivate::bindTexture. But since OpenGl errors are retains until glGetError is called the actual error was happening somewhere else. After adding in all the gl* call a check for a gl error, I was able to get the place where opengl fail with a GL_INVALID_ENUM. This happen in the call of glEnable(GL_TEXTURE_2D) in the file qgl_x11egl.cpp. This glEnable call does not need: removed. Reviewed-by: Tom Cooksey
* Make sure QGLTextureCache exists when creating surfaces for pixmapsTom Cooksey2009-10-201-0/+8
| | | | | | | QGLTextureCache installs pixmap cleanup hooks which are used to clean up the EGL surfaces. Reviewed-By: Trustme
* Add a new QX11GLPixmapData which renders to X pixmaps using GLTom Cooksey2009-10-191-1/+4
| | | | | Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-021-147/+186
|\
| * Refactor retrieving the X11 visual for EGLEskil Abrahamsen Blomfeldt2009-10-011-74/+84
| | | | | | | | | | | | | | | | | | We need this in qwindowsurface_gl.cpp. This patch was modified slightly by Tom, who stole it from another branch. :-) Reviewed-by: Gunnar
| * Split EGL config selection & surface creation into seperate functionsTom Cooksey2009-10-011-73/+102
| | | | | | | | | | This is needed to implement render-to-pixmap on x11/EGL, which will also need to create an EGL surface for pixmaps.
* | Make 16-bit graphicssystem opengl workGunnar Sletta2009-10-021-1/+11
|/ | | | Reviewed-by: Eskil
* Move common EGL functions to qgl_egl.cppRhys Weatherley2009-09-251-40/+0
| | | | | | | | There were several copies of the same stubbed functions in qgl_wince.cpp, qgl_qws.cpp, and qgl_x11egl.cpp. Move them all to a common location for easier maintainence. Reviewed-by: Sarah Smith
* Remove the storage of the EGLSurface from QEglContextRhys Weatherley2009-09-251-4/+9
| | | | Reviewed-by: Sarah Smith
* Start to separate the EGLSurface from QEglContext in QtOpenGLRhys Weatherley2009-09-241-53/+6
| | | | | | | Also, move the EGL makeCurrent(), doneCurrent(), swapBuffers(), and reset() functions into the common qgl_egl.cpp. Reviewed-by: Sarah Smith
* Make QtOpenGL on X11/EGL less chatty with it's debug outputTom Cooksey2009-09-161-5/+6
| | | | Reviewed-by: Trustme
* Performance: reduce TLS overhead of QGLContext::currentContext()Rhys Weatherley2009-09-141-10/+3
| | | | | | | | | | | | | 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
* Make an EGL context current when initializing GL extensionsRhys Weatherley2009-09-101-0/+7
| | | | Reviewed-by: trustme
* Don't yinvert pixmaps on eglx11Gunnar Sletta2009-09-101-3/+0
| | | | Reviewed-by: Tom
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Attempting to make EGL compile again and fix some potentialGunnar Sletta2009-08-281-3/+7
| | | | | | | | issues with flipped pixmaps on X11
* | Fix drawTiledPixmap for texture_from_pixmap on X11/EGLTom Cooksey2009-08-211-0/+4
| | | | | | | | | | | | | | QGLContextPrivate::bindTextureFromNativePixmap() needs to abort if it's not allowed to return a y-inverted texture. Reviewed-by: Trustme
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix build on X11/EGL without XRenderTom Cooksey2009-08-031-2/+4
| | | | | | | | Reviewed-by: Trustme
* | Support EGL_NOKIA_texture_from_pixmap on HarmattanTom Cooksey2009-07-291-8/+163
| | | | | | | | | | Added QGLContextPrivate::bindTextureFromNativePixmap() implementation for X11/EGL.
* | Refactor texture_from_pixmap to not re-create the gl surface each bindTom Cooksey2009-07-291-2/+8
| | | | | | | | | | | | | | | | Make a clear seperation between the GL texture and the GLX pixmap. A GLXPixmap is valid in any GL context and thus does not need to be re-created every time the pixmap has changed. Reviewed-By: Samuel
* | Add an ARGB check for EGL-provided X visualsTom Cooksey2009-07-241-3/+20
| | | | | | | | | | | | | | | | Don't just assume they're going to be ARGB just because the config has an alpha channel. This makes QGLWidgets with WA_TranslucentBackground set work again on the rx71 when running under xcompmgr. Reviewed-By: Trustme
* | Fix build on HarmattanTom Cooksey2009-07-231-1/+1
| | | | | | | | Reviewed-By: Trustme
* | Use texture_from_pixmap on X11 & avoid copiesTom Cooksey2009-07-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch tries to use texture_from_pixmap extentions on glX to properly bind an X Pixmap to a texture in QGLContextPrivate::bindTexture(QPixmap,). Because GL & X have different coordinate systems, the pixmap will be inverted about the y-axis. The extension does however allow a GLX_Y_INVERTED_EXT attribute to be set which will bind the pixmap the correct way up. If the underlying driver doesn't support this, texture_from_pixmap can't be used for QGLContext::bindTexture, because that function expects the resulting texture to be the right way up. However, it can still be used internally by the paint engine for drawPixmap operations. For these cases, if the pixmap is inverted, the paint engine can simply invert the texture coords to compensate. This is why this patch also moves QGLTexture into qgl_p.h. QGLContextPrivate::bindTexture(QPixmap,) now returns a QGLTexture which the paint engine can inspect to see if it needs to invert the texture coords. Finally, it seems on some (probably all) drivers, deleting an X pixmap which has been bound to a texture before calling glFinish/swapBuffers renders garbage. Presumably this is because X deletes the pixmap behind the driver's back before it's had a chance to use it. To fix this, we reference all QPixmaps which have been bound to stop them being deleted and only deref them after we swap the buffer, when they can be safely deleted. Reviewed-By: Kim
* | Integrate the OpenVG graphics system into Qt 4.6Rhys Weatherley2009-06-221-3/+3
| | | | | | | | | | This change also moves the EGL support classes from QtOpenGL to QtGui so they can be shared between OpenGL and OpenVG.
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
| * Long live Qt 4.5!Lars Knoll2009-03-231-0/+378
|
* Make WA_TranslucentBackground work for QGLWidgets on X11/EGLTom Cooksey2009-05-281-11/+15
| | | | Reviewed-By: TrustMe
* If EGL fails to provide a valid Visual ID, try XRender for ARGBsTom Cooksey2009-05-221-9/+55
| | | | | | | | | This patch is inspired by the "Fix ARGB visuals" patch in the Maemo branch. Thanks go to the author of that patch (who isn't signed up to Gitorious and thus can't be named - you know who you are! Thanks!!). This patch should also fix ARGB visuals (even if they are supplied by EGL) as such visuals require a colormap.
* Try to use the X11 visual ID provided by EGLTom Cooksey2009-05-221-30/+74
| | | | | | | EGL has an EGL_NATIVE_VISUAL_ID which can by used as the window's visual ID. We now try to use this ID to avoid an XVisual <-> EGLConfig mis-match. Of course this is usually broken in the EGL library, so we fall back to trying to match outselves.
* Long live Qt!Lars Knoll2009-03-231-0/+378