summaryrefslogtreecommitdiffstats
path: root/examples/gui/openglwindow/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Examples/OpenGLWindow: do not use hardcoded indicesChristian Ehrlicher2019-10-021-11/+14
| | | | | | | | | | | Don't use the hardcoded indices 0 and 1 but the ones returned from QOpenGLShaderProgram::attributeLocation(). Also change them from GLuint to GLint. Fixes: QTBUG-43566 Change-Id: I582bcf899f20d90f4ec1cd61326a177aabb69992 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Cleanup QtOpenGL examplesChristian Ehrlicher2019-09-301-18/+12
| | | | | | | | | | | Cleanup the OpenGL examples - use nullptr (clang-tidy) - use member-initialization - avoid redundant checks for != nullptr when deleting a pointer Change-Id: I3e4702690ed79e71c3e952d51ceef83b907b45b7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-151-2/+2
| | | | | | | | Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Unify license header usage.Jani Heikkinen2016-03-291-3/+13
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Doc: remove unused code from OpenGL Window exampleSamuel Gaist2015-10-071-10/+0
| | | | | Change-Id: Ifb2c7206dee55102eba91b4c30543f3ac4838259 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-151-3/+3
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-5/+5
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-151-2/+2
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Avoid truncation warning in openglwindow exampleLaszlo Agocs2014-02-211-1/+1
| | | | | | | | msvc shows a warning about double -> float truncation. Avoid this. Change-Id: I1b74cf407c81c881df5e95cc7d64a210888595e3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* improve openglwindow example a bitGunnar Sletta2013-03-211-2/+3
| | | | | Change-Id: I50e00c33c100beab975d0fcbfc4ccdd496cccbaf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-6/+6
| | | | | | | | 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>
* Added OpenGL example and documentation.Samuel Rødal2012-08-291-0/+179
Change-Id: I2d9d4e52caf0a39fef9648d8a9e83a0c1328f650 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>