Sign in to follow this  

getting the subset number of a triangle's index?

This topic is 2848 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 trying to paint the scene using a gun. I am using "D3DXIntersect" method, which gets a mesh and line and gives the index number of the closest triangle that line hits. so what I need to do after getting this index number I will edit the texture of the subset that uses that triangle. problem is each subset uses a different texture, so how can I find the which subset that triangle belongs to? I think each subset uses different part of index buffer (like s0 uses 0-999 s1 uses 1000-1999 etc) but how can I find it? also do you think this method is good? I will use the texture as a render target to render on it, so it will be efficent, only problem is I had to create a texture for each object and two different parts of a object can't use same part of texture.

Share this post


Link to post
Share on other sites

This topic is 2848 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this