summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fixed QGLWidget::grabFrameBuffer() to honor the 'withAlpha' value.Trond Kjernåsen2010-04-271-2/+10
| | | | | Task-number: QTBUG-7545 Reviewed-by: Kim
* Fixed possible data corruption in the triangulating stroker.Trond Kjernåsen2010-04-091-4/+12
| | | | | | | | | In the case where a polygon or polyline that contains consequtive equal points, we end up calculating an invalid normal vector for the joins. This fix skips past duplicate consequtive points. Task-number: QTBUG-9548 Reviewed-by: Kim
* Fixed caching of QPainter patterns in the GL 2 engine.Trond Kjernåsen2010-04-071-1/+1
| | | | | | | The patterns all got the same cache key (e.g. 1), which caused the patterns to be uploaded as a texture every single time they were used. Reviewed-by: Kim
* Allow attributes to be bound after a QGLShaderProgram is linked.Rhys Weatherley2010-03-311-6/+13
| | | | | Task-number: QTBUG-9450 Reviewed-by: Sarah Smith
* Export QGLContextResource for use with Qt/3DRhys Weatherley2010-03-291-1/+1
|
* Worked around driver bug causing clipping errors on N900.Samuel Rødal2010-03-101-3/+8
| | | | | | | | | Apparently the driver does some optimization which causes it to behave erratically when stencil testing is enabled. Multiplying the return value from the texture lookup by 1.0 disables the optimization. Task-number: QTBUG-8753 Reviewed-by: Trond
* Fixed an exit crash that could occur in the GL 2 engine under X11.Trond Kjernåsen2010-03-041-0/+1
| | | | | | | | | The global destructor for the clean up hooks might be called before the global destructor for QPixmap objects. We shouldn't leave pixmaps around that is destroyed after the QApplication destructor is called. Task-number: QTBUG-8681 Reviewed-by: Tom Cooksey
* Preparation to enable OpenGLES 2.0 for Windows Mobile.ninerider2010-02-271-3/+9
| | | | | | As there are no SDKs available for our test device (HTC HD2) that support OpenGL, we had to construct the libraries by extracting them from the ROM image. This is still work in progress at this time.
* Fix off-by-one error in mipmap count when loading PVRTC filesRhys Weatherley2010-02-241-1/+1
| | | | | Task-number: QT-2988 Reviewed-by: Julian de Bhal
* Fix building in a namespace on WindowsAndy Shaw2010-02-191-1/+3
| | | | Reviewed-by: hjk
* Fixed a GLX warning that occured with some Intel chipsets under X11.Trond Kjernåsen2010-02-151-2/+5
| | | | | | | | For some reason the Intel GL driver exports the texture_from_pixmap extension in the GLX server, but not in local clients. Task-number: related to QTBUG-5732 Reviewed-by: Kim
* Cleanup QEglContext & EGLDisplaysTom Cooksey2010-02-125-35/+12
| | | | | | | | | This basicaly replaces display(), openDisplay() & defaultDisplay() methods with a single display() and nativeDisplay(), the latter being implemented in the platform-specific files and everything else being cross-platform code. Reviewed-By: Trond
* Moved 'hasAlpha' property from GL2 engine to GL paint device.Kim Motoyoshi Kalland2010-02-128-24/+23
| | | | | | Got rid of an ugly switch statement. Reviewed-by: Tom
* Fix several bugs with GL texture cacheTom Cooksey2010-02-122-25/+23
| | | | | Reviewed-By: Trond Autotest: tst_QGL::qglContextDefaultBindTexture
* Compile fix for OpenGL ES.Kim Motoyoshi Kalland2010-02-121-1/+5
| | | | Reviewed-by: Trond
* Turned off subpixel AA text on surface with alpha in GL2 engine.Kim Motoyoshi Kalland2010-02-122-7/+25
| | | | | | | | | | Subpixel antialiased text does not look good on translucent surfaces, so turn it off if the surface the text is rendered on has an alpha channel. This makes change eb84acd899aee992f5631ee0b9c0d992c8fbbd5a redundant. Task-number: QTBUG-7190 Reviewed-by: Gunnar
* Fixed usage of QGLPixelBuffer with share widgets on other X11 screens.Trond Kjernåsen2010-02-101-1/+5
| | | | | | | | | When trying to share the internal pbo context with a widget context, the pbo context needs to be created on the same X11 screen as the widget context. Task-number: QTBUG-8047 Reviewed-by: Kim
* Fixed drawing QPixmaps on QGLWidgets on different X11 screens.Trond Kjernåsen2010-02-101-1/+8
| | | | | | | | | | | Don't try to use the texture_from_pixmap extension when drawing a pixmap from one X11 screen onto a different X11 screen in the GL 2 engine. For that to work, the pixmap will have to be re-created on the new screen, which is exactly what the default bind method does (via QImage conversion). Task-number: QTBUG-8054 Reviewed-by: Kim
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Kim Motoyoshi Kalland2010-02-092-3/+3
|\ | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| * Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-042-3/+3
| | | | | | | | | | | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
* | Add a pixmap modification hook to blur pixmap filter cacheTom Cooksey2010-02-081-0/+1
| | | | | | | | | | | | | | We probably want to kick out filtered pixmaps from the cache when the source pixmap is modified as well as just destroyed. Reviewed-By: Samuel
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-02-034-35/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (29 commits) Compiler warning in QAbstractSlider. Optimize QPathClipper::pathToRect. QGraphicsScene: Use QPainter::setClipRect instead of setClipPath if possible. QStyleSheetStyle: Fix combinaison of border-image and border-radius Revert "QAbstractScrollArea: Wheel over a scrollarea that has only one horizontal scrollbar" Proper Fav icon is not shown, for all the links default fav icon shown Update changes-4.6.2. Make DSFLIP_ONSYNC part of the default flip flags. Fixed a failure in tst_qgl. 4.6.2 changes Avoids a possible crash when saving the state of a main window Implemented QGifHandler::imageCount(). Fixed compilation of the GL2 engine for OpenGL ES 2. fix whitespace Document that QModelIndex::child does not work for the root item Fixed missing textures in the boxes demo. Fix QTBUG_7714_fullUpdateDiscardingOpacityUpdate2 autotest in qws-linux Assert failure when setting a widget focus proxy as its successor in tab order Fixed garbled 3D Qt logo in the overpainting example. fix crash in Phonon::DS9 backend ...
| * | Fixed a failure in tst_qgl.Trond Kjernåsen2010-02-021-1/+0
| | | | | | | | | | | | | | | | | | | | | The assert wrong, it may be that the texture isn't removed from the cache if it doesn't have the MemoryManaged bind option set. Reviewed-by: Samuel
| * | Fixed compilation of the GL2 engine for OpenGL ES 2.Kim Motoyoshi Kalland2010-02-021-0/+2
| | | | | | | | | | | | | | | | | | glColor4f is not defined in OpenGL ES 2. Reviewed-by: Trond
| * | Fixed missing textures in the boxes demo.Kim Motoyoshi Kalland2010-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The boxes demo assumed that the current GL colour was the default white, but the GL2 paint engine set it to black. Fixed by resetting the colour to white in resetGLState(). Task-number: QTBUG-7779 Reviewed-by: Trond
| * | Fixed garbled 3D Qt logo in the overpainting example.Kim Motoyoshi Kalland2010-02-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Disable vertex attribute arrays in the GL2 paint engine when calling QPainter::beginNativePainting() and QPainter::end(). Task-number: QTBUG-7781 Reviewed-by: Trond
| * | Fix GL texture leaks when pixmaps are deletedTom Cooksey2010-01-293-35/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes quite a lot of issues: * QtOpenGL only registered qpixmap destruction hooks on X11 and those only cleanup the EGL/GLX surface, not the texture object. * The QPixmap destruction hooks were only being called from the QPixmap destructor. However, this means when a QPixmap is assigned to another QPixmap, the hooks don't get called. Task-number: QTBUG-7647 Reviewed-By: Samuel Reviewed-By: Trond
* | | Fix missing namespace.ck2010-02-011-0/+4
|/ /
* | Better support for user-generated binary shadersRhys Weatherley2010-01-271-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user provided their own shader with glShaderBinary(), QGLShaderProgram::addShader() would refuse to add it because it wasn't marked as "compiled". According to the OpenGL/ES 2.0 specification: "It is permissible to attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled." Based on this, the compile check has been removed from addShader() which should make supporting binary shaders easier. Similarly, link() and programId() have been modified to support applications that use glProgramBinaryOES() to specify program binaries. Task-number: QTBUG-7490 Reviewed-by: Tom Cooksey
* | Added a warning to QGLWidget::renderText().Trond Kjernåsen2010-01-271-2/+20
| | | | | | | | | | | | | | | | | | renderText() can't be used while a GL 2 paint engine is active on the same device, because it will clash with the GL 1 engine and wreck havoc. We simply don't support that scenario. Task-number: QTBUG-7592 Reviewed-by: Samuel
* | Updated docs regarding QGLWidget::renderText() limitations.Trond Kjernåsen2010-01-251-0/+7
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2010-01-221-0/+3
|\ \
| * | Fix rendering with simple shader in GL2 engineTom Cooksey2010-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Need to bind the PMV matrix's attributes to their indexes in the simple shader, which is created in a seperate code path to all the other shaders. This should fix the qgl autotest failures. Reviewed-By: TrustMe
* | | Fix y-inverted pixmaps properly.Gunnar Sletta2010-01-221-9/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | There is a lot of code depending on that pixmaps are flipped upside down in the gl graphicssystem, so toggling this requires extensive testing. Since we're anyway questioning the relevance of this feature (compared to raster + GL viewport) its simply not worth the effort to fix it properly right now. Revert "Fixed y-inverted pixmaps on N900." This reverts commit 57473d5d2a7bd6ae3117f61ff29264a1b790bb01.
* | Purely cosmetic (formatting) changes to GL2 engine's GLSLTom Cooksey2010-01-211-333/+357
| | | | | | | | | | | | This makes GLSL dumps _significantly_ easier to read. Reviewed-By: TrustMe
* | Use an attribute value for the PMV matrix rather than a uniformTom Cooksey2010-01-215-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This has several advantages: First, updating an attribute value seems to be cheaper than updating a uniform. Second, vertex atribute values are independent of shader program, which means they persist across changing of the shader program. This makes code simpler and reduces GL state changes. Note: Credit goes to Samuel for finding this little gem. :-) For the 25920 solid QGraphicsRectItem test case, this gives 10% improvement on desktop and 27% on the SGX. Reviewed-By: Kim
* | Remove unnecessary depth uniform from GL2 engine's GLSLTom Cooksey2010-01-211-6/+0
| | | | | | | | Reviewed-By: Samuel
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-201-1/+5
|\ \ | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.
| * | Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.Trond Kjernåsen2010-01-201-1/+5
| | | | | | | | | | | | | | | Task-number: QTBUG-7476 Reviewed-by: Kim
* | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-192-2/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Memory leak in native Toolbar cleanup in Cocoa Fix copyright year. Bump version to 4.6.2. Add skeleton changes file for 4.6.2. Add released version of 4.6.1 changes file for posterity. Designer crashes when previewing QMainWindow with native Toolbar on Mac
| * | Fix copyright year.Jason McDonald2010-01-192-2/+2
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2010-01-191-6/+45
|\ \ \
| * | | Fix X11/EGL builds using OpenGL ES 1.1Tom Cooksey2010-01-191-6/+45
| |/ / | | | | | | | | | | | | Task-number: QTBUG-7399 Reviewed-By: TrustMe
* | | Fixed y-inverted pixmaps on N900.Gunnar Sletta2010-01-191-4/+8
|/ / | | | | | | | | | | | | | | | | | | | | The QGLPixmapData used default bind options, which means that the pixmap is always flipped up-side-down and rendered with flipping. The opaque pixmaps were uploaded unflipped which caused the bug. Ideally we do not want pixmap flipping so change the default in gl pixmaps and tag it accordingly. Reviewed-by: Samuel
* | Fix QGLWidget::renderPixmap() on Windows.Trond Kjernaasen2010-01-141-6/+6
| | | | | | | | | | | | | | | | Using renderPixmap() with scenes that contained textures might not work due to the wrong texture format being used under certain circumstances. Task-number: QTBUG-7213 Reviewed-by: Gunnar
* | Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-1315-428/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt used to store the GL extensions a particular implementation supported in a global cache, which was initialized once and never updated. This could cause problems because different types of context might support different kinds of extensions (e.g. the difference between sw and hw contexts). With this patch, the GL extensions are cached and updated within each QGLContext. It also makes the extension initialization lazy, which saves application initialization costs for embedded platforms. The patch introduces a internal cross platform QGLTemporaryContext class that is used to create a light-weight GL context without going via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks for now). Reviewed-by: Kim Reviewed-by: Samuel
* | Fixed tst_qgl multipleFBOInterleavedRendering.Samuel Rødal2010-01-131-1/+1
| | | | | | | | | | | | | | | | We need to clobber the vertex attribute pointers _before_ we call setState() to regenerate the clip, or we'll use invalid vertex pointers when writing the clip. Reviewed-by: Paul