Creates a Direct3D device based on a device described by a DXUTDeviceSettings structure.
HRESULT DXUTCreateDeviceFromSettings( DXUTDeviceSettings * pDeviceSettings, BOOL bPreserveInput );
If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.
To alter the settings of a current device, the application can call DXUTGetDeviceSettings to get the device settings structure, change it, and then call DXUTCreateDeviceFromSettings. The application can use DXUTFindValidDeviceSettings to ensure that the device settings are valid before calling DXUTCreateDeviceFromSettings.
This function creates a new Direct3D device for the application; alternately, the application can handle device creation and pass the desired device to DXUT by using the DXUTSetDevice function or calling DXUTCreateDevice. If neither DXUTCreateDevice, DXUTCreateDeviceFromSettings, nor DXUTSetDevice has been called before a framework method that relies on a device object, the framework will automatically call DXUTCreateDevice using the default parameter values.
The application can call this method to change the current device that has already been created.
Header: Declared in Dxut.h.