diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-02-29 15:44:30 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2016-03-04 10:46:50 +0000 |
commit | 7d0cdf06a6771e57fb3d70d62076bb9685747879 (patch) | |
tree | 9c17c3408a10f9847673e06c3dad2f61659a1f5c /tests/manual | |
parent | 2d1f8937acf874a37b7ef1d0814ee6dc7912f81b (diff) |
D3D12: add opacity support, fix buffer handling and dirty tracking
Avoid using .h for generated headers with shader blobs in order not to
confuse syncqt.
All buffer Map and memcpy is now done only at the end of the frame. This
is relevant for the constant buffer which can this way Map once and memcpy
only the data for elements that changed something.
This also marks a change from how simplerenderer works: instead of having
per-program matrix, opacity, etc. values (uniforms), there is a separate
copy of these in a dedicated area of the constant buffer for each element.
This allows reusing the data in the buffer as-is for non-changing elements
at the cost of higher memory usage (256 bytes per element both on CPU &
GPU side at minimum) and is also necessary in order to be able to build
command lists with multiple draw calls without intra-dependencies for the
cbuffer contents.
The somewhat broken dirty tracking of simplerenderer (matrices always
treated as dirty, forgetting the root node for ever in the list of dirty
transform nodes, etc.) is now corrected so that the DirtyMatrix and
DirtyOpacity states reflect reality, meaning the cbuffer update can be
skipped completely for items whose transform or inherited opacity has not
changed at all.
Format mapping is now moved to the engine.
Change-Id: Ia0a0d73e2a954970cb2745deb1a62c09f3d3cb7c
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/nodetypes/main.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/manual/nodetypes/main.qml b/tests/manual/nodetypes/main.qml index c4d0a5266d..81d1e63ead 100644 --- a/tests/manual/nodetypes/main.qml +++ b/tests/manual/nodetypes/main.qml @@ -47,6 +47,28 @@ Item { anchors.centerIn: parent color: "red" NumberAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; } + + Rectangle { + color: "gray" + width: 50 + height: 50 + anchors.centerIn: parent + + SequentialAnimation on opacity { + loops: Animation.Infinite + NumberAnimation { + from: 1.0 + to: 0.0 + duration: 4000 + } + NumberAnimation { + from: 0.0 + to: 1.0 + duration: 4000 + easing.type: Easing.InOutQuad + } + } + } } Rectangle { |