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.
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.