Startup

The Device

Enumerate adapters

To get a list of the devices use CreateDXGIFactory1() and then call IDXGIFactory::EnumAdapters() on it.

Enable the debug layer

To get more detail error and warning messages activate the debug layer by sending in the D3D11_CREATE_DEVICE_DEBUG flag when creating the device.

Create the device

Create the device using D3D11CreateDevice() or D3D11CreateDeviceAndSwapChain(). Both of them can return the ID3D11DeviceContext.