MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / DBG_DrawStatAfterFrameStep

Function DBG_DrawStatAfterFrameStep

ogsr_engine/xrGame/PHDebug.cpp:549–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void DBG_DrawStatAfterFrameStep()
550{
551 if (ph_dbg_draw_mask.test(phDbgDrawObjectStatistics))
552 {
553 DBG_OutText("------------------------------");
554 static float fdbg_bodies_num = 0.f;
555 static float fdbg_joints_num = 0.f;
556 static float fdbg_islands_num = 0.f;
557 static float fdbg_contacts_num = 0.f;
558 static float fdbg_tries_num = 0.f;
559 fdbg_islands_num = 0.9f * fdbg_islands_num + 0.1f * float(dbg_islands_num);
560 fdbg_bodies_num = 0.9f * fdbg_bodies_num + 0.1f * float(dbg_bodies_num);
561 fdbg_joints_num = 0.9f * fdbg_joints_num + 0.1f * float(dbg_joints_num);
562 fdbg_contacts_num = 0.9f * fdbg_contacts_num + 0.1f * float(dbg_contacts_num);
563 fdbg_tries_num = 0.9f * fdbg_tries_num + 0.1f * float(dbg_tries_num);
564 DBG_OutText("Ph Number of active islands %3.0f", fdbg_islands_num);
565 DBG_OutText("Ph Number of active bodies %3.0f", fdbg_bodies_num);
566 DBG_OutText("Ph Number of active joints %4.0f", fdbg_joints_num);
567 DBG_OutText("Ph Number of contacts %4.0f", fdbg_contacts_num);
568 DBG_OutText("Ph Number of tries %5.0f", fdbg_tries_num);
569 DBG_OutText("------------------------------");
570 }
571 if (ph_dbg_draw_mask.test(phDbgDrawCashedTriesStat))
572 {
573 DBG_OutText("------------------------------");
574 static float fdbg_saved_tries_for_active_objects = 0;
575 static float fdbg_total_saved_tries = 0;
576
577 fdbg_saved_tries_for_active_objects = 0.9f * fdbg_saved_tries_for_active_objects + 0.1f * float(dbg_saved_tries_for_active_objects);
578 fdbg_total_saved_tries = 0.9f * fdbg_total_saved_tries + 0.1f * float(dbg_total_saved_tries);
579 DBG_OutText("Ph Number of cashed tries in active objects %5.0f", fdbg_saved_tries_for_active_objects);
580 DBG_OutText("Ph Total number cashed %5.0f", fdbg_total_saved_tries);
581
582 static SInertVal fdbg_reused_queries_per_step(0.9f);
583 static SInertVal fdbg_new_queries_per_step(0.9f);
584 fdbg_reused_queries_per_step.new_val(float(dbg_reused_queries_per_step));
585 fdbg_new_queries_per_step.new_val(float(dbg_new_queries_per_step));
586 DBG_OutText("Ph tri_queries_per_step %5.2f", fdbg_new_queries_per_step.val);
587 DBG_OutText("Ph reused_tri_queries_per_step %5.2f", fdbg_reused_queries_per_step.val);
588 DBG_OutText("------------------------------");
589 }
590 draw_frame = !draw_frame;
591}
592
593CFunctionGraph::CFunctionGraph()
594{

Callers 1

OnFrameMethod · 0.85

Calls 3

DBG_OutTextFunction · 0.85
testMethod · 0.45
new_valMethod · 0.45

Tested by

no test coverage detected