Sign in to follow this  
generic_name

[.net] XNA: loading .x vs others

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this