MCPcopy Create free account
hub / github.com/KTStephano/StratusGFX / LoadMaterialTexture

Function LoadMaterialTexture

Source/Engine/StratusResourceManager.cpp:303–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 = {

Callers 1

ProcessMaterialFunction · 0.85

Calls 1

LoadTextureMethod · 0.80

Tested by

no test coverage detected