diff --git a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/ModelLoader.cpp b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/ModelLoader.cpp index 2b934ae5b..801284383 100644 --- a/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/ModelLoader.cpp +++ b/samples/SimpleTexturedDirectx11/SimpleTexturedDirectx11/ModelLoader.cpp @@ -102,7 +102,7 @@ vector ModelLoader::loadMaterialTextures(aiMaterial * mat, aiTextureTyp bool skip = false; for (UINT j = 0; j < textures_loaded.size(); j++) { - if (std::strcmp(textures_loaded[j].path.C_Str(), str.C_Str()) == 0) + if (std::strcmp(textures_loaded[j].path.c_str(), str.C_Str()) == 0) { textures.push_back(textures_loaded[j]); skip = true; // A texture with the same filepath has already been loaded, continue to next one. (optimization) @@ -128,7 +128,7 @@ vector ModelLoader::loadMaterialTextures(aiMaterial * mat, aiTextureTyp MessageBox(hwnd, "Texture couldn't be loaded", "Error!", MB_ICONERROR | MB_OK); } texture.type = typeName; - texture.path = str; + texture.path = str.C_Str(); textures.push_back(texture); this->textures_loaded.push_back(texture); // Store it as texture loaded for entire model, to ensure we won't unnecesery load duplicate textures. }