summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Remove pointless const's from functions (internal API)Tom Cooksey2009-12-292-4/+4
| | | | | | | | | | | | | | | | | | | | | This change is in response to the review for b063135, but was missed from that patch. Reviewed-By: Kim
| * | Lots of mostly cosmetic cleanups to GL2 paint engineTom Cooksey2009-12-284-138/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move most of drawPixmaps to private * Move most of stroke to private * Remove dead code: context() * Make optimiseForBrushTransform use xform type * Use GLuint for uniform location * Rename lastTexture -> lastTextureUsed * Move qopengl2paintengine_cleanup_vectorpath to private * Re-ordered declarations in header * Remove dead temporaryTransform * Rename use_system_clip -> useSystemClip Reviewed-By: Kim
| * | Move the 0.5 offset we add for aliased rendering to updateMatrix()Tom Cooksey2009-12-282-33/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code set and unset a temporary matrix for every draw command when doing aliased rendering. Instead, we just use a flag to indicate that updateMatrix() should add the offset. This means the offset is added only once. When doing lots of small rendering operations on a (non-multisampled) QGLWidget, this gives up to 72% performance boost on the SGX. Reviewed-By: Kim
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2009-12-272-5/+11
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: revert f36fb8b2b63b3734cc2bd66b329ca4fef1204845 Read QWS_SIZE from layer rather than screen Get rid of no_cast_from_ascii warning Docs: Amendments to latest changes to QImageReader docs. images: Document QImageReader::loopCount behaviour for infinite loops gif: Add unit test for QImageReader::size calls gif: 10% speedup on microbenchmark on QImageReader png: Avoid calling QImage::scanLine(int) from within a loop QImageReader: Avoid errorString creation in the normal case Fix text rendering on GL2 paint engine
| | * | Fix text rendering on GL2 paint engineTom Cooksey2009-12-232-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you draw with a brush, then draw a pixmap, then draw with the same brush, the GL2 engine wouldn't update the fragment shader to use the brush. This is because it detected the brush hadn't changed and so didn't need updating. To fix this, we now set the current brush to noBrush when drawing an image/pixmap so the engine knows it needs to update the GL state for the brush. Reviewed-By: Kim
| * | | Merge branch '4.5' into 4.6-stagingThiago Macieira2009-12-261-3/+11
| |\ \ \ | | |/ / | |/| / | | |/ | | | Conflicts: tests/benchmarks/benchmarks.pro
| | * Fix memory leak of QGLGlyphCoord objects in the OpenGL1 paint engineRhys Weatherley2009-12-201-3/+11
| | | | | | | | | | | | | | | Task-number: QTBUG-6936 Reviewed-by: Julian de Bhal
* | | Fixed QGLFormat::operator== to handle new fields.Kim Motoyoshi Kalland2010-01-041-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | When I added new fields to QGLFormat in commit 592dc597, I forgot to update operator==. It has now been fixed and the auto-test updated. Reviewed-by: Trond
* | | Added support for OpenGL up to version 3.2 on Windows.Kim Motoyoshi Kalland2009-12-304-25/+275
| | | | | | | | | | | | | | | Task-number: QTBUG-4438, QT-2662, QT-2663 Reviewed-by: Tom
* | | Format qOpenGLVersionFlagsFromString() according to Qt coding style.Kim Motoyoshi Kalland2009-12-301-22/+16
| | |
* | | Merge branch '4.6'Thiago Macieira2009-12-2616-822/+573
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: examples/webkit/fancybrowser/main.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/bookmarkmanager.cpp
| * | Use 3x3 PMV matrices rather than 4x4 in the GL2 engineTom Cooksey2009-12-223-64/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsView based applications will set a new transform for every item before it's painted. This leads to lots of updates to the PMV matrix. So switching to a 3x3 rather than a 4x4 gives us less data to pass to GL for each QGraphicsItem which gets rendered. It also means the vertex shader is more efficient. However, this patch only gives a maximum 2.5% speed improvement on the SGX, which seems to be only due to the faster vertex shader rather than the reduced amount of data we pass to GL. Reviewed-By: Kim
| * | Handle broken shaders better in the GL2 engine's shader managerTom Cooksey2009-12-221-77/+114
| | | | | | | | | | | | | | | | | | | | | The shader manager will now a) not seg-fault and b) actually tell you which shader has the error. Reviewed-By: Kim
| * | Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgramTom Cooksey2009-12-222-0/+71
| | | | | | | | | | | | Reviewed-By: Rhys Weatherley
| * | Prevent access to non-existent memory in triagulating strokerRhys Weatherley2009-12-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the triangulating stroker, the last point was being duplicated in dashed paths. But because QDataBuffer::add() takes a ref to a float rather than a float, it would resize the data buffer and then try to fetch the values out of a pointer to the original buffer memory. This change copies the values into temporary variables before resizing the array. Task-number: QTBUG-6045 Reviewed-by: Sarah Smith
| * | Align GL_RGB lines on a 4-byte boundary when uploading pixmap texturesRhys Weatherley2009-12-181-13/+2
| | | | | | | | | | | | | | | | | | | | | Previous code was aligning lines on a 3-byte boundary. Task-number: QTBUG-6902 Reviewed-by: Julian de Bhal
| * | GL2Engine: Don't mark brush as dirty if it hasn't changedTom Cooksey2009-12-173-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | If the same brush is used over and over again, this gives a huge performance boost (measured to be 25% faster on desktop and 73% faster on SGX). Reviewed-By: Samuel Rødal
| * | Update FBO docs to describe how QPainter changes the GL stateRhys Weatherley2009-12-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using a QPainter on a QGLFramebufferObject will not return the GL context to its original conditions, especially with the OpenGL2 paint engine. Update the docs to make this clearer. Task-number: QTBUG-6712 Reviewed-by: Daniel Pope
| * | Disable depth testing during the 2D QGLWidget::renderText()Rhys Weatherley2009-12-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Also document the depth testing conditions for the 2D and 3D versions of the function. Task-number: QTBUG-5041 Reviewed-by: Daniel Pope
| * | Fix EGL surface leaks when re-parenting QGLWidget on X11/EGLTom Cooksey2009-12-154-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QGLWidget is re-parented, it's native X11 window usually gets destroyed and re-created. This also happens when you set a window attribute or flag. On EGL, we must destroy the surface for the window before destroying the window itself, otherwise we can leak the surface. This also fixes lots of BadDrawable errors when running the autotests (which were due to surface leaks!). Reviewed-By: TrustMe
| * | Fix QGLWidgets created with an alpha channel on X11/EGLTom Cooksey2009-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the QGLWidget's QGLFormat says it should have an alpha channel, try to find an ARGB Visual. Reviewed-By: Trond Task-number: QT-2602
| * | Add QT_DEBUG_X11_VISUAL_SELECTION to aid debugging X11/EGLTom Cooksey2009-12-151-15/+31
| | |
| * | Got rid of unused variable compiler warning.Samuel Rødal2009-12-151-2/+0
| | |
| * | Optimized blur / drop shadow effects for the GL 2 paint engine.Samuel Rødal2009-12-144-602/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do the blur in half the resolution in software and then upload the result as a texture and smooth-scale it on the GPU. This leads to stable and decent performance regardless of the blur radius, and simplifies the implementation quite a bit. Reviewed-by: Bjørn Erik Nilsen
* | | Fixed memory leak in caching of concave paths in GL2 engine.Kim Motoyoshi Kalland2009-12-171-18/+21
| | | | | | | | | | | | Reviewed-by: Gunnar
* | | Implemented caching of concave vector paths in the GL2 engine.Kim Motoyoshi Kalland2009-12-152-26/+130
| | | | | | | | | | | | Reviewed-by: Gunnar
* | | Added missing OpenGL defines.Kim Motoyoshi Kalland2009-12-151-0/+14
| | |
* | | Fixed integer overflow in QTriangulator.Kim Motoyoshi Kalland2009-12-151-6/+6
| | | | | | | | | | | | The result of a function returning qint64 was stored in an int.
* | | Fixed QGL2PEXVertexArray to interpolate within the range [0, 1].Kim Motoyoshi Kalland2009-12-151-1/+1
| | | | | | | | | | | | | | | Because of numerical inaccuracy, the interpolation factor could exceed 1 by a small amount which would cause an assert failure.
* | | Merge commit 'origin/4.6'Olivier Goffart2009-12-159-277/+697
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/network/access/qnetworkrequest.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
| * | Optimize our GL extension checks to avoid mallocs.Trond Kjernåsen2009-12-103-35/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-101-3/+2
| | | | | | | | | | | | Reviewed-by: Eskil
| * | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-093-11/+3
| |\ \
| | * | 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
| | | |\ \
| * | | | | Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-091-2/+2
| |/ / / / | | | | | | | | | | | | | | | Reviewed-by: Eskil
| * | | | 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
| * | | | Speed up rotated/transformed text on OpenGL2 paint engineGunnar Sletta2009-12-081-61/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Trond Reviewed-by: Tom
* | | | | Merge branch '4.6'Thiago Macieira2009-12-082-6/+2
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | 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