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.
精彩评论