summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
authorSvenn-Arne Dragly <svenn-arne.dragly@qt.io>2018-02-13 12:52:57 +0100
committerSvenn-Arne Dragly <svenn-arne.dragly@qt.io>2018-02-14 16:54:12 +0000
commitc40c7ac6b57603ecb992f666ce7435110bb3e587 (patch)
treec27e63a9fe668a1ef9ace655e0a42649a27e751b /src/render/frontend
parent9c3c479193ec1bb02732c762fd5c4501b0a7933a (diff)
Fix OnDemand rendering by keeping ComputeDirty from being re-enabled
The previous implementation would reset ComputeDirty every frame if markDirty(AllDirty) had been called earlier. This would break the OnDemand rendering policy because every frame would be rendered even if there were no changes or no compute commands in the scene. This change removes the code that would re-enable the ComputeDirty flag every frame and documents that the user must either set the rendering policy to Always or trigger the rendering of a new frame if the rendering policy is set to OnDemand. Change-Id: Ide03a3a49ee1670fd9d67ed47454c6679219765d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend')
-rw-r--r--src/render/frontend/qcomputecommand.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/render/frontend/qcomputecommand.cpp b/src/render/frontend/qcomputecommand.cpp
index c36e4039c..e23f9e158 100644
--- a/src/render/frontend/qcomputecommand.cpp
+++ b/src/render/frontend/qcomputecommand.cpp
@@ -55,6 +55,12 @@ namespace Qt3DRender {
QComputeCommand is added to. The workGroupX, workGroupY and workGroupZ properties
specify the work group sizes for the compute shader invocation. Qt3DRender::QDispatchCompute
node needs to be present in the FrameGraph to actually issue the commands.
+
+ \note If the rendering policy is set to Qt3DRender::QRenderSettings::OnDemand and there are no
+ changes to the scene, the ComputeCommand will not be invoked repeatedly.
+ The Qt3DRender::QRenderSettings::Always render policy must be set for the ComputeCommand
+ to be repeatedly invoked if there are no other changes to the scene that triggers rendering a
+ new frame.
*/
/*!
@@ -70,6 +76,12 @@ namespace Qt3DRender {
ComputeCommand is added to. The workGroupX, workGroupY and workGroupZ properties
specify the work group sizes for the compute shader invocation. DispatchCompute
node needs to be present in the FrameGraph to actually issue the commands.
+
+ \note If the rendering policy is set to RenderSettings.OnDemand and there are no changes to the
+ scene, the ComputeCommand will not be invoked repeatedly.
+ The RenderSettings.Always render policy must be set for the ComputeCommand to be
+ repeatedly invoked if there are no other changes to the scene that triggers rendering a new
+ frame.
*/
/*!