Login  Register

Re: Fullscreen issue on KeyListener event

Posted by gouessej on Mar 28, 2012; 11:59am
URL: https://forum.jogamp.org/Fullscreen-issue-on-KeyListener-event-tp3855615p3864271.html

I don't use AWT full screen mode anymore. As far as I know, disposing a frame to drive it not displayable is necessary to implement the toggle from/to full screen mode (to modify the decoration and/or to switch to exclusive full screen mode) but disposing an heavyweight frame destroys some native resources which might cause some troubles with GLCanvas. In my case, I did not succeed to get something fully working because I had to remove the GLCanvas from an AWT embedded frame, it called removeNotify(), the OpenGL context was destroyed :(

Maybe using a shared context would solve this problem but personally, I would switch to NewtCanvasAWT, I would put a GLWindow as a child and I would use NewtCanvasAWT instead of GLCanvas. To switch to full screen mode, I would directly use the NEWT methods of the GLWindow. I have never fully tested it. Finally, keep in mind that NEWT full screen mode is more reliable than AWT equivalent.

Do you plan to put only a JOGL canvas into a window? If so, you could fully switch to NEWT, it would be even easier.

Edit.: according to the screen capture, the context has been probably destroyed like in my case.
Julien Gouesse | Personal blog | Website