Skip to content

Commit 56b98ff

Browse files
Native: throw explicit error if old-native lacks updateTextureData
Addresses review: existence-check before calling this._engine.updateTextureData so older native binaries (PROTOCOL_VERSION not bumped) restore the explicit 'updateTextureData not implemented.' error instead of a raw 'is not a function'.
1 parent aef72b9 commit 56b98ff

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/dev/core/src/Engines/thinNativeEngine.pure.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,6 +2829,10 @@ export class ThinNativeEngine extends ThinEngine {
28292829
return;
28302830
}
28312831

2832+
if (!this._engine.updateTextureData) {
2833+
throw new Error("updateTextureData not implemented.");
2834+
}
2835+
28322836
// bgfx updates the requested sub-rectangle of the existing texture (faceIndex selects the cube
28332837
// face / array layer, lod selects the mip level). invertY is forwarded so the native side can match
28342838
// the vertical orientation the base texture upload uses. Mip regeneration after a partial update is

0 commit comments

Comments
 (0)