summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Re-enabled GL pixmap backend and window surface to work without GL2.Samuel Rødal2009-06-151-0/+12
| | | | | | | | | | | | | | GL window surface and GL pixmap backend should work with old GL engine as well, though not supported to the same degree. Reviewed-by: Trond
* | Made QPixmap autotest pass with -graphicssystem openglSamuel Rødal2009-06-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The window surface has been modified to track widget deletion to make sure it doesn't try to access the widget's context data after deletion. QGLPixmapData now also uses GL_RGB instead of GL_RGBA when appropriate, and hasAlphaChannel() has been modified in view of this. A number of other issues have been fixed in QGLPixmapData, and the autotest has been modified to use a more lenient pixmap compare function due to off-by-one pixel errors here and there. Reviewed-by: Trond
* | Fix build on X11/OpenGL ES 2.0Tom Cooksey2009-05-281-1/+1
| | | | | | | | Reviewed-By: TrustMe
* | Introduced preserved swap buffer path in GL window surface.Samuel Rødal2009-05-251-50/+64
| | | | | | | | | | | | | | | | | | When a buffer swap leaves the back buffer intact we don't have to use an FBO or PB, but can render directly to the window's back buffer, yielding higher performance and depending less on extensions such as multisample FBOs and FBO blitting. Reviewed-by: Trond
* | Reverted use of GL 2 engine as default on desktop.Samuel Rødal2009-05-131-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | Using GL 2 as default engine breaks the use cases where OpenGL commands are inter-mixed with QPainter commands, such as when using raw OpenGL in graphicsview. For now we'll use the old OpenGL engine for QGLWidget, QGLPixelBuffer, and QGLFramebufferObject on desktop, and the OpenGL 2 paint engine when the OpenGL graphics system is used. Reviewed-by: Trond
* | Made GL graphics system work with GLES2 w/o FramebufferBlit extension.Samuel Rødal2009-05-131-10/+11
| | | | | | | | | | | | At the moment, for the GL graphics system to work properly with GLES 2 without the FramebufferBlit extension swapBuffers() needs to preserve the back buffer.
* | Enabled compilation of both GL and GL2 paint engine.Samuel Rødal2009-05-131-7/+11
| | | | | | | | | | | | | | Compile both GL and GL2 paint engine on desktop, and choose between them at run-time based on GL version flags. Reviewed-by: Tom
* | Big GL Extension CleanupTom Cooksey2009-05-061-2/+2
| | | | | | | | | | | | | | | | | | Clean up the extension naming and make things build on OpenGL ES 2.0 again. All the extensions which made it into OpenGL 2.0 spec have have the EXT postfix removed. This also eliminates defines on ES 2.0 as the code now refers to the in-spec names. Reviewed-by: sroedal
* | Fix OpenGL ES 2.0 breakagesTom Cooksey2009-05-051-1/+10
| | | | | | | | | | Enable GL graphics system on ES 2.0 builds - it wont work, but now QGLDrawable is being used it's just easier to build the graphics system.
* | Merge branch 'shader-api' into gl2engine-new-shadersRhys Weatherley2009-05-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: src/opengl/opengl.pro src/opengl/qglextensions.cpp src/opengl/qglextensions_p.h src/opengl/qglshaderprogram.cpp src/opengl/qglshaderprogram.h
| * Compile fix for static builds on Windows for QtOpenGL apps.Denis Dzyubenko2009-04-221-1/+1
| | | | | | | | Reviewed-by: Thiago
| * Make OpenGL/ES 1.1 CommonLite and OpenGL/ES 1.0 builds workRhys Weatherley2009-04-071-0/+4
| | | | | | | | Reviewed-by: trustme
| * Long live Qt 4.5!Lars Knoll2009-03-231-0/+661
|
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-graphics-teamGunnar Sletta2009-04-171-39/+57
|\
| * Use FBOs as pixmap backend in GL graphics system.Samuel Rødal2009-04-161-9/+25
| | | | | | | | | | | | | | | | We now use FBOs to implement render-to-pixmap for the GL pixmap backend. A multisample FBO is used for rendering, and is then blitted onto a non-multisample FBO dynamically bound to the relevant texture. Reviewed-by: Tom
| * Make FBO the default instead of pixel buffers in GL window surface.Samuel Rødal2009-04-161-28/+29
| | | | | | | | Fall back to using pbuffers only if the FBO fails.