Пример #1
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);
        }
Пример #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);
        }