| 233 | return false; |
| 234 | } |
| 235 | bool reshade::runtime::get_annotation_float_from_uniform_variable(api::effect_uniform_variable handle, const char *name_in, float *values, size_t count, size_t array_index) const |
| 236 | { |
| 237 | if (handle != 0 && name_in != nullptr) |
| 238 | { |
| 239 | const uniform &variable = *reinterpret_cast<const uniform *>(handle.handle); |
| 240 | const std::string_view name(name_in); |
| 241 | |
| 242 | if (const auto it = std::find_if(variable.annotations.cbegin(), variable.annotations.cend(), |
| 243 | [&](const reshadefx::annotation &annotation) { return annotation.name == name; }); |
| 244 | it != variable.annotations.cend()) |
| 245 | { |
| 246 | for (size_t i = 0; i < count; ++i) |
| 247 | values[i] = variable.annotation_as_float(name, i + array_index); |
| 248 | return true; |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | for (size_t i = 0; i < count; ++i) |
| 253 | values[i] = 0.0f; |
| 254 | return false; |
| 255 | } |
| 256 | bool 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) |
no test coverage detected