actually hook up set_frame_interval to FilamentViewer
This commit is contained in:
@@ -31,7 +31,7 @@ extern "C"
|
||||
FLUTTER_PLUGIN_EXPORT void render_ffi(void *const viewer);
|
||||
FLUTTER_PLUGIN_EXPORT FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback);
|
||||
FLUTTER_PLUGIN_EXPORT void set_rendering_ffi(void *const viewer, bool rendering);
|
||||
FLUTTER_PLUGIN_EXPORT void set_frame_interval_ffi(float frameInterval);
|
||||
FLUTTER_PLUGIN_EXPORT void set_frame_interval_ffi(void *const viewer, float frameInterval);
|
||||
FLUTTER_PLUGIN_EXPORT void update_viewport_and_camera_projection_ffi(void *const viewer, const uint32_t width, const uint32_t height, const float scaleFactor, void (*onComplete)());
|
||||
FLUTTER_PLUGIN_EXPORT void set_background_color_ffi(void *const viewer, const float r, const float g, const float b, const float a);
|
||||
FLUTTER_PLUGIN_EXPORT void clear_background_image_ffi(void *const viewer);
|
||||
|
||||
@@ -277,9 +277,12 @@ extern "C"
|
||||
}
|
||||
|
||||
FLUTTER_PLUGIN_EXPORT void
|
||||
set_frame_interval_ffi(float frameIntervalInMilliseconds)
|
||||
set_frame_interval_ffi(void* const viewer, float frameIntervalInMilliseconds)
|
||||
{
|
||||
_rl->setFrameIntervalInMilliseconds(frameIntervalInMilliseconds);
|
||||
std::packaged_task<void()> lambda([=]() mutable
|
||||
{ ((FilamentViewer*)viewer)->setFrameInterval(frameIntervalInMilliseconds); });
|
||||
auto fut = _rl->add_task(lambda);
|
||||
}
|
||||
|
||||
FLUTTER_PLUGIN_EXPORT void render_ffi(void *const viewer)
|
||||
|
||||
Reference in New Issue
Block a user