summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Get rid of legacy glTexParameterf calls.Samuel Rødal2011-10-283-25/+18
| | | | | | | | | | | ES 1.0 didn't have glTexParameteri, which is why we sometimes used glTexParameterf. However, we shouldn't use glTexParameterf because that's treating integer values as floating point, which is not type safe. ES 1.1+ and ES 2.x have glTexParameteri, and we don't really care about supporting ES 1.0 in any case in Qt 5. Change-Id: I6b586b31ddc418ba319c4cc88f6bb3978fdbd040 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-1/+1
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix compiler warnings.Friedemann Kleint2011-10-271-5/+2
| | | | | | | | - Fix gcc 4.6.X warnings about assigned but unused variables - Remove trailing ';' from inline functions (Clang) Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.Friedemann Kleint2011-10-133-37/+0
| | | | | | Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Removed src/gui/opengl/qopenglcolormap.*Samuel Rødal2011-10-103-404/+0
| | | | | | | | | | The QGLColormap API was used by QGLWidget, not very relevant in the Qt 5 core API. Change-Id: I3c75ac09cbc292e707aea62759c09277f834de8d Reviewed-on: http://codereview.qt-project.org/6333 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed some doc errors in QOpenGLFramebufferObject.Samuel Rødal2011-10-102-31/+14
| | | | | | | Change-Id: Ic132bc31f87900a492a80767aa247c71c48c4a10 Reviewed-on: http://codereview.qt-project.org/6334 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed missing snippets for QOpenGLShaderProgram.Samuel Rødal2011-10-101-3/+3
| | | | | | | Change-Id: Ie44edb3379f6fef4c4c8b69bb5e36fc19154ab26 Reviewed-on: http://codereview.qt-project.org/6332 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Easier shader debuggingJani Uusi-Rantala2011-10-101-8/+48
| | | | | | | | | | - Dumps out also the source code of the failed shader if available Change-Id: I9ae80e6a6749446c5ff54db1bc324cc7411a81a7 Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com> Reviewed-on: http://codereview.qt-project.org/6269 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed crash due to uninitialized pointer in OpenGL texture glyph cache.Samuel Rødal2011-10-071-0/+1
| | | | | | | | Change-Id: I384f82f1549a81e19566484e12c75ce8df1f314f Reviewed-on: http://codereview.qt-project.org/6149 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix ́́`macros' function test of `tst_headers'Sergio Ahumada2011-10-031-0/+6
| | | | | | | | Task-number: QTQAINFRA-324 Change-Id: I3202d9ee42de8174c5170f1b853884b19d5895e3 Reviewed-on: http://codereview.qt-project.org/5925 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use module prefixed include paths, avoids warnings in configure.Pekka Vuorela2011-09-281-1/+1
| | | | | | | Change-Id: I081fa49073da532647836ddd1087c0f5fcf32775 Reviewed-on: http://codereview.qt-project.org/5634 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed crash in QOpenGLFramebufferObject.Samuel Rødal2011-09-271-3/+0
| | | | | | | | | | AMD's Catalyst driver returns true in glIsRenderbuffer() for a newly gen'ed render buffer. Change-Id: I177425dc4b94923431cec5f89175c63782819eef Reviewed-on: http://codereview.qt-project.org/5522 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Implemented texture cache for GL paint engine in QtGui.Samuel Rødal2011-09-125-118/+329
| | | | | | | | | | | This is simpler than the existing texture cache in QtOpenGL, as it only serves the GL paint engine. There's one per context group, to simplify the design and to prevent performance degradations. Change-Id: I61e3c9a444d8e246a8b38da019a56f2c0a533c0c Reviewed-on: http://codereview.qt-project.org/4674 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Fixed auto-test failure in tst_QOpenGL.Samuel Rødal2011-09-121-1/+1
| | | | | | | | | QOpenGLFramebufferObject::height() was returning the width... Change-Id: I521c2df02e00015998dc31a74481113af26e1ba6 Reviewed-on: http://codereview.qt-project.org/4663 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Made FBO blit behave properlyGunnar Sletta2011-09-122-13/+25
| | | | | | Change-Id: Iad9b9823bbcdf1068455f743e5fbc554939f8592 Reviewed-on: http://codereview.qt-project.org/4630 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use the context we're givenGunnar Sletta2011-09-121-1/+1
| | | | | | | Change-Id: I5bdcd1baf1bff86d281664c219098fe841b43fce Reviewed-on: http://codereview.qt-project.org/4629 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* use QtGui/ based includesGunnar Sletta2011-09-091-1/+1
| | | | | | | Change-Id: I763bdba236aef25685d9d0fa2e02741c2f5c141e Reviewed-on: http://codereview.qt-project.org/4507 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Improved and made public the QOpenGLPaintDevice API.Samuel Rødal2011-09-089-301/+197
| | | | | | | | | | | | | The new API is more flexible, allowing the use of QOpenGLPaintDevice with any QOpenGLContext, and putting more responsibility on the user for ensuring the correct FBO is current (the user knows best anyhow). Task-number: QTBUG-21263 Change-Id: I50b954125f552baef52fbb3fe2ed907a11ad519c Reviewed-on: http://codereview.qt-project.org/4325 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fixed crash in tst_QGL::multipleFBOInterleavedRendering().Samuel Rødal2011-09-072-24/+25
| | | | | | | | | Properly check for the ElementIndexUint extension. Change-Id: I8117aa052f2dd697a2dadeb7ce84a415b5fd24c8 Reviewed-on: http://codereview.qt.nokia.com/4311 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix the \since 4.x tags in gui/opengl.Samuel Rødal2011-09-024-38/+5
| | | | | | | | | All this API is "new" since 5.0. Change-Id: I7ba1718a4a24eac00ccc4db1646200e9544ee5a4 Reviewed-on: http://codereview.qt.nokia.com/4131 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix build from scratch.Friedemann Kleint2011-08-301-0/+2
| | | | | | Change-Id: Ifd958a51da2dbaf6afc24ef6a10f8d29e0f5f6d2 Reviewed-on: http://codereview.qt.nokia.com/3888 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Rename remaining gui/opengl source files to avoid name clashing.Samuel Rødal2011-08-3010-27/+27
| | | | | | | | | | We don't want to have source files in the opengl module and gui with the same name, at least not private headers. Change-Id: I5f2bf629c943a67a405574fb148aa4c70e58ecbb Reviewed-on: http://codereview.qt.nokia.com/3864 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Build on Windows/clean build on Linux.Friedemann Kleint2011-08-2910-26/+36
| | | | | | | Change-Id: I26552e85a8e8c63002db93b7d9b645981620f0af Reviewed-on: http://codereview.qt.nokia.com/3738 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>