[vtkusers] VTK/Java + rendering issue

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri May 23 11:38:40 EDT 2014


Hi Marco,

thanks for your feed back.

For generating the freeze I don't have any automated test, but anything
that access the pixel buffer will freeze Windows.
- Screen capture (Using VTK code)
- Rubber band type of interaction where a rectangle get drawn on top of
window.
- Volume rendering

While on other platform, it still does not work but does not affect the
application. (No freeze, no crash, just invalid rendering)

if you try to do a screen capture using VTK , that should be enough to test
the issue. I'll paste some code once, I start my windows test laptop.

1) Test was using Release and latest git master from our generated binaries.
2) Not really but I'm pretty sure I've used at some point VTK 6.2
(git/master)

Thanks,

Seb



On Fri, May 23, 2014 at 9:21 AM, Marco Sambin <m.sambin at gmail.com> wrote:

> Hi Seb,
>
> thanks a lot for your explanations about the current status of the VTK +
> Java integration. From my side, I really appreciate your efforts to keep
> the VTK + Java integration up to date.
>
> At present, when using VTK + JOGL under Windows, do you still have the
> "freezing" issue described in your previous email?
>
> If you could provide a self-contained test case generating this kind of
> issue, maybe I could be able to provide some help, at least in identifying
> where the freezing happens on Windows. I made some JOGL-based experiments
> in the recent past, so I have some small experience on this topic...
>
> Just a couple of questions:
>
> 1 - In your tests, are you using the official VTK 6.1 release or a more
> recent git version?
> 2 - Have you ensured the "freeze" under Windows is not related to
> vtkClearOpenGLErrors() calls, in case you are still using the
> implementation present in the official VTK 6.1 release, which has been
> recently modified in git to avoid infinite loops?
>
> Regards,
>
> Marco
>
>
>
> On Thu, May 22, 2014 at 7:27 PM, Sebastien Jourdain <
> sebastien.jourdain at kitware.com> wrote:
>
>> 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
>>>
>>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140523/f14d30ac/attachment.html>


More information about the vtkusers mailing list