summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Reduce double-copying of textures when flipping upside downRhys Weatherley2009-12-021-7/+15
| | | | | | | | | | | bindTexture() flipped images in-place, to reduce data copying. But there is one case where the in-place is worse: when the QImage is not detached. In that case, the flip was copying the entire image and then flipping the lines, effectively processing the contents twice. The new version uses mirrored() to reduce the overhead for non-detached images. Reviewed-by: Samuel
* Added caching of vectorpaths to the GL paint engine.Gunnar Sletta2009-12-013-5/+116
| | | | | | | | | | | | | | | The first time a path is drawn we call makeCachable on the path, which means that if it is drawn again, we start caching it. This is a bit of a trick to avoid caching paths that are drawn once and discared while at the same time cache paths that are reused automatically. The GL engine owns the vertex information and is responsible for cleaning it up. If the vectorpath is destroyed first, it will call the cleanup function. if the engine dies first, we still require some hooks to clean up the cache in the path. More to come. When VBO's are used, these will be a leaked if the path is destroyed after the engine. Reviewed-by: Samuel
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-019-209/+277
|\
| * Fixed square root of negative number in drawTextItem().Kim Motoyoshi Kalland2009-11-301-1/+2
| | | | | | | | | | | | | | | | | | Fixed potential bug where you could end up taking the square root of a negative number in drawTextItem() in the raster and OpenGL paint engines. Task-number: QTBUG-6327 Reviewed-by: Trond
| * Fixed the GL2 engine stroker to handle Qt::SvgMiterJoin.Kim Motoyoshi Kalland2009-11-301-0/+1
| | | | | | | | Reviewed-by: Trond
| * Moved functions from .h to .cpp in the GL2 engine stroker.Kim Motoyoshi Kalland2009-11-262-219/+208
| | | | | | | | | | | | | | Some of the functions had become too long to be inlined in my opinion. Reviewed-by: Trond
| * Fixed miter joins generated by the GL2 engine stroker.Kim Motoyoshi Kalland2009-11-261-17/+36
| | | | | | | | | | | | | | | | | | | | The stroker generated two points for each miter join, one on the convex side of the join, and one on the concave side. For sharp joins between curved segments, the point on the concave side could end up poking out of the stroke. This was fixed by generating one point on the convex side only. Reviewed-by: Trond
| * Fixed round joins generated by the GL2 engine stroker.Kim Motoyoshi Kalland2009-11-251-49/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | Complete circles were generated at every round join, so if the join were close to a flat cap, the circle would extend beyond the flat cap. This was fixed by generating arcs rather than complete circles. Likewise, round caps are now semi-circles instead of full circles. I also removed some unnecessary calculations when generating square caps. Reviewed-by: Trond
| * Fixed subpixel text antialiasing with the GL2 engine on ATI.Kim Motoyoshi Kalland2009-11-251-4/+1
| | | | | | | | | | | | Use subpixel antialiasing even if the there is an alpha channel. Reviewed-by: Trond
| * Ran the script utils/normalizeOlivier Goffart2009-11-183-13/+13
| | | | | | | | Over src/ tools/ examples/ and demos/
| * Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-174-64/+89
| |\
| | * 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
| | * Fixed extension checks and usage of the GL 2 engine on old X11 systems.Trond Kjernåsen2009-11-162-25/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression from 4.5, where exporting a GL capable display from an old X11 HP/Sun workstation to a modern Linux machine causes crashes and lots of X11 error output. Just relying on the client GL version number is not enough under X11, since the server might only support GL 1.1 with non or very few extensions. Also, the extension checks worked a bit randomly since it checked for sub-strings which might or might not occur within one or more full extension names. Task-number: QTBUG-5853 Reviewed-by: Kim
| * | Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-171-0/+1
| |\ \
| | * | Fix memory leak.Morten Johan Sørvig2009-11-121-0/+1
| | | | | | | | | | | | Revby: Gunnar
* | | | Don't spend time on adding center point for convex paths, saves a few cycles.Gunnar Sletta2009-11-251-2/+2
| | | | | | | | | | | | | | | | Reviewed-by: Samuel
* | | | Replaced QVector in GL2 vertex array with QDataBuffer to reduce mallocsGunnar Sletta2009-11-254-17/+19
| | | | | | | | | | | | | | | | Reviewed-by: Tom Cooksey
* | | | Optimized the bezier flattening a bitGunnar Sletta2009-11-252-40/+17
| |_|/ |/| | | | | | | | | | | | | | Testcase with rounded rects went from 55 -> 62 FPS for 1000 random rects Reviewed-By: Tom Cooksey
* | | Fix context sharing in QGLPixelBuffer for EGLRhys Weatherley2009-11-151-26/+39
|/ / | | | | | | Reviewed-by: Sarah Smith
* | Make isSharing() reset to false when context no longer sharingRhys Weatherley2009-11-152-1/+2
| | | | | | | | | | | | | | | | | | | | The documentation for QGLContext::isSharing() indicates that the function returns true only when the context is sharing. However, previously the sharing flag would stay on if the context was created as sharing but is no longer sharing. Task-number: QTBUG-5578 Reviewed-by: Sarah Smith
* | Fixed stroking of cosmetic dashed pens with the GL2 paint engine.Kim Motoyoshi Kalland2009-11-131-6/+3
| | | | | | | | | | | | | | | | Also fixed square caps which in some cases were extruded in the wrong direction. Task-number: QTBUG-5736 Reviewed-by: Trond
* | Fixed stroking of discontinuous paths with the GL2 engine.Kim Motoyoshi Kalland2009-11-132-4/+3
| | | | | | | | | | | | | | | | | | | | Since the stroke is rendered as a triangle strip, zero area triangles must be inserted in order to have gaps in the stroke. This is achieved by duplicating vertices before and after each gap. It was already done for open subpaths. This commit fixes gaps between closed subpaths. Task-number: QTBUG-5736 Reviewed-by: Gunnar
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-136-32/+32
|\ \ | |/ | | | | | | Conflicts: dist/changes-4.6.0
| * Improvements to graphics effects API after review round.Samuel Rødal2009-11-103-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
| * API review: Rename numRects() -> rectCount()Marius Storm-Olsen2009-11-091-1/+1
| | | | | | | | | | | | | | QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
| * API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-062-2/+2
| | | | | | | | | | | | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* | Fixed drop shadows for opengl graphics systemGunnar Sletta2009-11-101-1/+1
| | | | | | | | Reviewed-by: Samuel
* | Mark both the new and original EGL contexts as sharingRhys Weatherley2009-11-093-0/+6
| | | | | | | | | | | | | | 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-093-0/+3
|/ | | | | | | | 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
* Fix fuzzy aliased rendering on GLES2Tom Cooksey2009-11-062-2/+13
| | | | | | | | | | The GL2 paint engine adds a (0.49,0.49) pixel offset when doing aliased rendering. But this assumed if it was doing aliased rendering then multisampling was disabled. On GLES, multisampling is always enabled if the surface has it enabled. So on GLES, we never add the offset if the surface is multisampled. Reviewed-By: Gunnar
* Fixed bad joins in the new stroker... Normal generation was broken.gunnar2009-11-051-4/+2
| | | | Reviewed-by: Trustme
* Use fallback stroker for cosmetic strokes with asymetric transformsGunnar Sletta2009-11-051-0/+8
| | | | Reviewed-by: Samuel
* Fix docs for QGLFramebufferObject & add warnings in bind/releaseTom Cooksey2009-11-051-7/+16
| | | | | | | Warnings are for binding/releasing when the current context isn't in the same context group as the FBO was created in. Reviewed-By: Trond
* Remove unnessisary QGLFBOGLPaintDevice re-implementationsTom Cooksey2009-11-052-33/+0
| | | | | | | Now QGLFBO doesn't do stacking, QGLPaintDevice's base implementation is ok to use. Reviewed-By: Trond
* Removed the FBO stacking behaviour and the test attached to it.Trond Kjernåsen2009-11-052-28/+9
| | | | | | | Having this behaviour in QGLFrameBufferObject complicates alot of things and isn't really necessary. Reviewed-by: Tom Cooksey
* Fixed soft-light composition mode in raster and OpenGL1.Kim Motoyoshi Kalland2009-11-052-339/+361
| | | | | | | | | Updated the soft-light composition mode implementation in the raster and OpenGL1 engines to use the equations in the SVG specification as of April 2009. Task-number: QTBUG-3193 Reviewed-by: Trond
* Modify QGLShader and QGLShaderProgram in response to API reviewRhys Weatherley2009-11-055-168/+205
| | | | Reviewed-by: Sarah Smith
* Add QMacGLCompatTypes to QGLShaderProgram APITom Cooksey2009-11-042-0/+61
|
* Fixed hardcoded GL library names on WinCE.Trond Kjernåsen2009-11-041-16/+1
| | | | | Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey
* Fixed compilation and linking of EGL on Windows CE.Trond Kjernåsen2009-11-041-8/+2
| | | | | | | | | Moved duplicated and broken code for setting up the include and library paths into the egl.prf feature file, which egl.pri and opengl.pro now includes using the qmake feature system. Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey
* Compile on Mac OS XEskil Abrahamsen Blomfeldt2009-11-041-1/+1
| | | | | | | On Mac, there are compat overloads to e.g. setInternalTextureFormat() so we need to specify which function to call to avoid ambiguity. Reviewed-by: Samuel
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-032-30/+3
|\
| * Fixed some compiler warnings.Samuel Rødal2009-11-032-30/+3
| | | | | | | | Reviewed-by: Trond
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-033-16/+17
|\ \ | |/ |/|
| * Sanitize building Qt with OpenGL ES supportHarald Fernengel2009-11-021-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES2 so we do not have to force users to copy/paste around entire mkspecs just to change the OpenGL backend. This should make the "-opengl es2" (and friends) configure option work out of the box with any mkspec on Linux+WinCE. Also removes a WinCE specific hack that is not required anymore. Reviewed-by: Tom Cooksey Reviewed-by: Trond Kjernåsen Approved-by: Lars Knoll
| * Compilation error qegl_p.h not found for OpenGL ES enabled build of QtKeith Isdale2009-11-021-3/+3
| | | | | | | | | | | | | | | | | | for WindowsCE Be more consistant in the usage of <private/foo_p.h> vs "foo_p.h" Task-number: QTBUG-5149 Reviewed-by: Trond Kjernåsen
| * Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley T. Hughes2009-10-301-1/+4
| |\
| | * Merge branch '4.6' into 4.6-platformDenis Dzyubenko2009-10-267-78/+376
| | |\
| | * | Remove internal widgets from QApplication::topLevelWidgets()Prasanth Ullattil2009-10-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some internal hidden widgets which should not come up in the QApplication::topLevelWidgets() list. So the known ones are being removed from the QWidgetPrivate::allWidgets set. Task-number: QTBUG-739 Reviewed-by: Denis Dzyubenko Reviewed-by: Bradley T. Hughes
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-026-31/+403
|\ \ \ \