Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI
Posted by Andreas on Feb 19, 2016; 8:11am
URL: https://forum.jogamp.org/JOGL-2-support-for-Ardor3D-JMonkeyEngine-3-jzy3d-and-NiftyGUI-tp1706747p4036314.html
Hi,
as mentioned in my post on 20th Oct. 2015 I had a sizing problem on my linux system with the up to date JOGL and Jogamp's Ardor3D continuation with the JoglSwingCanvas.. I found the point where this happens but don't know how to solve the problem correctly. This happens inside the JoglSwingInitializerRunnable of the JoglSwingCanvas. When _joglSwingCanvas.display(); is called the backend of the JoglSwingCanvas is not initialized and _joglSwingCanvas.getDelegatedDrawable() is null. Therefore a NullPointerException is thrown. If I add
if (_joglSwingCanvas.getDelegatedDrawable() == null){
_joglSwingCanvas.initializeBackend(false);
}
after _joglSwingCanvas.display(); everything is working fine and the sizing is done correctly. Could this additional lines cause other problems? It's more like a workaround then a solution. I wasn't able to find the reason why this happens.
Andreas