mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Count global number of drawcalls too
This commit is contained in:
@@ -54,6 +54,8 @@ const c8 *const FogTypeNames[] = {
|
||||
};
|
||||
|
||||
struct SFrameStats {
|
||||
//! Number of draw calls
|
||||
u32 Drawcalls = 0;
|
||||
//! Count of primitives drawn
|
||||
u32 PrimitivesDrawn = 0;
|
||||
//! Number of hardware buffers uploaded (new or updated)
|
||||
|
@@ -605,6 +605,7 @@ void CNullDriver::drawVertexPrimitiveList(const void *vertices, u32 vertexCount,
|
||||
{
|
||||
if ((iType == EIT_16BIT) && (vertexCount > 65536))
|
||||
os::Printer::log("Too many vertices for 16bit index type, render artifacts may occur.");
|
||||
FrameStats.Drawcalls++;
|
||||
FrameStats.PrimitivesDrawn += primitiveCount;
|
||||
}
|
||||
|
||||
@@ -613,6 +614,7 @@ void CNullDriver::draw2DVertexPrimitiveList(const void *vertices, u32 vertexCoun
|
||||
{
|
||||
if ((iType == EIT_16BIT) && (vertexCount > 65536))
|
||||
os::Printer::log("Too many vertices for 16bit index type, render artifacts may occur.");
|
||||
FrameStats.Drawcalls++;
|
||||
FrameStats.PrimitivesDrawn += primitiveCount;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user