separate out RenderLoop/FilamentViewer construction/destruction

This commit is contained in:
Nick Fisher
2025-03-07 18:53:36 +08:00
parent be61d5e5ca
commit aa26f4d0df
7 changed files with 125 additions and 68 deletions

View File

@@ -49,9 +49,10 @@ extern "C"
viewer->destroyRenderTarget(renderTarget);
}
EMSCRIPTEN_KEEPALIVE void Viewer_destroy(TViewer *viewer)
EMSCRIPTEN_KEEPALIVE void Viewer_destroy(TViewer *tViewer)
{
delete ((FilamentViewer *)viewer);
auto *viewer = reinterpret_cast<FilamentViewer*>(tViewer);
delete viewer;
}
EMSCRIPTEN_KEEPALIVE void set_background_color(TViewer *viewer, const float r, const float g, const float b, const float a)