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

Method handle_option

app/plugins/benchmark_mode/benchmark_mode.cpp:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool BenchmarkMode::handle_option(std::deque<std::string> &arguments)
35{
36 assert(!arguments.empty() && (arguments[0].substr(0, 2) == "--"));
37 std::string option = arguments[0].substr(2);
38 if (option == "benchmark")
39 {
40 // Whilst in benchmark mode fix the fps so that separate runs are consistently simulated
41 // This will effect the graph outputs of framerate
42 platform->force_simulation_fps(60.0f);
43 platform->force_render(true);
44
45 arguments.pop_front();
46 return true;
47 }
48 return false;
49}
50
51void BenchmarkMode::on_update(float delta_time)
52{

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
force_simulation_fpsMethod · 0.80
force_renderMethod · 0.80

Tested by

no test coverage detected