D3D_DRIVER_TYPE_HARDWARE,
0,
new D3D_FEATURE_LEVEL[] { D3D_FEATURE_LEVEL_11_0 });
final ID3D11DeviceContext immediateContext = device.GetImmediateContext();
IDXGIDevice1 dxgiDevice = device.QueryInterface(IDXGIDevice1.class);
IDXGIFactory1 dxgiFactory= dxgiDevice.GetParent(IDXGIAdapter1.class)
.GetParent(IDXGIFactory1.class);
final IDXGISwapChain swapChain = dxgiFactory.CreateSwapChain(dxgiDevice, DXGI.SwapChainDescription(frame));
dxgiDevice.Release();