ThermionViewerFFI constructor
ThermionViewerFFI({})
This controller uses platform channels to bridge Dart with the C/C++ code for the Filament API. Setting up the context/texture (since this is platform-specific) and the render ticker are platform-specific; all other methods are passed through by the platform channel to the methods specified in ThermionFlutterApi.h.
Implementation
ThermionViewerFFI(
{RenderCallback? renderCallback,
Pointer<Void>? renderCallbackOwner,
required this.resourceLoader,
Pointer<Void>? driver,
Pointer<Void>? sharedContext,
this.uberArchivePath}) {
this._renderCallbackOwner = renderCallbackOwner ?? nullptr;
this._renderCallback = renderCallback ?? nullptr;
this._driver = driver ?? nullptr;
this._sharedContext = sharedContext ?? nullptr;
try {
_onPickResultCallable =
NativeCallable<Void Function(Int entityId, Int x, Int y)>.listener(
_onPickResult);
} catch (err) {
_logger.severe(
"Failed to set pick result callback. This is expected if running on web/wasm");
}
_initialize();
}