Login  Register

Re: JOGL & netbeans gui builder (how to properly show a GLcanvas?)

Posted by dave_xenos on May 20, 2015; 2:27am
URL: https://forum.jogamp.org/JOGL-netbeans-gui-builder-how-to-properly-show-a-GLcanvas-tp4034496p4034498.html

Thanks for the answer. But that might be too complicated (having to update an old plugin myself).
Is there any other way to 'manually' utilize netbeans GUI builder with JOGL component? Or are you saying that the proper way to use JOGL component in netbeans GUI builder is by using a plugin?

Perhaps I'll just focus the question on the "java.awt.EventQueue.invokeLater". Here is a new found case:
I tried to completely copy-paste code from a simple project using the old plugin (just a GLCanvas that draws triangle) to a new project which uses new JOGL. The only changes made are the imports :
"javax.media.opengl.GLCanvas" to "com.jogamp.opengl.awt.GLCanvas"
"com.sun.opengl.util.Animator" to "com.jogamp.opengl.util.Animator"
"javax.media.opengl.???" to "com.jogamp.opengl.???"

The code runs fine using the old plugin (obviously). But displays blank (just like explained before) when used with the new JOGL.
Again, when I remove the auto generated "java.awt.EventQueue.invokeLater" at main, the code runs correctly.
What's the problem here? Why old JOGL plugin can use "invokeLater" while the newer ones can't?
Are there any equivalent of "invokeLater" for newer JOGL? Is it truly safe to remove "invokeLater"?