Application-defined resource creation callback function, called by DXUT after the device is created. Passes a pointer to the newly created Direct3D device.
HRESULT LPDXUTCALLBACKDEVICECREATED( IDirect3DDevice9 * pd3dDevice, CONST D3DSURFACE_DESC * pBackBufferSurfaceDesc, void* pUserContext );
In general, if no error occurs, program the function to return S_OK. Program the function to return an HRESULT failure code if the function fails. If DXUT receives a failure HRESULT code, it will shut down the application.
This callback function is the appropriate location for the application to create resources in D3DPOOL_MANAGED or D3DPOOL_SYSTEMMEM memory, since these resources do not need to be reloaded whenever the device is reset. Resources created in this callback function should be deleted in the LPDXUTCALLBACKDEVICEDESTROYED callback function.
Header: Declared in Dxut.h.
DXUTSetCallbackDeviceCreated, DXUTSetCallbackDeviceDestroyed, LPDXUTCALLBACKDEVICEDESTROYED