[vtkusers] VTK/Java + rendering issue

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue May 20 11:32:08 EDT 2014


Hi everyone,

I've been working on VTK and its Java wrapping lately.

Before getting into the details of my issue, I wanted to give you an update
on the work that I've done in the last couple months for you.

I've started an automated the process to build VTK/Java binaries package
for all the platforms. The full process is not yet polished but you can
already download on our VTK dashboard a compiled version of VTK master
specially packaged for Java.
To get a specific version, just click on the yellow box of the targeted
platform on the following page.

http://open.cdash.org/index.php?project=VTK

I've also worked on rendering components based on JOGL to overcome the
rendering issue that was happening on Mac with Java 7+ due to API change
inside the JVM and its management of the windowing system.

Thanks to the JOGL cross platform support, those classes can be used on
Windows, Mac and Linux.

The idea behind those classes were to rely on JOGL to create the OpenGL
context and deal with the Java windowing system. So VTK could just focus on
feeding that OpenGL context like we do with Qt.

The original integration is relying on the capability to "paste" an overlay
native window content into an AWT canvas.

Both integration works cross platform except the last one on Mac when using
the JVM from Oracle.

To ease my explanation lets call the 2 rendering/integration technics with
the following names: JOGL and AWT.

So here are the issues that I've discovered on which I would love to have
some insight.

Using the JOGL renderer, the rendering is behaving as expected except when
VTK tries to directly interact with the pixel buffer. This happen when
using some rubber band interactor style that aim to draw a dynamic
rectangle inside the window.

Here is what's happening on each platform:
- OSX: The rectangle does not show but the application still work and
behave as expected.
- Linux: Same as OSX.
- Windows: The rectangle does not show but the application freeze.

Using the AWT renderer, the rendering is behaving as expected specially
with the rubber band interactor. But when trying to render any 2D actor
(scalarbar, text), those don't even show up on Windows. I still have to see
how it behave on Linux.

But in the mean time if anyone has any clue on how to handle either issue,
I would love to hear from you.

Thanks for your help,

Seb

PS: I've also tried several JVM options without any success.
=> http://www.oracle.com/technetwork/java/javase/java2d-142140.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140520/61be494b/attachment.html>


More information about the vtkusers mailing list