Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI
Posted by
Sven Gothel on
Sep 21, 2011; 6:41am
URL: https://forum.jogamp.org/JOGL-2-support-for-Ardor3D-JMonkeyEngine-3-jzy3d-and-NiftyGUI-tp1706747p3354671.html
On Tuesday, September 20, 2011 08:20:33 PM gouessej [via jogamp] wrote:
>
> I get this when resizing JoglNewtAwtCanvas:
> Exception in thread "main" javax.media.opengl.GLException: Error: Attempt to
> make context current on thread Thread[main,5,main] which is already current
> on thread Thread[main-Display-X11_:0-1-EDT-1,5,main]
> at jogamp.opengl.GLContextImpl.lockConsiderFailFast(GLContextImpl.java:219)
> at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:385)
> at
> com.ardor3d.framework.jogl.JoglCanvasRenderer.makeCurrentContext(JoglCanvasRenderer.java:89)
> at
> com.ardor3d.framework.jogl.JoglCanvasRenderer.draw(JoglCanvasRenderer.java:188)
> at
> com.ardor3d.framework.jogl.JoglNewtAwtCanvas.draw(JoglNewtAwtCanvas.java:61)
> at com.ardor3d.framework.FrameHandler.updateFrame(FrameHandler.java:90)
> at
> com.ardor3d.example.canvas.JoglNewtAwtExample.main(JoglNewtAwtExample.java:133)
>
> Maybe I should run some operations on the EDT.
Run AWT modifications on the AWT-EDT, yes, this is a requirement
of AWT/Swing. This is true if you modify NewtCanvasAWT, which is an
AWT component holding a NEWT Window.
You don't need to take care if you modify a NEWT Window,
since the methods already spin of the modify action to it's NEWT EDT.
~Sven