Sign in to follow this  
Pulsar79

[SlimDX] Mesh.FromFile & GetEffects

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

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