realXtend/tundra-urho3d — pull request #7 by jonnenauha (2014-11-08 18:28:28+00:00)
Title: Mesh component material impl + IMaterialAsset + OgreMaterialAsset

Hi, as discussed I was interested in making a Ogre material parser. Here is the initial support for materials in general.

* `IMaterialAsset` base class for Urho, Ogre etc. material loader implementations.
* `OgreMaterialAsset` and `OgreMaterialDefines` wrap Ogre Material script parsing and creating a basic Urho material from the parsed data.
* The parser is generic and does not concern itself with the values or their types. It parses each block scope and each property line. The block scope hierarchy is preserved. After parsing the block scopes (material/technique/pass/texture units/fragment and vertex shader) can be queried by key. All available Ogre Material Script property keys are pre defined in `OgreMaterialDefines.h` which will allow you to query without guessing stuff.
* Parser separated was done for speed reasons. It is likely that we will use very little information on fixed pipeline and even shader based materials while converting them to Urho mode.
* Currently parses and converts fixed pipeline (and shader based too) by getting diffuse texture and loading it into a `Techniques/Diff.xml` technique. We can get fancier in the future.

For Mesh component I implemented loading and applying materials to the `Urho3D::StaticModel` aka `mesh_` both when mesh is loaded before or after materials. Settings default empty/error materials handlers are implemented but left is for @cadaver to decide how to apply them. I left todo comments in the code for you.

Once again feel free to refactor how ever you'd like if I'm doing something silly with Urho :)

Cheers :beers: