captureNextImage usage

Hi, I’m trying to make a video from several sub windows in my app so need the capture image first and turn them into a video through ffmpeg, it works fine when I do it like this(glWindow stands for a vtkOpenGLWindow instance from a sub window):

await glWindow1.captureNextImage()
await glWindow2.captureNextImage()

But when I try to improve:

await Promise.allSettled([

Only one capture will be a fulfilled promise, others will remain pending (they are captures on different window ).
I was wondering which part goes wrong or how should I improve the capture speed.

Thanks in advance

You will need to trigger a render on both windows in order for captureNextImage to work.

Thank you Forrest, I did do render() in each window but it did not work, I’ve found the reason in the code of captureImages() in renderWindow, after pushing these renders into a task queue with setTimeout(() => render(), 0) it worked.