I’m having an interesting problem with the context of my GLCanvas objects. The software I work on uses a number of GLCanvas objects to display views on a data set. It creates a number of textures to hold the views.
When a view is hidden, it’s removed from its parent component temporarily; when the parent component is made visible again, the GLCanvas is added back in. However, the GL context has lost any textures that were associated with it.
Currently we deal with this by subclassing GLCanvas and overriding addNotify and removeNotify. However, this isn’t a very nice approach. Is there some standard JOGL way of detecting this context cleanup instead, to allow textures and suchlike to be invalidated?