Esempio n. 1
0
        DXGI.SwapChain1 IDirect3DWindow.CreateSwapChain(D3D11.Device1 device, ref DXGI.SwapChainDescription1 description)
        {
            var dxgiDevice = device.QueryInterface<DXGI.Device1>();
            var dxgiAdapter = dxgiDevice.Adapter;

            var dxgiFactory = dxgiAdapter.GetParent<DXGI.Factory2>();

            return dxgiFactory.CreateSwapChainForHwnd(dxgiDevice, _form.Handle, ref description, null, null);
        }
Esempio n. 2
0
        DXGI.SwapChain1 IDirect3DWindow.CreateSwapChain(D3D11.Device1 device, ref DXGI.SwapChainDescription1 description)
        {
            var dxgiDevice = device.QueryInterface<DXGI.Device1>();
            var dxgiAdapter = dxgiDevice.Adapter;

            var dxgiFactory = dxgiAdapter.GetParent<DXGI.Factory2>();

            var coWindow = new SharpDX.ComObject(_coreWindow);
            return dxgiFactory.CreateSwapChainForCoreWindow(dxgiDevice, coWindow, ref description, null);
        }