Exemple #1
0
 public void Dispose()
 {
     SpriteBatch?.Dispose();
     BackBuffer?.Dispose();
     DepthBuffer?.Dispose();
     GraphicsDevice?.Dispose();
     Device10?.Dispose();
     Device11?.Dispose();
 }
Exemple #2
0
        private void Reset(int width, int height)
        {
            Color?backgroundColor = BackBuffer?.BackgroundColor;

            BackBuffer?.Dispose();
            DepthBuffer?.Dispose();

            ResizeBuffers(width, height);

            BackBuffer  = new BackBuffer(Device10, Device11);
            DepthBuffer = new DepthBuffer(Device11, width, height);

            if (backgroundColor != null)
            {
                BackBuffer.BackgroundColor = backgroundColor.Value;
            }

            SetViewport(width, height);
            SetTargets();

            Reseted?.Invoke(this);
        }