Sign in to follow this  

newbie question on ID3DXMesh::DrawSubsets

This topic is 4057 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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

This topic is 4057 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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