http://blog.sina.com.cn/huaner1006[订阅]
字体大小: 正文
begin,end切记要相互对应(2008-07-23 10:14:05)

今天在进行多个technique测试的时候,犯了一个白痴的错误;也就是用了多个technique时,俺只用了一个effect->end();查看了下sdk,以及自己想着测试时,才大悟原来begin(),end()都是要相互对应的。

SDK上提到:All rendering in an effect is done within a matching pair of ID3DXEffect::Begin and ID3DXEffect::End calls. After all passes are rendered, ID3DXEffect::End must be called to end the active technique.

也就是一个ID3DXEffect::End就是结束当前的technique。

同时,beginpass,endpass也要注意。

An application signals the end of rendering an active pass by calling ID3DXEffect::EndPass. Each ID3DXEffect::EndPass must be part of a matching pair of ID3DXEffect::BeginPass and ID3DXEffect::EndPass calls.

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

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

发评论

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

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