Browse Source

Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138)

pull/5447/head
ocornut 2 years ago
parent
commit
467a1cd4a5
  1. 1
      docs/CHANGELOG.txt
  2. 2
      imgui.h
  3. 2
      imgui_internal.h

1
docs/CHANGELOG.txt

@ -41,6 +41,7 @@ Other Changes:
- InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing
Enter keep the input active and select all text.
- Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138)
- Backends: Metal: Use __bridge for ARC based systems. (#5403) [@stack]
- Backends: OSX: Fixes to support full app creation in C++. (#5403) [@stack]

2
imgui.h

@ -1999,7 +1999,7 @@ struct ImGuiIO
bool WantSaveIniSettings; // When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
bool NavActive; // Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
bool NavVisible; // Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
float Framerate; // Rough estimate of application framerate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
float Framerate; // Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
int MetricsRenderVertices; // Vertices output during last call to Render()
int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3
int MetricsRenderWindows; // Number of visible windows

2
imgui_internal.h

@ -1828,7 +1828,7 @@ struct ImGuiContext
ImGuiStackTool DebugStackTool;
// Misc
float FramerateSecPerFrame[120]; // Calculate estimate of framerate for user over the last 2 seconds.
float FramerateSecPerFrame[60]; // Calculate estimate of framerate for user over the last 60 frames..
int FramerateSecPerFrameIdx;
int FramerateSecPerFrameCount;
float FramerateSecPerFrameAccum;

Loading…
Cancel
Save