Login  Register

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Posted by Mr.Marbles on Aug 28, 2015; 7:43pm
URL: https://forum.jogamp.org/JOGL-2-support-for-Ardor3D-JMonkeyEngine-3-jzy3d-and-NiftyGUI-tp1706747p4035171.html

I got TestSafeCanvas to work finally by commenting a couple lines of code:

...
        frame.setVisible(true);

//        Thread.sleep(3000);
//
//        frame.getContentPane().remove(canvas);
//
//        Thread.sleep(3000);
//
//        frame.getContentPane().add(canvas);
...

It appears the JOGL canvas did not like getting removed/added outside of the EDT. In general, this is bad practice. Any modifications to the Swing/AWT heirarchy should be done from within the EDT, however, this works with the LWJGL canvas.