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.



ImageSequenceWriter.vl (47.1 KB)

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