Patch - Start Implementing FPS Limiter - V14.4.1
Adds an FPS limiter to control the framerate, preventing excessive resource usage and providing a more consistent experience. Removes the standalone FPS limiter from the imguiManager and integrates it into the system class.
This commit is contained in:
@@ -64,6 +64,9 @@ private:
|
|||||||
bool is_debug_key_pressed_ = false;
|
bool is_debug_key_pressed_ = false;
|
||||||
|
|
||||||
std::mutex render_mutex_;
|
std::mutex render_mutex_;
|
||||||
|
|
||||||
|
std::unique_ptr<fps_limiter> fps_limiter_ = std::make_unique<fps_limiter>(60);
|
||||||
|
int target_fps_ = 60;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
#include "application_class.h"
|
#include "application_class.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
|
||||||
static fps_limiter fpsLimiter(60.0f);
|
|
||||||
|
|
||||||
imguiManager::imguiManager()
|
imguiManager::imguiManager()
|
||||||
{
|
{
|
||||||
io = nullptr;
|
io = nullptr;
|
||||||
@@ -864,6 +862,8 @@ void imguiManager::WidgetEngineSettingsWindow()
|
|||||||
ImGui::SetTooltip("Enable or disable Vsync");
|
ImGui::SetTooltip("Enable or disable Vsync");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float screen_depth = app_->get_screen_depth();
|
float screen_depth = app_->get_screen_depth();
|
||||||
float screen_near = app_->get_screen_near();
|
float screen_near = app_->get_screen_near();
|
||||||
// Drag float input for screen depth and near with min and max values and update the app values on change
|
// Drag float input for screen depth and near with min and max values and update the app values on change
|
||||||
|
|||||||
Reference in New Issue
Block a user