unload debugfont and add Gfx debug menu

This commit is contained in:
2026-09-05 17:03:17 +02:00
parent 32c94e0776
commit 85f50df154
+13 -2
View File
@@ -297,18 +297,28 @@ int main(int argc, char** argv) {
"#ff00ff");
}
pList.SetFont(&font);
#ifndef __3DS__
#ifndef __3DS__
PD::TT::Beg("BuildUI7Menus");
if (auto m = ui7.BeginMenu("Test")) {
m->Label("Hello World!");
ui7.EndMenu();
}
if (auto m = ui7.BeginMenu("LI DBG INFO")) {
m->Label("Gfx Driver: {}", PD::Gfx::GetDriverName());
m->Separator();
m->Label("LI Draw Comamnds: {}", PD::Gfx::GetNumCommands());
m->Label("GFX Draw Calls: {}", PD::Gfx::GetNumDrawcalls());
m->Label("GFX Vertices: {}", PD::Gfx::GetNumVertices());
m->Label("GFX Triangles: {}", PD::Gfx::GetNumVertices()/3);
m->Label("GFX Indices: {}", PD::Gfx::GetNumIndices());
ui7.EndMenu();
}
ui7.MetricsMenu();
PD::TT::End("BuildUI7Menus");
PD::TT::Beg("UI7::Context::Update");
ui7.Update();
PD::TT::End("UI7::Context::Update");
#endif
#endif
PD::Gfx::Reset();
PD::TT::Beg("PD::Gfx::Draw");
PD::Gfx::Draw(pList);
@@ -320,6 +330,7 @@ int main(int argc, char** argv) {
PD::TT::Beg("OSCTX::MainLoop");
}
font.Delete();
debug_font.Delete();
PD::Gfx::DeleteTexture(pTex);
PD::Gfx::Deinit();
pOs->Deinit();