[Interest] Qt3D/C++: How to disable rendering while makeing changes to the the Scenegraph

Yves Maurischat yves.maurischat at basyskom.com
Mon Jun 20 09:37:27 CEST 2022


Hi all,

I've got a C++/QWidgets application with 2 Qt3DWindow embedded. The 3D 
windows can be hidden (i.e. the user switches to another view), while 
work is done in other parts of the application. Whenever the user 
switches back to the view with the embedded Qt3DWindow there are a lot 
of changes to be made to the scenegraph.

Rendering is set to /OnDemand/, but whenever the view is switched back 
to the 3D windows there is a big lag, up to several seconds. Profiling 
the application has shown that a lot of work is done for rendering at 
that point because the scenegraph is changing (most time is spent in the 
material classes).

My working theory is, that each change to the scenegraph (i.e. removing 
entities, adding a new ones) causes a separate render update, which 
leads to the lag due to the amount of separate changes.

So my question is: Is there a way to disable all render updates until 
the scenegraph has been updated/modified completely? What would be the 
"correct" way to make such changes? Is there something similar to the 
beginResetModel() and endResetModel() methods in QAbstractItemModel?


Thanks!

Yves


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220620/03327f0a/attachment.htm>


More information about the Interest mailing list