Question

I'd like to enable my game to load content (such as a model, a jpg file, etc.) during run-time and display them.

I looked at the sample on XNA website (http://creators.xna.com/en-US/sample/winforms_series2), however this method requires Game Studio (which means Visual Studio too) installed on the client computer.

What are the approaches to loading content during run-time without VS+GS? Do I have to to avoid XNA Content Pipeline completely? If so do I have to write my own graphic import library or are there any suitable ones for this task?

Thanks in advance!

Was it helpful?

Solution

For loading a texture you can use Texture2D.FromFile method.

As for models I don't think there is a way to load them. If you just want to load vertex and index data then loading that from a file into buffers is fairly simple. If, however, you actually want a model instance then I know of no way (other than using the content pipeline)

OTHER TIPS

Doing this would require alot of tweeks, and looking into the target files, changing them, and breaking some of the rules in the EULA for XNA Gamestudio 3.1 and below. Your best bet would be to create Vertex and Index buffers, and loading your own custom file type for models.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top