Rendering with JAVA Wrapping and vtkComponent is broken (OpenGL/OpenGl2) - especially on linux
When building VTK with the Java Wrapper there is a vtkComponent, vtkSwtComponent and vtkAwtComponent. At least the vtkSwtComponent with OpenGL backend worked in 6.3 for windows and Linux. However with the latest 7.1 there are many issues. The vtkSwtComponent only works with OpenGL backend on windows (and somewhat on linux), with the OpenGL2 rendering it only works on windows.
Further investigation with the rendering samples and latest master branch (Merge topic 'fix-measurement-cube' [e44d1dbe]) yields the followig:
SWT -> SwtConeRendering
AWT -> AwtConeRendering
Windows (7 sp1)
-With OpenGL Backend:
--SWT: Grey Pane - no 3D visible
--AWT: window pops up, with additional error dialog box: "ChoosePixelFormat failed"
-With OpenGL2 Backend:
--SWT: Grey Pane - no 3D visible
--AWT: White Pane - no 3D visible
Linux (Debian Jessie)
-With OpenGL Backend:
--SWT: Grey Pane - no 3D visible
--AWT: one of 6 (which one seams to occur randomly):
--- 1) window briefly pops up, closes immediately without error message
---OR 2) window is visible, cone is rendered, interaction is possible, for about a second, window closes with:
----[xcb] Unknown sequence number while processing queue
----[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
----[xcb] Aborting, sorry about that.
----java: ../../src/xcb_io.c:274: poll_for_event: Assertion '!xcb_xlib_threads_sequence_lost' failed
---OR 3) window is visible, cone is rendered, interaction is not possible, window cannot be closed short of a kill -KILL
---OR 4) window is visible, no 3D view, instead what was behind the window at creation time is shown, window cannot be closed short of a kill -KILL
---OR 5) window is visible, cone is rendered, interaction is possible, for about a second, window closes without error message
---OR 6) window is visible, cone is rendered, interaction is possible, for about a second, window freezes, cannot be closed short of a kill -KILL
-With OpenGL2 Backend:
--SWT: Grey Pane - no 3D visible
--AWT: one of 5 (which one seams to occur randomly):
--- 1) window is visible, cone is rendered, interaction is possible, for about a second, window closes without error message
---OR 2) window briefly pops up, closes immediately with error message:
----java: ../../src/xcb_io.c:671: xcb_request_check: Assertion '!reply' failed
---OR 3) window briefly pops up, closes immediately without error message:
---OR 4) window briefly pops up, closes immediately with error message:
----[xcb] Extra reply data still left in queue
----[xcb] This is most likely caused by a broken X extension library
----[xcb] Aborting, sorry about that.
----java: ../../src/xcb_io.c:576: _XReply: Assertion '!xcb_xlib_extra_reply_data_left' failed.
---OR 5) window briefly pops up, closes immediately with error message:
----libGL error: failed to open drm device: No such file or directory
----libGL error: failed to load driver:
----[xcb] Extra reply data still left in queue
----[xcb] This is most likely caused by a broken X extension library
----[xcb] Aborting, sorry about that.
----java: ../../src/xcb_io.c:576: _XReply: Assertion '!xcb_xlib_extra_reply_data_left' failed.
Additional tests with the vtkSwtComponent in a ViewPart for Eclipse yield:
Windows (7 sp1)
-With OpenGL Backend:
--works
-With OpenGL2 Backend:
--works
Linux (Debian Jessie)
-With OpenGL Backend:
--same as SwtConeRendering, in this case a black pane instead of a grey one, click into black pane somehow triggers the 3D view to appear
--interaction works, however console spams (changing ID): de.iils.dc43.view3d.rcp:14462): GLib-CRITICAL **: Source ID 169 was not found when attempting to remove it
-With OpenGL2 Backend:
--same as SwtConeRendering, in this case a black pane instead of a grey one, click into black pane changes pane color to white
--further clicks spam in the console (changing ID): de.iils.dc43.view3d.rcp:14462): GLib-CRITICAL **: Source ID 169 was not found when attempting to remove it