summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-174-9/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * Workaround for ATI driver bug when using QGraphicsEffect with GL.Kim Motoyoshi Kalland2010-05-122-5/+6
| | | | | | | | | | | | | | | | | | If you forward declare a shader function which takes a sampler as argument, the shader program will fail to link on ATI cards under Windows. Task-number: QTBUG-10510 Reviewed-by: Trond
| * Fixed QGLPixmapDropShadowFilter on Nvidia hardware.Trond Kjernaasen2010-05-111-4/+5
| | | | | | | | | | | | | | | | There seems to be a driver bug that causes glTexSubImage2D() to not align data correctly when uploading a GL_ALPHA texture. Task-number: related to QTBUG-10510 Reviewed-by: Samuel
| * Fixed an issue with pixmaps not being released correctly in the GL 1 engine.Trond Kjernåsen2010-05-101-0/+5
| | | | | | | | | | | | | | | | | | | | When a pixmap is bound using the texture_from_pixmap extension we retain a reference to the pixmap to stop us destroying it before swapBuffers() or glFlush() is called. The references were not cleared out correctly in the GL 1 engine. Task-number: QTBUG-10529 Reviewed-by: Samuel
* | Limit the lower glyph texture cache size to 16x16 in GL.Trond Kjernåsen2010-05-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | The SGX chip has a limitation regarding FBOs in that it doesn't support FBO sizes that are POT and less than 16 pixels in width/height. Since the FBO we use in the GL glyph cache always mirrors the size of the texture itself, we limit that instead to avoid creating invalid FBOs. Task-number: QTBUG-10645 Reviewed-by: Gunnar
* | Added workarounds for two MBX/SGX specific GL ES bugs/problems.Trond Kjernåsen2010-05-147-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The workaround flags are put into the platform independent section for now, since there might be a general need for these as we expand our GL and GL ES usage. The workaround_needsFullClearOnEveryFrame flag covers the case where you get a performance penalty on PowerVR hw if all rendering buffers are not cleared. The workaround_brokenFBOReadBack flag covers the case where copying pixels from a texture (e.g. via glCopyTexSubImage2d()) bound in an FBO doesn't work. Task-number: QTBUG-10670 Reviewed-by: Gunnar
* | Compile fix on Windows.Kim Motoyoshi Kalland2010-05-121-1/+1
| | | | | | | | Reviewed-by: Trond
* | Remove an unnecessary assert.Trond Kjernåsen2010-05-121-2/+1
| | | | | | | | Reviewed-by: Kim
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-113-59/+105
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) Stabilize tst_QColumnView::parentCurrentIndex Really fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fix typos in Elastic Nodes example documentation. Made paint engine texture drawing work in GL ES 2 and updated docs. Opt out of visual-config size checks with extension Fix off-by-one in text layouts and widget size hints on Mac Stabilize tst_QDockWidget::taskQTBUG_9758_undockedGeometry Mark QFileDialog::Options as a Q_FLAGS fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fixed scrolling bugs in widget graphics effect backend. Fixed source pixmap bug in widget graphics effect backend. Fix crash with stylesheet if widget change style in the changeEvent Fix textdrawing under GL on N900. Fixed bug in QIODevice::read after first reading 0 bytes. Fix auto-test failure on Mac/Linux/QWS. Some EGL implementations does not return a EGLNativeDisplayType Fixed the sizing of the dock area with fixed size dock widgets QSortFilterProxyModel: Warning or assert failure Performance issue with QGraphicsItem::ItemClipsChildrenToShape. Fixes crash in QGraphicsItem::mouseMove for untransformable items. ...
| * | Made paint engine texture drawing work in GL ES 2 and updated docs.Samuel Rødal2010-05-101-27/+46
| | | | | | | | | | | | | | | | | | | | | | | | Now QGLWidget::drawTexture() can be used on OpenGL ES 2.0 when there's an active painter. Task-number: QTBUG-10420 Reviewed-by: Trond
| * | Fix textdrawing under GL on N900.Gunnar Sletta2010-05-072-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver in the N900 doesn't support glCopyTexSubImage or glReadPixels for FBO's that have a GL_ALPHA or POT color attachment. The ifdef'ed code in resize() was a previous attempt to make this work which didn't. We could have changed the texture to be GL_RGBA and changed the texture size to be NPOT, but that would have wasted precious GPU memory and would have been slower, so we waste a bit of system memory instead, by having a QImage copy along with the texture. Reviewed-by: Eskil Reviewed-by: Trond
* | | Avoid many unnecessary allocations, so so that paint engines attached to pixmapsWarwick Allison2010-05-076-7/+19
|/ / | | | | | | | | | | | | | | | | do not consume excessive amounts of memory, and so can still be reasonably kept cached with the pixmap. Saves 8K for every pixmaps drawn to on raster paint engine. Saves about 2K for other graphicssystems. Task-number: QTBUG-10215 Reviewed-by: Gunnar
* | Fixed OpenGL version flags for versions > 3.2.Kim Motoyoshi Kalland2010-05-031-1/+14
| | | | | | | | | | | | | | If the system supports an OpenGL version higher than what is recognized by Qt, all the version flags up to 3.2 should be set. Reviewed-by: Trond
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-025-19/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix project file generation for MSVC 2010 Fix wrong translation and clip for the raster paint-engine on Mac Return the correct library name in qt_gl_library_name for GLES* qmake: remove useless evaluation of variables from VS project generators Fix QT_NO_LIBRARY Documentation for the Elastic Nodes example. qmake: fix duplicate linker options in VS project files Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent. qmake: fix duplicate compiler options in VS project files Documentation for the Drag and Drop Robot example. Fix crash in styles example when running with opengl graphicssystem Fixed the sizehint for cols/rows in qtableview QUrl: parsing of host name with an undercore. Null pointer check Revert "Try to use multisampled opengl graphicssystem on all platforms" A small mistake when comparing the flag. Add unit tests covering most of QVector's API. Fix crash when CoreText fails to shape text for us Fix crash when using opengl graphicssystem on desktop Revert "Revert "Implement heightForWidth support for QTabWidget and QStackedLayout.""
| * | Return the correct library name in qt_gl_library_name for GLES*Tom Cooksey2010-04-301-4/+10
| | | | | | | | | | | | Reviewed-By: Gunnar
| * | Fix crash in styles example when running with opengl graphicssystemTom Cooksey2010-04-281-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing text using glyphs, the shader manager will select the "MaskFragmentShader" which requires a varying called "textureCoords" which is used to sample the glyph from the glyph texture. That's fine, except when you try to use one of the pattern brushes or a texture brush, because the src pixel fragment shader snippets for those brushes also sample from a texture (the brush texture) and name the verying they use "textureCoords" too. This led to textureCoords being defined twice, which in turn caused a shader compile error which then casued the seg-fault. This patch simply renames the varying used to pass the coordinates for the brush texture so it doesn't conflict. Reviewed-By: Kim Task-Number: QTBUG-9522
| * | Revert "Try to use multisampled opengl graphicssystem on all platforms"Eskil Abrahamsen Blomfeldt2010-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit 5f63f95def838ce72af99dc697ecce092fe7eb69. Fixes GL graphics system on Windows. With the patch, windows would pop up as completely empty.
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-273-6/+11
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Add unit tests covering most of QVector's API. Fix crash when CoreText fails to shape text for us Fix crash when using opengl graphicssystem on desktop
| | * | Fix crash when using opengl graphicssystem on desktopTom Cooksey2010-04-273-6/+11
| | | | | | | | | | | | | | | | | | | | Reviewed-By: Eskil Task-number: QTBUG-10225
* | | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-291-2/+10
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All EGL-related changes from 4.6 were discarded. Conflicts: src/gui/egl/egl.pri src/gui/egl/qegl.cpp src/gui/egl/qegl_p.h src/gui/egl/qegl_stub.cpp src/gui/egl/qeglproperties_p.h src/gui/egl/qeglproperties_stub.cpp src/gui/gui.pro src/multimedia/multimedia/audio/qaudioinput_win32_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * | Fixed QGLWidget::grabFrameBuffer() to honor the 'withAlpha' value.Trond Kjernåsen2010-04-271-2/+10
| | | | | | | | | | | | | | | Task-number: QTBUG-7545 Reviewed-by: Kim
* | | Correctly inherit extension propertiesAaron Kennedy2010-04-271-1/+1
| |/ |/| | | | | Correct a typo that breaks extension properties in some cases.
* | Remove stray qDebugTom Cooksey2010-04-261-1/+0
| | | | | | | | Reviewed-By: TrustMe
* | Don't leak objects if QX11GLSharedContexts is instanciated twiceTom Cooksey2010-04-261-3/+6
| | | | | | | | | | | | | | | | If two threads call the Q_GLOBAL_STATIC accessor at the same time, two QX11GLSharedContexts objects can be created with one being destroyed. Reviewed-By: TrustMe
* | Enable QX11GLWindowSurface using "-graphicssystem x11gl" optionTom Cooksey2010-04-264-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the OpenGL graphics system is in X11GL mode, it will use the QX11GLWindowSurface for all widgets except QGraphicsViews with the FullViewportUpdate update mode set, where it will use the regular QGLWindowSurface, as this is probabbly faster. QX11GLWindowSurface differs from QGLWindowSurface because it allows accelerated scrolling and partial updates, while still being using opengl to do rendering. Task-number: QT-280 Task-number: QT-2625 Reviewed-By: Trond
* | Force full-screen updates for QGLWindowSurfaceTom Cooksey2010-04-261-1/+6
| | | | | | | | | | | | | | | | | | If the back buffer is destroyed when swap buffers is called, we must tell the backing store any update needs to invalidate the entire window surface, so everything gets re-drawn. Task-number: QTBUG-9978 Reviewed-By: Trond
* | Try to use multisampled opengl graphicssystem on all platformsTom Cooksey2010-04-221-0/+1
| | | | | | | | Reviewed-By: Samuel
* | Make sure recreateEglSurface creates a surface if there isn't oneTom Cooksey2010-04-223-14/+14
| | | | | | | | | | | | | | | | If QGLWidgetPrivate::recreateEglSurface is called after a surface has been deleted, it should always create a new surface and ignore the fact that the window ID may not have changed. Reviewed-By: Trond
* | QX11GL: Implement QX11GLWindowSurface::grabWidgetTom Cooksey2010-04-222-0/+47
| | | | | | | | | | | | Now all the window surface autotests pass. Reviewed-By: TrustMe
* | QX11GL: Cleanup the window surface & remove some synchronisationTom Cooksey2010-04-221-51/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were calling all manor of synchronisation calls to make sure there were no issues. These have been sanitised to just use eglWaitClient and eglWaitNative and only in places which need it. There is still a bug where small updates will sometimes result in small horizontal streaks. However, this has been confirmed to be a cache flush bug in the X server 2D driver. The driver bug is tracked in Meamo bugzilla as bug 164941. Hopefully it will be fixed soon. Reviewed-By: TrustMe
* | QX11GL: Move the shared context ownership into a seperate classTom Cooksey2010-04-223-101/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves initialisation into a new QX11GLSharedContexts class which is created as a Q_GLOBAL_STATIC. This class owns both the RGB/ARGB EGL contexts and the QGLContext used for sharing. Finally, the shared QGLContext is make a valid context wrapping the RGB EGL context and a small pixmap surface. This makes the shared QGLContext the QGLContextGroup master, so when it is deleted, it can be made current to delete the GL resources. Among other benefits, this patch stops apps seg-faulting when they gracefully quit. Reviewed-By: TrustMe
* | QX11GL: Don't do glFinish in endPaintTom Cooksey2010-04-222-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to defer the synchronisation to just before the point it is actually needed. When used as a window surface, this is in flush and scroll. If the QX11GLPixmapData is used as the defaut backend for QPixmaps, it might need to be put back into endPaint. However, the GL driver will hopefully make sure rendering to the pixmap is complete before binding it as a texture via texture-from-pixmap. Also, it's probably better to use eglWaitClient rather than glFinish for synchronisation as it is potentially slightly more optimal. Reviewed-By: TrustMe
* | Implement QGLPaintDevice::metric()Tom Cooksey2010-04-222-0/+17
| | | | | | | | Reviewed-By: TrustMe
* | Remove dead code left after a merge conflict resolutionTom Cooksey2010-04-222-22/+0
| | | | | | | | Reviewed-By: Kim
* | QX11GL: Fix bug with pixmaps drawn on multiple top-levelsTom Cooksey2010-04-191-2/+17
| | | | | | | | Reviewed-By: TrustMe
* | Use QGLContextPrivate to track attribarray enabled state.Gunnar Sletta2010-04-191-3/+3
| | | | | | | | | | Reviewed-by: Trond Reviewed-by: Tom
* | Don't resolve geometry shaders every time...Gunnar Sletta2010-04-191-5/+6
| | | | | | | | | | | | | | This was a huge extra cost in all QPainter::begin's on GL target surfaces Reviewed-by: Rhys Weatherley
* | Set EGL_SWAP_BEHAVIOR to EGL_BUFFER_PRESERVED for regular QWidgetsTom Cooksey2010-04-161-0/+4
| | | | | | | | | | | | | | | | | | 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-162-3/+3
| | | | | | | | | | | | This should make stubbing out these APIs slightly easier. Reviewed-By: TrustMe
* | Wrap EGL image function pointers and move into QEgl namespaceTom Cooksey2010-04-151-6/+2
| | | | | | | | | | | | | | QtGui exporting a symbol called eglCreateImageKHR seems a pretty silly idea. Much better to have them in the QEgl namespace. Reviewed-By: Iain
* | Move nativePaintingActive flag to GL2 engine's privateTom Cooksey2010-04-142-9/+10
| | | | | | | | Reviewed-By: Samuel
* | More adjustments to QTBUG-6800Carolina Gomes2010-04-143-13/+11
| | | | | | | | | | Merge-request: 2344 Reviewed-by: Tom Cooksey
* | Adjustments to QTBUG-6800 patch.Carolina Gomes2010-04-141-8/+6
| | | | | | | | | | Merge-request: 2344 Reviewed-by: Tom Cooksey
* | QTBUG-6800 patch included, but only for OpenGL 2.0Carolina Gomes2010-04-143-1/+39
| | | | | | | | | | Merge-request: 2344 Reviewed-by: Tom Cooksey
* | Support building with desktop OpenGL managed via EGLTom Cooksey2010-04-146-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-126-7/+44
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (44 commits) QSlider and StyleSheet: fix one pixel error while drawing the SliderAddPage accelerate QWindowsPipeWriter for bigger chunks of data Fix antialiasing with transformed text in OpenGL2 paint engine Fix flattening of largely scaled, thin, dashed beziers. Increased the precision used to flatten beziers Fix QT_NO_MOVIE Fix compile error with QT_NO_ACTION in QtGui Fix QT_NO_COMPLETER Fix QT_NO_FSCOMPLETER Fix QT_NO_FILESYSTEMMODEL Build fix Safeguard ourselves against corrupt registry values for cleartype gamma fix cetest build properly qdrawhelper: optimize the fetch transformed bilinear functions Compile fix for WinCE Make sure the selectionChanged signal is not called too much Implement heightForWidth support for QTabWidget and QStackedLayout. Fix the doc for QFrame::frameStyle Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2D Add runtime check for GLX >= 1.3 before using glXCreatePixmap ...
| * \ Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7Eskil Abrahamsen Blomfeldt2010-04-125-12/+50
| |\ \
| | * | Fix flattening of largely scaled, thin, dashed beziers.Gunnar Sletta2010-04-121-4/+24
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Samuel Task: http://bugreports.qt.nokia.com/browse/QTBUG-9218
| | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-103-2/+13
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (27 commits) Fix the doc for QFrame::frameStyle Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2D Add runtime check for GLX >= 1.3 before using glXCreatePixmap QDrawHelper: Reduce code duplications Improve matching X11 VisualIDs to EGL configs Remove obsolete function set_winapp_name() Speedup fetchTransformedBilinear in the fast_matrix case Allow y-interted pixmaps for brushes in GL2 paint engine Build fix for mingw Fix build with mingw (64 bit) Make configure.exe compatible with mingw 64 Adjust indentation e-Ink support cleanup Tweak the display update IOCTL calls Support 8-Track e-Ink devices Get stride from LinuxFB instead of calculating it ourselves. Use DIR_SEPARATOR when setting up variables for RCC and UIC in features. Fixed bug in QPainterPath::intersected(). Fix compile error with QT_NO_ANIMATION O(n^2) to O(n) optimization in QTreeWidget::selectedItems() ...
| | | * | Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2DTom Cooksey2010-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-8546 Reviewed-By: TrustMe