Sign in to follow this  
janoside

Mesh Loading

Recommended Posts

I have a number of .x file models made by a friend and I would like to be able to load them into my application. The DXViewer and MeshViewer utilities distributed with the DXSDK have no problem loading the meshes properly. However the code available in the demos (EnhancedMesh and ProgressiveMesh samples) cannot load them. I am using Managed C#. I know that the source code for the DXViewer is included in the SDK but I really need a C# version of the code. If anyone knows of a more robust version of mesh loading than is available in the DX samples I would really appreciate any C# code samples available. Thanks in advance, Janoside

Share this post


Link to post
Share on other sites
"How" are they not loading them?

Does the function call fail / throw an exception? or does it silently fail and then display nothing on screen.

If it's the former - what is the error message/code?

In both cases - run the debug runtimes and see what they tell you (in the case of the former it might give you more details, in the case of the latter it might emit a warning message)...

If you still aren't getting anywhere... have you checked that what you're loading and rendering is actually going to appear on the screen? I've confused myself a number of times by thinking I had an error when in fact the camera was pointing in the wrong direction and/or the scaling component of the world matrix was wrong [grin]

hth
Jack

Share this post


Link to post
Share on other sites
Thanks for the reply, I should have been more descriptive. The mesh loading is throwing an exception. I tried running under the Debug runtime, but it did not help.

Specifically an exception is being thrown when I try to compute the normals of the mesh.

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