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?