Sign in to follow this  

.X File Loading

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

I'm trying to load a file using the sample 3 code provided here http://www.gamedev.net/reference/programming/features/xfilepc/ I can get the file that is provided with this code to load and display properly but anytime I try to use any other .x files that I've exported from blender the program crashes immediately and I can't seem to figure out why. I get the error "Debug Assertion failed"..."Expression: list iterator not dereferencable". I would appreciate any help.

Share this post


Link to post
Share on other sites
The blender xfile exporter occassionally puts invalid floating point values into the files. Look out for strings like "-1.#IND00" oder "1.#QNAN0" and handle them as a special case. Your average floating point parser will propably choke on these. But I can't tell if this is the actual reason for the error you encountered. You'll have to use the debugger and see for yourself. Alternatively you might want to take a look at Assimp, a flexible importer library which reads .x files and others. I wrote the xfile loader for this library, and I, too, had to add special parsing for invalid number string for the blender exporter. You might save yourself some work by using this library.

Share this post


Link to post
Share on other sites

This topic is 3339 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.

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