public void Terminate() { if (TV3DEngine != null) { TV3DEngine.ReleaseAll(); } TV3DEngine = null; if (TV3DScene != null) { TV3DScene.DestroyAllMeshes(); } TV3DScene = null; if (TexFactory != null) { TexFactory.DeleteAll(); } TexFactory = null; if (Screen2DImmediate != null) { Screen2DImmediate = null; } Screen2DText = null; if (LightEngine != null) { LightEngine.DeleteAllLights(); } LightEngine = null; Gl = null; Camera = null; if (Atmosphere != null) { Atmosphere.Unload(); } Atmosphere = null; if (Input != null) { Input.UnloadDevices(); } Input = null; }