[vtkusers] Nonblocking vtkRenderWindowInteractor
Clinton Stimpson
clinton at elemtech.com
Mon Jun 13 09:41:21 EDT 2005
Ok, I've attached some code that shows some things you can do by having
your own event loop.
This example includes console input and two windows in one event loop.
Commented out is some example code for timers.
It shows a few different things which I've seen other vtk users in the
past try to use multithreading to solve. I'm not saying this is better
than threading for what you need to do, I'm just giving this as an
example as another way to do these kinds of things. And this time, I'm
posting the code so it gets archived.
The object connected to the event loop is on unix, a pipe (int), on
Windows a HANDLE, and on Mac a CFRunLoopSource (which is made from a
CFSocketRef of the stdin).
So you have flexibility in what you can connect to the event loop in
this sample app.
Hmm.. I wonder if it would be nice to put this kind of stuff into
vtkRenderWindowInteractor.
Clint
Kim Chuan Lim wrote:
>Hi Clinton,
>
>Can i have your example (Event loops, timer, etc) please. Thanks in advance.
>
>Best Regards,
>Kim Chuan.
>
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050613/a9542aba/attachment.asc>
More information about the vtkusers
mailing list