| 63 | } |
| 64 | |
| 65 | ShaderHandle addVertexShader(std::string path) { |
| 66 | path = getDataFilePath("shaders\\" + path, true); |
| 67 | |
| 68 | mutex.lock(); |
| 69 | { |
| 70 | auto existing = vsPathToHandle.find(path); |
| 71 | if (existing != vsPathToHandle.end()) { |
| 72 | mutex.unlock(); |
| 73 | return existing->second; |
| 74 | } |
| 75 | } |
| 76 | ShaderHandle handle(shaderReloadInfo.size()); |
| 77 | shaderReloadInfo.push_back(ShaderReloadInfo { path, ShaderType::Vertex, FILETIME { 0, 0 } }); |
| 78 | loadedShaders.push_back(CompiledShader { nullptr }); |
| 79 | vsPathToHandle[path] = handle; |
| 80 | mutex.unlock(); |
| 81 | return handle; |
| 82 | } |
| 83 | |
| 84 | ShaderHandle addComputeShader(std::string path) { |
| 85 | path = getDataFilePath("shaders\\" + path, true); |
no test coverage detected