More timings

This commit is contained in:
2026-09-05 15:10:48 +02:00
parent 0a5a86459b
commit 26a8c230c6
+13 -5
View File
@@ -211,16 +211,14 @@ int main(int argc, char** argv) {
ui7.AddViewPort("Default", PD::ivec4(0, 0, 1280, 720)); ui7.AddViewPort("Default", PD::ivec4(0, 0, 1280, 720));
ui7.UseViewPort("Default"); ui7.UseViewPort("Default");
while (pOs->Mainloop()) { while (pOs->Mainloop()) {
PD::TT::End("OSCTX::MainLoop");
pOs->ClearViewPort();
PD::TT::Scope __st("MainLoop"); PD::TT::Scope __st("MainLoop");
PD::TT::Beg("MainRaw");
PD::Hid::Update(); PD::Hid::Update();
PD::Gfx::NewFrame(); PD::Gfx::NewFrame();
pOs->ClearViewPort();
// app.Update(pOs->GetViewport(), pList); // app.Update(pOs->GetViewport(), pList);
pList.SetFontscale(0.7); pList.SetFontscale(0.7);
if (auto m = ui7.BeginMenu("Test")) {
m->Label("Hello World!");
ui7.EndMenu();
}
if (PD::Hid::IsEvent(PD::Hid::Event::Down, PD::Hid::Gamepad::CPLeft | if (PD::Hid::IsEvent(PD::Hid::Event::Down, PD::Hid::Gamepad::CPLeft |
PD::Hid::Gamepad::CPRight)) { PD::Hid::Gamepad::CPRight)) {
LeftStick.pPos.x += PD::Hid::GetLeftStick().x * 15; LeftStick.pPos.x += PD::Hid::GetLeftStick().x * 15;
@@ -299,17 +297,27 @@ int main(int argc, char** argv) {
"#ff00ff"); "#ff00ff");
} }
pList.SetFont(&font); pList.SetFont(&font);
#ifndef __3DS__
PD::TT::Beg("BuildUI7Menus");
if (auto m = ui7.BeginMenu("Test")) {
m->Label("Hello World!");
ui7.EndMenu();
}
ui7.MetricsMenu(); ui7.MetricsMenu();
PD::TT::End("BuildUI7Menus");
PD::TT::Beg("UI7::Context::Update"); PD::TT::Beg("UI7::Context::Update");
ui7.Update(); ui7.Update();
PD::TT::End("UI7::Context::Update"); PD::TT::End("UI7::Context::Update");
#endif
PD::Gfx::Reset(); PD::Gfx::Reset();
PD::TT::Beg("PD::Gfx::Draw"); PD::TT::Beg("PD::Gfx::Draw");
PD::Gfx::Draw(pList); PD::Gfx::Draw(pList);
PD::Gfx::Draw(ui7.GetDrawData()); PD::Gfx::Draw(ui7.GetDrawData());
PD::TT::End("PD::Gfx::Draw"); PD::TT::End("PD::Gfx::Draw");
pList.Clear(); pList.Clear();
PD::TT::End("MainRaw");
pOs->SwapBuffers(); pOs->SwapBuffers();
PD::TT::Beg("OSCTX::MainLoop");
} }
font.Delete(); font.Delete();
PD::Gfx::DeleteTexture(pTex); PD::Gfx::DeleteTexture(pTex);