| 169 | } |
| 170 | |
| 171 | void 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 | |
| 197 | void BatchMode::on_app_error(const std::string &app_id) |
| 198 | { |