<div dir="auto"><div>Thank you David for your help.</div><div dir="auto">So i have to store two copy of my data one for the rendering thread and one for background(worker) thread, right?</div><div dir="auto"><br></div><div dir="auto">what if I have a polydata with something like 300 000 cells ? could be a big problem ?</div><div dir="auto"><br></div><div dir="auto">Thanks Again</div><div dir="auto">Antonio Fortino</div><div dir="auto"><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Jan 4, 2017 8:06 PM, "David Lonie" <<a href="mailto:david.lonie@kitware.com">david.lonie@kitware.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It can be done, but you'll need to keep all of the input data / pipeline logic in a background thread, and all of the renderable polydata / mapper / actor stuff in a rendering thread, and then synchronize the threads to copy the data from the background -> rendering thread after an update completes. This will let you interact with the scene while data is being recomputed.</div><div class="gmail_extra"><br><div class="gmail_quote"><div class="elided-text">On Wed, Dec 28, 2016 at 11:59 AM, Antonio Fortino <span dir="ltr"><<a href="mailto:thoniorf@gmail.com" target="_blank">thoniorf@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text"><div dir="ltr">Hello to everyone,<div><br></div><div>I'm trying to develop a simple example that update the celldata of a polydata in a thread while rendering in the main thread.</div><div>My final goal is to interact with the scene, and pause the updates.</div><div><br></div><div>To archive this i'm using a simple mutex and a boolean.</div><div>However it seams that i'm trying to access the render for two different threads, and the mutex isn't enough, because when interacting with the scene errors like the one below appears, and at random the program stops with a segmentation.</div><div><br></div><div>
<p style="margin:0px"><span style="color:rgb(170,0,0)">vtkOpenGLPolyDataMapper (0x1b62980): failed after UpdateShader 1 OpenGL errors detected</span></p>
<p style="margin:0px"><span style="color:rgb(170,0,0)">  0 : (1282) Invalid operation</span></p><p style="margin:0px"><span style="color:rgb(170,0,0)"><br></span></p></div><div>I attach the code, any help is very appreciated.</div><div><br></div><div>Best regards</div><span class="m_-3371381483718902261HOEnZb"><font color="#888888"><div>Antonio Fortino</div><div><br></div><div><br></div><div><div><br></div></div></font></span></div>
<br></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>