feat(graphics): add in-place texture pixel updates (updateTexture)

This commit is contained in:
西风逍遥游 committed 2026-08-22 23:47:33 +08:00
1 parent 934c887684
commit 5c3a4e2c0d
5 files changed
+37 -4

No files matched your search

+10
View File
@@ -1812,6 +1812,16 @@ bool Graphics::releaseTexture(Texture *texture) {
return true;
}
bool Graphics::updateTexture(Texture *texture, int width, int height,
const uint8_t *rgba) {
// WebGPU backend keeps texture images immutable; rebuild via newTexture.
(void)texture;
(void)width;
(void)height;
(void)rgba;
return false;
}
GpuTexture *Graphics::gpuForTexture(Texture *t) const {
return t ? static_cast<GpuTexture *>(t->gpuHandle) : nullptr;
}