triple buffering

How would I implement triple buffering? (Multiple buffering - Wikipedia)
From a bit of searching, I know that a framebuffer object can be used for a buffer.

Triple buffering implies that one back buffer is always being rendered to, and the other back buffer is done rendering.

I imagine (at least part of) the code looks something like:


while true
    render to bufferA
    swap bufferA and bufferB

How does the swap with the front buffer happen? If you look at File:Comparison double triple buffering.svg - Wikipedia , the copying (i.e. swap with front) happens at the same time asthe rendering. Is multithreading required?

I think it is best to leave that to the hardware. Common Mistakes - OpenGL Wiki
The user can enable it through the control panel (nvidia or amd)

[QUOTE=V-man;1241525]I think it is best to leave that to the hardware. Common Mistakes - OpenGL Wiki
The user can enable it through the control panel (nvidia or amd)[/QUOTE]

If it is enabled, what would a program that takes advantage of triple buffering roughly look like?

If it is not enabled, how would one implement it using FBO’s?