From e7092c416bc787a999262a43874be16c95d9e72d Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Wed, 16 Apr 2025 18:00:06 +0800 Subject: [PATCH] call render thread method for asyncBeginLoad --- thermion_dart/lib/src/viewer/src/ffi/src/ffi_filament_app.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thermion_dart/lib/src/viewer/src/ffi/src/ffi_filament_app.dart b/thermion_dart/lib/src/viewer/src/ffi/src/ffi_filament_app.dart index 32b95f97..dd1e6401 100644 --- a/thermion_dart/lib/src/viewer/src/ffi/src/ffi_filament_app.dart +++ b/thermion_dart/lib/src/viewer/src/ffi/src/ffi_filament_app.dart @@ -794,7 +794,8 @@ class FFIFilamentApp extends FilamentApp { cb)); } if (loadResourcesAsync) { - if(!GltfResourceLoader_asyncBeginLoad(gltfResourceLoader, filamentAsset)) { + final result = await withBoolCallback((cb) => GltfResourceLoader_asyncBeginLoadRenderThread(gltfResourceLoader, filamentAsset, cb)); + if(!result) { throw Exception("Failed to begin async loading"); } GltfResourceLoader_asyncUpdateLoad(gltfResourceLoader);