Incremental Mainloop + TextureWriter don't wait for rendering to finish

Hi, I was playing around with writing image sequences to disk and had the feeling something was off (by a frame). I changed this patch by joreg to display the current frame number in the written texture which proved there was something weird going on.

sequence-0001.png should show 0001, but shows 0000 (the frame before that after a fresh reset)
sequence-0002.png shows 0001 instead of 0002, and so on.

0001.png


0002.png

ImageSequenceWriter.vl (47.1 KB)

indeed, thanks for pointing this out. the TextureWriter got an according fix.

hey @readme unfortunately we had to revert this change: from vvvv gamma > 6.6 on the behavior will back to the behaviour of < 6.6

the reason is this follow-up issue that we oversaw when we made this change.

as to why we get the delay: the writer always writes the current texture, but the current texture is holding last frames content, since “render” takes place after “update”. so if you need file numbering in sync with numbers you show in the rendering, you’d have to manually account for that delay.