aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph
Commit message (Collapse)AuthorAgeFilesLines
* examples\..\scenegraph.pro: Remove duplicate entry textureinsgnodeFriedemann Kleint2016-12-011-1/+0
| | | | | | | | | | Fixes build warnings: Cannot add commands to previously defined target sub-textureinsgnode-qmake_all. Cannot add commands to previously defined target sub-textureinsgnode. Cannot add commands to previously defined target sub-textureinsgnode-make_first. Change-Id: Ieaa8b688fa112d42efa05721ff3bfe251036a69b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-293-5/+5
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* rendernode example: do not rely on build-time shader compilationLaszlo Agocs2016-11-225-22/+21
| | | | | | | | | | | | There is no public intrastructure for this. Relying on the internal qmake rule in qtdeclarative is wrong as it is not meant for public consumption and is not available in out of tree examples in the installed Qt anyway. Instead, ship the bytecode for now. Task-number: QTBUG-56327 Change-Id: I19327aa880ad573560d1e9376f36c67aa509b51a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QSGRendererInterface: Add Resource suffix for consistencyLaszlo Agocs2016-11-182-3/+4
| | | | | Change-Id: I60e674760725d4c4dd13f53b31c3abb6b09c1790 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use d3d12 feature in rendernode exampleLaszlo Agocs2016-10-114-7/+6
| | | | | | | | Migrate the example away from config_d3d12 and make the feature public. Task-number: QTBUG-56327 Change-Id: I88809b8c41282cd75952d085cfd539a5d80f3f38 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Adjust decarative after qtConfig changes in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | Most of the changes are optional, but cleanup our QT_CONFIG usage. Change-Id: I5253d53f72f6fb03c2cfedae1e17d94f424a6bbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* softwarerenderer example: fix ambiguous reference to QQuickItemShawn Rutledge2016-08-171-2/+1
| | | | | | | | | | GCC 6 says (with paths trimmed) In file included from customrenderitem.cpp:47:0: softwarerenderer.h:51:35: error: expected ')' before '*' token softwarerenderer.h:61:5: error: reference to 'QQuickItem' is ambiguous Change-Id: I70b328426ac48f5f6140d1ad4f015858979b99a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-172-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| | * Shader examples: initialize all membersEdward Welbourne2016-08-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Coverity (CIDs 161677, 161674) caught us setting a bad example in our example code. Change-Id: I395f689586f9a6ad783328b9258096cbc9ccd692 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | QSG: Make example namespace-awareErik Verbruggen2016-08-031-0/+4
| | | | | | | | | | | | | | | Change-Id: Ic2c101d49f4140a85f2e9f79c8df78e38a4404f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-08-031-2/+2
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| | * | Doc: minor spelling issueNico Vertriest2016-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I18316de7c0eaee98a7eb0aa274c06864af471116 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | | Add optional flags and rect to QSGRenderNodeLaszlo Agocs2016-08-026-1/+37
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having rendernodes triggering fullscreen updates with the software backend is not ideal. Therefore, introduce the option of reporting that the rendernode is well-behaving, meaning it only writes inside the reported bounding rectangle. Similarly, the OpenGL batch renderer can keep using the depth buffer when the rendernode is known to behave like the renderer expects. Change-Id: I6acc434432c2504776f26e8917b5434b44be293d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | software: Add support for QSGRenderNodeLaszlo Agocs2016-07-197-6/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have to change getResource() a bit since it turns out it is not suitable currently for backends that do not have a per-window rendercontext and do not implement the interface on the rendercontext. Pass in the window to make sure it can always figure out which window we want the resources for. (we do not want rendererInterface() to return window-specific instances created on the fly, with ownership issues, so stick with the simple model where backends implement the interface on one of their existing classes) To support clipping, QSGRenderNode::RenderState is extended accordingly. Also updated the docs since some claims in the rendernode docs are not true since Qt 5.3. Change-Id: I34779c83926f5231b888fcab7131e873ae97964f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | D3D12: Fix the rendernode example for multisamplingLaszlo Agocs2016-07-012-1/+21
| | | | | | | | | | | | | | | | | | | | | Show how this can be handled in the custom QSGRenderNode implementation. Change-Id: Id6f18ca568a4850060f957998532815bce5c4ac5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Enhance rendernode example with opacity supportLaszlo Agocs2016-06-035-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | The opacity is already animated in the QML scene but enabling blending and using inheritedOpacity() was not done. Until now. Change-Id: Iaaf50c20302e29db85c5dfaeaab4d069cb18714e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | One GraphicsInfo to rule them allLaszlo Agocs2016-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename RendererInfo to GraphicsInfo. Deprecate OpenGLInfo and move the surface format properties into GraphicsInfo. Move also the shader info properties from ShaderEffect. Change-Id: I3b3f01080e059b3a30a132fd67de19a4bfca54ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-011-1/+1
| | | | | | | | | | | | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Refactor the rendernode exampleLaszlo Agocs2016-05-316-112/+94
| | | | | | | | | | | | | | | | | | | | | | | | By removing the Renderer abstraction it becomes easier to follow and understand. Change-Id: Iddacb461d51a75864983850660c5480985b3524f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into HEADLaszlo Agocs2016-05-242-6/+7
|\| | | | | | | | | | | Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-192-6/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| | * Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-05-192-0/+6
| | |\ | | | | | | | | | | | | Change-Id: Ib7f8c60143c1efab279476dba390a3d9837ccc37
| | | * actually build the 'graph' exampleOswald Buddenhagen2016-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I297e302b4672bcd05543b88d7da9318ae81a00b4 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
| | | * fix example installsOswald Buddenhagen2016-05-132-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie6a219392a48fd6b1a32037cc215dc20d408e819 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * | decruft project fileOswald Buddenhagen2016-05-121-6/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | the "generated by qt creator" header is not supposed to be checked in. Change-Id: I379e91a44e693eb549c77517a482d1cee9153495 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | | Add rendernode example so that it gets builtLaszlo Agocs2016-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Suitable for -no-opengl too. It may not work at runtime if D3D is not available either but build-wise it should be ok. Change-Id: Icbcd736908707719cecd1bf006fb5e1904504160 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Fix building with QT_NO_OPENGL definedAndy Nichols2016-05-062-8/+13
| | | | | | | | | | | | | | | Change-Id: Ice6c47f766899e7313b9dde8cfcd6d81eeaf52f5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Use RendererInfo in the rendernode exampleLaszlo Agocs2016-05-033-69/+4
| | | | | | | | | | | | | | | | | | | | | Simplifies things a lot. Change-Id: I57fbedeeb99884aa5b14532c7be33f6373551b5f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Make rendernode suitable for public consumptionLaszlo Agocs2016-04-2011-0/+983
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-OpenGL APIs the primary (and likely the only) way to add custom rendering into the Qt Quick scene is via the render node. Other approaches,like the before/afterRendering signals, QQuickFramebufferObject, remain OpenGL-only. (although QQuickFramebufferObject may get a multi-API replacement based on QSGRenderNode at a later time) Note that this is not a generic 3D content integration enabler. It targets creating 2D and 2.5D Quick items with custom rendering via the graphics API in use. Make QSGRenderNode public, enhance the docs a bit and add a releaseResources(). Add a QSGRendererInterface with a query function in QQuickWindow and QSGEngine. The scenegraph adaptation can then return a custom implementation of the interface. This will be necessary to query API-specific values, f.ex. the ID3D12Device and ID3D12CommandList when running with the d3d12 backend. The interface allows querying the API and void* resources. Resources that we know about in advance are enum-based to prevent the QPlatformNativeInterface-like ugliness of string keys. Support is there in the batch renderer already, fix this up according to the new public API, and implement the corresponding bits for the D3D12 renderer. For D3D12, fix also an issue with QSGNode destruction where graphics resources in use were attempted to be final-released without a proper wait. The semantics of changedStates() in QSGRenderNode is changed so that it can be called at any time, including before render(). This is very useful since we can implement some state restoring in a more efficient manner. Added a new example as well. Documentation for QSGRenderNode is heavily expanded. Change-Id: I4c4a261c55791d0e38743a784bc4c05a53b3462d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* / Updated license headersJani Heikkinen2016-01-2014-232/+470
|/ | | | | | | | | | | 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-224-13/+13
| | | | | Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Include QQuickWindow::resetOpenGLState() in OpenGL under QML example.Gunnar Sletta2015-04-212-0/+7
| | | | | Change-Id: Ieae110475dfb3f91d68919c7075054b5400f9e73 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-1732-96/+96
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Update copyright headersJani Heikkinen2015-02-1253-295/+295
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-161-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| * Fix compile issue with -opengl dynamic on WindowsAndy Shaw2014-12-181-3/+5
| | | | | | | | | | Change-Id: I2b17482c0e8d04718e91b9772784afce4ebdc101 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Add hint regarding alpha fbo's in the textureinthread example.Gunnar Sletta2014-11-171-0/+2
|/ | | | | | Change-Id: I92e6a7c2ca9e9f229b1fc463feea9f657ae18db9 Task-number: QTBUG-42486 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Added an example that shows how to consume texture providers from C++.Gunnar Sletta2014-08-269-1/+608
| | | | | | | And how to use use two textures in the same material. Change-Id: Idcc618ed359422c2a104eeed105b7c4f5086ee4e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Mark custom node in textureinthread dirty after rendering textureTasuku Suzuki2014-08-261-0/+2
| | | | | Change-Id: I4401a6db18b1fcc69403062f3f4775d3b62dfd3e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new licensesJani Heikkinen2014-08-2514-266/+154
| | | | | | | | | - 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>
* Doc: Remove duplicated wordsTopi Reinio2014-08-121-1/+1
| | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Expose the scene graph publically through a QSGEngine classJocelyn Turcotte2014-08-017-0/+395
| | | | | | | | | This change wraps QSGRenderContext and QSGContext in a new QSGEngine class, and expose a public interface of QSGRenderer through a QSGAbstractRenderer to make it usable on a standalone window or FBO. Change-Id: I2d41187472424f5ea64650a006bcd61f2711f6b9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-023-104/+116
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quick/scenegraph/openglunderqml/squircle.h src/quick/doc/src/qmltypereference.qdoc src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9
| * Separate renderer out in "OpenGL under QML" example.Gunnar Sletta2014-06-163-104/+115
| | | | | | | | | | | | | | The example was promoting very bad practice. Change-Id: Ibb83780ec33e59ee5aabf65a775705dd0da681e6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Avoid direct GL calls in Qt Quick examples and testsLaszlo Agocs2014-07-015-5/+11
|/ | | | | | Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make example work when QOffscreenSurface == QWindowGunnar Sletta2014-04-023-36/+47
| | | | | Change-Id: I7435d91b37a46c0bced301c5c9c82fdf499e0587 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix reading of shader sources in scene graph examplehjk2014-03-273-32/+8
| | | | | | Task-number: QTBUG-33080 Change-Id: I9219233ab7c7fbe89c0a9f1453d7c6aeeca498a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Improve Scene Graph - Simple Material example documentation.Mitch Curtis2014-02-061-11/+11
| | | | | Change-Id: I5b77f7590c9f2cea9305014b8a9d4ab3a387eaa3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>