On 05/23/2012 11:04 AM, Martin [via jogamp] wrote:
> Hi,
>
> My GLEventListener.dispose() method makes some cleanup assuming dispose() is
> called only when someone close the windows.
>
> Unless I am wrong, it seems that in JOGL2 this method is called when a
> GLJPanel is resized. Thus the listener continue to live, but all its content
> get cleared.
>
> What is the reason for calling dispose() without really destroying the listener?
>
b/c GLJPanel may use an FBO, which must be recreated to fit the new size.
If you like to use GLJPanel and keep the GL data, you can use an initial
[offscreen] shared GLContext. However, then you need to figure out when to
release resources of that root GLContext.
~Sven
> Regards,
>
> Martin