Functions assigned to those pointers are called when the Direct3D
device is lost, or has been reset due to a screen mode or resolution
change. This can be used for external plug-ins to restore or reset
Direct3D objects that have been allocated.
- The D3D device can be lost or has to be reset when switching
between window and fullscreen mode, or when changing the screen
- If you are using the Direct3D framework, your
RestoreDeviceObjects() functions should be assigned to on_d3d_reset,
and your InvalidateDeviceObjects() functions should be assigned to
- If you are using the D3DX utilities, all OnDeviceReset() functions
should be assigned to on_d3d_reset, and all OnDeviceLost functions
should be assigned to on_d3d_lost.
- If you have no idea what I'm talking about, you probably won't need
on_d3d_lost or on_d3d_reset.
function devicelost(); // this invalidates my d3d objects
function devicereset(); // this restores my d3d objects
on_d3d_lost = devicelost;
on_d3d_reset = devicereset;