DXUTSetCallbackDeviceDestroyed
Sets the Direct3D device-destroyed callback function.
VOID DXUTSetCallbackDeviceDestroyed(
LPDXUTCALLBACKDEVICEDESTROYED pCallbackDeviceDestroyed,
void* pUserContext
);
Parameters
- pCallbackDeviceDestroyed
- [in] Pointer to a LPDXUTCALLBACKDEVICEDESTROYED callback function. If the callback function is supplied, it will be called when the Direct3D device has been destroyed. Device destruction will happen as a result of program termination and if the Direct3D device changes. If NULL, DXUT will not notify the application about device destroyed 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
Resources created in the LPDXUTCALLBACKDEVICECREATED callback function should be deleted in the LPDXUTCALLBACKDEVICEDESTROYED callback function. The deleted resources will generally include all resources created in D3DPOOL_MANAGED or D3DPOOL_SYSTEMMEM memory.
Requirements
Header: Declared in Dxut.h.
See Also
LPDXUTCALLBACKDEVICEDESTROYED, LPDXUTCALLBACKDEVICECREATED, DXUTSetCallbackDeviceCreated