View Full Version : sync to vertical blank with single-buffered window

08-01-2011, 07:04 AM
why would anyone want to use single-buffered window?

sometimes one needs to render the scene in FBOs: they provide freedom to dynamically combine different color/depth/stencil buffers (the default frame buffer does not allow this). Also this way the rendered scene can be available as a texture to be used for post-precessing effects and such.

when the scene is ready in a FBO, one just need to copy it to the window. double-buffering is not useful here - it would only consume video memory and adds one more copying (if SwapBuffers is unable to flip the buffers like in windowed mode).

It would be useful if the gl could be instructed to do glBlitFramebuffer to a window at the next vertical blank.

Please add a command (e.g. *WaitForVerticalBlank) that causes the next *SwapBuffers or glBlitFramebuffer to a window to wait for the vertical blank.
Or extend *_EXT_swap_control to have the same effect on glBlitFramebuffer to a window as on *SwapBuffers.

08-01-2011, 07:46 AM

What I would need the most from this is access to the buffers of the current framebuffer. This is already supported by D3D.