[vtkusers] vtkRenderWindowInteractor and multithreading
ttickle
ttickle at cs.uno.edu
Thu Dec 9 19:01:02 EST 2004
I have a windows application which I am writing which preforms live
updates to the Renderer held by my RenderWindow. I have a thread which
every so often preforms updates to objects representing data about a
particular task. The vtkProp objects which represent the onscreen
display of these objects are updated. Next, I attempt to remove all the
objects from the scene (cause I will be reordering the display so that
objects have order to them). I then get an assembly from each object
containing all the vtkActors representing the object and add them to
renderer at their appropriate places. I then attempt to call the
windows Render method to preform the updated visualization.
I also have a vtkRendererWindowInteractor running at this time so
that I may move around and get closeup views of the tasks (thus able to
get more detailed information). However, when I attempt to call render
on the window after updating, I get a number of messages which I cannot
fully read due to the application crashing near this point. The errors
mention that a wiggle call to make current (I assume the rendering
context) failed.
After doing some more testing, I have just window->Render() being
called. (No actors have been added to the renderer, and none of the
vtkActors representing the tasks have been updated.) This still results
in a crash as soon as render is called. So I then tried calling the
interactors Render method. However, this also results in a crash as
soon as it is called.
I assume I am running into a problem with mutlithreading. Is their
anyway to use the interactor in a multithreaded application (maybe
somehow stop the interactor from trying to render) while I preform my
updates. Any help is appreciated.
Sincerely,
Thomas Tickle
More information about the vtkusers
mailing list