summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Fixed drawing of QPixmaps with masks in the GL 2 and X11 engines.Trond Kjernåsen2010-09-221-0/+4
| | | | | | | | | | | A regression from 4.6.x. This is an X11-only problem caused by the separate masks that an X11 QPixmap can contain. These masks we're not taken into account when a number optimizations were done for 4.7. Introduction of the texture-from-pixmap extension in 4.6 also broke masked pixmaps under X11. Task-number: QTBUG-13814 Reviewed-by: Samuel
* remove extra includesRitt Konstantin2010-09-211-0/+1
|
* Fixed an on-exit crash for apps using GL.Trond Kjernåsen2010-06-111-1/+1
| | | | | | | | | | | | If a QGLWidget is left on the heap when the QApplication destructor is called, it will leave the QGLWidget in a broken state. The widget itself is released and set to a non-created state, which the associated QGLContext doesn't get notified about. With this patch the QGLWidget knows when QWidget::destroy() is called and can act acordingly. Task-number: QT-3498, QTBUG-10995 Reviewed-by: Paul
* Compile fix.Samuel Rødal2010-06-111-2/+6
| | | | | | | The PFNGLXCREATECONTEXTATTRIBSARBPROC typedef isn't defined on all GLX 1.3 systems, so we use our own. Reviewed-by: Trond
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-081-143/+224
|\ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QVarLenghtArray: Add typedefs for stl compatibility. prefer QElapsedTimer over QTime Allow to build Qt in static with mingw Protected call to glXChooseFBConfig with appropriate defines. Use the new OpenGL 3.* context/profile if asked with X11/GLX. Splitted attrib_list generation into buildSpec from QGLContext::tryVisual. Fix QTransform::map(const QPainterPath &) not working with paths that
| * Protected call to glXChooseFBConfig with appropriate defines.Samuel Rødal2010-06-071-0/+11
| | | | | | | | Reviewed-by: Trond
| * Use the new OpenGL 3.* context/profile if asked with X11/GLX.Riku Palomäki2010-06-071-6/+69
| | | | | | | | | | Merge-request: 609 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Splitted attrib_list generation into buildSpec from QGLContext::tryVisual.Riku Palomäki2010-06-071-137/+144
| | | | | | | | | | Merge-request: 609 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-06-081-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/painting/qpainter.cpp src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qfontmetrics/tst_qfontmetrics.cpp tools/linguist/lupdate/main.cpp
| * Fix the bindTexture() filters on X11 to not rely on mipmap generation.Trond Kjernåsen2010-06-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | The default GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR, which means you have to have mipmaps generated in order for it to produce correct results. We don't use mipmaps when this particular path is taken, so use texture filters that is in line with what we do in the non-pixmap_to_texture path. Task-number: QTBUG-11158 Reviewed-by: Kim
* | Add runtime check for GLX >= 1.3 before using glXCreatePixmapTom Cooksey2010-04-091-0/+8
| | | | | | | | | | Task-number: QTBUG-9084 Reviewed-By: TrustMe
* | Avoid having to create temporary QPixmaps when binding to textureTom Cooksey2010-03-261-3/+3
| | | | | | | | Reviewed-By: TrustMe
* | Handle EGLSurfaces better, including more error detectionTom Cooksey2010-03-101-1/+1
|/ | | | | | | Note: This changes QX11PixmapData::gl_surface to a void* to enable build on 64-bit systems where EGLSurface is a pointer. Reviewed-By: TrustMe
* Fixed a GLX warning that occured with some Intel chipsets under X11.Trond Kjernåsen2010-02-151-2/+5
| | | | | | | | For some reason the Intel GL driver exports the texture_from_pixmap extension in the GLX server, but not in local clients. Task-number: related to QTBUG-5732 Reviewed-by: Kim
* Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.Trond Kjernåsen2010-01-201-1/+5
| | | | | Task-number: QTBUG-7476 Reviewed-by: Kim
* Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-80/+58
| | | | | | | | | | | | | | | | | | 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/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
* | Removed temporary QGLWidget created during QGLWidget/X11 initialization.Trond Kjernåsen2010-01-051-2/+67
| | | | | | | | | | | | ..and replace it with a much lighter, internal QGLTempContext. Reviewed-by: Samuel
* | Remove QGLShareRegister and transfer its functionality to QGLContextGroupRhys Weatherley2010-01-041-1/+1
|/ | | | | Task-number: QT-2600 Reviewed-by: Samuel
* Optimize our GL extension checks to avoid mallocs.Trond Kjernåsen2009-12-101-12/+12
| | | | | | | | | | 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
* Fixed querying of GLX extensions under X11.Trond Kjernåsen2009-11-161-13/+14
| | | | | | | | | | | We always queried the client for its GLX extensions and used them blindly, even though they might not be available in the server. Also fixed the extension string check itself. We used simple sub-string search, which could potentially break if one extension name is a sub-string of another. Task-number: QTBUG-5732 Reviewed-by: Kim
* 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
* Use glXGetProcAddress to resolve glx extensionsTom Cooksey2009-09-291-32/+60
| | | | | | | | | | | | On systems where the GL driver is pluggable (like Mesa), we have to use the glXGetProcAddressARB extension to resolve other function pointers as the symbols wont be in the GL library, but rather in a plugin loaded by the GL library. This fix basically makes texture-from-pixmap work on Mesa drivers like intel i915 & friends. Reviewed-by: Trond
* 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
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Cleanup of QGLPaintDevice before it goes inTom Cooksey2009-09-081-2/+0
| | | | | | | | | This is the last patch in the QGLPaintDevice series. Although previous patches have not been reviewed individually, Samuel's reviewed QGLPaintDevice API and all the changes as the code stands with this patch. Reviewed-by: Samuel
* Make QGLFramebufferObject work again using new QGLPaintDevice APITom Cooksey2009-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also refactors QGL2PaintEngineEx::ensureActive() and the logic which handles multiple paint engines rendering to the same QGLContext. In a nut-shell: * QGLPaintDevice::beginPaint() stores the currently bound FBO * QGLPaintDevice::ensureActiveTarget() makes sure that GL rendering will end up in the paint device (I.e. the right context is current and the right FBO is bound). If a different context or FBO was bound, it is _not_ remembered. * QGLPaintDevice::endPaint() restores whatever FBO was bound when beginPaint() was called. This logic allows interleaved painter rendering to multiple FBOs and contexts to work as expected. It also allows a stacked begin/end to work properly when it's mixed with native GL rendering (as far as current render target is concerened. GL state clobbering is obviously a different topic). QGLPaintDevice::context() also had to be made virtual as there's no good place to call setContext. This might be possible to change in the future though. Finally, to make this work, QGLFramebufferObjectPrivate had to be moved into it's own private header.
* Replace QGLDrawable with a new QGLPaintDeviceTom Cooksey2009-09-081-1/+2
| | | | | | | | | | | | | | | | | This patch adds a new abstract base class which inherits from QPaintDevice called QGLPaintDevice. This base class will contain everything the GL paint engines need to know about the surface they are drawing onto. As such, new surfaces can be targeted by the GL paint engines without having to modify QtOpenGL. This is very useful for plugins, specifically QGraphicsSystem plugins. To unify things a little, the GL paint engines will use the same QGLPaintDevice API to render into existing target surfaces (QGLWidget, QGLPixelBuffer & QGLFrameBufferObject). Ideally we'd make QGLPaintDevice a common ancestor for these surfaces, but obviously that wil break B/C. This patch only implements QGLWidget using the new interface. Rendering to other surfaces will be fixed in following patches.
* 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-2/+3
| | | | | | | | issues with flipped pixmaps on X11
* | make x11 compile...Gunnar Sletta2009-08-271-3/+3
| |
* | New variant of QGLContext::bindTexture that does not require mipmap generationGunnar Sletta2009-08-271-5/+7
| | | | | | | | | | | | | | and y-axis inversion and overall less conversion, making significantly faster for plain usecases Reviewed-by: Trond
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch 'texture_from_pixmap'Tom Cooksey2009-07-301-74/+125
|\ \
| * | Fix build on Solaris x86 with old Mesa glx headersTom Cooksey2009-07-291-5/+8
| | |
| * | Refactor texture_from_pixmap to not re-create the gl surface each bindTom Cooksey2009-07-291-73/+121
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Port of Qt to VxWorksRobert Griebl2009-07-291-0/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes Qt work on VxWorks 6.6+ in native (kernel) mode. * compiles with the WindRiver GNU toolchain (Linux only) * works with QWS (tested with the VNC driver only) * tested on PPC hardware and the x86 VxWorks simulator * no q3support, no phonon, no webkit * no QSharedMemory, no QSystemSemaphore, no QProcess * only one QApplication instance (flat address space) * filesystem support depends heavily on the quality of the native driver * QLibrary is just a dummy to make plugins work at all * qmake transparently creates VxWorks munching rules for static ctors * made auto-test cope with missing OS features A special note regarding the Q_FOREACH patch for dcc: when calling foreach(a,c) with c being a function returning a container, the compiler would generate 5 references to some labels (.LXXXX), which are not there (so the linker complains in the end). Seems like dcc doesn't really like the 'true ? 0 : <function call to get type>' statement Reviewed-By: Harald Fernengel
* | Disable Texture-From-Pixmap on everything other than LinuxTom Cooksey2009-07-281-1/+6
| |
* | Fix build on SolarisTom Cooksey2009-07-271-2/+5
| | | | | | | | | | Solaris seems to define glXReleaseTexImageEXT rather than let it be resolved as a function pointer.
* | Really, really fix HPUX this timeTom Cooksey2009-07-271-1/+1
| | | | | | | | | | | | The conditionals were the wrong way round. Reviewed-By: Samuel
* | Fix build on HPUXTom Cooksey2009-07-241-0/+2
| | | | | | | | Reviewed-By: Trustme
* | Add texture_from_pixmap defines for systems without themTom Cooksey2009-07-231-0/+19
| | | | | | | | | | | | | | This fixes the build on older Solaris machines which don't have the GLX_EXT_texture_from_pixmap defines in glxext.h. Reviewed-By: Trustme
* | Plug a texture leak when deleting QPixmaps without a current contextTom Cooksey2009-07-221-13/+1
| | | | | | | | | | | | | | | | | | ~QGLTexture wouldn't make the texture's context current if the current context was zero, meaning the texture would leak. This also means deleteBoundPixmap doesn't need to make the context currnet anymore (as it's only called from ~QGLTexture). Reviewed-By: Kim
* | Use texture_from_pixmap on X11 & avoid copiesTom Cooksey2009-07-221-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | 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