What is the best practice to add support of loading models from multiple file formats (.obj, .3ds ...)? What class hierarchy should I use (now I have Mesh class( containing vertex, data ) and MeshLoader class ( doing nothing right now ))? I do not want to write loaders by myself, so than I have to copy loaded data into my structure. Possibly you can show some articles explaining it especially Mesh class organization. Thanks in advance.


The format that you load into your game engine should be specific to your game engine, and by specific I mean optimized for your target performance. What you will likely want to do, if you want to support multiple model formats, is to have a processing tool that will convert the different formats into the one for your engine. This is the start of an asset pipeline :)

| improve this answer | |
  • 1
    \$\begingroup\$ This, but please don't force them to precompile everything ala XNA :/ \$\endgroup\$ – ClassicThunder Feb 3 '12 at 17:33
  • \$\begingroup\$ @ClassicThunder Very true, especially if you want to target modding and such as I hear this is a right pain to accomplish with out visual studio to compile ala XNA. \$\endgroup\$ – James Feb 3 '12 at 17:51
  • \$\begingroup\$ You should hear the Terraria modding guys whine :) \$\endgroup\$ – ClassicThunder Feb 3 '12 at 17:55
  • \$\begingroup\$ @ClassicThunder That was actually the people I was thinking of when I was writing that ;) \$\endgroup\$ – James Feb 3 '12 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.