internal: expose View_getRenderTarget and set (Dart) FFIView.renderTarget property on construction

This commit is contained in:
Nick Fisher
2024-12-18 08:42:53 +08:00
parent dc690bb93a
commit b158062ce8
3 changed files with 20 additions and 2 deletions

View File

@@ -35,6 +35,12 @@ using namespace filament;
view->setViewport({0, 0, width, height});
}
EMSCRIPTEN_KEEPALIVE TRenderTarget *View_getRenderTarget(TView *tView) {
auto view = reinterpret_cast<View *>(tView);
auto tRenderTarget = reinterpret_cast<TRenderTarget *>(view->getRenderTarget());
return tRenderTarget;
}
EMSCRIPTEN_KEEPALIVE void View_setRenderTarget(TView *tView, TRenderTarget *tRenderTarget)
{
auto view = reinterpret_cast<View *>(tView);