From fef9c1f751fa0d13ef9d221fb14316b328ad0f15 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 12 Mar 2014 22:40:54 +0100 Subject: [PATCH] OBJ loader correct path for textures --- Escape-the-Dawn/OBJ.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Escape-the-Dawn/OBJ.cpp b/Escape-the-Dawn/OBJ.cpp index df3ece7..82b3901 100644 --- a/Escape-the-Dawn/OBJ.cpp +++ b/Escape-the-Dawn/OBJ.cpp @@ -218,7 +218,9 @@ void OBJ::ParseMaterial() // Texture file // TODO: if (prefix == "map_Ka" || prefix == "map_Kd") { - ss >> currentMaterial->TextureFile; + std::string textureFile; + ss >> textureFile; + currentMaterial->TextureFile = (m_MaterialPath.branch_path() / textureFile).string(); continue; } }