From: Combe, C. <C....@na...> - 2002-06-07 12:55:37
|
hi, if you've looked at any of my previous emails you'll know that i'm trying to replace a GLCanvas of one sort with a AWTCanvas or a GLCanvas of a different sort inside a Frame. No matter what I try it doesn't work. Destroying the canvas then creating a new object appears to work but it is always leaving behind a reference to a THread and eventually the prog slows to a crawl. I'm pretty certain that i'm not leaving behind this reference elsewhere in my prog. If I avoid creating new objects then after doing cvsDispose and removing the canvas I cannot get the GLCanvas to be initialised again. Removing and adding the canvas without ever calling cvsDispose works sometimes but eventually crashes (this is expected as the documentation says to always call cvsDispose before removing). Attatched is a version of my Frame class which tries to destroy and create the new GL canvas objects. What is the recommended way of swapping one canvas for another? I'll be most grateful for any advice. I'd really like to use gl4java for this project and the actual drawing of the scene works fine and is fast - its just this canvas changing thing that is the problem. :-( please help... colin |