Loading MilkShape files

Started by
3 comments, last by Daywalker313 23 years ago
I read NeHe''s OpenGL tutorials and learnt how to load MilkShape models. But if I''m now copying the .ms3d files into another path, the path for the textures doesn''t change. So the textures are searched again in the old folder and can''t be found. Does anybody know a solution for this problem?
Advertisement
No problem. I had this problem, and how I fixed it was, after you have moved the milkshape model, go back into the milkshape program, and update the location of all the texture files. It should work then. It worked for me.

The Kid

I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
Thanks, but I ment if there is a solution if another person (the player) wants to install the game in another folder then the folder the models were originally in.
Include string.

#include
using namespace std;

Then in the function that loads the images, just strip off the folder info by:

1) Initializing the string to be the filename of the texture
2) Searching the string for the last slash
3) Re-initializing te string to be the substring of the string that is just the file itself without the folder info
4) Set the char* filename = to the string

If you can''t figure that out, NeHe''s portalib thing has a utility for it
Thx, that was really helpful

This topic is closed to new replies.

Advertisement