| 82 | } |
| 83 | |
| 84 | ShaderHandle addComputeShader(std::string path) { |
| 85 | path = getDataFilePath("shaders\\" + path, true); |
| 86 | |
| 87 | mutex.lock(); |
| 88 | { |
| 89 | auto existing = csPathToHandle.find(path); |
| 90 | if (existing != csPathToHandle.end()) { |
| 91 | mutex.unlock(); |
| 92 | return existing->second; |
| 93 | } |
| 94 | } |
| 95 | ShaderHandle handle(shaderReloadInfo.size()); |
| 96 | shaderReloadInfo.push_back(ShaderReloadInfo { path, ShaderType::Compute, FILETIME { 0, 0 } }); |
| 97 | loadedShaders.push_back(CompiledShader { nullptr }); |
| 98 | csPathToHandle[path] = handle; |
| 99 | mutex.unlock(); |
| 100 | return handle; |
| 101 | } |
| 102 | |
| 103 | bool reload(ShaderReloadInfo *const reloadInfo, CompiledShader *const shader) { |
| 104 | LPCSTR profile = |
no test coverage detected