pioneerspacesim/pioneer — pull request #2643 by Luomu (2014-01-12 22:27:38+00:00)
Title: Binary model format

Adds the ability to save and load models in a binary format. This is good because:
- binary models load faster
- allows creating a version of pioneer without Assimp (it's a big dependency)
- more processing options could be added to the assimp loader, while the binary loader can stay fast & straightforward.

This is not really plugged into the game yet, we need to first decide how it should work. For testing purposes, modelviewer dumps a binary version (.sgm) of every model it loads into userfiles/ModelBinTest/. Pressing B attempts to load a binary model from data/models/whatever/. A .sgm must be located where the .model file is, because textures and patterns are not part of the .sgm file.

Doing binary conversions automatically is probably not a good idea, the model cache was a bit of a headache in the LMR days. Binarizing models should be some kind of a built-time process (or don't enable it at all, it's still a nice tool to have).

A FileSystem question: How to create a Serializer::Reader with FS? I had to use straight fopen, but that won't work if the .sgm file is in a zip or something.