| 123 | } |
| 124 | |
| 125 | void CoronaLoader::loadMaterialDefinition(const Ref<XML>& xml) |
| 126 | { |
| 127 | if (xml->name != "materialDefinition") |
| 128 | THROW_RUNTIME_ERROR(xml->loc.str()+": invalid material definition: "+xml->name); |
| 129 | if (xml->children.size() != 1) |
| 130 | THROW_RUNTIME_ERROR(xml->loc.str()+": invalid material definition"); |
| 131 | |
| 132 | const std::string name = xml->parm("name"); |
| 133 | materialMap[name] = loadMaterial(xml->children[0]); |
| 134 | } |
| 135 | |
| 136 | std::shared_ptr<Texture> CoronaLoader::loadMap(const Ref<XML>& xml) |
| 137 | { |