protected override void OnClosing(CancelEventArgs e) { Shader.DestroyAll(); ModelManager.Cleanup(); TextureManager.Destroy(); if (World != null) { WorldLoader.SaveWorld(World); } base.OnClosing(e); }