GLJPanel in JavaFX - blanking out window?
Posted by Brendan on Aug 21, 2014; 8:58am
URL: https://forum.jogamp.org/GLJPanel-in-JavaFX-blanking-out-window-tp4032861.html
I have a simple JavaFX 2 + JOGL2 frame using GLJPanel working:
<SwingNode id="MySwingNode"/>
...
SwingNode swingNode = (SwingNode)root.lookup("#MySwingNode");
swingNode.setContent(new GLJPanel());
The trouble I'm having now is that when I resize the window, ~30% of the time the GL redraw in GLJPanel ends up blanking out the entire window, overwriting other UI elements. They only redraw on events (hover, alt-tab etc). My google-fu suggests JavaFX does not permit a forced redraw of the other elements as a workaround. (I get the same symptoms when initializing inside SwingUtilities.invokeLater()).
1) Is this blanking out because JavaFX is using OpenGL behind the scenes?
2) Is it a symptom of an immature JavaFX/OpenGL integration overall, which may throw up further issues as I progress?
3) What's a workaround??
I would like to use JavaFX as I love the architecture, but considering a move to Swing for the sake of avoiding these issues.