summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-10-251-56/+83
|\ | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Simplify calculation of center point and scale for PinchRecongizer Doc: Fixing typo QtDFB: Make transparent windows behave better For meego graphics system, use floyd-steinberg dithering when converting to 16bit. Added support for blitting to native child widgets in GL window surface.
| * Added support for blitting to native child widgets in GL window surface.Samuel Rødal2010-10-221-56/+83
| | | | | | | | | | | | | | | | Support blitting by copying from the top-level window's back buffer to a temporary texture and then blitting from the texture to the native child widget. Performance suffers, but it's better than failing. Reviewed-by: Gunnar Sletta
* | Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
|/
* Adding a threshold for partial updates.Michael Dominic K2010-10-051-2/+3
| | | | | Merge-request: 841 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Prevented crash in GL window surface when deleting native child widgets.Samuel Rødal2010-09-101-4/+8
| | | | | | We should only destroy the FBO if it's the actual window that's deleted. Reviewed-by: Trond
* Don't waste memory on the share widget in the GL window surface.Samuel Rødal2010-09-101-1/+4
| | | | Reviewed-by: Trond
* Make sure we blit to the correct FBO in the GL window surface.Samuel Rødal2010-09-091-1/+5
| | | | Reviewed-by: Trond
* Clear the QGLWindowSurface in ::beginPaint when needed.Michael Dominic K2010-08-311-0/+14
| | | | | Merge-request: 2462 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added way to destroy the share widget in the GL graphics system.Samuel Rødal2010-08-121-0/+19
| | | | | | | This lets us destroy the share widget temporarily if we want to free up OpenGL resources for a while. Reviewed-by: Gunnar Sletta
* Do check after all if we have partialUpdateSupport.Michael Dominic K2010-07-261-4/+3
| | | | | | Task-number: QTBUG-12266 Merge-request: 752 Reviewed-by: Trond
* QGLWindowSurface support for partial updates via EGL_NOK_swap_region2Michael Dominic K2010-07-011-2/+22
| | | | | | | (if extension available). Merge-request: 712 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Revert "Try to use multisampled opengl graphicssystem on all platforms"Eskil Abrahamsen Blomfeldt2010-04-281-1/+0
| | | | | | | This reverts commit 5f63f95def838ce72af99dc697ecce092fe7eb69. Fixes GL graphics system on Windows. With the patch, windows would pop up as completely empty.
* Enable QX11GLWindowSurface using "-graphicssystem x11gl" optionTom Cooksey2010-04-261-2/+2
| | | | | | | | | | | | | | | When the OpenGL graphics system is in X11GL mode, it will use the QX11GLWindowSurface for all widgets except QGraphicsViews with the FullViewportUpdate update mode set, where it will use the regular QGLWindowSurface, as this is probabbly faster. QX11GLWindowSurface differs from QGLWindowSurface because it allows accelerated scrolling and partial updates, while still being using opengl to do rendering. Task-number: QT-280 Task-number: QT-2625 Reviewed-By: Trond
* Force full-screen updates for QGLWindowSurfaceTom Cooksey2010-04-261-1/+6
| | | | | | | | | If the back buffer is destroyed when swap buffers is called, we must tell the backing store any update needs to invalidate the entire window surface, so everything gets re-drawn. Task-number: QTBUG-9978 Reviewed-By: Trond
* Try to use multisampled opengl graphicssystem on all platformsTom Cooksey2010-04-221-0/+1
| | | | Reviewed-By: Samuel
* Move QGLWidget::setContext logic into QEgl & QGLContextTom Cooksey2010-03-021-12/+0
| | | | | | | | | | | | | | | | 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 qegl_p.h -> qeglcontext_p.h and add a new qegl_p.hTom Cooksey2010-03-021-1/+1
| | | | | | | | This puts the QEgl namespace in a single file which can be used by both qeglcontext and qeglproperties. Files which need QEglContext should now include qeglcontext_p.h. Reviewed-By: Aleksandar Sasha Babic
* Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-13/+9
| | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-4/+3
| | | | | | | | | | | | | | | | | | 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
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms.Samuel Rødal2009-12-041-5/+4
| | | | | | | The format and internal_format parameters to glTexImage2D need to always match on OpenGL ES 2.0. Reviewed-by: Tom Cooksey
* Ran the script utils/normalizeOlivier Goffart2009-11-181-1/+1
| | | | Over src/ tools/ examples/ and demos/
* Modify QGLShader and QGLShaderProgram in response to API reviewRhys Weatherley2009-11-051-1/+1
| | | | Reviewed-by: Sarah Smith
* Merge branch '4.6' into 4.6-platformDenis Dzyubenko2009-10-261-1/+1
|\
| * Suppress warnings in QtOpenGL codeRhys Weatherley2009-10-261-1/+1
| |
* | Remove internal widgets from QApplication::topLevelWidgets()Prasanth Ullattil2009-10-231-1/+4
|/ | | | | | | | | | We have some internal hidden widgets which should not come up in the QApplication::topLevelWidgets() list. So the known ones are being removed from the QWidgetPrivate::allWidgets set. Task-number: QTBUG-739 Reviewed-by: Denis Dzyubenko Reviewed-by: Bradley T. Hughes
* Add a new window surface which utilises QX11GLPixmapDataTom Cooksey2009-10-201-0/+1
| | | | | The new surface uses XCopyArea to post updates to the window and thus, supports partial updates.
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-191-12/+2
|\
| * qt_paint_device_metric() for fetching metricsRhys Weatherley2009-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | Custom window surfaces, graphics systems, and Qt/Embedded screen drivers often need to access QPaintDevice::metric(), but it is protected. Hence the growing number of friends in QWidget and QImage. The qt_paint_device_metric() function provides a more future-proof approach that doesn't require lots of friends. Reviewed-by: Gunnar
| * Centralize all GL paint engine creations into qt_qgl_paint_engine()Rhys Weatherley2009-10-151-11/+1
| | | | | | | | | | | | | | | | | | The qt_qgl_paint_engine() function was being used by QWS, but there's no reason why it can't be used by other platforms too. This should also fix ES 2.0 paint engine support under QWS, which was stubbed out. Reviewed-by: Sarah Smith Reviewed-by: Gunnar
* | Fixed crash in the Boxes demo when using -graphicssystem opengl.Kim Motoyoshi Kalland2009-10-161-0/+6
|/ | | | | | | | | | QGLWindowSurface::flush() assumed that updateGeometry() had been called, but in some cases it hadn't. It would therefore dereference a null pointer and crash. This has been fixed by returning from flush() if updateGeometry() has not been called. This fixes the symptom rather than the bug, so we still need to find out why it hasn't been called. Reviewed-by: Trond
* Make 16-bit graphicssystem opengl workGunnar Sletta2009-10-021-0/+6
| | | | Reviewed-by: Eskil
* Suppress some compiler warnings that occur under OpenGL/ES 2.0Rhys Weatherley2009-09-281-0/+2
| | | | Reviewed-by: trustme
* Make the GL graphics system work under OpenGL/ES 2.0Rhys Weatherley2009-09-281-4/+69
| | | | | | | Very basic port of the graphics system - performance may not be the best just yet. Reviewed-by: Sarah Smith
* Prevented crash in svgviewer in graphics system OpenGL with QGLWidget.Samuel Rødal2009-09-241-0/+2
| | | | | | | Need to make sure the correct context is current when painting on the window surface FBO. Reviewed-by: Kim
* Refactored gl window surface a bit.Gunnar Sletta2009-09-211-37/+43
| | | | | | | | | | | | The logic was a bit messy and didn't work on Mac OS X. On Linux we also had issues with 8xxx nvidia cards which didn't render properly. The FBO is now unbound between calls to beginPaint(), which prevents other gl calls from messing it up, which is probably what was the error in the first place. In addition, on Mac OS X, we also call the upatePaintDevice() as a result of setGeometry() to force-update the dimensions of the context. Reviewed-by: Trond
* context()->makeCurrent() is called above, so this is redundant.Gunnar Sletta2009-09-171-2/+0
| | | | Reviewed-by: Samuel
* Made GL window surface work better with native child widgets.Samuel Rødal2009-09-111-18/+62
| | | | | | | Need to unbind the window surface FBO and re-bind it in the child widget's context before doing a blit. Reviewed-by: Kim
* Do not use FBO as backend for window surface in opengl engineEskil Abrahamsen Blomfeldt2009-09-111-1/+2
| | | | | | | | | | | | There are too many platform regressions when using the FBO as a backend for the opengl engine. We need to find whether it's possible to work around them, but for the time being, to preserve compatibility, we only use FBOs when using the opengl2 engine. Example of issue: Smudged text and smudged diagonal lines on Windows XP when running with opengl engine and latest nvidia driver. Reviewed-by: Trond
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Make QGLWindowSurface use new QGLPaintDevice APITom Cooksey2009-09-081-22/+43
|
* Slightly improved QGLFramebufferObjectFormat API.Samuel Rødal2009-09-041-1/+1
| | | | | | | Renaming setInternalFormat() to setInternalTextureFormat() (and similarly for the accessor) makes the API a bit more explicit. Reviewed-by: Trond
* Fixed issues with using GLenum in public API on mac.Samuel Rødal2009-09-031-1/+1
| | | | | | | | | | The type of GLenum was changed between 10.4 and 10.5, so to support compiling on one and deploying on the other we need this hack. Also get rid of the complex QGLFramebufferObjectFormat constructor in favor of a simple default constructor and setters, which is more Qt-ish anyway, and avoids ambiguities on mac. Reviewed-by: Trond
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Enabled double buffering of window surfaces on Windows.Kim Motoyoshi Kalland2009-07-031-1/+1
| | | | | | | | | | | | Without this, QWindowSurface::flush() doesn't work. Reviewed-by: Samuel
* | Prevented infinite recursion in GL graphics system.Samuel Rødal2009-06-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | If creating a QGLWidget triggers the creation of a QPixmap then we might end up in an infinite recursion due to QPixmap trying to access qt_gl_share_widget(). This can happen via setWindowIcon for example. Adding an initializing flag to QGLGlobalShareWidget and preventing QGLFramebufferObject::hasOpenGLFramebufferObjects() and ::hasOpenGLFramebufferBlit() from creating a QGLWidget every time they are called with no active GL context. Reviewed-by: Trond
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/