Hi,

a QFrameAction is for code that should be executed once per frame not a one time thing. It's mainly useful for prototyping as it can be quite expensive due the backend/frontend synchronisation it entails.

To have some operation completed before rendering a part of your scene graph, just defer adding that subtree to the scene graph until it is done. That is, call your function that builds your uber shader then when that is done add your sub-tree that uses that shader to the main scene graph.

Cheers,

Sean

On 02/10/2016 22:22, Xavier Bigand wrote:
I have some operations that I need to do before the scene-graph start
the rendering or a least be able to do an operation before a specific
node is rendered.

I want to start by building the source code of the uber-shader used by
my custom material. So I tried to use a QFrameAction on my root scene
node, but the slot isn't called.
I have attached the QFrameAction as component of root node and then
connect my slot to it, but the slot is never called.

My I missed something, or it is simply not the good way to do?


--
Xavier


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


--
Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to