mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-11-18 13:56:00 +00:00
Display total build in GUI for demo purposes.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user