Jump to content
  • Advertisement
Sign in to follow this  
Pulsar79

[SlimDX] Mesh.FromFile & GetEffects

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

Good days. I believe that I have detected a bug at the moment of loading a file .X. The test you can do with the file DwarfWithEffectInstance.x that comes in DirectX's SDK. To seeing how I explain it. The question is that I use the function Mesh.FromFile (...) and when I make then the GetEffects function does not return anything. Nevertheless, examining SlimDX's code that does not return anything for the fact that in the loop that iters the EffectInstance GetAttributeTable's value (count value) is used and this is 0. I believe that this is due to the fact that a CloneMesh has not been used. There is another way of it doing that I not? Or have you to check it? Thank you very much and I think that it is an excellent project. Be still boys like that.

Share this post


Link to post
Share on other sites
Advertisement
Already I have managed to obtain effects by means of Mesh.GetEffects () changing a line into Mesh:: FromFile.

What I have done is to change in the line:

Result -> SetEffects (EffectInstance:: FromBuffer (instanceBuffer, instanceCount));

I have changed the variable "instanceCount" for "materialCount", since "instanceCount" always it is 0 inside this function.

This way already he returns InstanceEffect's[] array to me.

But I suppose that equal you will have to look how to do it. At the moment this way it me goes, but I say it to you for to seeing if you it can solve in future versions. Thank you very much again.

Sorry for my english.

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!