Feature Levels

The available feature levels are listed in D3D_FEATURE_LEVEL. For Direct3D 11, you should normally use D3D_FEATURE_LEVEL_111 for Xbox One development in order to use all of the features Xbox One makes available. Feature levels from D3D_FEATURE_LEVEL_10 may give greater compatibility between a Xbox One title and a Windows title than D3D_FEATURE_LEVEL_11_1. However, as extensions are added to the Xbox One version of DirectX 11, further feature levels will be added in future releases. Attempting to perform Direct3D operations by using D3D_FEATURE_LEVEL_9* returns DXGI_ERROR_UNSUPPORTED.

Currently the D3D11CreateDevice call could be written as follows:

// This array defines the ordering of feature levels that Direct3D should attempt to create.
D3D_FEATURE_LEVEL featureLevels[] =
{
    D3D_FEATURE_LEVEL_11_1,
    D3D_FEATURE_LEVEL_11_0,
    D3D_FEATURE_LEVEL_10_1,
    D3D_FEATURE_LEVEL_10_0
};

// This variable holds the feature level returned by the D3D11CreateDevice call.
D3D_FEATURE_LEVEL featureLevel;
ID3D11Device* pD3DDevice;
ID3D11DeviceContext* pD3DDeviceContext;

D3D11CreateDevice(
    nullptr,                    // specify null to use the default adapter
    D3D_DRIVER_TYPE_HARDWARE,
    nullptr,                    // leave as null if hardware is used
    CreationFlags,              // see the "Creation Flags" section below
    featureLevels,
    _countof( featureLevels ),
    D3D11_SDK_VERSION,          // always set this to D3D11_SDK_VERSION
    &pD3DDevice,
    &featureLevel,
    &pD3DDeviceContext
);  

For a full implementation, see the SampleFramework.cpp file included with the sample code.

See also

DirectX

D3D_FEATURE_LEVEL