Re: Problem when using an external context
Posted by herve on Mar 29, 2012; 10:14pm
URL: https://forum.jogamp.org/Problem-when-using-an-external-context-tp3851637p3869295.html
Hello!
Now it works!! As you wrote: "The context of the GLCanvas is not available when creating it, only when adding it into a container whereas in JOGL 1, it was available at its creation". It was exactly our problem. We tried to access the context only once * before * putting something in our GLJPanel. when we add the widget structure before trying to access the context, it works ok.
Again thanks, your advices were precious!
And yes, Dassault uses JOGL too. I suspect that the J661 project may not be the only one to use it, but at least this one is Open Source ;)
Herve
P.S.: What we are doing in fact is create a Swing structure inside the GLJPanel, and directly call paint on the top of our structure on a Graphics2D which in fact write in a JOGL Texture. After we end drawing the Swing tree, we render the texture on the OpenGL context in JOGL too. Of course we don't recreate the texture at every draw order.
We can't easily use direct OpenGL drawings for that because ARINC 661 widgets are really like Java widgets, and we really need Look and Feel capabilities.