[SlimDX] Mesh.FromFile & GetEffects

Started by
0 comments, last by Pulsar79 15 years, 4 months ago
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.
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.

This topic is closed to new replies.

Advertisement