use flush() instead of directly calling executeRenderThread (wasm) or flushAndWait (native)

This commit is contained in:
Nick Fisher
2025-05-22 15:18:19 +08:00
parent c712804bb1
commit 10136c8cde

View File

@@ -558,13 +558,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
Renderer_endFrameRenderThread(renderer, requestId, cb);
});
if (FILAMENT_SINGLE_THREADED) {
await withVoidCallback(
(requestId, cb) => Engine_executeRenderThread(engine, requestId, cb));
} else {
await withVoidCallback((requestId, cb) =>
Engine_flushAndWaitRenderThread(engine, requestId, cb));
}
await flush();
}
///