Minor - Adds target FPS control to engine settings - V14.5.0
Adds functionality to control the target FPS of the engine via the ImGui settings panel. This includes: - Adding target FPS variables and accessors in the application class. - Adding a set_target_fps function to the fps_limiter class. - Updating the ImGui engine settings panel to include a target FPS setting. - Modifying the main loop to make use of the fps limiter and the engine target FPS.
This commit is contained in:
@@ -483,6 +483,17 @@ public:
|
||||
*/
|
||||
float get_screen_near() const { return screen_near; }
|
||||
|
||||
/**
|
||||
* Get the target fps for the application.
|
||||
* @return The target fps as an integer.
|
||||
*/
|
||||
int get_target_fps() const { return target_fps_; };
|
||||
/**
|
||||
* Set the target fps for the application.
|
||||
* @param target_fps The new target fps as an integer.
|
||||
*/
|
||||
void set_target_fps(int target_fps) { target_fps_ = target_fps; };
|
||||
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -690,6 +701,7 @@ private :
|
||||
ID3D11ShaderResourceView* back_buffer_srv_;
|
||||
|
||||
stats* stats_;
|
||||
int target_fps_ = 60;
|
||||
|
||||
// ------------------------------------------------- //
|
||||
// ------------------- Culling --------------------- //
|
||||
|
||||
Reference in New Issue
Block a user