最近一直都纳闷为什么每次reset窗口的时候,就会在ID3DXEffect->end()的地方crash掉。今天才知道原因哦。还是感谢下同事的积极配合和帮助哦。
在reset设备之前,一定要ID3DXEffect->OnLostDevice();SDK里有这么一段话
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.
然后再reset设备;最后再调用ID3DXEffect->OnResetDevice()接口哦。
插入表情