Sets an existing Direct3D device for use by DXUT.
HRESULT DXUTSetDevice(IDirect3DDevice9 *pd3dDevice);
[in] Pointer to a IDirect3DDevice9 object to use for rendering.
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.
This function relies on an existing Direct3D device object created by the application. Alternately, the application can call DXUTCreateDevice or DXUTCreateDeviceFromSettings to have DXUT create a device. If neither DXUTCreateDevice, DXUTCreateDeviceFromSettings, nor DXUTSetDevice have been called before a framework method that relies on a device, the framework will automatically call DXUTCreateDevice using the default parameter values.
The application can call this function after a device has already been created to change the current device.
Header: Declared in Dxut.h.