summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* API fixes to QGLBuffer.Rhys Weatherley2010-03-222-21/+14
| | | | | | | | Use GLuint for bufferId(), not uint. Replace the raw bind() function with a raw release(), because that's the only useful case for being able to do a raw glBindBuffer(). Reviewed-by: Daniel Pope
* Added warnings on non-created buffer in QGLBufferGunnar Sletta2010-03-221-0/+24
| | | | Reviewed-by: Rhys Weatherley
* Make an attemt to upload QPixmap in the most optimal format on 16-bitGunnar Sletta2010-03-191-2/+9
| | | | | | | | On 16-bit configs, using 16-bit textures gives us quite a bit of performance extra, so making this extra effort prior to uploading it seems worth it. Reviewed-by: Samuel
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-191-5/+5
|\ | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Removed an assert in the print dialog on windows simple cleanup in QSplitter Actually use GL texture cache when bindoptions are provided
| * Actually use GL texture cache when bindoptions are providedGunnar Sletta2010-03-191-5/+5
| | | | | | | | Reviewed-by: Trond
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2010-03-182-12/+17
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (147 commits) Add missing semicolons. moc was confused and positionViewAtIndex not invokable. Use the correct base URL in resolveUri Remove timing sensitivity. Optimize id checking. Fix examples after 47fb07c9fdf47584ae55f3412102bbeef5576b04. Don't use QScriptValueIterator to iterate over arrays. Skip test, to be fixed. Only release the binding once we're finished with its memory Make it harder to accidentally delete a binding Adjust test now that redundant contexts are not create due Block modifications to internal QDeclarativeContexts Don't destroy cookie jar until while someone may be using it. Fix tests after 47fb07c9fdf47584ae55f3412102bbeef5576b04. Another fix to find Improve implicit "." import Fix auto test Fix type lookup with url Fix default values on Textinput Add an implicit import "." to types loaded from a local url Fix crash ...
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2010-03-172-12/+17
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (112 commits) Verbose unexpected errors. One url for an *unqualilfied* import is not special. Fix test failures Optimization: Don't unnecessarily run VMEStack element constructors Optimization: Reduce unnecessary QObject allocations Reset QDeclarativeDeclarativeData::outerContext when the context is removed Simplify QDeclarativeComponent::creationContext() logic Optimization: Use id notifier for QtScript bindings Optimization: Combine QDeclarativeDeclarativeData and QObject allocations Fixes for the module import Fix documentation add alan's tic-tac-toe AI Remove test in .pro file also Remove unneeded #include and add needed header to .pri Add easing changes to QmlChanges.txt Update more animation on property value source docs. Doc fixes. QmlChanges.txt cleanup. Remove WorkerListModel and integrate its functionality into ListModel. Split post alpha API changes into a separate section. ...
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2010-03-162-12/+17
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (100 commits) Remove test in .pro file also Remove unneeded #include and add needed header to .pri Add easing changes to QmlChanges.txt Update more animation on property value source docs. Doc fixes. QmlChanges.txt cleanup. Remove WorkerListModel and integrate its functionality into ListModel. Split post alpha API changes into a separate section. Optimize drawPixmapFragments for the GL2 paint engine. Optimize QRegion::intersects(QRect). Compile with user defined Qt namespace Fix regression from previous commit Import "content" with as qualifier to support network without qmldir Small fixes to photoviewer demo Little more doc on QabstractItemModel and QML. Fix benchmark. Add basic QUrl benchmarks. Add busy indicator to photoviewer demo Set maximumExtents correctly for highlightRangeMode: StrictlyEnforceRange fix installation of imports libraries ...
| | | * Optimize drawPixmapFragments for the GL2 paint engine.Michael Brasser2010-03-152-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case, we don't need QGL2PEXVertexArray to keep track of min and max information. Reviewed-by: Samuel
* | | | Add a raw bind() function to QGLBuffer.Rhys Weatherley2010-03-182-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is awkward for a Qt application to do the equivalent of glBindBuffer(GL_ARRAY_BUFFER, 0) without knowing the QGLBuffer that was previously bound, or to bind a raw id obtained elsewhere. Resolving the extension is annoying. This change provides a raw low-level version of bind() for directly resolving and calling glBindBuffer() to assist such applications. Reviewed-by: Sarah Smith
* | | | Make sure XCopyArea has completed before resuming renderingTom Cooksey2010-03-171-0/+6
| | | | | | | | | | | | | | | | Reviewed-By: TrustMe
* | | | Make QX11GLPixmapData::scroll() return a valueTom Cooksey2010-03-171-1/+3
| | | | | | | | | | | | | | | | Reviewed-By: TrustMe
* | | | Fix some rendering/scrolling artifacts with QX11GLWindowSurfaceTom Cooksey2010-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL2 paint engine sometimes adds a 0.49,0.49 offset when rendering into a multi-sampled QGLPaintDevice. The problem was that we weren't updating the QGLContext's QGLFormat with the EGLConfig so the paint engine thought it was rendering into an surface without multisampling and thus added the offset. Reviewed-By: TrustMe
* | | | Implement scrolling in QX11GLWindowSurfaceTom Cooksey2010-03-172-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems to have some artifacts when scrolling by 1 pixel, but apart from that works pretty well. Reviewed-By: TrustMe
* | | | Make WA_TranslucentBackground work with QX11GLWindowSurfaceTom Cooksey2010-03-171-0/+2
| | | | | | | | | | | | | | | | Reviewed-By: TrustMe
* | | | Add ultra-paranoid synchronization to QX11GLPixmapDataTom Cooksey2010-03-172-6/+65
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This is completely over the top and many of these synchronisation points should be removed before doing any serious benchmarking. However, it makes sure any remaining bugs are not due to GPU & CPU being out of sync. Reviewed-By: TrustMe
* | | Fix OpenGL2 paint engine compilation issueRhys Weatherley2010-03-161-1/+1
| | | | | | | | | | | | Reviewed-by: Daniel Pope
* | | Avoid using uncompatible vertex shader for non-solid brushesEskil Abrahamsen Blomfeldt2010-03-161-3/+10
|/ / | | | | | | | | | | | | | | | | | | The simplified vertex shader for complex geometry is written specifically for solid brushes and needs to be disabled when the brush is anything else. This work-around can be removed later when QTBUG-9069 is handled, since that removes the extra requirements on the setPosition() shader. Reviewed-by: tom
* | Implement a special case, simplified vertex shader for complex geometryEskil Abrahamsen Blomfeldt2010-03-165-2/+39
|/ | | | | | | | | | When drawing text, the vertex count will most likely be so high that using a uniform-based, simpler vertex shader is faster. We implement the ability to inform the shader manager that the geometry is considered complex, so that it can choose the simpler vertex shader in these cases. Task-number: QT-2887 Reviewed-by: tom
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-151-3/+8
|\ | | | | | | | | Conflicts: src/gui/styles/qs60style_s60.cpp
| * 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
* | Made QGLExtensions::glExtensions() thread-safe.Trond Kjernåsen2010-03-122-21/+18
| | | | | | | | Reviewed-by: Gunnar
* | Remove debug output from qt_eglproperties_set_glformatTom Cooksey2010-03-111-3/+1
| | | | | | | | Reviewed-By: TrustMe
* | Delete the QGLContext in ~QX11GLPixmapDataTom Cooksey2010-03-117-2/+11
| | | | | | | | | | | | | | | | This also includes changes which allow QGLContext to not own it's own QEglContext. With X11GL, the QEglContext gets reused by multiple QGLContexts so it is important QGLContext doesn't delete it. Reviewed-By: TrustMe
* | Made QGLTextureCache::instance() threadsafe.Trond Kjernåsen2010-03-112-21/+7
| | | | | | | | Reviewed-by: Tom Cooksey
* | Added clipping to the dashed stroke processor in the GL2 engine.Kim Motoyoshi Kalland2010-03-103-7/+12
| | | | | | | | | | | | | | | | | | Without clipping, the stroker could consume a huge amount of memory when scaling up cosmetic, dashed strokes. I also made QDashStroker clip more aggressively. Task-number: QTBUG-7832 Reviewed-by: Samuel
* | Update QGLFormat from EGLConfig properlyTom Cooksey2010-03-106-45/+38
| | | | | | | | | | | | | | Previously, some members of QGLFormat (like alphaBufferSize) would be left to the initial -1 value. Reviewed-By: TrustMe
* | Make calls to QGLFormat::set*BufferSize also update flagsTom Cooksey2010-03-101-1/+5
| | | | | | | | Reviewed-By: Trond
* | Compile fix when Qt3Support is enabled for devices using EGL.Trond Kjernåsen2010-03-101-1/+1
| | | | | | | | Reviewed-by: Samuel
* | Compile with Qt3Support in a ScratchBox environment.Trond Kjernåsen2010-03-101-1/+1
| | | | | | | | Reviewed-by: Tom Cooksey
* | Make sure 16-bit EGL configs are chosen over 32-bit configsTom Cooksey2010-03-102-32/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure 16-bit configs are chosen over 32-bit configs as they will provide the best performance. The EGL config selection algorithm is a bit stange in this regard: The selection criteria for EGL_BUFFER_SIZE is "AtLeast", so we can't use it to discard 32-bit configs completely from the selection. So it then comes to the sorting algorithm. The red/green/blue sizes have a sort priority of 3, so they are sorted by first. The sort order is special and described as "by larger _total_ number of color bits.". So EGL will put 32-bit configs in the list before the 16-bit configs. However, the spec also goes on to say "If the requested number of bits in attrib_list for a particular component is 0, then the number of bits for that component is not considered". This part of the spec also seems to imply that setting the red/green/blue bits to zero means none of the components are considered and EGL disregards the entire sorting rule. It then looks to the next highest priority rule, which is EGL_BUFFER_SIZE. Despite the selection criteria being "AtLeast" for EGL_BUFFER_SIZE, it's sort order is "smaller" meaning 16-bit configs are put in the list before 32-bit configs. So, to make sure 16-bit is preffered over 32-bit, we must set the red/green/blue sizes to zero. This has an unfortunate consequence that if the application sets the red/green/blue size to 5/6/5 on the QGLFormat, they will probably get a 32-bit config, even when there's an RGB565 config avaliable. Oh well. Reviewed-By: TrustMe
* | Make the EGL contexts in QX11GLPixmapData Q_GLOBAL_STATICTom Cooksey2010-03-101-3/+13
| | | | | | | | | | | | Still not ideal, but this should do for now. Reviewed-By: TrustMe
* | Handle EGLSurfaces better, including more error detectionTom Cooksey2010-03-103-7/+13
| | | | | | | | | | | | | | Note: This changes QX11PixmapData::gl_surface to a void* to enable build on 64-bit systems where EGLSurface is a pointer. Reviewed-By: TrustMe
* | Make sure pixmap hooks get installed so EGL surfaces are cleaned upTom Cooksey2010-03-101-0/+4
| | | | | | | | Reviewed-By: TrustMe
* | Renamed QPainter::Fragment/Hint -> QPainter::PixmapFragment/HintTrond Kjernåsen2010-03-092-5/+8
| | | | | | | | Reviewed-by: Kim
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-03-081-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: fix to mainwindow demo Fix build on Maemo X11 Fix crash on Win with 16bit screendepth when copy/pasting images Enable cleanup hooks when creating an EGL surface for a pixmap
| * | Enable cleanup hooks when creating an EGL surface for a pixmapTom Cooksey2010-03-081-1/+0
| | | | | | | | | | | | Reviewed-By: TrustMe
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-062-1/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * 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.
* | Port QX11GLPixmapData & QX11GLWindowSurface to new QEgl APITom Cooksey2010-03-055-196/+74
| | | | | | | | | | | | | | It's still just as buggy, but at least it allows us to remove a lot of crud from qgl_x11egl.cpp. Reviewed-By: TrustMe
* | Fix build when egl.h includes X11 headers & pollutes namespaceTom Cooksey2010-03-041-7/+1
| | | | | | | | | | | | | | At some point we should fix the include order in all the .cpp files, however #udef'ing the defines we use elsewhere seems to work for now. Reviewed-By: TrustMe
* | Fix build on EGL implementations where EGLConfig is a pointerTom Cooksey2010-03-041-3/+2
| | | | | | | | | | | | | | EGLConfig is an opaque type which we really shouldn't cast to an int. Instead, we get the config id for the EGLConfig. Reviewed-By: TrustMe
* | Add and use QGLContextPrivate::eglSurfaceForDevice()Tom Cooksey2010-03-024-4/+33
| | | | | | | | | | | | | | | | | | The QGLContext only stores the EGLSurface for QWidgets & QGLWidgets, other device types like QPixmap & QGLPixelBuffer store the surface themsselves. With this patch it is possible to create a QGLContext on a QPixmap, make it current and render GL to that QPixmap on X11. Reviewed-By: TrustMe
* | Make bindTextureFromNativePixmap use new QEgl APIsTom Cooksey2010-03-021-2/+7
| | | | | | | | | | | | | | The old qt_chooseEGLConfigForPixmap & qt_createEGLSurfaceForPixmap code will remain until QX11GLPixmapData can be re-written properly. Reviewed-By: TrustMe
* | Move QGLWidget::setContext logic into QEgl & QGLContextTom Cooksey2010-03-022-130/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEgl::createSurface() on X11 will now check to see if the device's X11 Visual is compatible with the EGLConfig passed in. If it is not compatible, the function will re-create the QPaintDevice's native drawable with a different Visual (one which is compatable with the EGLConfig). This represented the bulk of the QGLWidget::setContext method which is now much simpler. As a consequense of this change, QWidgets with graphicssystem opengl will behave much more like QGLWidget as most of the code is re-used. So things like WA_TranslucentBackground should now work with opengl graphicssystem too. Reviewed-By: TrustMe
* | Move EGL surface type setting to new QEglProperties::setDeviceTypeTom Cooksey2010-03-026-39/+40
| | | | | | | | | | | | Also renamed qt_egl_set_format->qt_eglproperties_set_glformat Reviewed-By: TrustMe
* | Replace qt_egl_add_platform_config with existing QEglProperties APITom Cooksey2010-03-024-35/+3
| | | | | | | | | | | | | | QEglProperties::setPaintDeviceFormat() seems to be a copy & paste of qt_egl_add_platform_config for every platform anyway. Reviewed-By: TrustMe
* | Use QEgl::display in QGLTemporaryContext so EGL is init'd only onceTom Cooksey2010-03-021-6/+1
| | | | | | | | Reviewed-By: Trond Kjernåsen
* | Remove qt_egl_setup_x11_visualTom Cooksey2010-03-021-149/+1
| | | | | | | | | | | | | | This method has been re-written as QEgl::getCompatibleVisualId() which is much cleaner code. Reviewed-By: TrustMe