[vtk-developers] Patch for vtkCocoaRenderWindowInteractor TerminateApp behavior
Sean McBride
sean at rogue-research.com
Mon Aug 5 18:02:00 EDT 2013
On Fri, 3 Aug 2012 11:36:00 -0400, Pat Marion said:
>The PCL community uses VTK as their visualization engine. They are
>interested in using VTK render windows that can enter, leave, and restart
>interaction loops. They've encountered an inconsistent behavior OSX, and I
>tracked it down to an issue in vtkCocoaRenderWindowInteractor.
>
>Attached is a test program that makes repeated calls to interactor Start()
>and TerminateApp(). The test creates a render window and calls interactor
>Start(). You can press 'Q' to trigger TerminateApp(), causing the
>interactor to return from Start() and begin a new loop. The test exhibits
>different behavior on Linux vs. OSX. On Linux, it successfully restarts
>the interaction loop, but on OSX the render window is destroyed after the
>first loop. I'm told the behavior on Windows is consistent with Linux, but
>I did not test there.
>
>I attached a patch for vtkCocoaRenderWindowInteractor. In this patch,
>TerminateApp() will break the NSApplication run loop, but not destroy the
>NSWindow. I think this makes OSX behave similarly to the Xt implementation
>on Linux. Can someone who is familiar with vtkCocoaRenderWindowInteractor
>take a look at the patch? Thanks!
Pat, others,
Pathetically, it has taken me a whole year to get around to this :(, but please see here:
<http://review.source.kitware.com/12200>
for a patch that does the above (based on your patch) and a bunch of other related (and unrelated) cleanup of the Cocoa code.
The changes are non-trivial, so I'd appreciate if anyone with an interest in VTK + Cocoa give this some good testing before I merge it.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list