public D3D11GraphicsDevice(GraphicsDeviceOptions options, SwapchainDescription?swapchainDesc)
        {
#if DEBUG
            DeviceCreationFlags creationFlags = DeviceCreationFlags.Debug;
#else
            DeviceCreationFlags creationFlags = options.Debug ? DeviceCreationFlags.Debug : DeviceCreationFlags.None;
#endif
            _device = new SharpDX.Direct3D11.Device(SharpDX.Direct3D.DriverType.Hardware, creationFlags);
            if (swapchainDesc != null)
            {
                SwapchainDescription desc = swapchainDesc.Value;
                _mainSwapchain = new D3D11Swapchain(_device, ref desc);
            }
            _immediateContext = _device.ImmediateContext;
            _device.CheckThreadingSupport(out _supportsConcurrentResources, out _supportsCommandLists);

            _d3d11ResourceFactory = new D3D11ResourceFactory(this);
            PostDeviceCreated();
        }
        protected override void SwapBuffersCore(Swapchain swapchain)
        {
            D3D11Swapchain d3d11SC = Util.AssertSubtype <Swapchain, D3D11Swapchain>(swapchain);

            d3d11SC.DxgiSwapChain.Present(d3d11SC.SyncInterval, PresentFlags.None);
        }