On 01/18/2013 09:01 PM, Andreas [via jogamp] wrote:> I found the answer for the GLCanvas problem. There is an if statement > "Beans.isDesignTime()" in line 1086 of the GLCanvas which was true for my > Netbeans runs and the GUIBuilder. So it returns a null > AWTGraphicsConfiguration for the chooseGraphicsConfiguration method. If I set > Beans.setDesignTime(false); before the GLCanvas is started everything works fine. > <http://forum.jogamp.org/Resize-of-a-JCanvas3D-tp4027842p4027936.html> Yes, we throw a NPE .. will add simple test case just setting the flag testing the code path .
Why do we do that? https://github.com/sgothel/jogl/blob/master/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java#L1148 https://github.com/sgothel/jogl/blob/master/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java#L544 https://github.com/sgothel/jogl/blob/master/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java#L580 https://github.com/sgothel/jogl/blob/master/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java#L479 Should we remove all these tests?
http://jogamp.org/git/?p=jogl.git;a=commit;h=3567e7e8519f82720f98b0b2ac30456cbfeddc0d