summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Add method to set size of QOpenGLPaintDevice.Kim Motoyoshi Kalland2012-06-012-2/+19
| | | | | Change-Id: Iecc72c64dbb5f35ee41bdeb960bc759cd43b8bcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtGui: remove \link usagesGiuseppe D'Angelo2012-05-291-4/+4
| | | | | Change-Id: Ib8cca14a8fa35fbc631bfea9b4873225eac3677f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-101-3/+3
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Doc: Modularize QtGui documentation.Casper van Donderen2012-05-091-3/+3
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: I5f86f598fbe7c47d632c613b85d94ced89ba2c29 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Fixed QOpenGLBuffer::map and unmap implementations.Samuel Rødal2012-05-071-23/+2
|/ | | | | | | We already have the necessary enablers in QOpenGLExtensions. Change-Id: I90d763516d8b92c09c878133552200c94a46fbf2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Allow creation of QOpenGLShaderProgram without a current contextSean Harmer2012-05-021-3/+3
| | | | | | | | | | | | | | This change prevents the qWarning() in QOpenGLFunctions from being triggered when creating a QOpenGLShaderProgram object without a current QOpenGLContext. This is a common case especially when the shader program is a member variable of a class. It now relies upon the QOpenGLShaderProgram::init() function to resolve the GL function pointers when the shader program is first used which of course should be done with an active context. Change-Id: Ib7dc345593f2a70d72ef8f650151cc90001058ca Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Initialize QOpenGLFunctions before using it in QOpenGLShaderProgramSean Harmer2012-05-021-0/+1
| | | | | Change-Id: I472e97092b05f1721b7df5759d674c213d6018c6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix warning about narrowing inside {}Olivier Goffart2012-05-011-1/+1
| | | | | | | | | | Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reset pointer to 0 after freeingLars Knoll2012-05-011-1/+3
| | | | | | | | | | set m_textureResource to 0 after freeing it, to ensure we allocate a new one two lines below before using it again 5 lines below. Change-Id: Ib9c4de94aefed91f15d0fab0cd3c774a64f2f891 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-173-3/+3
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-161-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * \ Merge master into api_changesKent Hansen2012-03-271-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * | | QtGui: make some constructors explicitMarc Mutz2012-03-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I5b122db2498dbb2aee50c7ad95c67e708aade45b Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | | | Remove incorrect inclusion of GL support headers given EGL presenceDonald Carr2012-04-161-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | The include files have a hard dependency on OpenGL (ES2); testing for the presence of EGL support is insufficient grounds for including this functionality Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | Fixed build issue when using GLEW with MSVCAndy Nichols2012-04-101-0/+2
| |/ |/| | | | | | | | | | | | | | | MSVC does not support the #warning precompiler command and is considered an error when used. This change checks for GCC before issuing the warning. Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Silence a warning about a change of sign.Thiago Macieira2012-03-241-1/+1
|/ | | | | | | | | GLuint is, like the name says, unsigned. To store -1 in it, a change of sign happens. Silence the warning by casting the -1 to GLuint first. Change-Id: I165a32c486358a60f7c5fd0c439204ed2f9f7f16 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unneeded check.Sergio Martins2012-03-101-1/+1
| | | | | | | | It would have already crashed on QOpenGLSharedResource(ctx->shareGroup()). Change-Id: Ib68759457a0fa7e4417dcd30cc40fbabf3df232c Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Enablers for shared graphics cache in raster paint engineJiang Jiang2012-03-082-5/+3
| | | | | | | | | | | | Required changes for using shared graphics cache for distance field raster glyph rendering. Most of the logic is in platform plugins. Platform plugins should implement QPlatformIntegration::createImagePaintEngine() to create a subclass of QRasterEngine. Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-5/+5
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Set texture parameters before allocating the texture.Gunnar Sletta2012-03-011-4/+6
| | | | | | | | Some drivers use this as a hint to decide on weither to preallocate mipmap memory or not. Change-Id: I2fd438a9625b658c7f30fe39a9d63ba5396f9679 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Prevent stack corruption when using OpenGL Core ProfileSean Harmer2012-02-281-1/+2
| | | | | | | | | | | | | When an OpenGL Core Profile context is requested the function glGetStringi() is used to query the supported extensions as glGetString(GL_EXTENSIONS) has been removed in the core profile. The signature for glGetStringi used in Qt missed off the APIENTRY calling convention. This results in stack corruption on windows each time glGetStringi() is called leading to a crash. Change-Id: Iff62c42e2bb5fc4a5c0561fae97ddc5a8ae3a45e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use "OpenGL" instead of just "GL" in documentation.Samuel Rødal2012-02-244-37/+37
| | | | | Change-Id: I81a0beebc0241b9699ce321174e13a93e76e45e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add GL_BGR to the list of defined GL constants, right next to GL_BGRASimon Hausmann2012-02-211-0/+3
| | | | | | | | We use this one in WebKit's OpenGL texture mapper and it would be convenient to have it here if it's not defined by the platform. Change-Id: Idae33e49773e21c6290b164bccd4f209cf9820a2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Corrected the size of mipmaps in framebuffer objects.Kim Motoyoshi Kalland2012-02-151-2/+2
| | | | | Change-Id: Ia3c0daefc6537b12be7f9072e7defc0631794690 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove a couple of QtGui/QtGui header entriesAndy Shaw2012-02-152-2/+2
| | | | | | | | | | Removed a couple of header entries since they were causing build problems on Mac. Additionally it is a bit much to include QtGui/QtGui in a private header file. Added in an include to QCache and QGradient which was necessary afterwards. Change-Id: I442efc799a4c81b50ec30d58f1aedfb08e686fcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added support for resetting QOpenGLFramebufferObject attachments.Samuel Rødal2012-02-153-27/+82
| | | | | | | | | | As the documentation says, this can be useful to free or recreate attachments when needed. For example, it might be useful to free stencil and depth attachments to free up resources when not rendering to the framebuffer object. Change-Id: Ib267024fdd380a788c256eb8fb86e0f8832329e0 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Produce unimplemented warning for QOpenGLBuffer::map only onceAlex Wilson2012-02-151-2/+10
| | | | | Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't crash when source or target is nullGunnar Sletta2012-01-301-2/+18
| | | | | Change-Id: I4992867ad764bd1bd175478c6be1094ca8a72812 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3037-37/+37
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduced QOpenGLContext::defaultFramebufferObject().Samuel Rødal2012-01-273-4/+9
| | | | | | | | Also add some debugging helpers to make sure applications are correctly written even on less restrictive platforms. Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2512-12/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move glyphMargin() to QFontEngineJiang Jiang2012-01-241-1/+1
| | | | | | | | | | | | | glyphMargin() support for QTextureGlyphCache is implemented in respective font engines, thus this function is platform dependent. Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC, now we should move them into QFontEngine and its subclasses. So far only Windows font engines support it. FreeType and Core Text based font engines all ignore it. Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Allocate mipmaps in FBOs with glTexImage2D, not glGenerateMipmap.Kim Motoyoshi Kalland2012-01-241-2/+12
| | | | | Change-Id: I7b7d26da97f82f354d81913eccab46d79ec9e8f0 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make it possible to compile with -no-opengl.Andreas Holzammer2012-01-247-37/+66
| | | | | | | | | | | | | This takes out the dependency to the header files of OpenGl. The ifdef QT_NO_OPENGL in the opengl headers are needed, as qmake adds depends in the makefiles for all GUI headers. Task-number: QTBUG-23207 Change-Id: If31448ee35fd8c39194c7cb7d62273fbc6def883 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Mark QTriangulatingStroker as Q_GUI_EXPORTAlex Wilson2012-01-231-1/+1
| | | | | Change-Id: I6083ba122c33769cd4626f2c4a32959e535da8a4 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2337-37/+37
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compilation of Qt itself with QT_NO_DEBUG_STREAMDavid Faure2012-01-121-4/+2
| | | | | | | Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Don't include qdialog.hLars Knoll2012-01-121-1/+0
| | | | | Change-Id: I67d48653b90f31d018c77ec069eb559ac46f9275 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed QOpenGLShader::log().Kim Motoyoshi Kalland2012-01-111-1/+0
| | | | | | | | log() returned an empty string because the compile log was stored in a local variable rather than the member variable. Change-Id: I60142fd0bccfcbb495cea430b583f81fb0241329 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* We should return texture id 0 for invalid images and pixmapsJørgen Lind2012-01-101-0/+4
| | | | | | | in the texture cache Change-Id: Ib9bb136fa451c571fce2adbee29998b3f3593b31 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-061-9/+9
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0537-37/+37
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Export QOpenGLTextureCacheJørgen2012-01-041-1/+1
| | | | | | | | | | because it can be useful outside QtGui. The function QOpenGLTextureCache::bindTexture gives a very convenient way to get a texture from an image. Change-Id: I2e22c0a3a8f1f307d0b558280043f726e3d8093a Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove template <class T> class QRingBufferJoão Abecasis2011-12-121-72/+0
| | | | | | | .. as it is declared and defined in .cpp file but never used. Change-Id: I7b72daf62712b4ec25717afbe2b7f0792ffa2a85 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* opengl: Do not crash when programGuard is a nullptrHolger Hans Peter Freyther2011-12-011-1/+1
| | | | | | | | The rest of the code is checking programGuard for nullptr, do it here as well to prevent a segmentation fault. Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtGui: Fix a crash in OpenGL on Windows.Friedemann Kleint2011-11-291-0/+4
| | | | | | | Add missing WINAPI calling convention for QOpenGLFunctions. Change-Id: I43827d801c5ecc3859d8d4ba0bb9bccc108880e7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add comment to the obscure initialization of QOpenGLFunctions.Friedemann Kleint2011-11-281-0/+4
| | | | | Change-Id: I9386c0e3b158a675e2dcbce34eecb57edf0ac27b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed compile of QtGui with -qtnamespace.Rohan McGovern2011-11-171-4/+4
| | | | | | | | GL headers should not be included inside of the Qt namespace. Change-Id: Ib19cbd3ab7b071a96e0816798f8ebc3fd4e28448 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Fix subpixel positioning supportJiang Jiang2011-11-081-6/+7
| | | | | | | | | | | | Move subpixelPositionForX from QTextureGlyphCache to QFontEngine, since some font engines like QFontEngineFT may need a custom implementation or tweak it a little bit. In QRasterPaintEngine::drawCachedGlyphs, do not add aliasedCoodinate to x offset as that will break subpixel positioning. Change-Id: Idbcec617509459b80965220ceb07b17737649bbf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>