private void Window_Closing(object sender, CancelEventArgs e)
        {
            try
            {
                Game.Device.ClearState();
            }
            catch { }
            Rendering.Grid.Dispose();
            KeyboardInput.ReleaseDevice();
            MouseInput.ReleaseDevice();
            SpriteDrawer.Dispose();
            DeferredRenderer.Dispose();
            SkyDome.Dispose();
            TextureLoader.Dispose();
            PhysicsEngine.Dispose();
            GameData.Dispose();
            WorldData.Dispose();

            if (view1.D3DScene != null)
            {
                view1.D3DScene.Dispose();
            }
            view1.Dispose();

            ShaderHelper.Dispose();
        }