Jump to content
  • Advertisement


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


Need Help

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

Hi guys In direct3d , I load my X file in to my class. but it have 3 material(3 different texture) to assign in a mesh. I use setMaterial and DrawIndexedPrimitive to render. but it only render one texture in my mesh. I think I need to select face to render , it is right ??? always I not want to use drawSubset. can any one told me how can do this ???? thanks

Share this post

Link to post
Share on other sites
Check out the ID3DXBaseMesh::GetAttributeTable() and use the info from D3DXATTRIBUTERANGE to know which vertices/faces you have to render for a certain material/texture/shader.

The docs say: An attribute table is created by ID3DXMesh::Optimize and passing D3DXMESHOPT_ATTRSORT for the Flags parameter.

But I noticed, that the attrib table is available after D3DXWeldVertices() too (DX9).

- Mete

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!