MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / addPixelShader

Function addPixelShader

src/dll/shaderRegistry.cpp:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 2

CreatePixelShader_hookFunction · 0.85
caOnDrawFunction · 0.85

Calls 1

getDataFilePathFunction · 0.85

Tested by

no test coverage detected