[vtkusers] Interesting feature of the GUI

Sean McInerney seanm at nmr.mgh.harvard.edu
Wed May 19 09:45:11 EDT 2004


Petru,

   This is a bit of a guess as I am not familiar with the Windows 
Interactor implementation, but I would bet that you are calling Start() 
from each Interactor. Because Start() begins a new event loop, 
subsequent Interactors might not be entered until the previous one 
terminates.
   There are system-specific means of  starting an event loop (e.g. in 
main()) and then forwarding the system-specific information to the 
system-specific Interactor specialization (e.g. 
vtkWin32RenderWindowInteractor). I apologize if this is too general or 
vague. There is a fair amount of variance between implementations. I 
think the bottom line may be to avoid calling Start() from any one of 
your Interactors.

-Sean

> 
> Is it possible to display more than one window using vtk?
> 
> More exactly: I have a few objects (3D models and images)
> and I want each of them displayed in a separate window
> (I am working in Windows XP).
> 
> So whenever there is something to display, my program calls a function
> that creates the rendering stuff and renders, and starts an
> interactor.
> 
> The program computes first the objects to be displayed, and
> after all is ready it displays them, using the function described
> above.
> 
> What happens is interesting. Only the window with the
> first object is displayed. If I want to close it by clicking
> the "Close" button of the window, the window with the
> next object pops up! Next click on "Close" brings next
> object, and so on, until all objects are displayed.
> 
> Why does this happen?
> 
> How can I have _all_ windows displayed from the very beginning?
> 
> Petru



More information about the vtkusers mailing list