| 65 | } |
| 66 | |
| 67 | void 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 | |
| 87 | reshade::api::effect_uniform_variable reshade::runtime::find_uniform_variable(const char *effect_name_in, const char *variable_name_in) const |
| 88 | { |
no test coverage detected