Does anyone have a fix for resizing the GLJPanel? A GLException occurs when the PBuffer needs to be resized.
This can be reproduced by running the JGears from jogamp.org source code samples.
Exception in thread “AWT-EventQueue-0” javax.media.opengl.GLException: GLEventListener Gears@ed42d08 already initialized
: AWT-GLJPanel[ com.jogamp.opengl.impl.GLPbufferImpl, GLEventListeners num 1 [Gears@ed42d08[init true], ]]
at com.jogamp.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:125)
at javax.media.opengl.awt.GLJPanel$Updater.init(GLJPanel.java:582)
at com.jogamp.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:111)
at com.jogamp.opengl.impl.GLDrawableHelper.init(GLDrawableHelper.java:124)
at com.jogamp.opengl.impl.GLPbufferImpl$InitAction.run(GLPbufferImpl.java:303)
at com.jogamp.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:273)
at com.jogamp.opengl.impl.GLPbufferImpl.maybeDoSingleThreadedWorkaround(GLPbufferImpl.java:296)
at com.jogamp.opengl.impl.GLPbufferImpl.display(GLPbufferImpl.java:120)
at javax.media.opengl.awt.GLJPanel$PbufferBackend.doPaintComponentImpl(GLJPanel.java:1143)
at javax.media.opengl.awt.GLJPanel$AbstractReadbackBackend.doPaintComponent(GLJPanel.java:914)
at javax.media.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:306)
at JGears.paintComponent(JGears.java:58)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
…
The code is using GLCanvas for now, but the GLJPanel is attractive because it gets rid of a disorienting flashing behavior when switching between tabs in a JTabbedPane.