[vtkusers] VTK6 + Java7 on Mac: offscreen rendering?
Marco Sambin
m.sambin at gmail.com
Mon Sep 9 07:22:19 EDT 2013
Dear VTKers,
I am developing a VTK 6-based Java application, and I am making some
efforts to make it compatible with Mac OS X as well.
I know that the jawt embedding currently supported by Java 7 on Mac (which
is CALayer-based) does not work with VTK 6 (nor with previous VTK
versions), but there are several portions of my application which do not
use direct drawing by VTK classes to Java panels (i.e., do not use jawt),
hence will work fine on Mac + Java 7 as well.
Now, for the portions of my application where VTK classes need to actually
"draw", my question is: will offscreen rendering work on Mac? The basic
idea would be to grab the output of the offscreen rendering, convert it to
a Java-compatible image, and draw it to a Java panel. I know this will be a
significant performance penalty, but my requirements in this moment are not
so strict or demanding under this point of view.
In particular, I have a vtkCanvas-derived panel, where I display some
planes in 3D (actually, they are vtkImagePlaneWidgets, but I am mainly
interested in the "display" functionality, not in the interactivity of the
widget with the user). Will it be sufficient to call
myVtkCanvas.GetRenderWindow().SetOffScreenRendering(1) to obtain offscreen
rendering on my Mac? Or it is more complicated than that?
Currently, calling just
myVtkCanvas.GetRenderWindow().SetOffScreenRendering(1), I am obtaining a
crash in the OpenGL library when running my application on the Mac.
Thanks in advance for your feedback.
Best regards,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130909/b92decce/attachment.htm>
More information about the vtkusers
mailing list