Re: [Interest] Qt3D: One-shot compute shader

2019-06-02 Thread Paul Lemire via Interest
If you can use Qt 5.13, ComputeCommand has a runType
property(Continuous/Manual) and a trigger function which you can use for
one shot compute calls.


https://doc-snapshots.qt.io/qt5-5.13/qt3drender-qcomputecommand.html


Another option would be to set the enabled property of your
DispatchCompute FG node to false once you know you don't need to execute
your compute shader.


Paul


On 6/1/19 1:21 AM, Daniel Proksch wrote:
> Hi all,
>
> I'm trying to implement a Qt3D FrameGraph (QML) that allows for
> one-shot dispatch of a compute shader.
> My current approach is to add a ComputeCommand component to my
> ComputeEntity whenever I want the dispatch to happen.
> When the compute task is done (i.e. in the next frame) I want to
> remove the ComputeCommand component again, so that the shader is no
> longer invoked.
>
> Is that approach reasonable?
> And is there a signal that is triggered whenever a frame is completed
> (so that I can remove the ComputeCommand)?
>
> Many thanks!
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest


smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt3D: One-shot compute shader

2019-05-31 Thread Daniel Proksch
Hi all,

I'm trying to implement a Qt3D FrameGraph (QML) that allows for one-shot 
dispatch of a compute shader.
My current approach is to add a ComputeCommand component to my ComputeEntity 
whenever I want the dispatch to happen.
When the compute task is done (i.e. in the next frame) I want to remove the 
ComputeCommand component again, so that the shader is no longer invoked.

Is that approach reasonable?
And is there a signal that is triggered whenever a frame is completed (so that 
I can remove the ComputeCommand)?

Many thanks!
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest