create material for texture baking

textures can now be created manually and are no longer tracked by SceneManager (and therefore require manual tracking/disposal)
This commit is contained in:
Nick Fisher
2025-03-04 14:52:48 +08:00
parent 5dca42c3c1
commit fc7f5d7b93
27 changed files with 528 additions and 571 deletions

View File

@@ -244,6 +244,12 @@ namespace thermion
return reinterpret_cast<TTexture *>(texture);
}
EMSCRIPTEN_KEEPALIVE void Engine_destroyTexture(TEngine *tEngine, TTexture *tTexture) {
auto *engine = reinterpret_cast<Engine *>(tEngine);
auto *texture = reinterpret_cast<Texture *>(tTexture);
engine->destroy(texture);
}
#ifdef __cplusplus
}
}