作者moonjustin (快点放长假吧@@)
看板GameDesign
标题[程式] 请问DirectX里除错的方式...
时间Sun Oct 26 17:38:59 2008
DirectX的函式都会告诉我们类似
只要回传D3D_OK就表示成功,
感觉上是要让我们把回传值和 D3D_OK作比较即可
但是我看到网路上一篇文章这样写:
Virtually all methods in DirectX return an HRESULT for success/failure.
The proper way to test if the method failed is with the FAILED macro.
There is also a SUCCEEDED macro to test for success.
In many examples, success will be tested by comparing the HRESULT with D3D_OK.
This is not the proper way to do it.
They only guaranteed method of testing for failure is with the supplied macros.
不知道这样代表什麽意思?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.218.0.112
1F:推 darkflier:简单的讲就是 他只检查成功 不是成功就是失败 10/26 23:14
2F:→ func:只是几个macro而已,用不用无所谓,标准的做法是用。你可以看 10/27 00:08
3F:→ func:看macro的代码。 10/27 00:08
4F:→ moonjustin:谢谢,我後来去查DirectX SDK也是建议使用Macro 10/30 09:03