• Advertisement

Archived

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

Need Help

This topic is 5494 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
Advertisement
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