Ejemplo n.º 1
0
        private void OnGraphicsDeviceResetting(object sender, EventArgs eventArgs)
        {
            RenderTargetPool.Clear();

            // Reset the texture stages. If a floating point texture is set, we get exceptions
            // when a sampler with bilinear filtering is set.
            GraphicsDevice.ResetTextures();
        }
Ejemplo n.º 2
0
        //private void OnGraphicsDeviceReset(object sender, EventArgs eventArgs)
        //{
        //}


        private void OnGraphicsDeviceDisposing(object sender, EventArgs eventArgs)
        {
            // Clean up resources.
            RenderTargetPool.Clear();

            // Dispose custom data. - Don't do this. Because the device will be
            // reset and automatically recreated when the game window moves between
            // screens for example...
            //foreach(var entry in Data)
            //  if (entry.Value is IDisposable)
            //    ((IDisposable)entry.Value).Dispose();
        }