on_d3d_lost
on_d3d_reset
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.
Remarks:
- The D3D device can be lost or has to be reset when switching
between window and fullscreen mode, or when changing the screen
resolution.
- 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
on_d3d_lost.
- 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.
Example:
function devicelost(); // this invalidates my d3d objects
function devicereset(); // this restores my d3d objects
...
on_d3d_lost = devicelost;
on_d3d_reset = devicereset;
See also:
on_click