开发者

Direct3D: What does the stream number do in device->SetStreamSource?

开发者 https://www.devze.com 2022-12-17 14:42 出处:网络
Where else is 开发者_如何转开发the stream number used other than in these two places: GetStreamSource and SetStreamSource?Using multiple streams allows you to combine together vertex component data fr

Where else is 开发者_如何转开发the stream number used other than in these two places: GetStreamSource and SetStreamSource?


Using multiple streams allows you to combine together vertex component data from different sources. This can be useful when you have different rendering methods, each of which requires different sets of vertex components. Instead of always sending the entire set of data, you can separate it into streams and only use the ones you need. See this chapter from GPU Gems 2 for an example and sample code. It can also be useful for effects such as morphing.

When calling CreateVertexDeclaration, you specify the stream number in the D3DVERTEXELEMENT9 elements to determine which stream each vertex component comes from.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号