Check if file to load texture from exists, display error if not

This commit is contained in:
saschawillems 2017-04-13 22:11:00 +02:00
parent ac0a4989bd
commit b399fed33b
3 changed files with 19 additions and 1 deletions

View file

@ -375,5 +375,11 @@ namespace vks
return shaderModule;
}
bool fileExists(const std::string &filename)
{
std::ifstream f(filename.c_str());
return !f.fail();
}
}
}