Implement fs::get_cache_dir

Win32: equal to config dir for now
Linux: respect XDG_CACHE_HOME if specified
OSX: possibly incomplete
This commit is contained in:
Nekotekina 2018-12-24 18:47:46 +03:00
parent 20efed66e9
commit bd9131ae1c
15 changed files with 69 additions and 28 deletions

View file

@ -388,7 +388,7 @@ void GLFragmentProgram::Compile()
const char* str = shader.c_str();
const int strlen = ::narrow<int>(shader.length());
fs::file(fs::get_config_dir() + "shaderlog/FragmentProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
fs::file(fs::get_cache_dir() + "shaderlog/FragmentProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
glShaderSource(id, 1, &str, &strlen);
glCompileShader(id);