[vtkusers] Multi-threaded creation, display and deletion of actors
dzenanz at gmail.com
Thu Feb 21 16:21:39 EST 2013
Thank you for your help Sebastien. Other issues appeared as well after I
have introduced multi-threading. The VTK-related part is finished. Here is
a sketch of my solution:
On Wed, Feb 20, 2013 at 8:06 PM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:
> The add actor should be done by the same VTK thread that is rendering.
> So only one thread can do that action.
> Moreover, you should call Update() on the mapper within each of your
> thread to reduce the work that will be done by the main vtk thread.
> Hope that make sense,
> PS: VTK is not thread safe, but I've already done something similar to
> what you did without any issue.
> On Wed, Feb 20, 2013 at 5:18 PM, Dženan Zukić <dzenanz at gmail.com> wrote:
>> I have a need to modify the scene from multiple threads.
>> Each thread looks like:
>> for (i=1 to 100)
>> create mesh_i;
>> convert it to vtkPolyData;
>> if exists actor delete it;
>> create actor with pd;
>> add actor to renderer;
>> update display;
>> How best to accomplish this? I already tried this<http://www.vtk.org/pipermail/vtkusers/2004-April/073478.html>approach, but it does not work. It always crashes before returning from
>> Render() method. Crashes are at random location in VTK rendering code.
>> Powered by www.kitware.com
>> Visit other Kitware open-source projects at
>> Please keep messages on-topic and check the VTK FAQ at:
>> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers