Posted by
gouessej on
Apr 21, 2011; 10:09am
URL: https://forum.jogamp.org/Future-of-GLJPanel-with-J2D-interop-tp2838422p2846495.html
Hi
I'm currently using the dev build 293. Swing/JOGL(/SWT?) interoperability works fine. The only remaining bug is this one: When I resize my embedded frame vertically, the GLJPanel it contains is not resized correctly except when I resize the same frame horizontally and I still get this exception:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: sun.java2d.InvalidPipeException: bounds changed or surface lost
at jogamp.opengl.awt.Java2D.invokeWithOGLContextCurrent(Java2D.java:299)
at javax.media.opengl.awt.GLJPanel$J2DOGLBackend.doPaintComponent(GLJPanel.java:1527)
at javax.media.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:384)
at javax.swing.JComponent.paint(JComponent.java:1029)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1780)
at java.awt.Window.paint(Window.java:3375)
at java.awt.Container.update(Container.java:1801)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
at sun.awt.X11.XRepaintArea.updateComponent(XRepaintArea.java:43)
at sun.awt.RepaintArea.paint(RepaintArea.java:216)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:695)
at java.awt.Component.dispatchEventImpl(Component.java:4706)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: sun.java2d.InvalidPipeException: bounds changed or surface lost
at sun.java2d.pipe.BufferedContext.validate(BufferedContext.java:162)
at sun.java2d.pipe.BufferedContext.validateContext(BufferedContext.java:110)
at sun.java2d.pipe.BufferedContext.validateContext(BufferedContext.java:127)
at sun.java2d.opengl.OGLUtilities.invokeWithOGLContextCurrent(OGLUtilities.java:91)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at jogamp.opengl.awt.Java2D.invokeWithOGLContextCurrent(Java2D.java:294)
... 24 more
I still use JOGL 2.0 inside an Eclipse RCP application. My embedded frame contains a GLJPanel (that contains a JInternalFrame) and a SWT Composite. I can use a more recent build and remove SWT things to see whether I still reproduce this bug if anyone is interested.