[Interest] [Qt3D] any way to synchronize main thread with render thread ?

david crémoux david at adeko.com
Thu Jan 18 08:04:56 CET 2018


While using Qt3D I'm trying to separate as much as possible the scene, 
rendering, and render window/widget. I'm not using Qt3DWindow, I'm using 
my own widget/surface.

The thing is, when I'm deleting my widget, I'm not deleting everything 
like in Qt3DWindow (scene, rendering, aspect, etc.).
But even if I'm setting a null surface to the rendering before 
physically deleting my widget/surface, the surface is still in use in 
the rendering thread : it crashes (on swapBuffers).

Is there a way to synchronize/wait for next frame with the render thread 
so I can be sure that my widget/surface is not used anymore so I can 
delete it freely?

I'm using Qt 5.9.3, c++, no QML, and I set an OnDemand render policy.


More information about the Interest mailing list