摘要: 1. 在Create D3D资源的时候,使用V()宏是非常必要的,因为很多情况下,即使D3D 资源创建失败,他也会继续执行下去,如此以来,程序的bug的定位就麻烦了很多,而使用V()宏会在出错的地方及时停下来,当然也有不好的地方,因为宏定义本身使用了if语句,因此如果V()宏下方有else将会导致else匹配if时出错的问题。2. Pair函数成对使用,我把Create-Release,Begin-End等等函数称为Pair函数,更多的时候,这应该称为一种习惯,就像括号的匹配一样,前者容易导致内存泄露,而后者产生的bug就更加奇怪,例如release下结果正常,而debug模式下结果却比较奇怪 阅读全文
posted @ 2012-10-24 10:50 小 楼 一 夜 听 春 雨 阅读(1748) 评论(0) 推荐(0)
摘要: From the DXSDK DocumentationD3DFVF_XYZRHW - Vertex format includes the position of a transformed vertex. This flag cannot be used with the D3DFVF_XYZ or D3DFVF_NORMAL flags.D3DFVF_XYZW - Vertex format contains transformed and clipped (x, y, z, w) data. ProcessVertices does not invoke the clipper, in 阅读全文
posted @ 2012-10-24 09:19 小 楼 一 夜 听 春 雨 阅读(932) 评论(0) 推荐(0)