MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DrawDebugInfo

Method DrawDebugInfo

TombEngine/Renderer/RendererDrawMenu.cpp:1576–1797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1574 }
1575
1576 void Renderer::DrawDebugInfo(RenderView& view)
1577 {
1578#if TEST_BUILD
1579 if (CurrentLevel == 0)
1580 {
1581 AddString("TombEngine " + std::string(TEN_VERSION_STRING) + " test build - not for distribution",
1582 Vector2(20, 560), Vector4(1.0f, 0, 0, 0.5f), 0.7f, 0);
1583 }
1584#endif
1585
1586 const auto& playerItem = *LaraItem;
1587 const auto& player = GetLaraInfo(playerItem);
1588
1589 _currentLineHeight = DISPLAY_SPACE_RES.y / 30;
1590
1591 const auto& room = g_Level.Rooms[playerItem.RoomNumber];
1592
1593 switch (_debugPage)
1594 {
1595 case RendererDebugPage::None:
1596 break;
1597
1598 case RendererDebugPage::RendererStats:
1599 PrintDebugMessage("RENDERER STATS");
1600 PrintDebugMessage(" ");
1601 PrintDebugMessage("FPS: %3.2f", _fps);
1602 PrintDebugMessage("Resolution: %d x %d", _screenWidth, _screenHeight);
1603 PrintDebugMessage("GPU: %s", g_Configuration.AdapterName.c_str());
1604 PrintDebugMessage("Update time: %d", _timeUpdate);
1605 PrintDebugMessage("Frame time: %d", _timeFrame);
1606 PrintDebugMessage("ControlPhase() time: %d", ControlPhaseTime);
1607 PrintDebugMessage("TOTAL draw calls: %d", _numDrawCalls);
1608 PrintDebugMessage(" Rooms: %d", _numRoomsDrawCalls);
1609 PrintDebugMessage(" Movables: %d", _numMoveablesDrawCalls);
1610 PrintDebugMessage(" Statics: %d", _numStaticsDrawCalls);
1611 PrintDebugMessage(" Instanced Statics: %d", _numInstancedStaticsDrawCalls);
1612 PrintDebugMessage(" Sprites: %d", _numSpritesDrawCalls);
1613 PrintDebugMessage(" Instanced Sprites: %d", _numInstancedSpritesDrawCalls);
1614 PrintDebugMessage("TOTAL triangles: %d", _numTriangles);
1615 PrintDebugMessage("Sprites: %d", view.SpritesToDraw.size());
1616 PrintDebugMessage("SORTED draw calls: %d", (_numSortedRoomsDrawCalls + _numSortedMoveablesDrawCalls + _numSortedStaticsDrawCalls + _numSortedSpritesDrawCalls));
1617 PrintDebugMessage(" Rooms: %d", _numSortedRoomsDrawCalls);
1618 PrintDebugMessage(" Movables: %d", _numSortedMoveablesDrawCalls);
1619 PrintDebugMessage(" Statics: %d", _numSortedStaticsDrawCalls);
1620 PrintDebugMessage(" Sprites: %d", _numSortedSpritesDrawCalls);
1621 PrintDebugMessage("SHADOW MAP draw calls: %d", _numShadowMapDrawCalls);
1622 PrintDebugMessage("DEBRIS draw calls: %d", _numDebrisDrawCalls);
1623 PrintDebugMessage("Constant buffer updates: %d", _numConstantBufferUpdates);
1624 PrintDebugMessage("Material updates: %d requested, %d executed", _numRequestedMaterialsUpdates, _numExecutedMaterialsUpdates);
1625 break;
1626
1627 case RendererDebugPage::MemoryStats:
1628 {
1629 const auto& vram = Graphics::VRAMTracker::Get();
1630
1631 PrintDebugMessage("MEMORY STATS");
1632 PrintDebugMessage(" ");
1633 PrintDebugMessage("Adapter: %s", _adapterInfo.Name.c_str());

Callers

nothing calls this directly

Calls 15

PrintDebugMessageFunction · 0.85
ToMegabytesFunction · 0.85
BitFieldClass · 0.85
GetMouse2DPositionFunction · 0.85
GetPointCollisionFunction · 0.85
GetActiveCreaturesFunction · 0.85
GetTotalMethod · 0.80
GetCategoryMethod · 0.80
IsClickedMethod · 0.80
IsHeldMethod · 0.80
IsReleasedMethod · 0.80
Vector2Function · 0.50

Tested by

no test coverage detected