Jump to content
  • Advertisement
Sign in to follow this  
ripper9101

.X File Loading

This topic is 3552 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!