Sign in to follow this  
Maxim Skachkov

[MDX] Draw mesh subset by his name

Recommended Posts

Can I draw mesh subsets in free order like this
mesh.DrawSubset("SubsetName")

where SubsetName - name of subset stored in .x-file? Thx. [Edited by - Maxim Skachkov on April 2, 2006 10:16:20 PM]

Share this post


Link to post
Share on other sites
If you really want to do that, I guess you could code a wrapped around the existing interface (ID3DXMesh).

Share this post


Link to post
Share on other sites
Quote:
Original post by programmer_tom
no. drawsubset takes a DWORD bro.
why would u want to?
-programmer_tom


I have few models of cars with different count of subsets. The designer have given an identical name for some subset (e.g. "automobile headlight") in each mesh but the index of this subset is differ from mesh to mesh.


During mesh loading I wish to receive the table of correspondence subsetName->subsetIndex. Then i can uniform access for necessary element.


As it to make not building the table manually?

Share this post


Link to post
Share on other sites
hmm, to be honest I don't think that information is imported by default. It might exist in the raw data, but I don't think it's brought into the D3DX implementation.

Some sort of map or look-up table might work though. If you can parse the data from the X file and retrieve the names then you might be able to do it. Bottom line though is that it'll require some custom code on your part.

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