| 301 | } |
| 302 | |
| 303 | static TextureHandle LoadMaterialTexture(aiMaterial * mat, const aiTextureType& type, const std::string& directory, const ColorSpace& cspace) { |
| 304 | TextureHandle texture; |
| 305 | if (mat->GetTextureCount(type) > 0) { |
| 306 | aiString str; |
| 307 | mat->GetTexture(type, 0, &str); |
| 308 | std::string file = str.C_Str(); |
| 309 | texture = ResourceManager::Instance()->LoadTexture(directory + "/" + file, cspace); |
| 310 | } |
| 311 | |
| 312 | return texture; |
| 313 | } |
| 314 | |
| 315 | static void PrintMatType(const aiMaterial * aimat, const aiTextureType type) { |
| 316 | static const std::unordered_map<int, std::string> conversion = { |
no test coverage detected