• Advertisement
Sign in to follow this  

Saving Files

This topic is 3774 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 need to save my levels that I can now create. Right now the levels are composed of X meshes and lights. What is the best way to save these files? I would like to have meshes stored into 1 type of file (for reference .mc for meshCollection and .tc for textureCollection or something ). Is there a way to save the mesh that is in memory (the ID3DXMESH I think) to a file or does it have to save it to an X file then store that X file? (if so that would require loading every X file when the level is loaded). But basically just any simple way of saving the collection will work. (as a combination of files)

Share this post


Link to post
Share on other sites
Advertisement
You could take your mesh and Lock the attribute, index, and vertex buffers...this gives you the memory so you could save it directly into a binary file using fwrite/fread. You could write into this file additional pieces such as textures and effects.

Share this post


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

  • Advertisement