[vtkusers] Re: vtkusers Digest, Vol 24, Issue 28
Clinton Stimpson
clinton at elemtech.com
Tue Apr 25 12:16:20 EDT 2006
> From: "Nigel Mcfarlane" <Nigel.Mcfarlane at luton.ac.uk>
> Subject: [vtkusers] render window refresh, loss of display
> To: <vtkusers at vtk.org>
>
> I am a newcomer to VTK, running version 5.0.0 under Visual C++ 2005, on
> WinXP.
>
> If I use std::cin to pause or obtain input from the console window, the
> render window display loses the ability to update.
That's because the event loop lost control to std::cin. std::cin takes
control and waits for only one thing, input from the console. So the window
can't update.
> It goes white if I
> move the console window, and I can't get the image back. This happens
> even if the std::cin is the first line of the program, before the render
> window is even created. I see that a few people in the distant past
> have mentioned this problem, but what's the answer ?
Here's a possible solution which includes example code. It puts console input
in the event loop, so you can use the console and a vtk window at the same
time.
http://public.kitware.com/pipermail/vtkusers/2005-June/080261.html
Clint
>
> I also can't get a simple observer (as in the distribution example "step
> 2") to acknowledge anything except "StartEvent" (Although the trackball
> interactor example works perfectly). Could this be related to the first
> problem ?
>
> Thank you
>
> Nigel McFarlane
> University of Luton
More information about the vtkusers
mailing list