Compile Shaders now as well

This commit is contained in:
2024-03-09 16:52:26 +01:00
parent d464128d78
commit 26ed5a1398
2 changed files with 61 additions and 6 deletions

View File

@ -20,7 +20,8 @@ inline std::string fix_path(const std::string &path)
inline std::string stupid_hash(const std::string &file)
{
std::ifstream iff(file);
if(!iff.is_open()) {
if (!iff.is_open())
{
return std::to_string(rand());
}
unsigned long long check_sum = 0x0ULL;
@ -44,10 +45,13 @@ createHashes(const std::vector<std::string> &dirs,
{
for (const auto &file : std::filesystem::directory_iterator(it))
{
if (file.is_regular_file() && file.path().extension() == extension)
if (file.is_regular_file())
{
std::string path = fix_path(file.path().string());
hashes[path] = stupid_hash(path);
if (path.length() > extension.length() && path.ends_with(extension))
{
hashes[path] = stupid_hash(path);
}
}
}
}