• Advertisement
Sign in to follow this  

Direct3DXException

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

Hi, I try to load a skinned mesh, but I keep getting this Direct3DXException on line: "this.rootFrame = Mesh.LoadHierarchyFromFile(this.xFilePath, MeshFlags.Managed, this.device, new CustomAllocateHierarchy(this.xFilePath), // AllocateHierarchy null);" here's the full message: "An unhandled exception of type 'Microsoft.DirectX.Direct3D.Direct3DXException' occurred in microsoft.directx.direct3dx.dll Additional information: Error in the application." What is the cause? How do I fix it? Thanks in Advance, Peter

Share this post


Link to post
Share on other sites
Advertisement
The likely cause is a NULL pointer.

Check for NULL pointers: this, Mesh, this.xFilePath, this.device, etc., before you make the Load call.

Share this post


Link to post
Share on other sites
okay, I checked the values, thus none of them are NULL, string.empty etc.
this is what I follow: http://www.jkarlsson.com/Articles/loadframes.asp
complete code is in the end,
what could possibly wrong?

Share this post


Link to post
Share on other sites
1. Try creating the allocate-hierarchy object before you make the load call to ensure the object gets created correctly.

2. Load the x-file in a mesh viewer to ensure the file is not corrupt.

Share this post


Link to post
Share on other sites
Thanks Buckeye,
It seems that the X file I used was corrupted, however, I can't see how..
It worked fine in dxviewer and obviously had hierarchy in it,
I wonder if it is my XExporter for Maya,

Anyway,
Thanks and good luck,
Peter

Share this post


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

  • Advertisement