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:
parent
39970fed38
commit
fa4529b4f1
8 changed files with 53 additions and 88 deletions
|
@ -195,9 +195,7 @@ public:
|
|||
// get current frames per second value
|
||||
s32 getFPS() const override;
|
||||
|
||||
//! returns amount of primitives (mostly triangles) were drawn in the last frame.
|
||||
//! very useful method for statistics.
|
||||
u32 getPrimitiveCountDrawn(u32 param = 0) const override;
|
||||
SFrameStats getFrameStats() const override;
|
||||
|
||||
//! \return Returns the name of the video driver. Example: In case of the DIRECT3D8
|
||||
//! driver, it would return "Direct3D8.1".
|
||||
|
@ -538,8 +536,6 @@ public:
|
|||
virtual void convertColor(const void *sP, ECOLOR_FORMAT sF, s32 sN,
|
||||
void *dP, ECOLOR_FORMAT dF) const override;
|
||||
|
||||
bool checkDriverReset() override { return false; }
|
||||
|
||||
protected:
|
||||
//! deletes all textures
|
||||
void deleteAllTextures();
|
||||
|
@ -570,6 +566,12 @@ protected:
|
|||
// prints renderer version
|
||||
void printVersion();
|
||||
|
||||
inline void accountHWBufferUpload(u32 size)
|
||||
{
|
||||
FrameStats.HWBuffersUploaded++;
|
||||
FrameStats.HWBuffersUploadedSize += size;
|
||||
}
|
||||
|
||||
inline bool getWriteZBuffer(const SMaterial &material) const
|
||||
{
|
||||
switch (material.ZWriteEnable) {
|
||||
|
@ -696,8 +698,8 @@ protected:
|
|||
core::matrix4 TransformationMatrix;
|
||||
|
||||
CFPSCounter FPSCounter;
|
||||
SFrameStats FrameStats;
|
||||
|
||||
u32 PrimitivesDrawn;
|
||||
u32 MinVertexCountForVBO;
|
||||
|
||||
u32 TextureCreationFlags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue