MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / Update

Method Update

Sources/OvGame/src/OvGame/Debug/FrameInfo.cpp:26–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void OvGame::Debug::FrameInfo::Update(const OvRendering::Data::FrameInfo& p_frameInfo)
27{
28 // Workaround for Tracy memory profiler.
29 // When using a non-default locale, std::format
30 // will call delete on a non-allocated object,
31 // resulting in a instrumentation error, interrupting
32 // Tracy profiler's execution.
33#if defined(TRACY_MEMORY_ENABLE)
34 const std::locale loc{ };
35#else
36 const std::locale loc{ "" };
37#endif
38
39 m_batchText.content = std::format(loc, "Batches: {:L}", p_frameInfo.batchCount);
40 m_instanceText.content = std::format(loc, "Instances: {:L}", p_frameInfo.instanceCount);
41 m_polyText.content = std::format(loc, "Polygons: {:L}", p_frameInfo.polyCount);
42 m_vertexText.content = std::format(loc, "Vertices: {:L}", p_frameInfo.vertexCount);
43
44 SetPosition({ 10.0f , static_cast<float>(m_window.GetSize().second) - 10.f });
45 SetAlignment(OvUI::Settings::EHorizontalAlignment::LEFT, OvUI::Settings::EVerticalAlignment::BOTTOM);
46}
47
48#endif

Callers

nothing calls this directly

Calls 1

GetSizeMethod · 0.45

Tested by

no test coverage detected