From db4b9598689f3021d56440f08ab7fc51ba5cccd5 Mon Sep 17 00:00:00 2001 From: Ias0601 Date: Thu, 1 Jun 2017 21:12:48 +0530 Subject: [PATCH] Update ModelLoader.cpp --- .../SimpleTexturedDirectx11/ModelLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. }