Jump to content
  • Advertisement
Sign in to follow this  
shultays

getting the subset number of a triangle's index?

This topic is 3063 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
Advertisement
I just noticed that these values are recorded in attribute table :) sorry about that.

but my second question still stands, is there a better alternative?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!