saveScreen after frame rendering is finished

Hi there,

I’m trying to do a frame-by-frame screen capture and noticed a difference between calling saveFrame/Image() during the draw() function vs. during keyPressed(). I’m assuming this is because there is some housekeeping done inbetween, such as glFlush() and other routines at the end of the render pipeline.

This might not make a difference for most people, but in my case it does. (I’m using a stereo rendering plugin (moreStereo3D) that hooks into the OpenGL DLL to do some post-draw-transformations.) Only the saveFrame() called from keyPressed() gives me the intended result.

The question is now: Is there a way to record every frame, but in the moment when the rendering pipeline is completely finished?
Unfortunately there is no postDraw() or similar event that I could hook into. Or is there?


  • andré

i guess doing it as the first thing in update should have the same effect as doing it in keyPressed

Thanks, I think you’re right. :smile:

I hacked a “postDraw” event into oF, calling it at the very end of ofAppGLFWindow::draw() and it creates the same result as when calling it at the beginning of update().

The reason I didn’t notice before, even though I tried that, is of course a tiny little bug in a different place…