• Advertisement
Sign in to follow this  

[.net] XNA: loading .x vs others

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

This is probably a pretty stupid question. But how much of a performance hit would you get by loading up like a .obj and loading it into an array of VertexPositionTexture then just loading a .x model and going that route?

Share this post


Link to post
Share on other sites
Advertisement
If you use the content pipeline for it, you will have 0 runtime performance hit. All the content processors and importers run at build time to make those .xnb files. So if you parse the .obj file and do whatever you want inside of a content processor/importer pair, you will see no runtime difference in your game; just slightly longer build times I'd guess.

Share this post


Link to post
Share on other sites
I'll have to poke around with the content pipeline then. Just started messing with XNA last night and seen how easy it should be just to load model data into an array.

Share this post


Link to post
Share on other sites
Playing with the content pipeline got me thinking, there is nothing inherently wrong with loading a model at runtime and just packing the data into an array? It seems for certain kinds of programs (ie supporting user supplied data) that you couldn't turn everything into a .xnb before hand.

Share this post


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

  • Advertisement