Login  Register

Re: GLWindow in NewtCanvasAWT - deadlock in GLWindow.setSize

Posted by gouessej on May 04, 2018; 11:07am
URL: https://forum.jogamp.org/GLWindow-in-NewtCanvasAWT-deadlock-in-GLWindow-setSize-tp4038848p4038852.html

Don't set the size of the GLWindow, rather set the size of the top level container (JFrame).

Rather use com.jogamp.newt.event.WindowListener.windowResized(WindowEvent) or its AWT equivalent to listen to resize events.

Then, remove your loop (while(true)...) and use a simple animator.

After that, put into the listener a call to GLAutoDrawable.invoke(), use a GLRunnable that calls your native renderer.
Julien Gouesse | Personal blog | Website