MCPcopy Create free account
hub / github.com/crosire/reshade / enumerate_uniform_variables

Method enumerate_uniform_variables

source/runtime_api.cpp:67–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void reshade::runtime::enumerate_uniform_variables(const char *effect_name_in, void(*callback)(effect_runtime *runtime, api::effect_uniform_variable variable, void *user_data), void *user_data)
68{
69 if (is_loading())
70 return;
71
72 const std::filesystem::path effect_name = effect_name_in != nullptr ? std::filesystem::u8path(effect_name_in) : std::filesystem::path();
73
74 for (const effect &effect : _effects)
75 {
76 if (effect_name_in != nullptr && effect.source_file.filename() != effect_name)
77 continue;
78
79 for (const uniform &variable : effect.uniforms)
80 callback(this, { reinterpret_cast<uintptr_t>(&variable) }, user_data);
81
82 if (effect_name_in != nullptr)
83 break;
84 }
85}
86
87reshade::api::effect_uniform_variable reshade::runtime::find_uniform_variable(const char *effect_name_in, const char *variable_name_in) const
88{

Callers 2

update_effect_runtimeFunction · 0.45
update_uniform_variablesFunction · 0.45

Calls 1

is_loadingFunction · 0.85

Tested by

no test coverage detected