Commit 373db14
[Native] Report engine.name "Native" and implement updateTextureData
The native engine inherited engine.name === "WebGL" from ThinEngine, so code
that guards WebGL-only _gl access with �ngine.name === "WebGL" ran on the
native engine and dereferenced the null _gl context (e.g. TEXTURE_2D undefined).
updateTextureData also threw "not implemented".
- Report a distinct engine name ("Native"), mirroring how the WebGPU engine
reports "WebGPU", so name-gated WebGL-only code paths skip the native engine.
- Implement updateTextureData: forward the sub-rectangle (plus invertY, so the
native side can match the base texture's vertical orientation) to the native
engine. generateMipMaps is ignored (mip regeneration after a partial update is
not supported on Native).
Pairs with the BabylonNative change adding NativeEngine::UpdateTextureData.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4ada000 commit 373db14
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
2662 | 2666 | | |
2663 | 2667 | | |
2664 | 2668 | | |
2665 | | - | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
2666 | 2678 | | |
2667 | 2679 | | |
2668 | 2680 | | |
| |||
0 commit comments