add android option to pause rendering

This commit is contained in:
Nick Fisher
2022-09-01 15:19:29 +10:00
parent 7dd9ed971f
commit d9470912ed
3 changed files with 84 additions and 40 deletions

View File

@@ -11,6 +11,8 @@ abstract class FilamentController {
Future initialize();
Future createTextureViewer(int width, int height, { double devicePixelRatio = 1});
Future setFrameRate(int framerate);
Future setRendering(bool render);
Future resize(int width, int height, { double devicePixelRatio = 1, double contentScaleFactor=1});
Future setBackgroundImage(String path);
Future loadSkybox(String skyboxPath);
@@ -86,6 +88,10 @@ class PolyvoxFilamentController extends FilamentController {
return _initialized.future;
}
Future setRendering(bool render) async {
await _channel.invokeMethod("setRendering", render);
}
Future setFrameRate(int framerate) async {
await _channel.invokeMethod("setFrameInterval", 1/ framerate);
}