• Advertisement
Sign in to follow this  

[MDX] Draw mesh subset by his name

This topic is 4311 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement