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

Method get_uniform_variable_effect_name

source/runtime_api.cpp:189–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 }
188}
189void reshade::runtime::get_uniform_variable_effect_name(api::effect_uniform_variable handle, char *value, size_t *size) const
190{
191 if (size == nullptr)
192 return;
193
194 if (const auto variable = reinterpret_cast<const uniform *>(handle.handle))
195 {
196 const std::string effect_name = _effects[variable->effect_index].source_file.filename().u8string();
197
198 if (value == nullptr)
199 {
200 *size = effect_name.size() + 1;
201 }
202 else if (*size != 0)
203 {
204 *size = effect_name.copy(value, *size - 1);
205 value[*size] = '\0';
206 }
207 }
208 else
209 {
210 *size = 0;
211 }
212}
213
214bool reshade::runtime::get_annotation_bool_from_uniform_variable(api::effect_uniform_variable handle, const char *name_in, bool *values, size_t count, size_t array_index) const
215{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected