修改OpenGl渲染底层之前
This commit is contained in:
@@ -57,7 +57,10 @@ public:
|
||||
|
||||
SDL_Renderer *GetRenderer();
|
||||
|
||||
uint32_t RenderCount = 0;
|
||||
// 每秒帧率
|
||||
u32 m_fps;
|
||||
// 每帧绘制调用次数
|
||||
u32 m_RenderCount = 0;
|
||||
|
||||
private:
|
||||
// 构造函数和析构函数设为私有,防止外部创建和销毁
|
||||
@@ -78,18 +81,19 @@ private:
|
||||
|
||||
// 帧数
|
||||
#ifdef __SWITCH__
|
||||
int m_fps = 60;
|
||||
float m_Settingfps = 60.0;
|
||||
#else
|
||||
int m_fps = 2000;
|
||||
float m_Settingfps = 144.0;
|
||||
#endif
|
||||
u32 m_frameTime;
|
||||
float m_deltaTime;
|
||||
// 新增:帧率统计变量
|
||||
u32 m_frameCount; // 每秒内的帧数计数器
|
||||
u32 m_lastFpsPrintTime; // 上一次输出帧率的时间(毫秒,基于 SDL_GetTicks())
|
||||
// 单帧时间
|
||||
float m_frameTime = 0.f;
|
||||
// 每秒内的帧数计数器
|
||||
u32 m_frameCounter;
|
||||
// 上一次输出帧率的时间
|
||||
u32 m_lastFpsPrintTime;
|
||||
|
||||
// 调试信息Actor
|
||||
RefPtr<Debug_Actor> m_DebugInfoActor;
|
||||
// 帧间隔
|
||||
float m_deltaTime = 0.f;
|
||||
|
||||
public:
|
||||
// 屏幕宽高
|
||||
|
||||
Reference in New Issue
Block a user