看板 GameDesign 關於我們 聯絡資訊
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
darkflier:簡單的講就是 他只檢查成功 不是成功就是失敗 10/26 23:14
func:隻是幾個macro而已,用不用無所謂,標準的做法是用。你可以看 10/27 00:08
func:看macro的代碼。 10/27 00:08
moonjustin:謝謝,我後來去查DirectX SDK也是建議使用Macro 10/30 09:03