Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device.
Syntax
HRESULT OnLostDevice();
Parameters
This method has no parameters.
Return value
Type: HRESULT
If the method succeeds, the return value is S_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
Remarks
This method should be called whenever the device is lost or before the user calls IDirect3DDevice9::Reset. Even if the device was not actually lost, ID3DXEffect::OnLostDevice is responsible for freeing stateblocks and other resources that may need to be released before resetting the device. As a result, the font object cannot be used again before calling IDirect3DDevice9::Reset and then ID3DXEffect::OnResetDevice.
Requirements
| Requirement | Value |
|---|---|
| Header |
|
| Library |
|
See also