add option to record to PNGs (inc background threadpool for encoding)
This commit is contained in:
@@ -53,6 +53,7 @@ class ExampleWidgetState extends State<ExampleWidget> {
|
||||
// these are all the options that can be set via the menu
|
||||
// we store them here
|
||||
static bool rendering = false;
|
||||
static bool recording = false;
|
||||
static int framerate = 60;
|
||||
static bool postProcessing = true;
|
||||
static bool frustumCulling = true;
|
||||
|
||||
@@ -38,7 +38,7 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
||||
widget.controller.setFrameRate(ExampleWidgetState.framerate);
|
||||
},
|
||||
child: Text(
|
||||
"Toggle framerate (currently $ExampleWidgetState.framerate) "),
|
||||
"Toggle framerate (currently ${ExampleWidgetState.framerate}) "),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
@@ -56,6 +56,14 @@ class _RenderingSubmenuState extends State<RenderingSubmenu> {
|
||||
child: Text(
|
||||
"${ExampleWidgetState.postProcessing ? "Disable" : "Enable"} postprocessing"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () {
|
||||
ExampleWidgetState.recording = !ExampleWidgetState.recording;
|
||||
widget.controller.setRecording(ExampleWidgetState.recording);
|
||||
},
|
||||
child: Text(
|
||||
"Turn recording ${ExampleWidgetState.recording ? "OFF" : "ON"}) "),
|
||||
),
|
||||
],
|
||||
child: const Text("Rendering"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user