summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglshaderprogram.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* OpenGL: Remove API for stubbed Geometry shader support in gui/openglSean Harmer2012-09-241-132/+1
| | | | | | | | | | | | | | | There is a pending patch to reinstate this for Qt 5.1 (the patch introduces new API top QOpenGLContext). I will fold the revert of this patch into: https://codereview.qt-project.org/#change,31231 Note that QGLShaderProgram still supports Geometry shaders so source compatibility with Qt 4.8 is maintained. Change-Id: I53faedd4e4a2a6c2a9765afdc1bee6df5ae2f711 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make gui/math3d classes use float rather than qrealSean Harmer2012-09-071-44/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mismatch between using floats for internal storage and qreal in the API of QVector*D which leads to lots of implicit casts between double and float. This change also stops users from being surprised by the loss of precision when using these classes on desktop platforms and removes the need for the private constructors taking a dummy int as the final argument. The QMatrix4x4 and QQuaternion classes have been changed to use float for their internal storage since these are meant to be used in conjunction with the QVector*D classes. This is to prevent unexpected loss of precision and to improve performance. The on-disk format has also been changed from double to float thereby reducing the storage required when streaming vectors and matrices. This is potentially a large saving when working with complex 3D meshes etc. This also has a significant performance improvement when passing matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no longer have to iterate and convert the data to floats. This is an operation that could easily be needed many times per frame. This change also opens the door for further optimisations of these classes to be implemented by using SIMD intrinsics. This needs to be applied in conjunction with https://codereview.qt-project.org/#change,33548 Task-number: QTBUG-21035 Task-number: QTBUG-20661 Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+2
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed QOpenGLFunctions API.Samuel Rødal2012-06-181-1/+1
| | | | | | | | | We don't use the GL short term in the new API. Change-Id: I73a51f65f5f4216c1763b95dcddf68fe8fc229d1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* 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>
* 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@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>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@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>
* 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>
* Fix the \since 4.x tags in gui/opengl.Samuel Rødal2011-09-021-23/+1
| | | | | | | | | 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>
* Build on Windows/clean build on Linux.Friedemann Kleint2011-08-291-0/+2
| | | | | | | 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>
* Compile without QT_DEBUG.Morten Sorvig2011-08-291-1/+1
| | | | | | | Change-Id: I3dadcdd83f45451d712703601d46adbc1691291b Reviewed-on: http://codereview.qt.nokia.com/3727 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clean up legacy defines in gui/opengl.Samuel Rødal2011-08-291-46/+0
| | | | | | | Change-Id: I14d477c3f7a98cecca2c0a240ff13ea8ec64a154 Reviewed-on: http://codereview.qt.nokia.com/3716 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-291-0/+3171
Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>