Re: Swing application crashing when resizing OpenGL (GLJPanel) window.
Posted by
mikaelhc on
Dec 10, 2012; 12:49pm
URL: https://forum.jogamp.org/Swing-application-crashing-when-resizing-OpenGL-GLJPanel-window-tp4027441p4027466.html
gouessej wrote
mikaelhc wrote
Following your suggestion, I tried nesting the GLCanvas inside a jawa.awt.Component and putting this into the JSplitPane. Amazingly, this works. I no longer get exceptions when resizing the views.
Please mention it in your bug report too so that we keep a track of this workaround.
I will - but I need to do some more testing (on more machines), before I am sure the exceptions are completely gone.
gouessej wrote
mikaelhc wrote
My only worry is, that before I could see my problems came because the OpenGL context was destroyed during the resize (dispose(GLAutoDrawable drawable) was called), and JOGL for some reason could not create a new context. Now the context is no longer called when resized, but can I be sure that the OpenGL context is not lost for other reasons?
That's a good question. The context can be destroyed when removing a GLCanvas from an AWT container.
I'll try that out, to see if I can recreate the context loses.