examples: Added --fixed-fps and --screenshot for deterministic captures. (#3998)

This commit is contained in:
Branimir Karadžić
2026-09-25 15:29:53 -07:00
committed by GitHub
parent c00cc181cc
commit d79de7ac63
6 changed files with 103 additions and 9 deletions
+8
View File
@@ -531,6 +531,14 @@ struct OcornutImguiContext
const double freq = double(bx::getHPFrequency() );
io.DeltaTime = float(frameTime/freq);
#if USE_ENTRY
const bx::Ticks step = entry::getFixedTimeStep();
if (bx::Ticks(bx::InitZero) != step)
{
io.DeltaTime = bx::toSeconds<float>(step);
}
#endif // USE_ENTRY
io.AddMousePosEvent( (float)_mx, (float)_my);
io.AddMouseButtonEvent(ImGuiMouseButton_Left, 0 != (_button & IMGUI_MBUT_LEFT ) );
io.AddMouseButtonEvent(ImGuiMouseButton_Right, 0 != (_button & IMGUI_MBUT_RIGHT ) );