summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed potential use of uninitialized variable in qgl.cppSamuel Rødal2012-09-211-1/+1
| | | | | | | | | If glGetBooleanv fails this variable is left uninitialized. Task-number: QTBUG-26952 Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438 (cherry picked from commit 0d55b4596f490f8f64eb3134e77e59df7d1c16f9) Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Prevent stack corruption when using OpenGL Core Profile on WindowsSean Harmer2012-03-061-1/+1
| | | | | | | | | | | This is the backport of commit 1c5b2de9b75a5e74fd7d511fea71edc382d539b6 to qtbase. Change-Id: I8680c20c8b804fb4e77062f52b8f4188b49263a8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Clear error due to FRAMEBUFFER_SRGB_CAPABLE_EXTJani Hautakangas2011-11-031-0/+3
| | | | | | | | glGetBooleanv generates an error if this param isn't supported. This error generates wrong warnings in later states. Reviewed-by: Eskil
* Add GL_EXT_texture_format_BGRA8888 support.Jani Hautakangas2011-11-031-1/+2
| | | | | | | | | QtOpenGL supports GL_IMG_texture_format_BGRA8888 but GL_EXT_texture_format_BGRA8888 is missing. These extensions are essentially the same. Task-number: QTBUG-22538 Reviewed-by: Samuel Rødal
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-10-271-1/+10
|\ | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix possible crash in glyph cache when deleting and creating contexts
| * Fix possible crash in glyph cache when deleting and creating contextsEskil Abrahamsen Blomfeldt2011-10-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | The freeResource(), used in the glyph cache as a notifier of when the owner context of the cache disappears, is never called if the context is in a group with other contexts that share its resources. This implements a second notifier function instead which can be used to invalidate the glyph cache when its context is destroyed. Task-number: QTBUG-22324 Reviewed-by: Samuel
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-251-2/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qeventdispatcher_symbian.cpp src/declarative/qml/qdeclarativetypeloader.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/opengl/qgl.cpp src/opengl/qgl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qclipboard/test/test.pro tests/auto/qsound/qsound.pro
| * Workaround to VideoCore III scissor bug.Jani Hautakangas2011-10-191-0/+2
| | | | | | | | | | | | | | | | | | | | Some versions of VideoCore III drivers seem to pollute and use stencil buffer when using glScissors. Workaround is to clear stencil buffer before disabling scissoring. Task-number: QT-5308 Reviewed-by: Samuel Rødal
| * Fix to QGLWidget crashJani Hautakangas2011-10-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | QGLWidget crashed due to regression caused by fix to QTTH-1553. Crash only occurred if application was locked to landscape mode but started when device was in portrait mode. Task-number: QTTH-1597 Reviewed-by: Laszlo Agocs
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-071-1/+19
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/getting-started/installation.qdoc doc/src/platforms/platform-notes.qdoc src/corelib/tools/qlocale_symbian.cpp src/gui/kernel/qwidget_p.h src/network/access/qnetworkaccesshttpbackend.cpp src/opengl/qgl.cpp src/plugins/bearer/symbian/qnetworksession_impl.cpp
| * Do not let QGLContext get out of sync when doing mixed VG-GL renderingLaszlo Agocs2011-10-061-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default graphics system is openvg, this means that apps using QGLWidget (despite the official recommendation), without explicitly setting opengl as the graphics system will use both the openvg and opengl modules to perform rendering. This presents some problems because QtOpenGL's comes with its own wrapper over QEglContext, and making a foreign QEglContext (e.g. from VG) current will cause its state to get out of sync, resulting in various drawing issues due to skipped makeCurrent and similar calls. The patch works this around by querying the current context from EGL in QGLContext::currentContext() and returning null if the EGLContext does not match. This somewhat ugly workaround ensures that at least QGLContext::currentContext() will not lie: It will not return a valid pointer when the underlying QEglContext's underlying EGLContext is not actually the current context. This will allow e.g. QGLPaintDevice::beginPaint to correctly recognize the need for making the GL widget's context current and thus avoid various rendering issues in certain games. Task-number: QTTH-1553 Reviewed-by: Jani Hautakangas
* | Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-07-041-0/+1
|\ \ | |/ | | | | | | | | | | Conflicts: doc/src/external-resources.qdoc src/gui/text/qtextlayout.cpp src/opengl/qwindowsurface_gl.cpp
| * Introduce QPixmap::fromSymbianRSgImage(RSgImage*) to GL engineJani Hautakangas2011-06-301-0/+1
| | | | | | | | | | | | | | | | Initial implementation of QPixmap::fromSymbianRSgImage(RSgImage*) on OpenGL graphics system. Task-number: QTBUG-15254 Reviewed-by: Laszlo Agocs
* | Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-06-221-6/+49
|\ \ | |/ | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qpixmapdata_symbiangl.cpp src/opengl/qwindowsurface_gl.cpp
| * Add missing freeTexture() from fix for QTBUG-19180Jani Hautakangas2011-06-091-0/+22
| | | | | | | | | | Task-number: QTBUG-19180 Reviewed-by: TRUSTME
| * Simplify texture pooling logic in GL graphics system.Jani Hautakangas2011-06-091-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove ugly TemporarilyCachedBindOption and use QGLTexture objects as texture pool entries instead of QGLPixmapData. Make texture pooling totally Symbian specific, remove VG like texture pooling code and use common texture binding path which is used on other platforms also on Symbian. QGLPixmapData should be only used to bind SgImage based textures (will be implemented by another commit). Task-number: QTBUG-19180 Reviewed-by: Samuel Rødal
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-06-171-0/+7
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/righttoleft.qdoc examples/draganddrop/fridgemagnets/main.cpp examples/script/context2d/main.cpp
| * | Silence the "array out of bounds" warning in GCC 4.6.Thiago Macieira2011-06-141-0/+7
| | | | | | | | | | | | | | | | | | | | | I can't find anything wrong with this code, so tell GCC simply to shut up. Reviewed-by: Trust Me
* | | Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-05-241-17/+24
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qrawfont.cpp src/gui/text/qtextlayout.cpp src/gui/util/qscroller.cpp src/gui/widgets/qlineedit.cpp
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
| * | Support gamma correction of text on GLEskil Abrahamsen Blomfeldt2011-05-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the SRGB framebuffer extension in GL is available, we can support gamma correction of text with a gamma of 2.1. On Mac this is sufficient for gamma correcting subpixel antialiased text. Gray antialiasing should not be gamma corrected on Mac. On Windows, the user can potentially set the gamma value to anything between 1.0 and 2.2 (or something like that). We support anything that resembles 1.0 closely enough by pushing the text out without any correction (like before). We also support anything that resembles 2.1 (the gamma hardcoded in GL's SRGB extension) by turning on the extension before blending the text. In between the two, we'll use gray antialiasing to avoid differing too much from the raster engine (which is our reference in this.) For gray antialiasing on Windows, we use a constant gamma of 2.3 which has been determined by experimentation. Since this is close enough to 2.1 we do gamma correction with SRGB extension. The distance limit of 0.2 is determined by some experimentation. Reviewed-by: Samuel
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-04-181-6/+74
|\ \ \ | |/ / | | | | | | | | | Conflicts: examples/webkit/webkit.pro
| * | Remove hasOpenGL. This changes breaks binary compatibillityJørgen Lind2011-04-141-4/+0
| | | | | | | | | | | | | | | so you will need to use $QTBUILDDIR/bin/syncqt and recompile all applications
| * | Made extension resolving work with Core profile.Samuel Rødal2011-04-051-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Core profile was introduced in OpenGL 3.2 and if chosen removes all deprecated functionality from the OpenGL API. In the Core profile glGetString(GL_EXTENSIONS) is unsupported, so instead we need to use glGetStringi(GL_EXTENSIONS, index) together with glGetIntegerv(GL_NUM_EXTENSIONS). Also optimized the QGLExtensionMatcher to not have to recompute the split positions all the time. Preliminary support to prevent non-core-functions to be called in the GL 2 engine has also been added. Reviewed-by: Kim
| * | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| | * Don't include qwindowsurface_gl_p.h on QT_OPENGL_ES_1.Samuel Rødal2011-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | This causes linker errors since qwindowsurface.cpp isn't compiled. Task-number: QTBUG-14217 Reviewed-by: Eskil Abrahamsen Blomfeldt
| * | Reset GL glyph cache when texture limit is reachedEskil Abrahamsen Blomfeldt2011-03-231-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a port of 72f161739b270b01807f97cd853030440f0fd430 which was reverted in integration to master, since it was incompatible with the refactored glyph cache. When the GL glyph cache reached its texture limit, we have to reset it and start over. Added a new cleanup() function in QGLContextGroupResourceBase which deletes the resource for a given context and removes itself from that context group. Task-number: QTBUG-13784 Reviewed-by: Samuel
* | | Doc: Clarified and tidied up OpenGL overlay color documentation.David Boddie2011-04-151-9/+4
|/ / | | | | | | Task-number: QTBUG-701
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-teamaavit2011-03-211-0/+3
|\ \
| * | Optimized glyph uploads in GL texture cache.Samuel Rødal2011-03-211-0/+3
| | | | | | | | | | | | | | | | | | | | | Avoid doing a lot of glTexSubImage2D calls in favor of doing a single call (even if it involves an additional image copy). Reviewed-by: Eskil
* | | Merge remote-tracking branch 'origin/master' into lighthouse-masterJørgen Lind2011-03-171-1/+17
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: mkspecs/qws/macx-nacl-g++/qplatformdefs.h
| * \ \ Merge remote-tracking branch 'origin/4.7' into HEADThiago Macieira2011-03-161-1/+17
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/symbian-gcce/qmake.conf qmake/generators/metamakefile.cpp qmake/generators/win32/mingw_make.cpp src/corelib/global/global.pri src/corelib/global/qglobal.h src/opengl/qgl.cpp src/opengl/qwindowsurface_gl.cpp src/plugins/platforms/wayland/qwaylandbuffer.h tests/auto/qnetworkreply/tst_qnetworkreply.cpp tools/designer/src/components/formeditor/qdesigner_resource.cpp
| | * Initial implementation of GLES2.0 resource poolingJani Hautakangas2011-03-151-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the implementation in separate qpixmapdata_poolgl.cpp file until the pooling has been verified and confirmed to work ok. Task-number: QTBUG-15253 QTBUG-17850 Reviewed-by: Samuel Rødal
* | | Merge remote-tracking branch 'origin/master' into lighthouse-masterJørgen Lind2011-03-011-1/+1
|\ \ \ | |/ /
| * | OpenGL Framebuffer FormatGerhard Roethlin2011-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL's framebuffer contains data with premultiplied alpha images, so QImage::Format_ARGB32_Premultiplied should be used instead of QImage::Format_ARGB32 to store it. Alternatively, the color values could be divided by the alpha to restore the original color. Merge-request: 1102 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Dont include EGL header when compiling with QT_NO_EGLJørgen Lind2011-02-091-1/+1
| | |
* | | Lighthouse: Fix if context isSharing setup for QGLContextJørgen Lind2011-02-071-0/+2
|/ /
* | Merge branch 'master' into lighthouse-masterJørgen Lind2011-01-261-1/+1
|\ \
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| | * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Remove Lighthouse specific code in QGLWidget constructorJørgen Lind2011-01-041-34/+0
|/ / | | | | | | | | | | | | | | | | truth to be told, I can't remember why I decided that it was a good idea to have the code there. But clearly now I don't think so anymore. Such initialisation should happen in qgl_qpa.cpp chooseContext. If we tear down the window and the context then that has to be solved elsewhere.
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-201-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/plugins/phonon/mmf/mmf.pro src/s60installs/s60installs.pro tests/auto/qapplication/test/test.pro tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * Add work around for bug when painting w/glTexSubImage into large textureEskil Abrahamsen Blomfeldt2010-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that copying small rectangles from glTexSubImage2D into a texture which is 2048x2048 is busted on some SGX drivers, even though the driver reports 2048 as the maximum texture size. This caused text to turn into flickering garbage once the texture glyph cache had grown to its max size (e.g. when painting very many Chinese glyphs.) To work around the problem, we hardcore the maximum texture height to 1024 on this driver so that the texture glyph cache is reset whenever that size is exceeded. Task-number: QT-3971 Done-with: Samuel
* | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-12-081-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (101 commits) Fix QTextEdit::selectAll crash from textChanged() Fix proxy reading from gconf so that it is only done once / session. rebuild configure fix misleading uppercasing deprecation warning Enable Phonon on Symbian by default. Disable OpenGL on Symbian only by default instead of always VFP type on ARM option in Linux configure script Adding -dont-process option to Unix configure script Synchronized configure.exe OpenGL options with Unix configure build lrelease as part of the "libs" part. purge vestiges of imageformat-plugins Unify epocroot usage in createpackage and patch_capabilities scripts Update visual tests for the recent qmlviewer change Do not use openGL on Mac OS X for QML visual tests Give qmlviewer a minimum size if root object has no size. Add 'Writing New Components' docs, and document the connect() function. Mention that image providers should be added before loading QML files Update QML visual tests Cleaned up sis_targets.prf Append qml import path individually for each available drive on Symbian ...
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-061-0/+4
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/win32/msbuild_objectmodel.cpp src/gui/image/qpnghandler.cpp src/network/access/qnetworkaccessdatabackend.cpp src/opengl/qgl_x11egl.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp