> I'm working on a level editor which I originally wrote with plain Java2D and
> later converted to JOGL.
>
> The original Java2D implementation had several JPanels, a big one for actually
> editing a level and many small ones as level previews. Each panel was
> connected to the same instance of my ResourceManager class which held all the
> images (now textures) and knew how to paint itself when an update was necessary.
>
> When I switched my game to JOGL, I quick-and-dirtily turned each of these
> panels into a GLJPanel, with its own ResourceManager (because instantiating
> the ResourceManager required a GL context). Aside from certainly wasting a lot
> of resources, this also makes things horribly slow when, while scrolling
> through the list of level previews, each panel that's displayed for the first
> time reads and initialises its textures.
>
> I've therefore been trying to switch to a shared GL context which would be the
> home of the ResourceManager. It's been mostly trial and error and Google
> searches (the link on the GLJPanel Javadoc page that would presumably provide
> more info doesn't exist:
>
https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/spec-overview.html#SHARING).