update main
This commit is contained in:
parent
cca8ccad32
commit
16421febc4
@ -101,8 +101,6 @@ static void Run()
|
|||||||
glfwGetWindowSize(g_window, &w, &h);
|
glfwGetWindowSize(g_window, &w, &h);
|
||||||
g_view->Event_SetWindowSize(u32(w), u32(h));
|
g_view->Event_SetWindowSize(u32(w), u32(h));
|
||||||
|
|
||||||
b3StackArray<ProfilerRecord*, 256> records;
|
|
||||||
|
|
||||||
while (glfwWindowShouldClose(g_window) == 0)
|
while (glfwWindowShouldClose(g_window) == 0)
|
||||||
{
|
{
|
||||||
g_profiler->Begin();
|
g_profiler->Begin();
|
||||||
@ -120,33 +118,30 @@ static void Run()
|
|||||||
g_draw->DrawString(b3Color_white, "*PLAYING*");
|
g_draw->DrawString(b3Color_white, "*PLAYING*");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_settings->drawProfile)
|
|
||||||
{
|
|
||||||
for (u32 i = 0; i < records.Count(); ++i)
|
|
||||||
{
|
|
||||||
ProfilerRecord* r = records[i];
|
|
||||||
g_draw->DrawString(b3Color_white, "%s %.4f (min = %.4f) (max = %.4f) (calls = %d) [ms]", r->name, r->elapsed, r->minElapsed, r->maxElapsed, r->callCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_view->Interface();
|
g_view->Interface();
|
||||||
|
|
||||||
g_model->Update();
|
g_model->Update();
|
||||||
|
|
||||||
g_view->EndInterface();
|
|
||||||
|
|
||||||
g_profiler->EndScope();
|
g_profiler->EndScope();
|
||||||
|
|
||||||
g_profilerRecorder->BuildRecords();
|
g_profilerRecorder->BuildRecords();
|
||||||
|
|
||||||
if (g_settings->drawProfile)
|
if (g_settings->drawProfile)
|
||||||
{
|
{
|
||||||
records.Resize(0);
|
b3StackArray<ProfilerRecord*, 256> records;
|
||||||
g_profilerRecorder->BuildSortedRecords(records);
|
g_profilerRecorder->BuildSortedRecords(records);
|
||||||
|
|
||||||
|
for (u32 i = 0; i < records.Count(); ++i)
|
||||||
|
{
|
||||||
|
ProfilerRecord* r = records[i];
|
||||||
|
g_draw->DrawString(b3Color_white, "%s %.4f (min = %.4f) (max = %.4f) (calls = %d) [ms]", r->name, r->elapsed, r->minElapsed, r->maxElapsed, r->callCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_profiler->End();
|
g_profiler->End();
|
||||||
|
|
||||||
|
g_view->EndInterface();
|
||||||
|
|
||||||
glfwSwapBuffers(g_window);
|
glfwSwapBuffers(g_window);
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user