Source

gltut / framework / Mesh.cpp

Diff from to

File framework/Mesh.cpp

 		{
 			std::string strDataFilename = LOCAL_FILE_DIR + strFilename;
 			std::ifstream fileStream(strDataFilename.c_str());
+			if(!fileStream.is_open())
+			{
+				fileStream.clear();
+				strDataFilename = GLOBAL_FILE_DIR + strFilename;
+				fileStream.open(strDataFilename.c_str());
+
+				if(!fileStream.is_open())
+					throw std::runtime_error("Could not find the mesh file.");
+			}
 
 			TiXmlDocument theDoc;