newbie question on ID3DXMesh::DrawSubsets

Started by
1 comment, last by indigox3 17 years, 5 months ago
I've been using only this mesh class so far in learning direct x, and I'm a little confused by the DrawSubsets method. I understand what its for, but what if the effect associated with each subset takes in different types of stream data? For example, if I have a mesh divided into two subsets, where one subset requires 1 set of UVs but the other subset requires 2 sets of UVs. Using the ID3DXMesh class, it seems that the only option is to create the mesh with one big vertex stream that includes both UV sets, instead of multiple streams for each UV set?
Advertisement
The current implementation of ID3DXMesh uses only a single stream so you'll have to store your data as a superset. I've not actually tried it, but from a quick look at ID3DX10Mesh it seems they've rolled both instancing and multi-streams into the implementation which is nice.

If you really need streams then rolling your own simplfied ID3DXMesh-like implementation isn't so difficult. The major downside is that it becomes more difficult to use the many D3DX functions that operate on mesh data...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Ok, that makes sense,

thanks!

This topic is closed to new replies.

Advertisement