call render thread method for asyncBeginLoad

This commit is contained in:
Nick Fisher
2025-04-16 18:00:06 +08:00
parent f272410803
commit e7092c416b

View File

@@ -794,7 +794,8 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
cb)); cb));
} }
if (loadResourcesAsync) { 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"); throw Exception("Failed to begin async loading");
} }
GltfResourceLoader_asyncUpdateLoad(gltfResourceLoader); GltfResourceLoader_asyncUpdateLoad(gltfResourceLoader);