Skip to content

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.

feat(render): a frame capture lists every texture a draw bound

esengine562612be51b8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c031df03..e118c6bc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,7 +16,7 @@ published separately; it ships inside the editor.
### Added
-- **A frame can be captured draw call by draw call, and replayed up to any one of them.** The Frame Debugger panel (Window menu, or from the Profiler) captures the viewport or the running game and lists every draw by pass, with a chip per reason that filters to it; a scrubber steps through the draws, and the selected one shows its batch cause in words, what it drew, the entities it was made from — click one to select it — and the pass as it stood after it. `capture_frame` (MCP and the built-in agent) takes the next whole frame of the viewport or the running game — every camera's pass and the screen overlay — and names, for each draw, why it could not join the one before it (material, shader, a different mesh, the instancing cap, …), what it drew and the entities it was made from. `frame_draws` pages a large frame; `replay_draw` shows the pass as it stood after that draw, and refuses when the scene has changed since the capture rather than showing a later frame under the capture's numbering. The SDK's `captureFrame` / `replayDraw` are the same capture. The engine's capture used to keep no entities, report every material as none, see only the first camera, and could be taken by an asset preview instead of the frame.
+- **A frame can be captured draw call by draw call, and replayed up to any one of them.** The Frame Debugger panel (Window menu, or from the Profiler) captures the viewport or the running game and lists every draw by pass, with a chip per reason that filters to it; a scrubber steps through the draws, and the selected one shows its batch cause in words, what it drew — its material and every texture it bound, by the asset behind them — the entities it was made from — click one to select it — and the pass as it stood after it. `capture_frame` (MCP and the built-in agent) takes the next whole frame of the viewport or the running game — every camera's pass and the screen overlay — and names, for each draw, why it could not join the one before it (material, shader, a different mesh, the instancing cap, …), what it drew and the entities it was made from. `frame_draws` pages a large frame; `replay_draw` shows the pass as it stood after that draw, and refuses when the scene has changed since the capture rather than showing a later frame under the capture's numbering. The SDK's `captureFrame` / `replayDraw` are the same capture. The engine's capture used to keep no entities, report every material as none, see only the first camera, and could be taken by an asset preview instead of the frame.
- **A project can be packaged as a Huawei quick game (华为快游戏).** The same signed `.rpk` as the quick-game alliance — Huawei's signtool writes the same block, and ours matches it byte for byte — with Huawei's manifest (`appType: "fastgame"`, orientation under `display`) and its own package name, version code and release key in Project Settings. It packages the engine build without SIMD and is judged against 4 MB and the 20 MB AppGallery Connect takes. Subpackages are refused rather than packaged wrongly (Huawei packs each as its own `.rpk`); sign-in, purchase and share go through HMS Core with shapes of their own and are not offered. Huawei's loader asks Huawei's servers about a package before it runs one, so nothing has run without an app registered in AppGallery Connect.
- **A project can be packaged for Alipay (支付宝小游戏).** `game.json` turns on iOS high-performance mode — the only iOS mode with `MYWebAssembly`, which the runtime instantiates through with an absolute package path — and `project.config.json` turns off the review build's own transpile and minify, since the bundle is already down-levelled; the appid is passed to Alipay's tool (`minidev -a`), not packaged. The profile hands the family `my` in WeChat's words — a rewarded unit through `my.createRewardedAd`, sign-in through `my.getAuthCode`, share through the card `my.showSharePanel` reads off `my.onShareAppMessage`. It packages the engine build without SIMD, judged against 4 MB and 20 MB. Nothing has run on a device; purchase is not offered (Android and Harmony only, keyed by a `customId`), and Taobao — which only supports Cocos and Laya — is not a target.
- **A project can be packaged as a quick game — one signed `.rpk` for vivo, OPPO, Xiaomi and Honor (快游戏联盟).** Set the package name (it must end in `.minigame`) in Project Settings → Packaging → Quick game, and the export writes `manifest.json` (allianceVersion 1300), the project's icon (or Estella's mark), and `<package>.rpk` signed with your release key — or with Estella's public debug key, which a device debugger installs and a store refuses. It needs no vendor tool: the signing block is written here and matches the vendor CLI's byte for byte. The package runs on its own engine build (`build -t quickgame`) without wasm SIMD and BigInt i64, which the hosts' V8 8.3 refuses, and the runtime reads the hosts' window in physical pixels and turns WebAssembly on first. Verified end to end on vivo's engine in an Android emulator; OPPO grants WebGL2 only to a game that applied for it, and no device has run it yet.
diff --git a/desktop b/desktop
index e345319ce..c1a71f039 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit e345319ce5830ebb922e1d80a57a49fed65cf26a
+Subproject commit c1a71f03913140e906f6ff1c852e97c203c69e46
diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.md
index f9231e7e6..4522386b9 100644
--- a/sdk/etc/index.api.md
+++ b/sdk/etc/index.api.md
@@ -1005,6 +1005,7 @@ meshRealizations: () => { handle: number; realized: boolean; }[]
meshesAwaitingRematerialization: () => number[]
onInvalidate: (listener: InvalidateListener) => () => void
pathForHandle: (kind: string, handle: number) => string | null
+pathForRenderedTexture: (renderId: number) => string | null
preload: (refs: ReadonlyArray<string>, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; }) => Promise<{ failed: MissingAsset[]; }>
preloadSceneAssets: (sceneData: SceneData, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; readonly skipSpine?: boolean; }) => Promise<SceneAssetResult>
recoverFromDeviceLoss: () => Promise<boolean>
@@ -3065,6 +3066,7 @@ stencilTest: boolean
stencilWrite: boolean
textureId: number
textureSlotUsage: number
+textures: number[]
triangleCount: number
type: RenderType
```
diff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.md
index 0f8d9f7dd..099a681f9 100644
--- a/sdk/etc/index.native.api.md
+++ b/sdk/etc/index.native.api.md
@@ -1005,6 +1005,7 @@ meshRealizations: () => { handle: number; realized: boolean; }[]
meshesAwaitingRematerialization: () => number[]
onInvalidate: (listener: InvalidateListener) => () => void
pathForHandle: (kind: string, handle: number) => string | null
+pathForRenderedTexture: (renderId: number) => string | null
preload: (refs: ReadonlyArray<string>, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; }) => Promise<{ failed: MissingAsset[]; }>
preloadSceneAssets: (sceneData: SceneData, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; readonly skipSpine?: boolean; }) => Promise<SceneAssetResult>
recoverFromDeviceLoss: () => Promise<boolean>
@@ -3073,6 +3074,7 @@ stencilTest: boolean
stencilWrite: boolean
textureId: number
textureSlotUsage: number
+textures: number[]
triangleCount: number
type: RenderType
```
diff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.md
index 5847098c7..dc6f3660c 100644
--- a/sdk/etc/index.node.api.md
+++ b/sdk/etc/index.node.api.md
@@ -1000,6 +1000,7 @@ meshRealizations: () => { handle: number; realized: boolean; }[]
meshesAwaitingRematerialization: () => number[]
onInvalidate: (listener: InvalidateListener) => () => void
pathForHandle: (kind: string, handle: number) => string | null
+pathForRenderedTexture: (renderId: number) => string | null
preload: (refs: ReadonlyArray<string>, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; }) => Promise<{ failed: MissingAsset[]; }>
preloadSceneAssets: (sceneData: SceneData, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; readonly skipSpine?: boolean; }) => Promise<SceneAssetResult>
recoverFromDeviceLoss: () => Promise<boolean>
@@ -3060,6 +3061,7 @@ stencilTest: boolean
stencilWrite: boolean
textureId: number
textureSlotUsage: number
+textures: number[]
triangleCount: number
type: RenderType
```
diff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.md
index 8ce3e9e91..4bf28ff91 100644
--- a/sdk/etc/minigame.api.md
+++ b/sdk/etc/minigame.api.md
@@ -1000,6 +1000,7 @@ meshRealizations: () => { handle: number; realized: boolean; }[]
meshesAwaitingRematerialization: () => number[]
onInvalidate: (listener: InvalidateListener) => () => void
pathForHandle: (kind: string, handle: number) => string | null
+pathForRenderedTexture: (renderId: number) => string | null
preload: (refs: ReadonlyArray<string>, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; }) => Promise<{ failed: MissingAsset[]; }>
preloadSceneAssets: (sceneData: SceneData, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; readonly skipSpine?: boolean; }) => Promise<SceneAssetResult>
recoverFromDeviceLoss: () => Promise<boolean>
@@ -3060,6 +3061,7 @@ stencilTest: boolean
stencilWrite: boolean
textureId: number
textureSlotUsage: number
+textures: number[]
triangleCount: number
type: RenderType
```
diff --git a/sdk/etc/wasm.api.md b/sdk/etc/wasm.api.md
index bf98231e3..2a62300e5 100644
--- a/sdk/etc/wasm.api.md
+++ b/sdk/etc/wasm.api.md
@@ -412,6 +412,8 @@ renderer_getCapturedEntityCount: () => number
renderer_getCapturedFrameData: () => number
renderer_getCapturedFrameSize: () => number
renderer_getCapturedPassCount: () => number
+renderer_getCapturedTextureCount: () => number
+renderer_getCapturedTextures: () => number
renderer_getCulled: () => number
renderer_getDrawCalls: () => number
renderer_getGpuTimeMs: (() => number) | undefined
diff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.md
index ad8f07121..44252276e 100644
--- a/sdk/etc/wechat.api.md
+++ b/sdk/etc/wechat.api.md
@@ -1000,6 +1000,7 @@ meshRealizations: () => { handle: number; realized: boolean; }[]
meshesAwaitingRematerialization: () => number[]
onInvalidate: (listener: InvalidateListener) => () => void
pathForHandle: (kind: string, handle: number) => string | null
+pathForRenderedTexture: (renderId: number) => string | null
preload: (refs: ReadonlyArray<string>, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; }) => Promise<{ failed: MissingAsset[]; }>
preloadSceneAssets: (sceneData: SceneData, onProgress?: (loaded: number, total: number) => void, options?: { readonly maxConcurrent?: number; readonly skipSpine?: boolean; }) => Promise<SceneAssetResult>
recoverFromDeviceLoss: () => Promise<boolean>
@@ -3060,6 +3061,7 @@ stencilTest: boolean
stencilWrite: boolean
textureId: number
textureSlotUsage: number
+textures: number[]
triangleCount: number
type: RenderType
```
diff --git a/sdk/src/asset/Assets.ts b/sdk/src/asset/Assets.ts
index 3c78d1749..502126c16 100644
--- a/sdk/src/asset/Assets.ts
+++ b/sdk/src/asset/Assets.ts
@@ -676,6 +676,22 @@ export class Assets {
return this.handleToPath_.get(`${kind}:${handle}`) ?? null;
}
+ /**
+ * The load path of a texture by the id the renderer bound it with — a frame
+ * capture's `textureId` — rather than by asset handle. Null for a texture no
+ * asset of this realm loaded: the white fill, a render target, a glyph atlas.
+ */
+ pathForRenderedTexture(renderId: number): string | null {
+ const rm = getResourceManager();
+ if (!rm || renderId === 0) return null;
+ for (const [key, path] of this.handleToPath_) {
+ if (key.startsWith('texture:') && rm.getTextureGLId(Number(key.slice('texture:'.length))) === renderId) {
+ return path;
+ }
+ }
+ return null;
+ }
+
/** Record a handle→path pair for {@link pathForHandle} (dropped on invalidate/releaseAll). */
private recordHandlePath_(kind: string, handle: number, path: string): void {
if (handle !== 0) this.handleToPath_.set(`${kind}:${handle}`, path);
diff --git a/sdk/src/ecs/bridge/nativeEngineApi.generated.ts b/sdk/src/ecs/bridge/nativeEngineApi.generated.ts
index 4031cd200..547393f8e 100644
--- a/sdk/src/ecs/bridge/nativeEngineApi.generated.ts
+++ b/sdk/src/ecs/bridge/nativeEngineApi.generated.ts
@@ -137,6 +137,7 @@ export interface NativeEngineApi {
renderer_getCapturedEntityCount?(): number;
renderer_getCapturedFrameSize?(): number;
renderer_getCapturedPassCount?(): number;
+ renderer_getCapturedTextureCount?(): number;
renderer_getCulled?(): number;
renderer_getDrawCalls?(): number;
renderer_getGpuTimeMs?(): number;
@@ -407,6 +408,7 @@ export function createNativeEngineApi(
bind('renderer_getCapturedEntityCount', 'es_renderer_getCapturedEntityCount', false);
bind('renderer_getCapturedFrameSize', 'es_renderer_getCapturedFrameSize', false);
bind('renderer_getCapturedPassCount', 'es_renderer_getCapturedPassCount', false);
+ bind('renderer_getCapturedTextureCount', 'es_renderer_getCapturedTextureCount', false);
bind('renderer_getCulled', 'es_renderer_getCulled', false);
bind('renderer_getDrawCalls', 'es_renderer_getDrawCalls', false);
bind('renderer_getGpuTimeMs', 'es_renderer_getGpuTimeMs', false);
diff --git a/sdk/src/render/frameCapture.ts b/sdk/src/render/frameCapture.ts
index a0cd68af7..6958b9e57 100644
--- a/sdk/src/render/frameCapture.ts
+++ b/sdk/src/render/frameCapture.ts
@@ -90,6 +90,8 @@ export interface DrawCallInfo {
stencilTest: boolean;
stencilRef: number;
textureSlotUsage: number;
+ /** Every texture the draw bound, slot 0 first; `textureId` is the first. */
+ textures: number[];
/** The entities the draw was made from, in draw order; an item with no entity
* (a glyph run, a gizmo) is not listed. */
entities: number[];
@@ -101,7 +103,7 @@ export interface FrameCaptureData {
}
/** sizeof(DrawCallRecord) in FrameCapture.hpp, which asserts the offsets read here. */
-const RECORD_SIZE_BYTES = 80;
+const RECORD_SIZE_BYTES = 84;
export function decodeFrameCapture(module: ESEngineModule): FrameCaptureData | null {
if (!module.renderer_hasCapturedData()) return null;
@@ -117,6 +119,8 @@ export function decodeFrameCapture(module: ESEngineModule): FrameCaptureData | n
const heap = module.HEAPU8;
const view = new DataView(heap.buffer, dataPtr, count * RECORD_SIZE_BYTES);
const entityHeap = new Uint32Array(heap.buffer, entitiesPtr, entityCount);
+ const textureCount = module.renderer_getCapturedTextureCount();
+ const textureHeap = new Uint32Array(heap.buffer, module.renderer_getCapturedTextures(), textureCount);
const drawCalls: DrawCallInfo[] = [];
for (let i = 0; i < count; i++) {
@@ -127,6 +131,10 @@ export function decodeFrameCapture(module: ESEngineModule): FrameCaptureData | n
for (let e = 0; e < listed && entityOffset + e < entityCount; e++) {
entities.push(entityHeap[entityOffset + e]);
}
+ const slots = view.getUint8(off + 72);
+ const textureOffset = view.getUint32(off + 80, true);
+ const textures: number[] = [];
+ for (let t = 0; t < slots && textureOffset + t < textureCount; t++) textures.push(textureHeap[textureOffset + t]);
drawCalls.push({
index: view.getUint32(off, true),
pass: view.getUint32(off + 4, true),
@@ -149,7 +157,8 @@ export function decodeFrameCapture(module: ESEngineModule): FrameCaptureData | n
stencilWrite: view.getUint8(off + 65) !== 0,
stencilTest: view.getUint8(off + 66) !== 0,
stencilRef: view.getInt32(off + 68, true),
- textureSlotUsage: view.getUint8(off + 72),
+ textureSlotUsage: slots,
+ textures,
instanceCount: view.getUint32(off + 76, true),
entities,
});
diff --git a/sdk/src/wasm.ts b/sdk/src/wasm.ts
index 44869898f..34431494b 100644
--- a/sdk/src/wasm.ts
+++ b/sdk/src/wasm.ts
@@ -668,6 +668,8 @@ export interface ESEngineModule {
renderer_getCapturedFrameData(): number;
renderer_getCapturedEntities(): number;
renderer_getCapturedEntityCount(): number;
+ renderer_getCapturedTextures(): number;
+ renderer_getCapturedTextureCount(): number;
renderer_getCapturedPassCount(): number;
renderer_hasCapturedData(): boolean;
diff --git a/sdk/tests/frame-capture.test.ts b/sdk/tests/frame-capture.test.ts
index e545c2df0..c2d61f88e 100644
--- a/sdk/tests/frame-capture.test.ts
+++ b/sdk/tests/frame-capture.test.ts
@@ -36,7 +36,7 @@ function buildModule(opts: {
pollStatus?: number;
}): { module: ESEngineModule; heap: Uint8Array; dataPtr: number; entitiesPtr: number; snapshotPtr: number } {
const { width, height, drawCallCount = 0, entities = [], pollStatus = 1 } = opts;
- const RECORD_SIZE = 80;
+ const RECORD_SIZE = 84;
const snapshotSize = width * height * 4;
const entitiesSize = entities.length * 4;
const drawCallsSize = drawCallCount * RECORD_SIZE;
@@ -71,6 +71,8 @@ function buildModule(opts: {
renderer_getCapturedEntities: () => entitiesPtr,
renderer_getCapturedEntityCount: () => entities.length,
renderer_getCapturedPassCount: () => 1,
+ renderer_getCapturedTextures: () => 0,
+ renderer_getCapturedTextureCount: () => 0,
renderer_pollSnapshotReadback: () => pollStatus,
renderer_getSnapshotSize: () => snapshotSize,
renderer_getSnapshotWidth: () => width,
@@ -165,7 +167,7 @@ describe('decodeFrameCapture', () => {
it('reads the pass, the counts and the instance count where the engine writes them', () => {
const { module, heap, dataPtr } = buildModule({ width: 1, height: 1, drawCallCount: 1 });
- const view = new DataView(heap.buffer, dataPtr, 80);
+ const view = new DataView(heap.buffer, dataPtr, 84);
view.setUint32(4, 2, true);
view.setUint8(11, CapturePass.Overlay);
view.setUint32(16, 7, true);
diff --git a/src/esengine/bindings/RendererBindings.cpp b/src/esengine/bindings/RendererBindings.cpp
index 954ecb181..bc12c3809 100644
--- a/src/esengine/bindings/RendererBindings.cpp
+++ b/src/esengine/bindings/RendererBindings.cpp
@@ -1204,6 +1204,16 @@ u32 renderer_getCapturedEntityCount() {
return g_renderFrame->frameCapture().getEntityCount();
}
+uintptr_t renderer_getCapturedTextures() {
+ if (!g_renderFrame) return 0;
+ return reinterpret_cast<uintptr_t>(g_renderFrame->frameCapture().getTextures());
+}
+
+u32 renderer_getCapturedTextureCount() {
+ if (!g_renderFrame) return 0;
+ return g_renderFrame->frameCapture().getTextureCount();
+}
+
u32 renderer_getCapturedPassCount() {
if (!g_renderFrame) return 0;
return g_renderFrame->frameCapture().getPassCount();
diff --git a/src/esengine/bindings/RendererBindings.hpp b/src/esengine/bindings/RendererBindings.hpp
index ebe291cb3..b0af49982 100644
--- a/src/esengine/bindings/RendererBindings.hpp
+++ b/src/esengine/bindings/RendererBindings.hpp
@@ -242,6 +242,8 @@ u32 renderer_getCapturedFrameSize();
uintptr_t renderer_getCapturedFrameData();
uintptr_t renderer_getCapturedEntities();
u32 renderer_getCapturedEntityCount();
+uintptr_t renderer_getCapturedTextures();
+u32 renderer_getCapturedTextureCount();
u32 renderer_getCapturedPassCount();
bool renderer_hasCapturedData();
diff --git a/src/esengine/bindings/WebSDKEntry.cpp b/src/esengine/bindings/WebSDKEntry.cpp
index 654dd11b1..637998fb8 100644
--- a/src/esengine/bindings/WebSDKEntry.cpp
+++ b/src/esengine/bindings/WebSDKEntry.cpp
@@ -768,6 +768,8 @@ EMSCRIPTEN_BINDINGS(esengine_renderer) {
emscripten::function("renderer_getCapturedFrameData", &esengine::renderer_getCapturedFrameData);
emscripten::function("renderer_getCapturedEntities", &esengine::renderer_getCapturedEntities);
emscripten::function("renderer_getCapturedEntityCount", &esengine::renderer_getCapturedEntityCount);
+ emscripten::function("renderer_getCapturedTextures", &esengine::renderer_getCapturedTextures);
+ emscripten::function("renderer_getCapturedTextureCount", &esengine::renderer_getCapturedTextureCount);
emscripten::function("renderer_getCapturedPassCount", &esengine::renderer_getCapturedPassCount);
emscripten::function("renderer_hasCapturedData", &esengine::renderer_hasCapturedData);
emscripten::function("renderer_replayToDrawCall", &esengine::renderer_replayToDrawCall);
diff --git a/src/esengine/renderer/frame/FrameCapture.cpp b/src/esengine/renderer/frame/FrameCapture.cpp
index fa6fc619c..59c615c78 100644
--- a/src/esengine/renderer/frame/FrameCapture.cpp
+++ b/src/esengine/renderer/frame/FrameCapture.cpp
@@ -12,6 +12,7 @@ void FrameCapture::beginFrame() {
capture_next_ = false;
records_.clear();
entities_.clear();
+ textures_.clear();
pass_count_ = 0;
has_data_ = false;
capturing_ = true;
@@ -53,6 +54,8 @@ void FrameCapture::record(const DrawCommand& cmd, std::span<const Entity> entiti
r.stencil_test = (cmd.state_flags & CMD_STATE_STENCIL_TEST) != 0;
r.stencil_ref = cmd.stencil_ref;
r.texture_slot_usage = cmd.texture_count;
+ r.texture_offset = static_cast<u32>(textures_.size());
+ textures_.insert(textures_.end(), cmd.texture_ids, cmd.texture_ids + cmd.texture_count);
r.entity_offset = static_cast<u32>(entities_.size());
r.entity_count = static_cast<u32>(entities.size());
entities_.insert(entities_.end(), entities.begin(), entities.end());
diff --git a/src/esengine/renderer/frame/FrameCapture.hpp b/src/esengine/renderer/frame/FrameCapture.hpp
index 63294e94a..6e3ad2912 100644
--- a/src/esengine/renderer/frame/FrameCapture.hpp
+++ b/src/esengine/renderer/frame/FrameCapture.hpp
@@ -47,12 +47,16 @@ struct DrawCallRecord {
i32 stencil_ref = -1;
u8 texture_slot_usage = 0;
u32 instance_count = 0;
+ /// Where this draw's bound textures start in the capture's texture list;
+ /// texture_slot_usage of them.
+ u32 texture_offset = 0;
};
// The TS decoder (sdk/src/render/frameCapture.ts) reads these offsets.
-static_assert(sizeof(DrawCallRecord) == 80, "DrawCallRecord size must match TS decoder");
+static_assert(sizeof(DrawCallRecord) == 84, "DrawCallRecord size must match TS decoder");
static_assert(offsetof(DrawCallRecord, pass_kind) == 11, "DrawCallRecord layout must match TS decoder");
static_assert(offsetof(DrawCallRecord, instance_count) == 76, "DrawCallRecord layout must match TS decoder");
+static_assert(offsetof(DrawCallRecord, texture_offset) == 80, "DrawCallRecord layout must match TS decoder");
/**
* A capture spans beginFrame to endFrame, so every camera and the overlay land in
@@ -82,6 +86,8 @@ public:
const DrawCallRecord* getRecords() const { return records_.data(); }
const Entity* getEntities() const { return entities_.data(); }
u32 getEntityCount() const { return static_cast<u32>(entities_.size()); }
+ const u32* getTextures() const { return textures_.data(); }
+ u32 getTextureCount() const { return static_cast<u32>(textures_.size()); }
u32 getPassCount() const { return pass_count_; }
/** How many draws the captured frame's pass @p pass made. */
u32 recordsInPass(i32 pass) const;
@@ -95,6 +101,7 @@ public:
private:
std::vector<DrawCallRecord> records_;
std::vector<Entity> entities_;
+ std::vector<u32> textures_;
i32 pass_ = -1;
CapturePass pass_kind_ = CapturePass::Scene;
u32 pass_count_ = 0;
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index c441b0341..4c3750cb2 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -984,6 +984,10 @@ export const NOTED = {
{ note: 'A frame can be captured draw call by draw call, and replayed up to any one of them.' },
'feat(editor): the Frame Debugger panel lists a frame\'s draws, why each started, and replays up to one':
{ note: 'A frame can be captured draw call by draw call, and replayed up to any one of them.' },
+ 'feat(editor): the Frame Debugger names each draw\'s material and every texture it bound':
+ { note: 'A frame can be captured draw call by draw call, and replayed up to any one of them.' },
+ 'feat(render): a frame capture lists every texture a draw bound':
+ { note: 'A frame can be captured draw call by draw call, and replayed up to any one of them.' },
'fix(render): the profiler and the draw-call count cover every camera of the frame':
{ note: 'With more than one camera, the profiler and the draw-call count cover the whole frame.' },
'fix(play): a Play pressed while the engine warms up starts the game once, not again ten seconds later':