summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-1266-71/+83
|\ \ | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| * | Fix broken QGLWidget::renderPixmap on Mac/CarbonMorten Johan Sørvig2010-01-081-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: ed2a03b3bc85be056eca87928d18a746faa07bca Reviewed-by: Trond Commit ed2a03b3bc85be056eca87928d18a746faa07bca removed all QuickDraw code and made QPixmap::macQDHandle() return 0 in all cases. Unfortunately QGLWidget::renderPixmap() depended on macQDHandle returning a valid handle, causing it to break. Fix this by inserting the macQDHandle implementation were we would call macQDHandle before. This is the only place in Qt where macQDHandle is used.
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-083-69/+70
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| * \ \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-0766-67/+67
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| | * | | Update copyright year to 2010Jason McDonald2010-01-0666-67/+67
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | | Fixed bug where QGLPixmapData::toImage() returned too dark image.Kim Motoyoshi Kalland2010-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGLPixmapData::toImage() called qt_gl_read_texture() which didn't take into account that the texture was in a premultiplied format. Task-number: QTBUG-7190 Reviewed-by: Trond
* | | | | Fixed justify aligned text drawing with the GL1 engine.Kim Motoyoshi Kalland2010-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text was blurry because it wasn't pixel aligned. Fixed by using nearest-neighbour texture filtering when using only translations on the painter. Reviewed-by: Trond
* | | | | Fixed subpixel antialiased text drawing with the GL2 engine.Kim Motoyoshi Kalland2010-01-111-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where drawing subpixel antialiased glyphs on a translucent surface would cause all the pixels in the glyphs' bounding box to become opaque. Task-number: QTBUG-7190 Reviewed-by: Trond
* | | | | Track the glVertexAttribPointer and only update it if it's changedTom Cooksey2010-01-113-34/+61
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a lot of unnecessary GL state changes resulting in an 18% performance boost on desktop and 5% on SGX for the 25920 3x3 solid rectangle test case. Reviewed-By: Samuel
* | | | Reset the GL stencil mask, op and function in resetGLState().Trond Kjernåsen2010-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-7203 Reviewed-by: Samuel
* | | | Fixed indentation and typo.Trond Kjernåsen2010-01-071-67/+67
| | | | | | | | | | | | | | | | Reviewed-by: TrustMe
* | | | Remove unnecessary call to QWidget::setAttribute().Trond Kjernåsen2010-01-071-2/+0
|/ / / | | | | | | | | | | | | | | | This is already done in the QGLWidget constructor. Reviewed-by: Kim