Archived

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

Adding tangent n binormal in my mesh's vertex declaration

This topic is 4945 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''m trying to add tangent and binormal in my mesh''s vertex declaration. I''m loading my mesh from an x file and try to clone them.. but I''m having a hard time adding those two item in the vertex declaration. The idea is to use D3DXcomputeTangent function later on.. Can somebody tell me how it works ?

Share this post


Link to post
Share on other sites
Well, you have to call CloneMesh with a vertex declaration that allocates space for tangent and binormal vectors.

You say you''re having a hard time adding those two items to the vertex declaration. What do you mean? Do you mean that you can''t come up with the correct vertex declaration at all or do you mean that CloneMesh doesn''t produce the results you want?

Make sure that you''re using the Debug Runtime so you can see the reasons why functions fail. If CloneMesh is failing, the debug spew will tell you exactly why.

neneboricua

Share this post


Link to post
Share on other sites