MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / on_update

Method on_update

app/plugins/batch_mode/batch_mode.cpp:171–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void BatchMode::on_update(float delta_time)
172{
173 elapsed_time += delta_time;
174
175 // When the runtime for the current configuration is reached, advance to the next config or next sample
176 if (elapsed_time >= duration.count())
177 {
178 elapsed_time = 0.0f;
179
180 // Only check and advance the config if the application is a vulkan sample
181 if (auto *vulkan_app = dynamic_cast<vkb::VulkanSampleC *>(&platform->get_app()))
182 {
183 auto &configuration = vulkan_app->get_configuration();
184
185 if (configuration.next())
186 {
187 configuration.set();
188 return;
189 }
190 }
191
192 // Cycled through all configs, load next app
193 load_next_app();
194 }
195}
196
197void BatchMode::on_app_error(const std::string &app_id)
198{

Callers

nothing calls this directly

Calls 2

nextMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected