summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'origin/4.5'Oswald Buddenhagen2009-06-231-7/+13
|\ | | | | | | | | Conflicts: src/sql/drivers/psql/qsql_psql.cpp
| * Fixed drawTiledPixmap() for the GL paint engine.Trond Kjernåsen2009-06-221-7/+13
| | | | | | | | | | | | | | The offset was completely ignored for the GL 1 paint engine. Task-number: 256608 Reviewed-by: Samuel
* | Integrate the OpenVG graphics system into Qt 4.6Rhys Weatherley2009-06-2211-1421/+72
| | | | | | | | | | This change also moves the EGL support classes from QtOpenGL to QtGui so they can be shared between OpenGL and OpenVG.
* | Use QTransform more efficiently.Bjørn Erik Nilsen2009-06-182-8/+4
| | | | | | | | Reviewed-by: Samuel
* | Prevented unnecessary depth clip updates in OpenGL paint engine.Samuel Rødal2009-06-182-1/+10
| | | | | | | | | | | | | | | | | | Keep track of whether the depth clip has actually changed between states, so that when QPainter::restore() is called we don't call the potentially expensive updateDepthClip() function when not needed. Task-number: 254658 Reviewed-by: Trond
* | Added save state detection in OpenGL engine to avoid dirtying state.Samuel Rødal2009-06-181-0/+13
| | | | | | | | | | | | | | | | When setState() is called right after createState() it means that none of the OpenGL state needs changing, so we can simply return. Task-number: 254658 Reviewed-by: Trond
* | Speed up QPixmap::width(), height(), isNull() and depth().Andreas Aardal Hanssen2009-06-172-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the w, h, d variables to QPixmapData and introduces is_null to keep track of nullness. This is possible only because QPixmapData is internal API; otherwise we'd have to be smarter. The optimization makes the QPixmap::width() function take 7 instructions, down from 34 before. For the calculator demo in the declarative ui branch this reduces a block of 750000 instructions (out of 30000000) to around 100000-150000 instructions. Tested on Windows, Linux, Mac. Raster, X11 and OpenGL paint engines. Have not tested the DirectFB engine. Reviewed-by: Trond
* | Prevented infinite recursion in GL graphics system.Samuel Rødal2009-06-173-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | If creating a QGLWidget triggers the creation of a QPixmap then we might end up in an infinite recursion due to QPixmap trying to access qt_gl_share_widget(). This can happen via setWindowIcon for example. Adding an initializing flag to QGLGlobalShareWidget and preventing QGLFramebufferObject::hasOpenGLFramebufferObjects() and ::hasOpenGLFramebufferBlit() from creating a QGLWidget every time they are called with no active GL context. Reviewed-by: Trond
* | Update license headers in files that are new in 4.6.Jason McDonald2009-06-175-10/+10
| | | | | | | | Reviewed-by: Trust Me
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-1654-108/+108
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-1659-118/+118
| | | | | | | | Reviewed-by: Trust Me
| * Fixed a crash in the GL 2 paintengine when drawing text.Trond Kjernåsen2009-05-291-0/+3
| | | | | | | | | | | | | | | | The new glyph cache may return null images for e.g. space characters. Task-number: 253468 Reviewed-by: Samuel BT: yes
* | Disabled the use of VERSION_1_3 GLX functions on HPUX.Carlos Manuel Duclos Vergara2009-06-151-4/+8
| | | | | | | | | | | | This is a compilation fix reported by pulse agent on HPUXi. Reviewed-by: Samuel
* | Enabled switching multisampling on/off in GL2 engine on desktop.Samuel Rødal2009-06-151-0/+14
| | | | | | | | | | | | | | Switching multisampling is not supported in GLES 2.0, but it's supported in GL 2.0 so we should do it on desktop at least. Reviewed-by: Trond
* | Re-enabled GL pixmap backend and window surface to work without GL2.Samuel Rødal2009-06-153-1/+15
| | | | | | | | | | | | | | GL window surface and GL pixmap backend should work with old GL engine as well, though not supported to the same degree. Reviewed-by: Trond
* | Fixed bitmap drawing in GL 2 engine when not using GL pixmap backend.Samuel Rødal2009-06-122-3/+5
| | | | | | | | | | | | | | | | | | QPixmap shouldn't return true in hasAlphaChannel() for bitmaps, instead the paint engine should check whether the pixmap is a bitmap or not. In addition, QBrush::isOpaque() returned true for bitmap brushes, which is wrong according to the documentation. Reviewed-by: Trond
* | Fixed off-by-one color bug in GL 2 paint engine.Samuel Rødal2009-06-121-5/+5
| | | | | | | | | | Calling premultiplyColor() with a red channel of 255, alpha channel of 255, and opacity 1 would result in a color with red channel of 254.
* | Fixed incorrect rendering of bitmap/pattern brushes in GL 2 engine.Samuel Rødal2009-06-125-8/+56
| | | | | | | | | | | | | | | | | | The pen color should be used when drawPixmap is called with a bitmap, and the brush color should be used for texture patterns that are bitmaps. Task-number: 245802 Reviewed-by: Trond
* | Made QPixmap autotest pass with -graphicssystem openglSamuel Rødal2009-06-124-15/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The window surface has been modified to track widget deletion to make sure it doesn't try to access the widget's context data after deletion. QGLPixmapData now also uses GL_RGB instead of GL_RGBA when appropriate, and hasAlphaChannel() has been modified in view of this. A number of other issues have been fixed in QGLPixmapData, and the autotest has been modified to use a more lenient pixmap compare function due to off-by-one pixel errors here and there. Reviewed-by: Trond
* | Prevented pixmap FBOs from growing too big.Samuel Rødal2009-06-091-0/+5
| | | | | | | | | | | | | | | | If we're painting to very wide and then very tall pixmaps we don't want the FBO to grow to max_width * max_height, instead we should recreate the FBO if it grows too large compared to what's being painted. Reviewed-by: Trond
* | Optimized stencil buffer clearing in GL 2 paint engine.Samuel Rødal2009-06-092-42/+9
| | | | | | | | | | | | | | | | Based on Zack's patch, 17e1bca1ce366395f8331e16aa96b7176ca1abac. Instead of manually clearing the stencil buffer after drawing we simply do the clearing and drawing in one go. Reviewed-by: Trond
* | Resolved FBO extensions as well when resolving GL 2 extensions.Samuel Rødal2009-06-091-0/+3
| | | | | | | | | | The new GL 2 text drawing requries the FBO function pointers to be resolved.
* | Improved clipping in GL2 paint engine.Samuel Rødal2009-06-094-170/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the stencil method to draw clip paths and regions to the Z-buffer instead of using glClear / glScissor. Using different depth values for the various clip parts also makes restore() very cheap when only IntersectClip is used. As an additional bonus this patch gives antialiased clip in the GL 2 paint engine. Task-number: 254658 Reviewed-by: Trond
* | Another breakage in 1bbe23c5 - move qpaintengineex_opengl2_p.h include upRhys Weatherley2009-06-091-3/+6
| | | | | | | | | | | | | | | | Moving qpaintengineex_opengl2_p.h down caused it to come after an include of <X11/Xlib.h>, which causes problems on some platforms. Move it back up again. Reviewed-by: trustme
* | Fix build breakage from 1bbe23c5 - endif in the wrong placeRhys Weatherley2009-06-091-1/+1
| | | | | | | | Reviewed-by: trustme
* | Make OpenGL/ES 1.1 work again for Qt/EmbeddedRhys Weatherley2009-06-094-4/+21
| | | | | | | | Reviewed-by: trustme
* | Protect EGL property names that only exist in some versions with #ifdefsRhys Weatherley2009-06-091-1/+9
| | | | | | | | Reviewed-by: trustme
* | Compile with Sun CC 5.5.jasplin2009-06-051-1/+1
| | | | | | | | | | | | | | | | An alternative solution is to swap the order of -I../../include and -I../../include/QtOpenGL when compiling the opengl module. Reviewed-by: TrustMe
* | All of Qt's own code compiles with -pedantic now (but pcre and webkit don't ↵David Faure2009-06-045-13/+13
| | | | | | | | | | | | | | seem fixable easily) Merge-request: 594 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Fix compilation with gcc-4.3.3 (due to std::system)David Faure2009-06-041-0/+1
| | | | | | | | | | Merge-request: 594 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Code cleanup - use constructor initializers in shader classes.Rhys Weatherley2009-06-041-14/+14
| | | | | | | | | | Task-number: QT-80 Reviewed-by: Ian Walters
* | Improvements to shader API in response to API reviewRhys Weatherley2009-06-043-94/+83
| | | | | | | | | | Task-number: QT-80 Reviewed-by: Ian Walters
* | Implemented QGLTextureGlyphCache to avoid wasting glyph cache memory.Samuel Rødal2009-06-035-29/+212
| | | | | | | | | | | | | | | | | | Now there's only a copy of the texture glyph cache in graphics memory, avoiding the system memory copy that we used earlier. In addition the texture will use the GL_ALPHA texture format when possible, making it consume less graphics memory as well. Reviewed-by: Tom
* | Made GL2 engine default for QGLWidget, and added GL2 sync() functionSamuel Rødal2009-05-293-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | To allow mixing QPainter and raw OpenGL commands we need to have some way for the user to say that's he's about to use raw OpenGL so that we are free to do buffering optimizations in the paint engines and use either GL1 or GL2 paint engine. As there's already a syncState() function in QPaintEngine we've reused this and added QPaintEngineEx::sync() which takes care of syncing/flushing the paint engine. Reviewed-by: Trond
* | Added check in GL pixmap backend to fall back to raster if FBO fails.Samuel Rødal2009-05-291-32/+37
| |
* | Fixed bug in GL graphics system when painting to pixmaps.Samuel Rødal2009-05-281-0/+3
| | | | | | | | | | Make sure the correct texture unit is active when copying from the pixmap to the FBO in begin().
* | Fixed incorrect handling of composition modes in GL2 paint engine.Samuel Rødal2009-05-282-22/+11
| | | | | | | | | | | | | | | | Even if the source pixels are opaque we have to enable blending for the non-trivial composition modes. Some of the composition modes are independent of source alpha and depend on destination alpha for example. Reviewed-by: Tom
* | Compile fix with namespaces.hjk2009-05-287-3/+28
| |
* | Make WA_TranslucentBackground work for QGLWidgets on X11/EGLTom Cooksey2009-05-281-11/+15
| | | | | | | | Reviewed-By: TrustMe
* | Print the error string when surface creation failsTom Cooksey2009-05-281-1/+4
| | | | | | | | Reviewed-By: TrustMe
* | Fix build on X11/OpenGL ES 2.0Tom Cooksey2009-05-281-1/+1
| | | | | | | | Reviewed-By: TrustMe
* | Moved QGL2PaintEngineExPrivate into GL2 paint engine header file.Samuel Rødal2009-05-284-93/+96
| | | | | | | | Reviewed-by: Tom
* | improved string operations all over the placeThierry Bastian2009-05-285-31/+30
| | | | | | | | | | used character operations whenever possible better usage of QLatin1String
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-05-274-46/+51
|\ \ | |/ | | | | | | Conflicts: tests/auto/qtreeview/tst_qtreeview.cpp
| * qdoc: Added some missing qdoc comments.Martin Smith2009-05-254-46/+51
| | | | | | | | Task-number: 252491
* | Make QGLWidgets have the same background colour as QWidgetsTom Cooksey2009-05-274-17/+22
| | | | | | | | | | | | | | | | QWidgets are filled with Qt::transparent when WA_TranslucentBackground is set, reguardless of what their background colour has been set to. This patch makes QGLWidgets behave the same way. Reviewed-By: Samuel Rødal
* | Make WA_TranslucentBackground work on QGLWidget for X11Tom Cooksey2009-05-274-6/+124
| | | | | | | | | | | | | | This patch enables QGLWidget's to have an ARGB visual on X11, alowing GL rendering on semi-transparent windows. Reviewed-By: Trond
* | Avoided expensive image upload for GL pixmap backend for QPixmap::fill.Samuel Rødal2009-05-274-11/+59
| | | | | | | | | | | | | | In the fill case we can simply set a flag saying the pixmap needs to be filled, and then when painting on the pixmap we start by filling the background using glClear via the existing QGLDrawable::autoFillBackground interface.
* | Fixed bugs in GL2 paint engine when several engines are active.Samuel Rødal2009-05-274-33/+41
| | | | | | | | | | | | | | Make sure makeCurrent() on a window surface unbinds any active FBO, and simplify ensureActive() code in GL2 paint engine a bit. We don't need the last_engine pointer as ensureActive() will take care of ensuring the correct engine is active anway.
* | Use GLInt and not uint because of Apple's old header swapMartin Smith2009-05-271-1/+1
| |