aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/rendercontrol
Commit message (Collapse)AuthorAgeFilesLines
* Enable shader disk cache in Qt QuickLaszlo Agocs2016-11-271-2/+2
| | | | | | Change-Id: I14ee97ee75664c5dfcd229a5be2be6294c936b2c Task-number: QTBUG-55496 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* examples: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-032-8/+8
| | | | | | | | While touching the code, replace QStringLiteral with QL1S in QStringBuilder expression. Change-Id: I2519b254d82453e1c9bd5b834c0bd78e5c026f83 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-2/+3
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * Don't call render during expose, since we are already calling render().Jan Arve Saether2016-02-051-2/+3
| | | | | | | | | | | | | | | | | | This causes drawing artifacts on Win7 with ANGLES d3d11 backend. Task-number: QTBUG-49923 Change-Id: I801282c4359bd485d1894e409e34393b4264d994 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-201-16/+33
|/ | | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: I09ba19590e9425d5116a6c27cbc183debb485dde Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Port examples to new connection syntax.Friedemann Kleint2015-07-222-2/+2
| | | | | Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix rendercontrol example for screens with different dprLaszlo Agocs2015-04-282-2/+29
| | | | | | | | | | | | | | | | renderWindow() was not reimplemented in the example. This is pretty bad since renderWindowFor() fails to find a window and thus falls back to using the default device pixel ratio (which is the highest dpr present in the system). The result is broken content from Quick because it operates with a dpr of 2 any time a retina screen is connected, even when the example's own QWindow is placed on a normal screen. Add also a note to the QQuickRenderControl docs because it is easy to overlook. Task-number: QTBUG-45613 Change-Id: I31bf92ec285f3d9867a5604a4b4e3bea73791932 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Recreate the FBO on dpr change in rendercontrol exampleLaszlo Agocs2015-04-282-5/+28
| | | | | | | | | Even when the window size is not changing. This provides a useful example of connecting to the screenChanged() signal. Task-number: QTBUG-45613 Change-Id: I0652838d9c0cfec8b64b3422997159f385445b20 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Avoid showing garbage when resizing the rendercontrol exampleLaszlo Agocs2015-04-281-0/+1
| | | | | | | | | | | The threaded variant was working well since that triggers a render when resizing. The single threaded version lacked this and this resulted in showing garbage on OS X at least since the new FBO had undefined contents. Avoid this. Task-number: QTBUG-45613 Change-Id: Ibb3d3f7640bab5da913df1c0c63cc3a3aaafb140 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Address uninitialized pointer variablesHolger Hans Peter Freyther2015-04-202-3/+11
| | | | | | | | Coverity CID 10721, 84861, 86705, 85424, 85422, 85259, 84863, 84857 Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-177-21/+21
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Update copyright headersJani Heikkinen2015-02-129-48/+48
| | | | | | | | | 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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Prevent windows outside the gui thread in rendercontrol exampleLaszlo Agocs2015-01-074-11/+15
| | | | | | | | | | | | | | | | In the multithreaded case we attempted to create QWindows outside the gui thread on platforms where QOffscreenSurface is backed by the hidden QWindow in the absence of a better solution. This has to be avoided. Therefore, pass a suitable surface from the gui thread instead. This will avoid "Attempting to create QWindow-based QOffscreenSurface outside the gui thread." type of warnings when running on OS X with --threaded. Change-Id: Ie3ebeeeaa9e6bdf83e763e40213e2940fbfde667 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* rendercontrol example: calculate fbo size correctlyLaszlo Agocs2014-12-181-1/+1
| | | | | Change-Id: Ida1e7cb9426d31ed6406dd6db86f5834f0f1a6ac Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* rendercontrol example: Add missing flushesLaszlo Agocs2014-12-172-0/+3
| | | | | | | | Otherwise we will show broken output with some drivers. QQuickWidget does this already. Change-Id: I5193595c4606d0497dbe85f6f8c670618ca366e9 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Support threading with QQuickRenderControlLaszlo Agocs2014-12-128-201/+938
| | | | | | | | | | | | | | | | | | | | | Reorganize the rendercontrol example to demonstrate both the single and multi threaded approaches. A small helper function is introduced to the QQuickRenderControl API: The QSGRenderContext has to live on the render thread. Previously there was no way for applications to move it to the desired thread. This is now possible. Pass --threaded to the rendercontrol example to use a separate render thread. [ChangeLog][QtQuick] QQuickRenderControl can now be used to render the Qt Quick scene on a dedicated render thread, similarly to how the built-in threaded render loop operates. Task-number: QTBUG-42813 Change-Id: I01c3b2ffca8a174d9d2c267a51f2e484ed7b34b3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Avoid crashing the rendercontrol example on exitLaszlo Agocs2014-09-181-2/+5
| | | | | | Task-number: QTBUG-41278 Change-Id: I456467698e66fb28f1bf6a05d85771ac25f454d0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Tune the colors in the rendercontrol exampleLaszlo Agocs2014-09-101-10/+11
| | | | | Change-Id: I904782e6a54c8df63a2e187cdfed5a3193ff2a54 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Make QQuickRenderControl publicLaszlo Agocs2014-06-248-0/+801
QQuickRenderControl allows rendering Qt Quick 2 scenes into framebuffer objects which can then be used in arbitrary ways in Qt-based or 3rd party OpenGL renderers. [ChangeLog][QtQuick] Introduced QQuickRenderControl as a public API. Task-number: QTBUG-37944 Change-Id: I84262243b261b35cefdf67ec6bba8127a0f29275 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>