Hey,
I’m developing an application that puts a number of GLCanvases into more or less complex layouts. Depending on the state of the application, I want to show or hide specific views. The problem I have is that a GLCanvas that has been realised doesn’t destroy its context when hidden; it appears that this happens only in removeNotify() i.e. when I remove the view from its parent container. Is there a way around this? I am attaching a test case to demo the problem: a JTabbedPane hosting 10 or so GLCanvas instances. Click each tab and you’ll notice that at some point (depending on your gfx hardware I guess), performance drops and the animation becomes very jerky. NB: the underlying CardLayout will hide components for inactive tabs; I have installed a ComponentListener that will remove the corresponding GLCanvas from the animator.
Any help would be much appreciated! Also please shout if you spot any blatant mistakes…
Matt.
