Check if file to load texture from exists, display error if not
This commit is contained in:
parent
ac0a4989bd
commit
b399fed33b
3 changed files with 19 additions and 1 deletions
|
|
@ -375,5 +375,11 @@ namespace vks
|
|||
|
||||
return shaderModule;
|
||||
}
|
||||
|
||||
bool fileExists(const std::string &filename)
|
||||
{
|
||||
std::ifstream f(filename.c_str());
|
||||
return !f.fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue