DXUTSetCallbackDeviceReset

Sets the Direct3D device reset callback function.

VOID DXUTSetCallbackDeviceReset(
  LPDXUTCALLBACKDEVICERESET pCallbackDeviceReset,
  void* pUserContext
);

Parameters

pCallbackDeviceReset
[in] Pointer to a LPDXUTCALLBACKDEVICERESET callback function. If the callback function is supplied, it will be called when the Direct3D device has been reset, which will happen after a lost-device scenario. If NULL, DXUT will not notify the application about device reset events.
pUserContext
[in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. The default value is NULL

Return Values

No return value.

Remarks

The LPDXUTCALLBACKDEVICERESET callback function is the appropriate location for the application to create default pool resources, in D3DPOOL_DEFAULT memory, because these resources need to be reloaded whenever the device is reset. Resources created in the LPDXUTCALLBACKDEVICERESET callback function should be deleted in the LPDXUTCALLBACKDEVICELOST callback function.

Requirements

Header: Declared in Dxut.h.

See Also

LPDXUTCALLBACKDEVICERESET, LPDXUTCALLBACKDEVICELOST, LPDXUTCALLBACKDEVICELOST, Lost Devices