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

Method get_annotation_int_from_uniform_variable

source/runtime_api.cpp:256–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254 return false;
255}
256bool reshade::runtime::get_annotation_int_from_uniform_variable(api::effect_uniform_variable handle, const char *name_in, int32_t *values, size_t count, size_t array_index) const
257{
258 if (handle != 0 && name_in != nullptr)
259 {
260 const uniform &variable = *reinterpret_cast<const uniform *>(handle.handle);
261 const std::string_view name(name_in);
262
263 if (const auto it = std::find_if(variable.annotations.cbegin(), variable.annotations.cend(),
264 [&](const reshadefx::annotation &annotation) { return annotation.name == name; });
265 it != variable.annotations.cend())
266 {
267 for (size_t i = 0; i < count; ++i)
268 values[i] = variable.annotation_as_int(name, array_index + i);
269 return true;
270 }
271 }
272
273 for (size_t i = 0; i < count; ++i)
274 values[i] = 0;
275 return false;
276}
277bool reshade::runtime::get_annotation_uint_from_uniform_variable(api::effect_uniform_variable handle, const char *name_in, uint32_t *values, size_t count, size_t array_index) const
278{
279 if (handle != 0 && name_in != nullptr)

Callers 1

update_uniform_variablesFunction · 0.80

Calls 1

annotation_as_intMethod · 0.45

Tested by

no test coverage detected