show log in game
This commit is contained in:
@@ -474,6 +474,22 @@ namespace Game
|
||||
debug.DebugCardRotation++;
|
||||
if (debug.DebugCardRotation >= 4) debug.DebugCardRotation = 0;
|
||||
}
|
||||
if (ImGui::Begin("Log"))
|
||||
{
|
||||
for (int32_t i = 0; i < bx::min(100, LogInternal::LogHistorySize); ++i)
|
||||
{
|
||||
int32_t idx = GetLogHistory().WriteIdx - i - 1;
|
||||
if (idx < 0) idx += LogInternal::LogHistorySize;
|
||||
const char* line = &GetLogHistory().LogBuffer[idx * LogInternal::MaxLineSize];
|
||||
if (line[0] != 0)
|
||||
{
|
||||
int64_t timeOffset = GetLogHistory().WriteTime[idx] - GetInstance().Time.StartTime;
|
||||
double writeTime = (double)timeOffset / bx::getHPFrequency();
|
||||
ImGui::Text("%.04f: %s", writeTime, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
if (ImGui::Begin("Rendering"))
|
||||
{
|
||||
if (LastShaderLoadTime >= 0.0f)
|
||||
|
||||
Reference in New Issue
Block a user