I have an application using Jogl jsr 1.1.1, that can be started in fullscreen exclusive mode or windowed mode. It uses an AWT JFrame and a GLCanvas.
I'd like to be able to change from fullscreen to windowed (and reverse) directly inside the application.
Unfortunately it seems I have to destroy the frame to do that (setUndecorated needs the frame to be not displayable), then recreate a new windowed one, and add back my GLCanvas. Unfortunately this operation destroys the GLContext (I don't know why, but I can understand it).
Is there a clean way to do this?
Sorry for the late reply. Use a shared drawable to work around this issue or use NEWT (it does not destroy the context in such a situation).