afegit comptador de frames per segon
This commit is contained in:
1 parent
20538af4c6
commit
c26a4774a1
5 files changed
+57
-1
No files matched your search
@@ -7,6 +7,7 @@
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "core/rendering/color_oscillator.hpp"
|
||||
|
||||
@@ -35,13 +36,24 @@ class SDLManager {
|
||||
// [NUEVO] Actualització de colors (oscil·lació)
|
||||
void updateColors(float delta_time);
|
||||
|
||||
// [NUEVO] Actualitzar comptador de FPS
|
||||
void updateFPS(float delta_time);
|
||||
|
||||
// Getters
|
||||
SDL_Renderer* obte_renderer() { return renderer_; }
|
||||
|
||||
// [NUEVO] Actualitzar títol de la finestra
|
||||
void setWindowTitle(const std::string& title);
|
||||
|
||||
private:
|
||||
SDL_Window* finestra_;
|
||||
SDL_Renderer* renderer_;
|
||||
|
||||
// [NUEVO] Variables FPS
|
||||
float fps_accumulator_;
|
||||
int fps_frame_count_;
|
||||
int fps_display_;
|
||||
|
||||
// [NUEVO] Estat de la finestra
|
||||
int current_width_; // Mida física actual
|
||||
int current_height_;
|
||||
|
||||
Reference in new issue
Block a user