1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Keep stats on hw buffer uploads

This commit is contained in:
sfan5 2024-08-27 12:09:08 +02:00
parent 39970fed38
commit fa4529b4f1
8 changed files with 53 additions and 88 deletions

View file

@ -17,29 +17,15 @@ public:
CFPSCounter();
//! returns current fps
s32 getFPS() const;
//! returns primitive count
u32 getPrimitive() const;
//! returns average primitive count of last period
u32 getPrimitiveAverage() const;
//! returns accumulated primitive count since start
u32 getPrimitiveTotal() const;
s32 getFPS() const { return FPS; }
//! to be called every frame
void registerFrame(u32 now, u32 primitive);
void registerFrame(u32 now);
private:
s32 FPS;
u32 Primitive;
u32 StartTime;
u32 FramesCounted;
u32 PrimitivesCounted;
u32 PrimitiveAverage;
u32 PrimitiveTotal;
};
} // end namespace video