[vtkusers] update,interact and render in different threads
thoniorf at gmail.com
Wed Jan 4 16:16:05 EST 2017
Thank you David for your help.
So i have to store two copy of my data one for the rendering thread and one
for background(worker) thread, right?
what if I have a polydata with something like 300 000 cells ? could be a
big problem ?
On Jan 4, 2017 8:06 PM, "David Lonie" <david.lonie at kitware.com> wrote:
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.
On Wed, Dec 28, 2016 at 11:59 AM, Antonio Fortino <thoniorf at gmail.com>
> Hello to everyone,
> I'm trying to develop a simple example that update the celldata of a
> polydata in a thread while rendering in the main thread.
> My final goal is to interact with the scene, and pause the updates.
> To archive this i'm using a simple mutex and a boolean.
> 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.
> vtkOpenGLPolyDataMapper (0x1b62980): failed after UpdateShader 1 OpenGL
> errors detected
> 0 : (1282) Invalid operation
> I attach the code, any help is very appreciated.
> Best regards
> Antonio Fortino
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers