Windows embedder fixes
This commit is contained in:
@@ -142,6 +142,17 @@ external void Viewer_setViewRenderable(
|
||||
bool renderable,
|
||||
);
|
||||
|
||||
@ffi.Native<
|
||||
ffi.Void Function(ffi.Pointer<TViewer>, ffi.Pointer<ffi.Char>, ffi.Float,
|
||||
ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(isLeaf: true)
|
||||
external void Viewer_loadIblRenderThread(
|
||||
ffi.Pointer<TViewer> viewer,
|
||||
ffi.Pointer<ffi.Char> iblPath,
|
||||
double intensity,
|
||||
ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
|
||||
);
|
||||
|
||||
|
||||
@ffi.Native<
|
||||
ffi.Void Function(
|
||||
ffi.Pointer<TViewer>,
|
||||
|
||||
@@ -360,7 +360,12 @@ class ThermionViewerFFI extends ThermionViewer {
|
||||
Future loadIbl(String lightingPath, {double intensity = 30000}) async {
|
||||
final pathPtr =
|
||||
lightingPath.toNativeUtf8(allocator: allocator).cast<Char>();
|
||||
load_ibl(_viewer!, pathPtr, intensity);
|
||||
|
||||
await withVoidCallback((cb) {
|
||||
Viewer_loadIblRenderThread(_viewer!, pathPtr, intensity, cb);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user