shader copy to output
All checks were successful
CI / build-test-release (push) Successful in 15m1s

This commit is contained in:
Jorijn van der Graaf 2026-05-01 19:16:13 +02:00
commit de9865b583
8 changed files with 163 additions and 1 deletions

View file

@ -54,7 +54,8 @@ namespace Crafter {
}
bool Shader::Check(const fs::path& outputDir) const {
return fs::exists((outputDir/path.filename()).generic_string()+".spv") && fs::last_write_time(path.generic_string()+".glsl") < fs::last_write_time((outputDir/path.filename()).generic_string()+".spv");
fs::path spv = outputDir / path.filename().replace_extension("spv");
return fs::exists(spv) && fs::last_write_time(path) < fs::last_write_time(spv);
}
std::string Shader::Compile(const fs::path& outputDir) const {
EShLanguage glslangType = ToEShLanguage(type);