I’m using a GLCanvas, and switching the window it’s in to fullscreen mode. Because I have to dispose the window to make it undecorated, it seems that the GLContext attached to the window is lost and re-created (I’ve tested this with a display list, at least, and it does indeed disappear). While I can simply re-load all the necessary items using the init method of the GLEventListener, it would be nice if there was some way to do this without having to re-load everything. Is there some obvious way to do this that I’m missing?
No, there is no way to preserve the GLContext in this situation. Fundamentally the native peer is being destroyed and re-created. It’s for this reason that you should make your init() method “re-entrant”, in other words, support calling init() more than once.