[vtkusers] VTK/Java + rendering issue

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu May 22 13:27:25 EDT 2014


I guess I'll answer to myself. ;-)

So the JOGL render has definitely an issue when VTK tries to read or write
into the pixel buffer. And I don't have a solution for that. This must be a
JOGL related issue.

This mean the following features won't work:
- Screen capture (Using VTK code)
- Rubber band type of interaction where a rectangle get drawn on top of
window.
- Volume rendering

On the AWT side, it is better. My issue was related to the fact that my
Windows system was using its integrated GPU instead of the Nvidia one. Once
I changed to use the Nvidia one, everything was fine.

Have a great day!

Seb



On Tue, May 20, 2014 at 9:32 AM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> 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/20140522/12329524/attachment.html>


More information about the vtkusers mailing list