Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Roaders

Drawing mesh subsets

This topic is 5580 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 am using this code to draw a mesh that has many sub sets: (LPD3DXMESH g_pMeshTruck) for( DWORD i=0; iSetMaterial( &g_pMeshTruckMaterials ); g_pd3dDevice->SetTexture( 0, g_pMeshTruckTextures[i] ); // Draw the mesh subset g_pMeshTruck->DrawSubset( i ); } When I am looping through the subsets is there any way I can get the name of the subset? Basically it is a truck that I saved from 3DS MAX, in 3DS one of the subsets had the name RLights. WHne the brakes are on I want to change the material of RLights so it looks like the break lights are on. How do I find out what the index of the lights are? Thanks Giles Roadnight giles.roadnight.name

Share this post


Link to post
Share on other sites
Advertisement
I use the name of the texture to find out which subset will be rendered in that step. So I can change the material as I need before rendering that subset!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!