| 44 | |
| 45 | |
| 46 | ShaderHandle addPixelShader(std::string path) { |
| 47 | path = getDataFilePath("shaders\\" + path, true); |
| 48 | |
| 49 | mutex.lock(); |
| 50 | { |
| 51 | auto existing = psPathToHandle.find(path); |
| 52 | if (existing != psPathToHandle.end()) { |
| 53 | mutex.unlock(); |
| 54 | return existing->second; |
| 55 | } |
| 56 | } |
| 57 | ShaderHandle handle(shaderReloadInfo.size()); |
| 58 | shaderReloadInfo.push_back(ShaderReloadInfo { path, ShaderType::Pixel, FILETIME { 0, 0 } }); |
| 59 | loadedShaders.push_back(CompiledShader { nullptr }); |
| 60 | psPathToHandle[path] = handle; |
| 61 | mutex.unlock(); |
| 62 | return handle; |
| 63 | } |
| 64 | |
| 65 | ShaderHandle addVertexShader(std::string path) { |
| 66 | path = getDataFilePath("shaders\\" + path, true); |
no test coverage detected