[vtkusers] Multithreading & vtkRenderWindowInteractor

ttickle ttickle at cs.uno.edu
Wed Jan 19 16:36:04 EST 2005


    I am writing a program which will have realtime updates to the 
displayed data under C++ using VTK under Windows.  I have tried using a 
vtkRenderWindowInteractor.  Unfortunatly, vtkRenderWindowInteractor only 
seems to preform updates when the user is interacting with the scene.  I 
need to refresh the window anytime my data changes.  At the present 
time, I am trying to following solution:
   
    Create the window, interactor, and renderer and associate 
appropriatly.   Then create my worker thread whose job it will be to 
periodically update the vtkActors which are being displayed.  I then 
start the interactors event loop with interactor->Start();.   I have 
tried having the thread update the screne by calling the render methods 
of both vtkRenderWindowInteractor and vtkRenderWindow (not at the same 
time of course).  However, I get error messages related to something 
about wgl not being able to make the current context.  Can anyone show 
me some code or suggest how I can both use an Interactor with a scene 
that must be updated even when the user is not interacting with the data 
scene?


Thanks in advance.

Thomas Tickle


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005




More information about the vtkusers mailing list