summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* GLES 2 should *not* use a multisampled format by default.Trond Kjernåsen2009-12-092-5/+1
| | | | | | | | This is a platform regression and should never have been there in the first place. Having this as the default format on embedded devices may drop the framerates with as much as 30% on selected HW. Reviewed-by: Tom Cooksey
* Merge upstream/4.6 into oslo-staging-2/4.6Olivier Goffart2009-12-092-6/+2
|\ | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def
| * Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-12-097-179/+584
| |\
| * \ Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-12-062-6/+2
| |\ \
| | * | Replace glColor4ub() calls with glColor4f()Rhys Weatherley2009-12-062-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel Q45/Q43 Express Chipset has problems with glColor4ub() not updating GL_CURRENT_COLOR correctly. Replace all references with calls to glColor4f() instead as it is more likely to be implemented correctly on all chipsets. Task-number: QTBUG-6217 Reviewed-by: Sarah Smith
| | * | Recognize transformed screens when looking for a QGLScreenRhys Weatherley2009-10-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the QWS_DISPLAY is specified as "Transformed:powervr:...", then we will encounter QScreen::TransformedClass rather than QScreen::ProxyClass when searching for the QGLScreen. This change makes the code search for both. Task-number: QT-2261 Reviewed-by: Sarah Smith Back port of 8e4fa6e87f74cfb3457e8270a361cf30ca7d3593
| | * | Back-port several OpenGL/ES fixes from 4.6 to 4.5Rhys Weatherley2009-10-153-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8ee6d090d45198fb2530849236c97f014666b7e4: fix EGL_SAMPLES b125af1b298d694c332f56deebe4755d0c985d5d: memory leak of EGLSurface's ef8d9fa7091b0d45fe15aae43b8f1c47547cb16d: double-destroy of pbuffer 73d9dced8298dfad7bc72607146e81e96fffb6d4: suppress pbuffer warnings Reviewed-by: Donald Carr
| | * | Fix detection of pbuffers on OpenGL/ES systemsRhys Weatherley2009-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code was searching for an exact pbuffer format of RGBA = 1, 1, 1, 0, which of course is never going to happen. Instead, search for the best format. Reviewed-by: trustme Conflicts: src/opengl/qglpixelbuffer_egl.cpp Back-port of 46843022acd7322c42a98858ec52b65ce7451d06
* | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-099-189/+617
|\ \ \ \
| * | | | Export QGLShareRegister because qgl_share_reg() is exportedRhys Weatherley2009-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: trustme
| * | | | Fix upside down PVR compressed textures.Rhys Weatherley2009-12-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "vertical flip" flag in the PVR format is the inverse of the "inverted y" state that we use in Qt. Reviewed-by: trustme
| * | | | Make sure a context is current when loading compressed textures.Rhys Weatherley2009-12-081-0/+2
| | |_|/ | |/| | | | | | | | | | Reviewed-by: trustme
| * | | Fix GL_BGRA formats under OpenGL/ES systemsRhys Weatherley2009-12-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL/ES requires that the internal and external formats be the same when calling glTexImage2D(). This caused problems with devices that had the GL_EXT_bgra extension. This change makes the formats the same just before the upload and also makes sure that the pixel type is GL_UNSIGNED_BYTE when GL_BGRA is used. No change for desktop systems. Reviewed-by: Donald Carr
| * | | Detect GL2 paint engine based on fragment shaders, not programsRhys Weatherley2009-12-072-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The auto-detect logic was looking for fragment programs to check for OpenGL2 support. It should have been looking for fragment shaders. Task-number: QTBUG-5638 Reviewed-by: Sarah Smith
| * | | Compressed texture binding for QtOpenGL: ETC1 and PVRTCRhys Weatherley2009-12-065-118/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QGLContext::bindTexture(QString) function has been augmented with support for ETC1, PVRTC2, and PVRTC4 compressed textures, in addition to the existing DDS support. The QGLPixmapData class has also been modified to recognize compressed texture formats in fromFile() and fromData(). This change also fixes a bug in bindTexture() that prevented the same compressed texture file from being bound in multiple contexts. There is now a separate file cache for each context group. Task-number: QT-2547 Reviewed-by: Trond
| * | | 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
| * | | Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms.Samuel Rødal2009-12-043-14/+36
| |/ / | | | | | | | | | | | | | | | | | | The format and internal_format parameters to glTexImage2D need to always match on OpenGL ES 2.0. Reviewed-by: Tom Cooksey
| * | Rebind window surface fbo after native GL renderingRhys Weatherley2009-12-044-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the user called QGLFramebufferObject::bind()/release() during a beginNativePainting() callout, the release() would reset the context's fbo to zero, not the actual window surface fbo. Task-number: QTBUG-6204 Reviewed-by: Tom
| * | 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
* | | Speed up rotated/transformed text on OpenGL2 paint engineGunnar Sletta2009-12-081-61/+34
|/ / | | | | | | | | Reviewed-by: Trond Reviewed-by: Tom
* | 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