Sign in to follow this  
indigox3

newbie question on ID3DXMesh::DrawSubsets

Recommended Posts

indigox3    122
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?

Share this post


Link to post
Share on other sites
jollyjeffers    1570
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this