Add polycount display in GEVulkanDriver

This commit is contained in:
Benau 2022-07-20 10:37:09 +08:00
parent f768badee0
commit e9924357cd
3 changed files with 24 additions and 7 deletions

View File

@ -65,6 +65,14 @@ public:
void uploadDynamicData(GEVulkanDriver* vk, GEVulkanCameraSceneNode* cam);
// ------------------------------------------------------------------------
void render(GEVulkanDriver* vk, GEVulkanCameraSceneNode* cam);
// ------------------------------------------------------------------------
unsigned getPolyCount() const
{
unsigned result = 0;
for (auto& cmd : m_cmds)
result += (cmd.indexCount / 3) * cmd.instanceCount;
return result;
}
}; // GEVulkanDrawCall
}

View File

@ -2187,6 +2187,7 @@ void GEVulkanDriver::buildCommandBuffers()
m_irrlicht_device->getSceneManager())->getDrawCalls())
{
p.second->render(this, p.first);
PrimitivesDrawn += p.second->getPolyCount();
}
GEVulkan2dRenderer::render();

View File

@ -1849,7 +1849,9 @@ void IrrDriver::displayFPS()
if (low > kilotris) low = kilotris;
if (high < kilotris) high = kilotris;
if ((UserConfigParams::m_artist_debug_mode)&&(CVS->isGLSL()))
if (UserConfigParams::m_artist_debug_mode)
{
if (CVS->isGLSL())
{
fps_string = StringUtils::insertValues
(L"FPS: %d/%d/%d - PolyCount: %d Solid, %d Shadows - LightDist: %d\n"
@ -1859,6 +1861,12 @@ void IrrDriver::displayFPS()
m_skinning_joint, ping);
}
else
{
fps_string = StringUtils::insertValues(L"FPS: %d/%d/%d - PolyCount: %d Solid, Ping: %dms", min, fps,
max, m_video_driver->getPrimitiveCountDrawn(0), ping);
}
}
else
{
if (CVS->isGLSL())
{