[vtkusers] VTK, Python, MacOS X, Cocoa, Offscreen rendering?
Sean McBride
sean at rogue-research.com
Thu Mar 13 11:36:26 EDT 2008
On 3/13/08 8:21 AM, Bridgman, William T. said:
>I've found some posts from June 2004 ("Mac offscreen drawing")
>suggesting that VTK should be able to do offscreen rendering through
>the Cocoa interface, but that this was not yet implemented. Has this
>changed?
I've never used 'offscreen' and to be honest I'm not _exactly_ sure what
it is... :) But I can suggest some reading for you. :)
>I'm trying to batch export RIB files on an XGrid cluster (Hundreds of
>files that take 5-15 minutes to process).
>
>I've got vtkPython running with Cocoa but haven't found the sequence
>of commands that completely disables the window generation. My
>simple-minded first guesses of
>
> renWin=vtk.vtkCocoaRenderWindow()
> renWin.OffScreenRenderingOn()
>
>before installing actors, die with:
>
>kCGErrorRangeCheck : Window Server communications from outside of
>session allowed for root and console user only
>INIT_Processeses(), could not establish the default connection to the
>WindowServer.Abort
>
>when run on the headless machines. It runs fine without off-screen
>rendering on a console, though I believe some window briefly
>appears. I suspect I'm missing something in the initialization
>sequence but am not that familiar with Cocoa.
You can read about the 'window server' here:
<http://developer.apple.com/technotes/tn2005/tn2083.html#SECWINDOWSERVER>
and about 'daemon-safe frameworks' here:
<http://developer.apple.com/technotes/tn2005/tn2083.html#SECLIVINGDANGEROUSLY>
Also, maybe add a log or breakpoint to
vtkCocoaRenderWindow::CreateAWindow(), do you reach that point on your
headless Mac? If so, that would explain your problem.
--
____________________________________________________________
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 vtkusers
mailing list