Skip to content

Commit aab7a48

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 de7ed44 commit aab7a48

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
@@ -2698,6 +2698,10 @@ export class ThinNativeEngine extends ThinEngine {
26982698
return;
26992699
}
27002700

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

0 commit comments

Comments
 (0)