feat: Introduce TimingManager for Accurate Frame Timing
- Added TimingManager class to provide precise timing for animations and frame pacing, addressing issues with ImGui::GetIO().DeltaTime. - Updated event handling in the window management to use SDL_PollEvent for improved responsiveness. - Integrated TimingManager into EditorManager, BackgroundRenderer, and WelcomeScreen for consistent delta time usage across the application. - Enhanced animation updates to utilize accurate frame timing, improving visual performance and user experience.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#include "app/core/timing.h"
|
||||
#include "app/gui/theme_manager.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
@@ -23,7 +24,7 @@ void BackgroundRenderer::RenderDockingBackground(ImDrawList* draw_list, const Im
|
||||
const ImVec2& window_size, const Color& theme_color) {
|
||||
if (!draw_list) return;
|
||||
|
||||
UpdateAnimation(ImGui::GetIO().DeltaTime);
|
||||
UpdateAnimation(core::TimingManager::Get().GetDeltaTime());
|
||||
|
||||
// Get current theme colors
|
||||
auto& theme_manager = ThemeManager::Get();
|
||||
|
||||
Reference in New Issue
Block a user