From 3eeeaf051f4a92ff13fa612bf4045e79f11706c2 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Thu, 29 Jan 2015 17:54:22 +0800 Subject: [PATCH] fix load mtl --- cocos/3d/CCObjLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/3d/CCObjLoader.cpp b/cocos/3d/CCObjLoader.cpp index 01da07a27c..eb77f2a7d5 100644 --- a/cocos/3d/CCObjLoader.cpp +++ b/cocos/3d/CCObjLoader.cpp @@ -289,7 +289,7 @@ std::string LoadMtl ( std::map& material_map filepath = std::string(filename); } - std::ifstream ifs(filepath.c_str()); + std::istringstream ifs(FileUtils::getInstance()->getStringFromFile(filepath)); if (!ifs) { err << "Cannot open file [" << filepath << "]" << std::endl;