A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(native): the boot record says what the frame drew
esengine66313a9f2421
diff --git a/native/host/Host.cpp b/native/host/Host.cppindex 08082eb48..c86565e22 100644--- a/native/host/Host.cpp+++ b/native/host/Host.cpp@@ -345,7 +345,19 @@ void frame() {#endifh.gfx->present();if (shotAfterPresent(*h.gfx)) h.quitRequested = true;- if (++h.frame % 120 == 0) ESHOST_LOGI("real-SDK frame %llu", (unsigned long long)h.frame);+ // What the frame DREW, not only that one happened: a capture is one flat colour+ // whether nothing was submitted or it was submitted into a view nothing is in.+ // Frame 1 too — a run judged after half a second never reaches the 120th.+ if (++h.frame == 1 || h.frame % 120 == 0) {+ if (auto* rf = h.ctx->tryGet<RenderFrame>()) {+ const auto& st = rf->stats();+ ESHOST_LOGI("real-SDK frame %llu — %u draw(s), %u tri, %u sprite, %u mesh, %u text, %u culled",+ (unsigned long long)h.frame, st.draw_calls, st.triangles, st.sprites,+ st.meshes, st.text, st.culled);+ } else {+ ESHOST_LOGI("real-SDK frame %llu", (unsigned long long)h.frame);+ }+ }}bool quitRequested() { return hostAlive() && host().quitRequested; }