http://blog.sina.com.cn/huaner1006[订阅]
字体大小: 正文
ID3DXEffect 重设窗口的crash(2008-09-08 16:14:03)

最近一直都纳闷为什么每次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()接口哦。

 

加载中,请稍候...
  • 评论加载中,请稍候...

验证码:请点击后输入验证码  收听验证码

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

相关博文
读取中...
推荐博文
读取中...