Display total build in GUI for demo purposes.

This commit is contained in:
Mikko Mononen
2010-04-14 18:22:35 +00:00
parent 7f11a61066
commit b21e854c9a
11 changed files with 984 additions and 693 deletions
@@ -44,6 +44,7 @@
Sample_SoloMeshSimple::Sample_SoloMeshSimple() :
m_keepInterResults(true),
m_totalBuildTimeMs(0),
m_triflags(0),
m_solid(0),
m_chf(0),
@@ -86,6 +87,12 @@ void Sample_SoloMeshSimple::handleSettings()
m_keepInterResults = !m_keepInterResults;
imguiSeparator();
char msg[64];
snprintf(msg, 64, "Build Time: %.1fms", m_totalBuildTimeMs);
imguiLabel(msg);
imguiSeparator();
}
void Sample_SoloMeshSimple::handleTools()
@@ -684,6 +691,8 @@ bool Sample_SoloMeshSimple::handleBuild()
rcGetLog()->log(RC_LOG_PROGRESS, "TOTAL: %.1fms", rcGetDeltaTimeUsec(totStartTime, totEndTime)/1000.0f);
}
m_totalBuildTimeMs = rcGetDeltaTimeUsec(totStartTime, totEndTime)/1000.0f;
if (m_tool)
m_tool->init(this);